@syncfusion/ej2-inputs 21.2.8 → 22.1.34

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 (173) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +37 -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 +144 -96
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +146 -99
  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 +5 -1
  16. package/src/form-validator/form-validator.js +21 -3
  17. package/src/input/input.js +16 -10
  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.d.ts +31 -65
  23. package/src/slider/slider.js +69 -50
  24. package/src/textbox/textbox.js +3 -5
  25. package/src/uploader/uploader-model.d.ts +2 -1
  26. package/src/uploader/uploader.d.ts +2 -1
  27. package/src/uploader/uploader.js +2 -10
  28. package/styles/bootstrap-dark.css +22 -3
  29. package/styles/bootstrap.css +22 -3
  30. package/styles/bootstrap4.css +22 -4
  31. package/styles/bootstrap5-dark.css +22 -3
  32. package/styles/bootstrap5.css +22 -3
  33. package/styles/color-picker/_layout.scss +49 -5
  34. package/styles/color-picker/_material3-dark-definition.scss +1 -0
  35. package/styles/color-picker/_material3-definition.scss +141 -0
  36. package/styles/color-picker/_theme.scss +6 -1
  37. package/styles/color-picker/fluent-dark.css +1 -0
  38. package/styles/color-picker/fluent.css +1 -0
  39. package/styles/color-picker/icons/_material3-dark.scss +1 -0
  40. package/styles/color-picker/material3-dark.css +880 -0
  41. package/styles/color-picker/material3-dark.scss +12 -0
  42. package/styles/color-picker/material3.css +936 -0
  43. package/styles/color-picker/material3.scss +12 -0
  44. package/styles/fabric-dark.css +22 -3
  45. package/styles/fabric.css +22 -3
  46. package/styles/fluent-dark.css +23 -3
  47. package/styles/fluent.css +23 -3
  48. package/styles/highcontrast-light.css +22 -3
  49. package/styles/highcontrast.css +22 -3
  50. package/styles/input/_layout.scss +268 -107
  51. package/styles/input/_material3-dark-definition.scss +1 -0
  52. package/styles/input/_material3-definition.scss +548 -0
  53. package/styles/input/_theme.scss +3 -2
  54. package/styles/input/bootstrap-dark.css +14 -1
  55. package/styles/input/bootstrap.css +14 -1
  56. package/styles/input/bootstrap4.css +14 -1
  57. package/styles/input/bootstrap5-dark.css +14 -1
  58. package/styles/input/bootstrap5.css +14 -1
  59. package/styles/input/fabric-dark.css +14 -1
  60. package/styles/input/fabric.css +14 -1
  61. package/styles/input/fluent-dark.css +14 -1
  62. package/styles/input/fluent.css +14 -1
  63. package/styles/input/highcontrast-light.css +14 -1
  64. package/styles/input/highcontrast.css +14 -1
  65. package/styles/input/icons/_material3-dark.scss +1 -0
  66. package/styles/input/material-dark.css +92 -64
  67. package/styles/input/material.css +92 -64
  68. package/styles/input/material3-dark.css +12357 -0
  69. package/styles/input/material3-dark.scss +5 -0
  70. package/styles/input/material3.css +12413 -0
  71. package/styles/input/material3.scss +5 -0
  72. package/styles/input/tailwind-dark.css +14 -1
  73. package/styles/input/tailwind.css +14 -1
  74. package/styles/maskedtextbox/_material3-dark-definition.scss +1 -0
  75. package/styles/maskedtextbox/_material3-definition.scss +4 -0
  76. package/styles/maskedtextbox/material3-dark.css +104 -0
  77. package/styles/maskedtextbox/material3-dark.scss +5 -0
  78. package/styles/maskedtextbox/material3.css +160 -0
  79. package/styles/maskedtextbox/material3.scss +5 -0
  80. package/styles/material-dark.css +102 -66
  81. package/styles/material.css +102 -66
  82. package/styles/material3-dark.css +15119 -0
  83. package/styles/material3-dark.scss +11 -0
  84. package/styles/material3.css +15175 -0
  85. package/styles/material3.scss +11 -0
  86. package/styles/numerictextbox/_material3-dark-definition.scss +1 -0
  87. package/styles/numerictextbox/_material3-definition.scss +4 -0
  88. package/styles/numerictextbox/icons/_material3-dark.scss +1 -0
  89. package/styles/numerictextbox/material3-dark.css +118 -0
  90. package/styles/numerictextbox/material3-dark.scss +6 -0
  91. package/styles/numerictextbox/material3.css +174 -0
  92. package/styles/numerictextbox/material3.scss +6 -0
  93. package/styles/rating/_bootstrap-dark-definition.scss +4 -3
  94. package/styles/rating/_bootstrap-definition.scss +4 -3
  95. package/styles/rating/_bootstrap4-definition.scss +4 -3
  96. package/styles/rating/_bootstrap5-definition.scss +4 -0
  97. package/styles/rating/_fabric-dark-definition.scss +4 -3
  98. package/styles/rating/_fabric-definition.scss +4 -3
  99. package/styles/rating/_fluent-definition.scss +4 -0
  100. package/styles/rating/_fusionnew-definition.scss +4 -3
  101. package/styles/rating/_highcontrast-definition.scss +4 -3
  102. package/styles/rating/_highcontrast-light-definition.scss +4 -3
  103. package/styles/rating/_layout.scss +2 -0
  104. package/styles/rating/_material-dark-definition.scss +4 -3
  105. package/styles/rating/_material-definition.scss +4 -3
  106. package/styles/rating/_material3-dark-definition.scss +1 -0
  107. package/styles/rating/_material3-definition.scss +47 -0
  108. package/styles/rating/_tailwind-definition.scss +4 -0
  109. package/styles/rating/_theme.scss +36 -14
  110. package/styles/rating/bootstrap-dark.css +8 -2
  111. package/styles/rating/bootstrap.css +8 -2
  112. package/styles/rating/bootstrap4.css +8 -3
  113. package/styles/rating/bootstrap5-dark.css +8 -2
  114. package/styles/rating/bootstrap5.css +8 -2
  115. package/styles/rating/fabric-dark.css +8 -2
  116. package/styles/rating/fabric.css +8 -2
  117. package/styles/rating/fluent-dark.css +8 -2
  118. package/styles/rating/fluent.css +8 -2
  119. package/styles/rating/highcontrast-light.css +8 -2
  120. package/styles/rating/highcontrast.css +8 -2
  121. package/styles/rating/material-dark.css +8 -2
  122. package/styles/rating/material.css +8 -2
  123. package/styles/rating/material3-dark.css +340 -0
  124. package/styles/rating/material3-dark.scss +5 -0
  125. package/styles/rating/material3.css +396 -0
  126. package/styles/rating/material3.scss +5 -0
  127. package/styles/rating/tailwind-dark.css +8 -2
  128. package/styles/rating/tailwind.css +8 -2
  129. package/styles/signature/_material3-dark-definition.scss +1 -0
  130. package/styles/signature/_material3-definition.scss +3 -0
  131. package/styles/signature/material3-dark.css +65 -0
  132. package/styles/signature/material3-dark.scss +4 -0
  133. package/styles/signature/material3.css +121 -0
  134. package/styles/signature/material3.scss +4 -0
  135. package/styles/slider/_layout.scss +60 -15
  136. package/styles/slider/_material3-dark-definition.scss +1 -0
  137. package/styles/slider/_material3-definition.scss +97 -0
  138. package/styles/slider/_theme.scss +11 -2
  139. package/styles/slider/material-dark.css +2 -0
  140. package/styles/slider/material.css +2 -0
  141. package/styles/slider/material3-dark.css +765 -0
  142. package/styles/slider/material3-dark.scss +6 -0
  143. package/styles/slider/material3.css +821 -0
  144. package/styles/slider/material3.scss +6 -0
  145. package/styles/tailwind-dark.css +22 -3
  146. package/styles/tailwind.css +22 -3
  147. package/styles/textbox/_bootstrap-dark-definition.scss +3 -0
  148. package/styles/textbox/_bootstrap-definition.scss +3 -0
  149. package/styles/textbox/_bootstrap4-definition.scss +3 -0
  150. package/styles/textbox/_bootstrap5-definition.scss +3 -0
  151. package/styles/textbox/_fabric-dark-definition.scss +3 -0
  152. package/styles/textbox/_fabric-definition.scss +3 -0
  153. package/styles/textbox/_fluent-definition.scss +3 -0
  154. package/styles/textbox/_fusionnew-definition.scss +3 -0
  155. package/styles/textbox/_highcontrast-definition.scss +3 -0
  156. package/styles/textbox/_highcontrast-light-definition.scss +3 -0
  157. package/styles/textbox/_layout.scss +27 -0
  158. package/styles/textbox/_material-dark-definition.scss +3 -0
  159. package/styles/textbox/_material-definition.scss +3 -0
  160. package/styles/textbox/_material3-dark-definition.scss +1 -0
  161. package/styles/textbox/_material3-definition.scss +4 -0
  162. package/styles/textbox/_tailwind-definition.scss +3 -0
  163. package/styles/textbox/material3-dark.css +72 -0
  164. package/styles/textbox/material3-dark.scss +5 -0
  165. package/styles/textbox/material3.css +128 -0
  166. package/styles/textbox/material3.scss +5 -0
  167. package/styles/uploader/_material3-dark-definition.scss +1 -0
  168. package/styles/uploader/_material3-definition.scss +215 -0
  169. package/styles/uploader/icons/_material3-dark.scss +1 -0
  170. package/styles/uploader/material3-dark.css +861 -0
  171. package/styles/uploader/material3-dark.scss +7 -0
  172. package/styles/uploader/material3.css +917 -0
  173. 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);
@@ -300,7 +304,7 @@ var Input;
300
304
  }
301
305
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
302
306
  function wireClearBtnEvents(element, button, container) {
303
- if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
307
+ if (isBindClearAction === undefined || isBindClearAction) {
304
308
  button.addEventListener('click', function (event) {
305
309
  if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
306
310
  event.preventDefault();
@@ -381,7 +385,9 @@ var Input;
381
385
  */
382
386
  function setValue$$1(value, element, floatLabelType, clearButton) {
383
387
  element.value = value;
384
- calculateWidth(element, element.parentElement);
388
+ if (floatLabelType === 'Auto' && value === '') {
389
+ calculateWidth(element, element.parentElement);
390
+ }
385
391
  if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
386
392
  validateLabel(element, floatLabelType);
387
393
  }
@@ -1958,8 +1964,12 @@ var NumericTextBox = /** @__PURE__ @class */ (function (_super) {
1958
1964
  event.stopPropagation();
1959
1965
  clearInterval(this.timeOut);
1960
1966
  this.isCalled = false;
1961
- EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1962
- EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1967
+ if (this.spinUp) {
1968
+ EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1969
+ }
1970
+ if (this.spinDown) {
1971
+ EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1972
+ }
1963
1973
  };
1964
1974
  /**
1965
1975
  * Increments the NumericTextBox value with the specified step value.
@@ -4400,13 +4410,15 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4400
4410
  Slider.prototype.getThemeInitialization = function () {
4401
4411
  this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
4402
4412
  || this.getTheme(this.sliderContainer) === 'material-dark';
4413
+ this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
4414
+ || this.getTheme(this.sliderContainer) === 'Material3-dark';
4403
4415
  this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
4404
4416
  || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
4405
4417
  this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
4406
4418
  this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
4407
4419
  this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
4408
4420
  this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
4409
- this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
4421
+ this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
4410
4422
  };
4411
4423
  Slider.prototype.createRangeBar = function () {
4412
4424
  if (this.type !== 'Default') {
@@ -4560,7 +4572,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4560
4572
  if (this.type !== 'Default') {
4561
4573
  this.rangeBar.style.transition = 'none';
4562
4574
  }
4563
- if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
4575
+ if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
4564
4576
  this.tooltipElement.style.transition = this.transition.handle;
4565
4577
  }
4566
4578
  this.tooltipToggle(this.getHandle());
@@ -4607,9 +4619,6 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
4607
4619
  }
4608
4620
  };
4609
4621
  Slider.prototype.setHandler = function () {
4610
- if (this.min > this.max) {
4611
- this.min = this.max;
4612
- }
4613
4622
  this.createFirstHandle();
4614
4623
  if (this.type === 'Range') {
4615
4624
  this.createSecondHandle();
@@ -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
  }
@@ -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))) {
@@ -9120,7 +9167,7 @@ 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
  }
@@ -9175,22 +9222,13 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9175
9222
  Uploader.prototype.updateSortedFileList = function (filesData) {
9176
9223
  var previousListClone = this.createElement('div', { id: 'clonewrapper' });
9177
9224
  var added = -1;
9178
- var removedList;
9179
9225
  if (this.listParent) {
9180
9226
  for (var i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
9181
9227
  var liElement = this.listParent.querySelectorAll('li')[i];
9182
9228
  previousListClone.appendChild(liElement.cloneNode(true));
9183
9229
  }
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
9230
  this.removeActionButtons();
9190
9231
  var oldList = [].slice.call(previousListClone.childNodes);
9191
- detach(this.listParent);
9192
- this.listParent = null;
9193
- this.fileList = [];
9194
9232
  this.createParentUL();
9195
9233
  for (var index = 0; index < filesData.length; index++) {
9196
9234
  for (var j = 0; j < this.filesData.length; j++) {
@@ -10030,7 +10068,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
10030
10068
  Uploader.prototype.templateComplier = function (uploadTemplate) {
10031
10069
  if (uploadTemplate) {
10032
10070
  try {
10033
- if (selectAll(uploadTemplate, document).length) {
10071
+ if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
10034
10072
  return compile(select(uploadTemplate, document).innerHTML.trim());
10035
10073
  }
10036
10074
  else {
@@ -11657,7 +11695,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
11657
11695
  hsvContainer.appendChild(this.createElement('div', { className: HSVAREA }));
11658
11696
  var dragHandler = this.createElement('span', { className: HANDLER, attrs: { 'tabindex': '0' } });
11659
11697
  hsvContainer.appendChild(dragHandler);
11660
- if (this.value === null) {
11698
+ if (this.value === null || this.value === '') {
11661
11699
  this.value = '#008000ff';
11662
11700
  }
11663
11701
  this.rgb = this.hexToRgb(this.value);
@@ -13008,6 +13046,10 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
13008
13046
  preview.style.backgroundColor = this.convertToRgbString(this.hexToRgb(newProp.value));
13009
13047
  }
13010
13048
  }
13049
+ else if (this.noColor && this.mode === 'Palette' && this.value === '') {
13050
+ var preview = this.splitBtn && select('.' + SPLITPREVIEW, this.splitBtn.element);
13051
+ preview.style.backgroundColor = '';
13052
+ }
13011
13053
  else {
13012
13054
  this.value = oldProp.value;
13013
13055
  }
@@ -13323,10 +13365,8 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13323
13365
  }
13324
13366
  break;
13325
13367
  case 'showClearButton':
13326
- if (this.respectiveElement.tagName !== 'TEXTAREA') {
13327
- Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13328
- this.bindClearEvent();
13329
- }
13368
+ Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13369
+ this.bindClearEvent();
13330
13370
  break;
13331
13371
  case 'enableRtl':
13332
13372
  Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
@@ -13712,7 +13752,7 @@ var TextBox = /** @__PURE__ @class */ (function (_super) {
13712
13752
  }
13713
13753
  };
13714
13754
  TextBox.prototype.bindClearEvent = function () {
13715
- if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
13755
+ if (this.showClearButton) {
13716
13756
  if (this.enabled) {
13717
13757
  EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
13718
13758
  }
@@ -15281,8 +15321,8 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15281
15321
  return;
15282
15322
  }
15283
15323
  var previousValue = this.currentValue;
15284
- this.updateCurrentValue(currValue);
15285
15324
  this.triggerChange(e, currValue);
15325
+ this.updateCurrentValue(currValue);
15286
15326
  if (this.showTooltip) {
15287
15327
  if (element) {
15288
15328
  if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
@@ -15326,11 +15366,11 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15326
15366
  }
15327
15367
  if (this.fullTemplate && val === 1) {
15328
15368
  spanEle.classList.add(FULLTEMPLATE);
15329
- spanEle.append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
15369
+ append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
15330
15370
  }
15331
15371
  else if (this.emptyTemplate) {
15332
15372
  spanEle.classList.add(EMPTYTEMPLATE);
15333
- spanEle.append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate)[0]);
15373
+ append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
15334
15374
  }
15335
15375
  else {
15336
15376
  addClass([spanEle], ICONCSS.split(' '));
@@ -15340,7 +15380,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15340
15380
  spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
15341
15381
  removeClass([spanEle], ICONCSS.split(' '));
15342
15382
  if (spanEle.firstChild) {
15343
- spanEle.removeChild(spanEle.firstChild);
15383
+ spanEle.innerHTML = '';
15344
15384
  }
15345
15385
  };
15346
15386
  Rating.prototype.updateTooltip = function () {
@@ -15425,7 +15465,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15425
15465
  }
15426
15466
  this.removeItemContent(spanEle);
15427
15467
  spanEle.classList.add(FULLTEMPLATE);
15428
- spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate)[0]);
15468
+ append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
15429
15469
  }
15430
15470
  else if (this.emptyTemplate) {
15431
15471
  if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
@@ -15433,7 +15473,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15433
15473
  }
15434
15474
  this.removeItemContent(spanEle);
15435
15475
  spanEle.classList.add(EMPTYTEMPLATE);
15436
- spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate)[0]);
15476
+ append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
15437
15477
  }
15438
15478
  else {
15439
15479
  this.removeItemContent(spanEle);
@@ -15445,25 +15485,32 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15445
15485
  if (this.isReact) {
15446
15486
  this.clearTemplate(['ratingTooltipTemplate']);
15447
15487
  }
15448
- var content = void 0;
15488
+ var content_1;
15449
15489
  if (this.tooltipTemplate) {
15490
+ content_1 = this.createElement('span', { className: 'e-rating-tooltip-content' });
15450
15491
  var templateFunction = this.getTemplateString(this.tooltipTemplate);
15451
- content = templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate)[0];
15492
+ append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content_1);
15493
+ this.tooltipObj.setProperties({ content: content_1 }, isChange);
15452
15494
  }
15453
15495
  else {
15454
- content = this.currentValue.toString();
15496
+ content_1 = this.currentValue.toString();
15497
+ this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content_1; }) }, isChange);
15455
15498
  }
15456
- this.tooltipObj.setProperties({ content: content }, isChange);
15457
15499
  this.renderReactTemplates();
15458
15500
  }
15459
15501
  };
15460
15502
  Rating.prototype.getTemplateString = function (template) {
15461
15503
  var stringContent = '';
15462
15504
  try {
15463
- var tempEle = select(template);
15464
- if (tempEle) {
15465
- //Return innerHTML incase of jsrenderer script else outerHTML
15466
- stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15505
+ if (typeof template !== 'function') {
15506
+ var tempEle = select(template);
15507
+ if (tempEle) {
15508
+ //Return innerHTML incase of jsrenderer script else outerHTML
15509
+ stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15510
+ }
15511
+ else {
15512
+ stringContent = template;
15513
+ }
15467
15514
  }
15468
15515
  else {
15469
15516
  stringContent = template;
@@ -15494,10 +15541,10 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15494
15541
  this.clearTemplate(['ratingLabelTemplate']);
15495
15542
  }
15496
15543
  if (this.spanLabel.firstChild) {
15497
- this.spanLabel.removeChild(this.spanLabel.firstChild);
15544
+ this.spanLabel.innerHTML = '';
15498
15545
  }
15499
15546
  var templateFunction = this.getTemplateString(this.labelTemplate);
15500
- this.spanLabel.append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate)[0]);
15547
+ append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
15501
15548
  this.renderReactTemplates();
15502
15549
  }
15503
15550
  else {
@@ -15585,7 +15632,7 @@ var Rating = /** @__PURE__ @class */ (function (_super) {
15585
15632
  if (this.showTooltip) {
15586
15633
  if (!this.tooltipOpen) {
15587
15634
  this.updateTooltipContent(false);
15588
- this.tooltipObj.open(element); //eslint-disable-line
15635
+ this.tooltipObj.open(element);
15589
15636
  this.tooltipOpen = true;
15590
15637
  }
15591
15638
  else if (isChange) {