@syncfusion/ej2-inputs 21.2.9 → 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 +22 -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 +142 -109
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +144 -112
  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 +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 (let i = 0; i < args.buttons.length; i++) {
64
64
  inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container, makeElement));
65
65
  }
@@ -82,9 +82,11 @@ var Input;
82
82
  || parent.classList.contains('e-filled')) {
83
83
  parent.classList.add('e-input-focus');
84
84
  }
85
- setTimeout(() => {
86
- Input.calculateWidth(args.element, parent);
87
- }, 80);
85
+ if (args.floatLabelType === 'Auto') {
86
+ setTimeout(() => {
87
+ Input.calculateWidth(args.element, parent);
88
+ }, 80);
89
+ }
88
90
  });
89
91
  args.element.addEventListener('blur', function () {
90
92
  const parent = getParentNode(this);
@@ -92,9 +94,11 @@ var Input;
92
94
  || parent.classList.contains('e-filled')) {
93
95
  parent.classList.remove('e-input-focus');
94
96
  }
95
- setTimeout(() => {
96
- Input.calculateWidth(args.element, parent);
97
- }, 80);
97
+ if (args.floatLabelType === 'Auto' && args.element.value === '') {
98
+ setTimeout(() => {
99
+ Input.calculateWidth(args.element, parent);
100
+ }, 80);
101
+ }
98
102
  });
99
103
  args.element.addEventListener('input', () => {
100
104
  checkInputValue(floatType, args.element);
@@ -298,7 +302,7 @@ var Input;
298
302
  }
299
303
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
300
304
  function wireClearBtnEvents(element, button, container) {
301
- if (!isNullOrUndefined(button) && (isBindClearAction === undefined || isBindClearAction)) {
305
+ if (isBindClearAction === undefined || isBindClearAction) {
302
306
  button.addEventListener('click', (event) => {
303
307
  if (!(element.classList.contains(CLASSNAMES.DISABLE) || element.readOnly)) {
304
308
  event.preventDefault();
@@ -379,7 +383,9 @@ var Input;
379
383
  */
380
384
  function setValue$$1(value, element, floatLabelType, clearButton) {
381
385
  element.value = value;
382
- calculateWidth(element, element.parentElement);
386
+ if (floatLabelType === 'Auto' && value === '') {
387
+ calculateWidth(element, element.parentElement);
388
+ }
383
389
  if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
384
390
  validateLabel(element, floatLabelType);
385
391
  }
@@ -1928,8 +1934,12 @@ let NumericTextBox = class NumericTextBox extends Component {
1928
1934
  event.stopPropagation();
1929
1935
  clearInterval(this.timeOut);
1930
1936
  this.isCalled = false;
1931
- EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1932
- EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1937
+ if (this.spinUp) {
1938
+ EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);
1939
+ }
1940
+ if (this.spinDown) {
1941
+ EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);
1942
+ }
1933
1943
  }
1934
1944
  /**
1935
1945
  * Increments the NumericTextBox value with the specified step value.
@@ -4303,13 +4313,15 @@ let Slider = class Slider extends Component {
4303
4313
  getThemeInitialization() {
4304
4314
  this.isMaterial = this.getTheme(this.sliderContainer) === 'material'
4305
4315
  || this.getTheme(this.sliderContainer) === 'material-dark';
4316
+ this.isMaterial3 = this.getTheme(this.sliderContainer) === 'Material3'
4317
+ || this.getTheme(this.sliderContainer) === 'Material3-dark';
4306
4318
  this.isBootstrap = this.getTheme(this.sliderContainer) === 'bootstrap'
4307
4319
  || this.getTheme(this.sliderContainer) === 'bootstrap-dark';
4308
4320
  this.isBootstrap4 = this.getTheme(this.sliderContainer) === 'bootstrap4';
4309
4321
  this.isTailwind = this.getTheme(this.sliderContainer) === 'tailwind' || this.getTheme(this.sliderContainer) === 'tailwind-dark';
4310
4322
  this.isBootstrap5 = this.getTheme(this.sliderContainer) === 'bootstrap5';
4311
4323
  this.isFluent = this.getTheme(this.sliderContainer) === 'FluentUI';
4312
- this.isMaterialTooltip = this.isMaterial && this.type !== 'Range' && this.tooltip.isVisible;
4324
+ this.isMaterialTooltip = (this.isMaterial || this.isMaterial3) && this.type !== 'Range' && this.tooltip.isVisible;
4313
4325
  }
4314
4326
  createRangeBar() {
4315
4327
  if (this.type !== 'Default') {
@@ -4462,7 +4474,7 @@ let Slider = class Slider extends Component {
4462
4474
  if (this.type !== 'Default') {
4463
4475
  this.rangeBar.style.transition = 'none';
4464
4476
  }
4465
- if (this.isMaterial && this.tooltip.isVisible && this.type === 'Default') {
4477
+ if ((this.isMaterial || this.isMaterial3) && this.tooltip.isVisible && this.type === 'Default') {
4466
4478
  this.tooltipElement.style.transition = this.transition.handle;
4467
4479
  }
4468
4480
  this.tooltipToggle(this.getHandle());
@@ -4509,9 +4521,6 @@ let Slider = class Slider extends Component {
4509
4521
  }
4510
4522
  }
4511
4523
  setHandler() {
4512
- if (this.min > this.max) {
4513
- this.min = this.max;
4514
- }
4515
4524
  this.createFirstHandle();
4516
4525
  if (this.type === 'Range') {
4517
4526
  this.createSecondHandle();
@@ -4661,7 +4670,7 @@ let Slider = class Slider extends Component {
4661
4670
  }
4662
4671
  }
4663
4672
  tooltipCollision(position) {
4664
- if (this.isBootstrap || this.isBootstrap4 || (this.isMaterial && !this.isMaterialTooltip)) {
4673
+ if (this.isBootstrap || this.isBootstrap4 || ((this.isMaterial || this.isMaterial3) && !this.isMaterialTooltip)) {
4665
4674
  const tooltipOffsetValue = this.isBootstrap4 ? bootstrap4TooltipOffset : bootstrapTooltipOffset;
4666
4675
  switch (position) {
4667
4676
  case 'TopCenter':
@@ -4799,9 +4808,9 @@ let Slider = class Slider extends Component {
4799
4808
  }
4800
4809
  renderTooltip() {
4801
4810
  this.tooltipObj = new Tooltip({
4802
- showTipPointer: this.isBootstrap || this.isMaterial || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4811
+ showTipPointer: this.isBootstrap || this.isMaterial || this.isMaterial3 || this.isBootstrap4 || this.isTailwind || this.isBootstrap5 || this.isFluent,
4803
4812
  cssClass: classNames.sliderTooltip,
4804
- height: this.isMaterial ? 30 : 'auto',
4813
+ height: (this.isMaterial || this.isMaterial3) ? 30 : 'auto',
4805
4814
  animation: { open: { effect: 'None' }, close: { effect: 'FadeOut', duration: 500 } },
4806
4815
  opensOn: 'Custom',
4807
4816
  beforeOpen: this.tooltipBeforeOpen.bind(this),
@@ -4861,7 +4870,7 @@ let Slider = class Slider extends Component {
4861
4870
  attributes(enabledRTL ? this.firstBtn : this.secondBtn, { 'aria-label': incrementTitle, title: incrementTitle });
4862
4871
  }
4863
4872
  buttonFocusOut() {
4864
- if (this.isMaterial) {
4873
+ if (this.isMaterial || this.isMaterial3) {
4865
4874
  this.getHandle().classList.remove('e-large-thumb-size');
4866
4875
  }
4867
4876
  }
@@ -5038,7 +5047,12 @@ let Slider = class Slider extends Component {
5038
5047
  start = this.makeRoundNumber(start + smallStep, decimalPoints);
5039
5048
  }
5040
5049
  else {
5041
- start = this.makeRoundNumber(start - smallStep, decimalPoints);
5050
+ if (this.min > this.max) {
5051
+ start = this.makeRoundNumber(start + smallStep, decimalPoints);
5052
+ }
5053
+ else {
5054
+ start = this.makeRoundNumber(start - smallStep, decimalPoints);
5055
+ }
5042
5056
  }
5043
5057
  left = this.makeRoundNumber(left + smallStep, decimalPoints);
5044
5058
  }
@@ -5279,16 +5293,16 @@ let Slider = class Slider extends Component {
5279
5293
  (value = this.add(hVal, parseFloat(this.ticks.largeStep.toString()), false));
5280
5294
  }
5281
5295
  else if ((args.keyCode === 36)) {
5282
- value = parseFloat(this.min.toString());
5296
+ value = parseFloat(this.min < this.max ? this.min.toString() : this.max.toString());
5283
5297
  }
5284
5298
  else if ((args.keyCode === 35)) {
5285
- value = parseFloat(this.max.toString());
5299
+ value = parseFloat(this.min < this.max ? this.max.toString() : this.min.toString());
5286
5300
  }
5287
5301
  if (this.limits.enabled) {
5288
5302
  value = this.getLimitCorrectedValues(value);
5289
5303
  }
5290
5304
  this.changeHandleValue(value);
5291
- if (this.isMaterial && !this.tooltip.isVisible &&
5305
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
5292
5306
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
5293
5307
  this.materialChange();
5294
5308
  }
@@ -5337,12 +5351,12 @@ let Slider = class Slider extends Component {
5337
5351
  }
5338
5352
  else {
5339
5353
  if (this.type === 'MinRange') {
5340
- this.rangeBar.style.bottom = '0px';
5341
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5354
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5355
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5342
5356
  }
5343
5357
  else {
5344
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5345
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5358
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5359
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5346
5360
  }
5347
5361
  }
5348
5362
  }
@@ -5363,8 +5377,8 @@ let Slider = class Slider extends Component {
5363
5377
  }
5364
5378
  }
5365
5379
  else {
5366
- this.limitBarFirst.style.bottom = fromMinPostion + 'px';
5367
- this.limitBarFirst.style.height = (fromMaxpostion - fromMinPostion) + 'px';
5380
+ this.limitBarFirst.style.bottom = (this.min < this.max ? fromMinPostion : fromMaxpostion) + 'px';
5381
+ this.limitBarFirst.style.height = (this.min < this.max ? (fromMaxpostion - fromMinPostion) : (fromMinPostion - fromMaxpostion)) + 'px';
5368
5382
  }
5369
5383
  if (this.type === 'Range') {
5370
5384
  if (this.orientation === 'Horizontal') {
@@ -5378,8 +5392,8 @@ let Slider = class Slider extends Component {
5378
5392
  }
5379
5393
  }
5380
5394
  else {
5381
- this.limitBarSecond.style.bottom = toMinPostion + 'px';
5382
- this.limitBarSecond.style.height = (toMaxpostion - toMinPostion) + 'px';
5395
+ this.limitBarSecond.style.bottom = (this.min < this.max ? toMinPostion : toMaxpostion) + 'px';
5396
+ this.limitBarSecond.style.height = (this.min < this.max ? (toMaxpostion - toMinPostion) : (toMinPostion - toMaxpostion)) + 'px';
5383
5397
  }
5384
5398
  }
5385
5399
  }
@@ -5405,13 +5419,13 @@ let Slider = class Slider extends Component {
5405
5419
  }
5406
5420
  getLimitValueAndPosition(currentValue, minValue, maxValue, limitBar) {
5407
5421
  if (isNullOrUndefined(minValue)) {
5408
- minValue = this.min;
5422
+ minValue = this.min < this.max ? this.min : this.max;
5409
5423
  if (isNullOrUndefined(currentValue) && limitBar) {
5410
5424
  currentValue = minValue;
5411
5425
  }
5412
5426
  }
5413
5427
  if (isNullOrUndefined(maxValue)) {
5414
- maxValue = this.max;
5428
+ maxValue = this.min < this.max ? this.max : this.min;
5415
5429
  if (isNullOrUndefined(currentValue) && limitBar) {
5416
5430
  currentValue = maxValue;
5417
5431
  }
@@ -5593,10 +5607,14 @@ let Slider = class Slider extends Component {
5593
5607
  }
5594
5608
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5595
5609
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5596
- if (this.handlePos1 > this.handlePos2) {
5610
+ if (this.min < this.max && this.handlePos1 > this.handlePos2) {
5597
5611
  this.handlePos1 = this.handlePos2;
5598
5612
  this.handleVal1 = this.handleVal2;
5599
5613
  }
5614
+ if (this.min > this.max && this.handlePos1 < this.handlePos2) {
5615
+ this.handlePos2 = this.handlePos1;
5616
+ this.handleVal2 = this.handleVal1;
5617
+ }
5600
5618
  this.preHandlePos1 = this.handlePos1;
5601
5619
  this.preHandlePos2 = this.handlePos2;
5602
5620
  if (this.limits.enabled) {
@@ -5633,9 +5651,6 @@ let Slider = class Slider extends Component {
5633
5651
  return pos;
5634
5652
  }
5635
5653
  checkHandleValue(value) {
5636
- if (this.min > this.max) {
5637
- this.min = this.max;
5638
- }
5639
5654
  if (this.min === this.max) {
5640
5655
  return (parseFloat(formatUnit(this.max)));
5641
5656
  }
@@ -5695,13 +5710,13 @@ let Slider = class Slider extends Component {
5695
5710
  this.materialHandle.style.bottom = `${this.handlePos1}px`;
5696
5711
  }
5697
5712
  if (this.type === 'MinRange') {
5698
- this.rangeBar.style.bottom = '0px';
5699
- setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
5713
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
5714
+ setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
5700
5715
  }
5701
5716
  else if (this.type === 'Range') {
5702
5717
  this.secondHandle.style.bottom = `${this.handlePos2}px`;
5703
- this.rangeBar.style.bottom = this.handlePos1 + 'px';
5704
- setStyleAttribute(this.rangeBar, { 'height': this.handlePos2 - this.handlePos1 + 'px' });
5718
+ this.rangeBar.style.bottom = this.min > this.max ? this.handlePos2 + 'px' : this.handlePos1 + 'px';
5719
+ setStyleAttribute(this.rangeBar, { 'height': this.min > this.max ? this.handlePos1 - this.handlePos2 + 'px' : this.handlePos2 - this.handlePos1 + 'px' });
5705
5720
  }
5706
5721
  }
5707
5722
  if (this.limits.enabled) {
@@ -5730,7 +5745,7 @@ let Slider = class Slider extends Component {
5730
5745
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
5731
5746
  this.handleVal1 = this.checkHandleValue(value);
5732
5747
  this.handlePos1 = this.checkHandlePosition(this.handleVal1);
5733
- if (this.type === 'Range' && this.handlePos1 > this.handlePos2) {
5748
+ if (this.type === 'Range' && ((this.handlePos1 > this.handlePos2 && this.min < this.max) || (this.handlePos1 < this.handlePos2 && this.min > this.max))) {
5734
5749
  this.handlePos1 = this.handlePos2;
5735
5750
  this.handleVal1 = this.handleVal2;
5736
5751
  }
@@ -5744,7 +5759,7 @@ let Slider = class Slider extends Component {
5744
5759
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5745
5760
  this.handleVal2 = this.checkHandleValue(value);
5746
5761
  this.handlePos2 = this.checkHandlePosition(this.handleVal2);
5747
- if (this.type === 'Range' && this.handlePos2 < this.handlePos1) {
5762
+ if (this.type === 'Range' && ((this.handlePos2 < this.handlePos1 && this.min < this.max) || (this.handlePos2 > this.handlePos1 && this.min > this.max))) {
5748
5763
  this.handlePos2 = this.handlePos1;
5749
5764
  this.handleVal2 = this.handleVal1;
5750
5765
  }
@@ -5862,7 +5877,7 @@ let Slider = class Slider extends Component {
5862
5877
  }
5863
5878
  let handlepos = this.xyToPosition(pos);
5864
5879
  let handleVal = this.positionToValue(handlepos);
5865
- if (this.type === 'Range' && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1)) {
5880
+ if (this.type === 'Range' && (this.min < (this.max) && (this.handlePos2 - handlepos) < (handlepos - this.handlePos1) || (this.min > this.max) && (this.handlePos1 - handlepos) > (handlepos - this.handlePos2))) {
5866
5881
  this.activeHandle = 2;
5867
5882
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
5868
5883
  if (this.limits.enabled) {
@@ -5906,7 +5921,7 @@ let Slider = class Slider extends Component {
5906
5921
  behindElement = document.elementFromPoint(eventX, eventY);
5907
5922
  }
5908
5923
  if (evt.target === handle && behindElement != handle) {
5909
- if (this.isMaterial && !this.tooltip.isVisible &&
5924
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
5910
5925
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
5911
5926
  this.materialChange();
5912
5927
  }
@@ -5917,7 +5932,7 @@ let Slider = class Slider extends Component {
5917
5932
  if (!this.checkRepeatedValue(handleVal)) {
5918
5933
  return;
5919
5934
  }
5920
- let transition = this.isMaterial && this.tooltip.isVisible ?
5935
+ let transition = (this.isMaterial || this.isMaterial3) && this.tooltip.isVisible ?
5921
5936
  this.transitionOnMaterialTooltip : this.transition;
5922
5937
  this.getHandle().style.transition = transition.handle;
5923
5938
  if (this.type !== 'Default') {
@@ -5968,16 +5983,28 @@ let Slider = class Slider extends Component {
5968
5983
  else {
5969
5984
  pos = { x: xPostion + this.secondPartRemain, y: yPostion + this.secondPartRemain };
5970
5985
  }
5971
- this.handlePos1 = this.xyToPosition(pos);
5972
- this.handleVal1 = this.positionToValue(this.handlePos1);
5986
+ if (this.min > this.max) {
5987
+ this.handlePos2 = this.xyToPosition(pos);
5988
+ this.handleVal2 = this.positionToValue(this.handlePos2);
5989
+ }
5990
+ else {
5991
+ this.handlePos1 = this.xyToPosition(pos);
5992
+ this.handleVal1 = this.positionToValue(this.handlePos1);
5993
+ }
5973
5994
  if (!this.enableRtl) {
5974
5995
  pos = { x: xPostion + this.secondPartRemain, y: yPostion - this.firstPartRemain };
5975
5996
  }
5976
5997
  else {
5977
5998
  pos = { x: xPostion - this.firstPartRemain, y: yPostion - this.firstPartRemain };
5978
5999
  }
5979
- this.handlePos2 = this.xyToPosition(pos);
5980
- this.handleVal2 = this.positionToValue(this.handlePos2);
6000
+ if (this.min > this.max) {
6001
+ this.handlePos1 = this.xyToPosition(pos);
6002
+ this.handleVal1 = this.positionToValue(this.handlePos1);
6003
+ }
6004
+ else {
6005
+ this.handlePos2 = this.xyToPosition(pos);
6006
+ this.handleVal2 = this.positionToValue(this.handlePos2);
6007
+ }
5981
6008
  if (this.limits.enabled) {
5982
6009
  let value = this.getLimitValueAndPosition(this.handleVal1, this.limits.minStart, this.limits.minEnd);
5983
6010
  this.handleVal1 = value[0];
@@ -5998,11 +6025,11 @@ let Slider = class Slider extends Component {
5998
6025
  this.handleValueAdjust(this.handleVal2, this.limits.maxEnd, 2);
5999
6026
  }
6000
6027
  }
6001
- if (this.handleVal2 === this.max) {
6002
- this.handleValueAdjust(this.handleVal2, this.max, 2);
6028
+ if (this.handleVal2 === (this.min > this.max ? this.min : this.max)) {
6029
+ this.handleValueAdjust(this.handleVal2, (this.min > this.max ? this.min : this.max), 2);
6003
6030
  }
6004
- if (this.handleVal1 === this.min) {
6005
- this.handleValueAdjust(this.handleVal1, this.min, 1);
6031
+ if (this.handleVal1 === (this.min > this.max ? this.max : this.min)) {
6032
+ this.handleValueAdjust(this.handleVal1, (this.min > this.max ? this.max : this.min), 1);
6006
6033
  }
6007
6034
  }
6008
6035
  this.activeHandle = 1;
@@ -6021,7 +6048,7 @@ let Slider = class Slider extends Component {
6021
6048
  this.secondHandle.classList.remove(classNames.sliderActiveHandle);
6022
6049
  }
6023
6050
  this.closeTooltip();
6024
- if (this.isMaterial) {
6051
+ if (this.isMaterial || this.isMaterial3) {
6025
6052
  this.getHandle().classList.remove('e-large-thumb-size');
6026
6053
  if (this.isMaterialTooltip) {
6027
6054
  this.tooltipElement.classList.remove(classNames.materialTooltipActive);
@@ -6060,7 +6087,7 @@ let Slider = class Slider extends Component {
6060
6087
  if (this.activeHandle === 1) {
6061
6088
  this.firstHandle.classList.add(classNames.sliderActiveHandle);
6062
6089
  if (!(this.limits.enabled && this.limits.startHandleFixed)) {
6063
- if (handlepos > this.handlePos2) {
6090
+ if ((this.min < this.max && handlepos > this.handlePos2 || (this.min > this.max && handlepos < this.handlePos2))) {
6064
6091
  handlepos = this.handlePos2;
6065
6092
  handleVal = this.handleVal2;
6066
6093
  }
@@ -6079,7 +6106,7 @@ let Slider = class Slider extends Component {
6079
6106
  else if (this.activeHandle === 2) {
6080
6107
  this.secondHandle.classList.add(classNames.sliderActiveHandle);
6081
6108
  if (!(this.limits.enabled && this.limits.endHandleFixed)) {
6082
- if (handlepos < this.handlePos1) {
6109
+ if ((this.min < this.max && handlepos < this.handlePos1) || (this.min > this.max && handlepos > this.handlePos1)) {
6083
6110
  handlepos = this.handlePos1;
6084
6111
  handleVal = this.handleVal1;
6085
6112
  }
@@ -6104,7 +6131,7 @@ let Slider = class Slider extends Component {
6104
6131
  this.rangeBar.style.transition = 'none';
6105
6132
  }
6106
6133
  this.setHandlePosition(evt);
6107
- if (this.isMaterial && !this.tooltip.isVisible &&
6134
+ if ((this.isMaterial || this.isMaterial3) && !this.tooltip.isVisible &&
6108
6135
  !this.getHandle().classList.contains(classNames.sliderTabHandle)) {
6109
6136
  this.materialChange();
6110
6137
  }
@@ -6542,7 +6569,9 @@ let Slider = class Slider extends Component {
6542
6569
  case 'tooltip':
6543
6570
  if (!isNullOrUndefined(newProp.tooltip) && !isNullOrUndefined(oldProp.tooltip)) {
6544
6571
  this.setTooltip(prop);
6545
- this.wireEvents();
6572
+ if (!this.showButtons) {
6573
+ this.wireEvents();
6574
+ }
6546
6575
  }
6547
6576
  break;
6548
6577
  case 'type':
@@ -6659,7 +6688,7 @@ let Slider = class Slider extends Component {
6659
6688
  this.ul.style.zIndex = (this.zIndex + -7) + '';
6660
6689
  this.element.style.zIndex = (this.zIndex + 2) + '';
6661
6690
  }
6662
- if (!this.isMaterial && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6691
+ if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
6663
6692
  this.element.style.zIndex = (this.zIndex + 2) + '';
6664
6693
  }
6665
6694
  this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
@@ -7450,7 +7479,17 @@ let FormValidator = FormValidator_1 = class FormValidator extends Base {
7450
7479
  this.customPlacement.call(this, this.inputElement, errorElement);
7451
7480
  }
7452
7481
  else {
7453
- this.inputElement.parentNode.insertBefore(errorElement, this.inputElement.nextSibling);
7482
+ const inputParent = this.inputElement.parentElement;
7483
+ const grandParent = inputParent.parentElement;
7484
+ if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {
7485
+ grandParent.insertBefore(errorElement, inputParent.nextSibling);
7486
+ }
7487
+ else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {
7488
+ grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);
7489
+ }
7490
+ else {
7491
+ inputParent.insertBefore(errorElement, this.inputElement.nextSibling);
7492
+ }
7454
7493
  }
7455
7494
  errorElement.style.display = 'block';
7456
7495
  this.getErrorElement(name);
@@ -7545,7 +7584,15 @@ FormValidator.checkValidator = {
7545
7584
  return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
7546
7585
  },
7547
7586
  date: (option) => {
7548
- return !isNaN(new Date(option.value).getTime());
7587
+ if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {
7588
+ var globalize = new Internationalization;
7589
+ var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };
7590
+ var dateValue = globalize.parseDate(option.value, dateOptions);
7591
+ return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));
7592
+ }
7593
+ else {
7594
+ return !isNaN(new Date(option.value).getTime());
7595
+ }
7549
7596
  },
7550
7597
  max: (option) => {
7551
7598
  if (!isNaN(Number(option.value))) {
@@ -8929,7 +8976,7 @@ let Uploader = class Uploader extends Component {
8929
8976
  const dataFiles = this.allTypes ? eventArgs.modifiedFilesData :
8930
8977
  this.checkExtension(eventArgs.modifiedFilesData);
8931
8978
  this.updateSortedFileList(dataFiles);
8932
- this.filesData = dataFiles;
8979
+ this.filesData = this.filesData.concat(dataFiles);
8933
8980
  if (!this.isForm || this.allowUpload()) {
8934
8981
  this.checkAutoUpload(dataFiles);
8935
8982
  }
@@ -8984,21 +9031,13 @@ let Uploader = class Uploader extends Component {
8984
9031
  updateSortedFileList(filesData) {
8985
9032
  const previousListClone = this.createElement('div', { id: 'clonewrapper' });
8986
9033
  let added = -1;
8987
- let removedList;
8988
9034
  if (this.listParent) {
8989
9035
  for (let i = 0; i < this.listParent.querySelectorAll('li').length; i++) {
8990
9036
  const liElement = this.listParent.querySelectorAll('li')[i];
8991
9037
  previousListClone.appendChild(liElement.cloneNode(true));
8992
9038
  }
8993
- removedList = this.listParent.querySelectorAll('li');
8994
- for (const item of removedList) {
8995
- detach(item);
8996
- }
8997
9039
  this.removeActionButtons();
8998
9040
  const oldList = [].slice.call(previousListClone.childNodes);
8999
- detach(this.listParent);
9000
- this.listParent = null;
9001
- this.fileList = [];
9002
9041
  this.createParentUL();
9003
9042
  for (let index = 0; index < filesData.length; index++) {
9004
9043
  for (let j = 0; j < this.filesData.length; j++) {
@@ -9823,7 +9862,7 @@ let Uploader = class Uploader extends Component {
9823
9862
  templateComplier(uploadTemplate) {
9824
9863
  if (uploadTemplate) {
9825
9864
  try {
9826
- if (selectAll(uploadTemplate, document).length) {
9865
+ if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {
9827
9866
  return compile(select(uploadTemplate, document).innerHTML.trim());
9828
9867
  }
9829
9868
  else {
@@ -12211,23 +12250,12 @@ let ColorPicker = class ColorPicker extends Component {
12211
12250
  }
12212
12251
  paletteKeyDown(e) {
12213
12252
  const target = e.target;
12253
+ if (!target.classList.contains(PALETTES)) {
12254
+ return;
12255
+ }
12214
12256
  let selectedEle;
12215
12257
  let idx;
12216
12258
  const tiles = [].slice.call(selectAll('.' + TILE, target));
12217
- if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && !e.shiftKey)) {
12218
- if (this.modeSwitcher || this.showButtons) {
12219
- this.getPopupEle().querySelector('.e-btn').focus();
12220
- e.preventDefault();
12221
- e.stopPropagation();
12222
- }
12223
- }
12224
- else if ((target.classList.contains('e-palette') || target.classList.contains('e-tile')) && (e.keyCode === 9 && e.shiftKey)) {
12225
- if (this.splitBtn) {
12226
- this.splitBtn.element.focus();
12227
- e.preventDefault();
12228
- e.stopPropagation();
12229
- }
12230
- }
12231
12259
  const prevSelectedEle = (tiles.filter((tile) => tile.classList.contains('e-selected'))).pop();
12232
12260
  switch (!e.altKey && e.keyCode) {
12233
12261
  case 39:
@@ -13064,10 +13092,8 @@ let TextBox = class TextBox extends Component {
13064
13092
  }
13065
13093
  break;
13066
13094
  case 'showClearButton':
13067
- if (this.respectiveElement.tagName !== 'TEXTAREA') {
13068
- Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13069
- this.bindClearEvent();
13070
- }
13095
+ Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);
13096
+ this.bindClearEvent();
13071
13097
  break;
13072
13098
  case 'enableRtl':
13073
13099
  Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);
@@ -13450,7 +13476,7 @@ let TextBox = class TextBox extends Component {
13450
13476
  }
13451
13477
  }
13452
13478
  bindClearEvent() {
13453
- if (this.showClearButton && this.respectiveElement.tagName !== 'TEXTAREA') {
13479
+ if (this.showClearButton) {
13454
13480
  if (this.enabled) {
13455
13481
  EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);
13456
13482
  }
@@ -14966,8 +14992,8 @@ let Rating = class Rating extends Component {
14966
14992
  return;
14967
14993
  }
14968
14994
  const previousValue = this.currentValue;
14969
- this.updateCurrentValue(currValue);
14970
14995
  this.triggerChange(e, currValue);
14996
+ this.updateCurrentValue(currValue);
14971
14997
  if (this.showTooltip) {
14972
14998
  if (element) {
14973
14999
  if (Math.ceil(currValue) !== Math.ceil(previousValue)) {
@@ -15010,11 +15036,11 @@ let Rating = class Rating extends Component {
15010
15036
  }
15011
15037
  if (this.fullTemplate && val === 1) {
15012
15038
  spanEle.classList.add(FULLTEMPLATE);
15013
- spanEle.append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
15039
+ append(this.fullTemplateFunction({ index: index, ratingValue: val }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate), spanEle);
15014
15040
  }
15015
15041
  else if (this.emptyTemplate) {
15016
15042
  spanEle.classList.add(EMPTYTEMPLATE);
15017
- spanEle.append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate)[0]);
15043
+ append(this.emptyTemplateFunction({ index: index, ratingValue: val }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate'), this.isStringTemplate), spanEle);
15018
15044
  }
15019
15045
  else {
15020
15046
  addClass([spanEle], ICONCSS.split(' '));
@@ -15024,7 +15050,7 @@ let Rating = class Rating extends Component {
15024
15050
  spanEle.classList.remove(FULLTEMPLATE, EMPTYTEMPLATE);
15025
15051
  removeClass([spanEle], ICONCSS.split(' '));
15026
15052
  if (spanEle.firstChild) {
15027
- spanEle.removeChild(spanEle.firstChild);
15053
+ spanEle.innerHTML = '';
15028
15054
  }
15029
15055
  }
15030
15056
  updateTooltip() {
@@ -15108,7 +15134,7 @@ let Rating = class Rating extends Component {
15108
15134
  }
15109
15135
  this.removeItemContent(spanEle);
15110
15136
  spanEle.classList.add(FULLTEMPLATE);
15111
- spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate)[0]);
15137
+ append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate), spanEle);
15112
15138
  }
15113
15139
  else if (this.emptyTemplate) {
15114
15140
  if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
@@ -15116,7 +15142,7 @@ let Rating = class Rating extends Component {
15116
15142
  }
15117
15143
  this.removeItemContent(spanEle);
15118
15144
  spanEle.classList.add(EMPTYTEMPLATE);
15119
- spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate)[0]);
15145
+ append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate), spanEle);
15120
15146
  }
15121
15147
  else {
15122
15148
  this.removeItemContent(spanEle);
@@ -15130,23 +15156,30 @@ let Rating = class Rating extends Component {
15130
15156
  }
15131
15157
  let content;
15132
15158
  if (this.tooltipTemplate) {
15159
+ content = this.createElement('span', { className: 'e-rating-tooltip-content' });
15133
15160
  const templateFunction = this.getTemplateString(this.tooltipTemplate);
15134
- content = templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate)[0];
15161
+ append(templateFunction({ value: this.currentValue }, this, 'ratingTooltipTemplate', (this.element.id + 'tooltipTemplate'), this.isStringTemplate), content);
15162
+ this.tooltipObj.setProperties({ content: content }, isChange);
15135
15163
  }
15136
15164
  else {
15137
15165
  content = this.currentValue.toString();
15166
+ this.tooltipObj.setProperties({ content: initializeCSPTemplate(function () { return content; }) }, isChange);
15138
15167
  }
15139
- this.tooltipObj.setProperties({ content: content }, isChange);
15140
15168
  this.renderReactTemplates();
15141
15169
  }
15142
15170
  }
15143
15171
  getTemplateString(template) {
15144
15172
  let stringContent = '';
15145
15173
  try {
15146
- const tempEle = select(template);
15147
- if (tempEle) {
15148
- //Return innerHTML incase of jsrenderer script else outerHTML
15149
- stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15174
+ if (typeof template !== 'function') {
15175
+ const tempEle = select(template);
15176
+ if (tempEle) {
15177
+ //Return innerHTML incase of jsrenderer script else outerHTML
15178
+ stringContent = tempEle.tagName === 'SCRIPT' ? tempEle.innerHTML : tempEle.outerHTML;
15179
+ }
15180
+ else {
15181
+ stringContent = template;
15182
+ }
15150
15183
  }
15151
15184
  else {
15152
15185
  stringContent = template;
@@ -15177,10 +15210,10 @@ let Rating = class Rating extends Component {
15177
15210
  this.clearTemplate(['ratingLabelTemplate']);
15178
15211
  }
15179
15212
  if (this.spanLabel.firstChild) {
15180
- this.spanLabel.removeChild(this.spanLabel.firstChild);
15213
+ this.spanLabel.innerHTML = '';
15181
15214
  }
15182
15215
  const templateFunction = this.getTemplateString(this.labelTemplate);
15183
- this.spanLabel.append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate)[0]);
15216
+ append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate), this.spanLabel);
15184
15217
  this.renderReactTemplates();
15185
15218
  }
15186
15219
  else {
@@ -15265,7 +15298,7 @@ let Rating = class Rating extends Component {
15265
15298
  if (this.showTooltip) {
15266
15299
  if (!this.tooltipOpen) {
15267
15300
  this.updateTooltipContent(false);
15268
- this.tooltipObj.open(element); //eslint-disable-line
15301
+ this.tooltipObj.open(element);
15269
15302
  this.tooltipOpen = true;
15270
15303
  }
15271
15304
  else if (isChange) {