@syncfusion/ej2-inputs 20.4.52 → 21.1.35

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 (102) hide show
  1. package/CHANGELOG.md +0 -27
  2. package/README.md +196 -119
  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 +168 -120
  7. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  8. package/dist/es6/ej2-inputs.es5.js +162 -114
  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 +10 -10
  14. package/src/color-picker/color-picker.d.ts +6 -1
  15. package/src/color-picker/color-picker.js +21 -4
  16. package/src/common/signature-base.js +6 -3
  17. package/src/form-validator/form-validator.js +23 -21
  18. package/src/input/input.js +10 -10
  19. package/src/maskedtextbox/base/mask-base.js +5 -5
  20. package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +3 -3
  21. package/src/numerictextbox/numerictextbox.js +4 -4
  22. package/src/rating/rating-model.d.ts +33 -11
  23. package/src/rating/rating.d.ts +25 -1
  24. package/src/rating/rating.js +64 -45
  25. package/src/slider/slider-model.d.ts +41 -6
  26. package/src/slider/slider.d.ts +113 -8
  27. package/src/slider/slider.js +8 -3
  28. package/src/textbox/textbox.js +4 -2
  29. package/src/uploader/uploader-model.d.ts +1 -1
  30. package/src/uploader/uploader.js +14 -14
  31. package/styles/bootstrap-dark.css +6 -0
  32. package/styles/bootstrap.css +6 -0
  33. package/styles/bootstrap4.css +6 -0
  34. package/styles/bootstrap5-dark.css +10 -4
  35. package/styles/bootstrap5.css +10 -4
  36. package/styles/color-picker/_layout.scss +78 -6
  37. package/styles/color-picker/_theme.scss +3 -0
  38. package/styles/color-picker/bootstrap-dark.css +6 -0
  39. package/styles/color-picker/bootstrap.css +6 -0
  40. package/styles/color-picker/bootstrap4.css +6 -0
  41. package/styles/color-picker/bootstrap5-dark.css +6 -0
  42. package/styles/color-picker/bootstrap5.css +6 -0
  43. package/styles/color-picker/fabric-dark.css +6 -0
  44. package/styles/color-picker/fabric.css +6 -0
  45. package/styles/color-picker/fluent-dark.css +6 -0
  46. package/styles/color-picker/fluent.css +6 -0
  47. package/styles/color-picker/highcontrast-light.css +6 -0
  48. package/styles/color-picker/highcontrast.css +6 -0
  49. package/styles/color-picker/material-dark.css +6 -0
  50. package/styles/color-picker/material.css +6 -0
  51. package/styles/color-picker/tailwind-dark.css +6 -0
  52. package/styles/color-picker/tailwind.css +6 -0
  53. package/styles/fabric-dark.css +6 -0
  54. package/styles/fabric.css +6 -0
  55. package/styles/fluent-dark.css +6 -0
  56. package/styles/fluent.css +6 -0
  57. package/styles/highcontrast-light.css +6 -0
  58. package/styles/highcontrast.css +6 -0
  59. package/styles/input/_bootstrap5-definition.scss +2 -2
  60. package/styles/input/_fluent-definition.scss +5 -5
  61. package/styles/input/_layout.scss +445 -445
  62. package/styles/input/_tailwind-definition.scss +14 -14
  63. package/styles/input/_theme.scss +218 -199
  64. package/styles/input/material-dark.css +1 -1
  65. package/styles/input/material.css +1 -1
  66. package/styles/maskedtextbox/_bootstrap5-definition.scss +2 -2
  67. package/styles/maskedtextbox/_fluent-definition.scss +2 -2
  68. package/styles/material-dark.css +7 -5
  69. package/styles/material.css +7 -1
  70. package/styles/numerictextbox/icons/_material3.scss +3 -3
  71. package/styles/rating/_bootstrap5-definition.scss +12 -15
  72. package/styles/rating/_fluent-definition.scss +12 -15
  73. package/styles/rating/_tailwind-definition.scss +12 -15
  74. package/styles/rating/_theme.scss +14 -2
  75. package/styles/rating/tailwind-dark.css +1 -1
  76. package/styles/rating/tailwind.css +1 -1
  77. package/styles/slider/_layout.scss +44 -25
  78. package/styles/slider/_theme.scss +6 -1
  79. package/styles/tailwind-dark.css +8 -2
  80. package/styles/tailwind.css +8 -2
  81. package/styles/uploader/_bootstrap5-definition.scss +12 -12
  82. package/styles/uploader/_fluent-definition.scss +10 -10
  83. package/styles/uploader/_layout.scss +7 -2
  84. package/styles/uploader/_tailwind-definition.scss +10 -10
  85. package/styles/uploader/_theme.scss +13 -3
  86. package/styles/uploader/bootstrap5-dark.css +4 -4
  87. package/styles/uploader/bootstrap5.css +4 -4
  88. package/styles/uploader/material-dark.css +0 -4
  89. package/styles/uploader/tailwind-dark.css +1 -1
  90. package/styles/uploader/tailwind.css +1 -1
  91. package/GitLeaksReport.json +0 -42
  92. package/gitleaks-ci/gitleaks +0 -0
  93. package/gitleaks-ci.tar.gz +0 -0
  94. package/styles/color-picker/_material3-definition.scss +0 -133
  95. package/styles/input/_material3-definition.scss +0 -336
  96. package/styles/maskedtextbox/_material3-definition.scss +0 -7
  97. package/styles/numerictextbox/_material3-definition.scss +0 -3
  98. package/styles/rating/_material3-definition.scss +0 -46
  99. package/styles/signature/_material3-definition.scss +0 -3
  100. package/styles/slider/_material3-definition.scss +0 -90
  101. package/styles/textbox/_material3-definition.scss +0 -1
  102. package/styles/uploader/_material3-definition.scss +0 -216
@@ -113,6 +113,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
113
113
  * Defines whether to show or hide the reset button in a rating component.
114
114
  * When set to "true", the reset button will be visible to the user, and they will be able to click it to reset the rating value to its default value.
115
115
  *
116
+ * {% codeBlock src='rating/allowReset/index.md' %}{% endcodeBlock %}
117
+ *
116
118
  * @default false
117
119
  */
118
120
  allowReset: boolean;
@@ -155,6 +157,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
155
157
  /**
156
158
  * Defines the template that defines the appearance of each rated item in a rating component.
157
159
  *
160
+ * {% codeBlock src='rating/fullTemplate/index.md' %}{% endcodeBlock %}
161
+ *
158
162
  * @default ''
159
163
  */
160
164
  fullTemplate: string;
@@ -175,6 +179,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
175
179
  * * Left
176
180
  * * Right
177
181
  *
182
+ * {% codeBlock src='rating/labelPosition/index.md' %}{% endcodeBlock %}
183
+ *
178
184
  * @isenumeration true
179
185
  * @default LabelPosition.Right
180
186
  * @asptype LabelPosition
@@ -183,6 +189,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
183
189
  /**
184
190
  * Defines the template that used as label over default label of the rating. The current value of rating passed as context to build the content.
185
191
  *
192
+ * {% codeBlock src='rating/labelTemplate/index.md' %}{% endcodeBlock %}
193
+ *
186
194
  * @default ''
187
195
  */
188
196
  labelTemplate: string;
@@ -204,6 +212,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
204
212
  * * Quarter
205
213
  * * Exact
206
214
  *
215
+ * {% codeBlock src='rating/precision/index.md' %}{% endcodeBlock %}
216
+ *
207
217
  * @isenumeration true
208
218
  * @default PrecisionType.Full
209
219
  * @asptype PrecisionType
@@ -220,6 +230,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
220
230
  * Defines a value that specifies whether to display a label that shows the current value of a rating.
221
231
  * When set to "true", a label will be displayed that shows the current value of the rating; otherwise false.
222
232
  *
233
+ * {% codeBlock src='rating/showLabel/index.md' %}{% endcodeBlock %}
234
+ *
223
235
  * @default false
224
236
  */
225
237
  showLabel: boolean;
@@ -234,6 +246,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
234
246
  * Defines the template that used as tooltip content over default tooltip content of the rating.
235
247
  * The current value of rating passed as context to build the content.
236
248
  *
249
+ * {% codeBlock src='rating/tooltipTemplate/index.md' %}{% endcodeBlock %}
250
+ *
237
251
  * @default ''
238
252
  */
239
253
  tooltipTemplate: string;
@@ -243,6 +257,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
243
257
  * The "value" is a decimal value that ranges from the minimum value to the items count,
244
258
  * as specified by the "min" and "itemsCount" properties of the rating.
245
259
  *
260
+ * {% codeBlock src='rating/value/index.md' %}{% endcodeBlock %}
261
+ *
246
262
  * @default 0.0
247
263
  * @aspType double
248
264
  */
@@ -257,6 +273,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
257
273
  /**
258
274
  * Event callback that is raised before rendering each item.
259
275
  *
276
+ * {% codeBlock src='rating/beforeItemRenderEvent/index.md' %}{% endcodeBlock %}
277
+ *
260
278
  * @event beforeItemRender
261
279
  */
262
280
  beforeItemRender: EmitType<RatingItemEventArgs>;
@@ -269,12 +287,16 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
269
287
  /**
270
288
  * Event callback that is raised when a user hovers over an item.
271
289
  *
290
+ * {% codeBlock src='rating/onItemHoverEvent/index.md' %}{% endcodeBlock %}
291
+ *
272
292
  * @event onItemHover
273
293
  */
274
294
  onItemHover: EmitType<RatingHoverEventArgs>;
275
295
  /**
276
296
  * Event callback that is raised when the value is changed.
277
297
  *
298
+ * {% codeBlock src='rating/valueChangedEvent/index.md' %}{% endcodeBlock %}
299
+ *
278
300
  * @event valueChanged
279
301
  */
280
302
  valueChanged: EmitType<RatingChangedEventArgs>;
@@ -290,6 +312,7 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
290
312
  private emptyTemplateFunction;
291
313
  private fullTemplateFunction;
292
314
  private tooltipOpen;
315
+ private isReact?;
293
316
  /**
294
317
  * Constructor for creating the widget
295
318
  *
@@ -311,7 +334,6 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
311
334
  private removeItemContent;
312
335
  private updateTooltip;
313
336
  private updateMinValue;
314
- private updatePrecision;
315
337
  private validateValue;
316
338
  private getRatingValue;
317
339
  private updateItemValue;
@@ -336,6 +358,8 @@ export declare class Rating extends Component<HTMLElement> implements INotifyPro
336
358
  /**
337
359
  * Reset’s the value to minimum.
338
360
  *
361
+ * {% codeBlock src='rating/reset/index.md' %}{% endcodeBlock %}
362
+ *
339
363
  * @returns {void}
340
364
  */
341
365
  reset(): void;
@@ -106,7 +106,6 @@ var Rating = /** @class */ (function (_super) {
106
106
  function Rating(options, element) {
107
107
  var _this = _super.call(this, options, element) || this;
108
108
  _this.itemElements = [];
109
- _this.tooltipOpen = false;
110
109
  return _this;
111
110
  }
112
111
  Rating.prototype.preRender = function () {
@@ -120,13 +119,14 @@ var Rating = /** @class */ (function (_super) {
120
119
  uparrow: 'uparrow',
121
120
  space: 'space'
122
121
  };
122
+ this.tooltipOpen = false;
123
123
  };
124
124
  Rating.prototype.render = function () {
125
125
  this.initialize();
126
126
  this.updateMinValue();
127
127
  this.updateTemplateFunction();
128
+ this.triggerChange(null, this.value, false);
128
129
  this.renderItems();
129
- this.updatePrecision();
130
130
  this.displayLabel();
131
131
  };
132
132
  Rating.prototype.initialize = function () {
@@ -139,36 +139,42 @@ var Rating = /** @class */ (function (_super) {
139
139
  attributes(this.element, { 'aria-label': 'rating' });
140
140
  this.renderItemList();
141
141
  this.updateReset();
142
- this.updateDisabled();
143
- this.wrapper.classList[this.readOnly ? 'add' : 'remove'](READONLY);
144
- this.wrapper.classList[!this.visible ? 'add' : 'remove'](HIDDEN);
145
- this.wrapper.classList[this.enableRtl ? 'add' : 'remove'](RTL);
146
- this.wrapper.classList[this.enableAnimation ? 'add' : 'remove'](ANIMATION);
142
+ if (this.readOnly) {
143
+ this.wrapper.classList.add(READONLY);
144
+ }
145
+ if (!this.visible) {
146
+ this.wrapper.classList.add(HIDDEN);
147
+ }
148
+ if (this.enableRtl) {
149
+ this.wrapper.classList.add(RTL);
150
+ }
151
+ if (this.enableAnimation) {
152
+ this.wrapper.classList.add(ANIMATION);
153
+ }
147
154
  if (this.cssClass) {
148
155
  addClass([this.wrapper], this.cssClass.split(' '));
149
156
  }
150
157
  this.updateTooltip();
151
158
  this.wireKeyboardEvent();
159
+ this.updateDisabled();
152
160
  };
153
161
  Rating.prototype.updateDisabled = function () {
154
162
  this.wrapper.classList[this.disabled ? 'add' : 'remove'](DISABLED);
155
163
  attributes(this.ratingItemList, { 'tabindex': (this.disabled) ? '-1' : '0' });
156
- if (this.allowReset) {
157
- this.updateResetButton();
158
- }
164
+ this.updateResetButton();
159
165
  };
160
166
  Rating.prototype.updateResetButton = function () {
161
- var isDisabled = (this.value <= this.min) || this.disabled;
162
- this.resetElement.classList[isDisabled ? 'add' : 'remove'](DISABLED);
163
- attributes(this.resetElement, { 'aria-label': 'resetbutton', 'role': 'button',
164
- 'tabindex': (isDisabled ? '-1' : '0'), 'aria-hidden': isDisabled.toString() });
167
+ if (this.allowReset) {
168
+ var isDisabled = (this.value <= this.min) || this.disabled;
169
+ this.resetElement.classList[isDisabled ? 'add' : 'remove'](DISABLED);
170
+ attributes(this.resetElement, { 'tabindex': (isDisabled ? '-1' : '0'), 'aria-hidden': isDisabled.toString() });
171
+ }
165
172
  };
166
173
  Rating.prototype.renderItemList = function () {
167
174
  var _this = this;
168
175
  this.ratingItemList = this.createElement('div', {
169
176
  className: ITEMLIST,
170
- id: this.element.id + '_item-list',
171
- attrs: { 'tabindex': '0' }
177
+ id: this.element.id + '_item-list'
172
178
  });
173
179
  attributes(this.ratingItemList, { 'aria-label': 'rating', 'role': 'slider' });
174
180
  this.wrapper.appendChild(this.ratingItemList);
@@ -217,7 +223,7 @@ var Rating = /** @class */ (function (_super) {
217
223
  var ratingItemContainer = this.createElement('span', { className: ITEMCONTAINER });
218
224
  var spanItem = this.createElement('span', { className: 'e-rating-item' });
219
225
  var ratingValue = this.getRatingValue(this.value, i);
220
- this.renderItemContent(spanItem, ratingValue, i);
226
+ this.renderItemContent(spanItem, ratingValue, i, false);
221
227
  ratingItemContainer.appendChild(spanItem);
222
228
  this.wireItemsEvents(ratingItemContainer, i + 1);
223
229
  this.itemElements.push(ratingItemContainer);
@@ -227,12 +233,9 @@ var Rating = /** @class */ (function (_super) {
227
233
  });
228
234
  }
229
235
  attributes(this.ratingItemList, { 'aria-valuemax': this.itemsCount.toString() });
230
- if (this.disabled) {
231
- attributes(this.ratingItemList, { 'tabindex': '-1' });
232
- }
236
+ this.updateItemValue(false);
233
237
  };
234
238
  Rating.prototype.renderItemContent = function (spanEle, val, index, isrerender) {
235
- if (isrerender === void 0) { isrerender = false; }
236
239
  if (isrerender) {
237
240
  this.removeItemContent(spanEle);
238
241
  }
@@ -271,17 +274,12 @@ var Rating = /** @class */ (function (_super) {
271
274
  }
272
275
  };
273
276
  Rating.prototype.updateMinValue = function () {
274
- this.min = this.validateValue(this.min);
277
+ this.setProperties({ min: this.validateValue(this.min) }, true);
275
278
  if (this.min > 0 && this.value < this.min) {
276
279
  this.triggerChange(null, this.min, false);
277
280
  }
278
281
  attributes(this.ratingItemList, { 'aria-valuemin': this.min.toString() });
279
282
  };
280
- Rating.prototype.updatePrecision = function () {
281
- this.min = this.validateValue(this.min);
282
- this.triggerChange(null, this.validateValue(this.value), false);
283
- this.updateItemValue();
284
- };
285
283
  Rating.prototype.validateValue = function (currentValue) {
286
284
  if (currentValue > this.itemsCount) {
287
285
  currentValue = this.itemsCount;
@@ -300,7 +298,11 @@ var Rating = /** @class */ (function (_super) {
300
298
  return (this.enableSingleSelection) ? (((value > i) && (value <= i + 1)) ? 1 : 0) :
301
299
  (value >= i + 1) ? 1 : ((value < i) ? 0 : (value - i));
302
300
  };
303
- Rating.prototype.updateItemValue = function () {
301
+ Rating.prototype.updateItemValue = function (isUpdate) {
302
+ if (isUpdate === void 0) { isUpdate = true; }
303
+ if (isUpdate && this.isReact) {
304
+ this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
305
+ }
304
306
  for (var i = 0; i < this.itemsCount; i++) {
305
307
  var itemElement = this.itemElements[parseInt(i.toString(), 10)];
306
308
  itemElement.classList.remove(SELECTED, INTERMEDIATE, SELECTEDVALUE);
@@ -314,13 +316,16 @@ var Rating = /** @class */ (function (_super) {
314
316
  else if ((this.precision === PrecisionType.Full) && (i + 1 <= this.value) && (!this.enableSingleSelection)) {
315
317
  itemElement.classList.add(SELECTEDVALUE);
316
318
  }
317
- this.updateItemContent(ratingValue, i);
319
+ if (isUpdate) {
320
+ this.updateItemContent(ratingValue, i);
321
+ }
318
322
  itemElement.style.setProperty(RATINGVALUE, (ratingValue * 100) + '%');
319
323
  itemElement.classList[((this.value === 0) && (i === 0)) || (this.value === i + 1) || ((ratingValue > 0) && (ratingValue < 1)) ? 'add' : 'remove']('e-rating-focus');
320
324
  }
321
- if (this.allowReset) {
322
- this.updateResetButton();
325
+ if (isUpdate) {
326
+ this.renderReactTemplates();
323
327
  }
328
+ this.updateResetButton();
324
329
  attributes(this.ratingItemList, { 'aria-valuenow': this.currentValue.toString() });
325
330
  attributes(this.element, { 'value': this.value.toString() });
326
331
  };
@@ -330,26 +335,31 @@ var Rating = /** @class */ (function (_super) {
330
335
  }
331
336
  var spanEle = this.itemElements[parseInt(index.toString(), 10)].querySelector('.e-rating-item');
332
337
  if (this.fullTemplate && ratingValue === 1) {
333
- if (spanEle.classList.contains(FULLTEMPLATE)) {
338
+ if (!this.isReact && spanEle.classList.contains(FULLTEMPLATE)) {
334
339
  return;
335
340
  }
336
341
  this.removeItemContent(spanEle);
337
342
  spanEle.classList.add(FULLTEMPLATE);
338
- spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
343
+ spanEle.append(this.fullTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate' + index), this.isStringTemplate)[0]);
339
344
  }
340
345
  else if (this.emptyTemplate) {
346
+ if (!this.isReact && spanEle.classList.contains(EMPTYTEMPLATE)) {
347
+ return;
348
+ }
341
349
  this.removeItemContent(spanEle);
342
350
  spanEle.classList.add(EMPTYTEMPLATE);
343
- spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingFullTemplate', (this.element.id + 'fullTemplate'), this.isStringTemplate)[0]);
351
+ spanEle.append(this.emptyTemplateFunction({ ratingValue: ratingValue, index: index }, this, 'ratingEmptyTemplate', (this.element.id + 'emptyTemplate' + index), this.isStringTemplate)[0]);
344
352
  }
345
353
  else {
346
354
  this.removeItemContent(spanEle);
347
355
  addClass([spanEle], ICONCSS.split(' '));
348
356
  }
349
- this.renderReactTemplates();
350
357
  };
351
358
  Rating.prototype.updateTooltipContent = function (isChange) {
352
359
  if (this.showTooltip) {
360
+ if (this.isReact) {
361
+ this.clearTemplate(['ratingTooltipTemplate']);
362
+ }
353
363
  var content = void 0;
354
364
  if (this.tooltipTemplate) {
355
365
  var templateFunction = this.getTemplateString(this.tooltipTemplate);
@@ -395,21 +405,27 @@ var Rating = /** @class */ (function (_super) {
395
405
  Rating.prototype.updateLabel = function () {
396
406
  if (this.showLabel) {
397
407
  if (this.labelTemplate) {
408
+ if (this.isReact) {
409
+ this.clearTemplate(['ratingLabelTemplate']);
410
+ }
398
411
  if (this.spanLabel.firstChild) {
399
412
  this.spanLabel.removeChild(this.spanLabel.firstChild);
400
413
  }
401
414
  var templateFunction = this.getTemplateString(this.labelTemplate);
402
415
  this.spanLabel.append(templateFunction({ value: this.currentValue }, this, 'ratingLabelTemplate', (this.element.id + 'labelTemplate'), this.isStringTemplate)[0]);
416
+ this.renderReactTemplates();
403
417
  }
404
418
  else {
405
419
  this.spanLabel.textContent = this.currentValue + ' / ' + this.itemsCount;
406
420
  }
407
- this.renderReactTemplates();
408
421
  }
409
422
  };
410
423
  Rating.prototype.updateReset = function () {
411
424
  if (this.allowReset) {
412
- this.resetElement = this.createElement('span', { className: RESET });
425
+ this.resetElement = this.createElement('span', {
426
+ className: RESET,
427
+ attrs: { 'aria-label': 'resetbutton', 'role': 'button' }
428
+ });
413
429
  this.updateResetButton();
414
430
  EventHandler.add(this.resetElement, 'click', this.resetClicked, this);
415
431
  this.wrapper.insertBefore(this.resetElement, this.ratingItemList);
@@ -448,9 +464,7 @@ var Rating = /** @class */ (function (_super) {
448
464
  this.triggerChange(e, this.currentValue);
449
465
  this.updateItemValue();
450
466
  this.updateLabel();
451
- if (this.allowReset) {
452
- this.updateResetButton();
453
- }
467
+ this.updateResetButton();
454
468
  };
455
469
  Rating.prototype.updateValueChange = function (e, val, isInteracted) {
456
470
  if (isInteracted === void 0) { isInteracted = true; }
@@ -528,6 +542,8 @@ var Rating = /** @class */ (function (_super) {
528
542
  /**
529
543
  * Reset’s the value to minimum.
530
544
  *
545
+ * {% codeBlock src='rating/reset/index.md' %}{% endcodeBlock %}
546
+ *
531
547
  * @returns {void}
532
548
  */
533
549
  Rating.prototype.reset = function () {
@@ -580,12 +596,13 @@ var Rating = /** @class */ (function (_super) {
580
596
  Math.round(0.1 * 10) / 10;
581
597
  currentValue = isIncrease ? this.value + currentValue : this.value - currentValue;
582
598
  this.updateValueChange(e, (currentValue));
583
- if (this.allowReset) {
584
- this.updateResetButton();
585
- }
599
+ this.updateResetButton();
586
600
  }
587
601
  };
588
602
  Rating.prototype.updateContent = function () {
603
+ if (this.isReact) {
604
+ this.clearTemplate(['ratingEmptyTemplate', 'ratingFullTemplate']);
605
+ }
589
606
  for (var i = 0; i < this.itemsCount; i++) {
590
607
  var itemElement = this.itemElements[parseInt(i.toString(), 10)].firstElementChild;
591
608
  this.renderItemContent(itemElement, this.getRatingValue(this.value, i), i, true);
@@ -624,6 +641,7 @@ var Rating = /** @class */ (function (_super) {
624
641
  _super.prototype.destroy.call(this);
625
642
  // unwires the events and detach the li elements
626
643
  this.removeItemElements();
644
+ this.clearTemplate();
627
645
  if (this.spanLabel) {
628
646
  remove(this.spanLabel);
629
647
  this.spanLabel = null;
@@ -702,7 +720,9 @@ var Rating = /** @class */ (function (_super) {
702
720
  this.updateTooltip();
703
721
  break;
704
722
  case 'precision':
705
- this.updatePrecision();
723
+ this.updateMinValue();
724
+ this.triggerChange(null, this.value, false);
725
+ this.updateItemValue();
706
726
  this.updateLabel();
707
727
  break;
708
728
  case 'enableSingleSelection':
@@ -723,7 +743,6 @@ var Rating = /** @class */ (function (_super) {
723
743
  case 'itemsCount':
724
744
  this.removeItemElements();
725
745
  this.renderItems();
726
- this.updateItemValue();
727
746
  this.updateLabel();
728
747
  break;
729
748
  }
@@ -15,6 +15,7 @@ export interface TicksDataModel {
15
15
  * * both - Ticks are placed on the both side of the Slider bar.
16
16
  * * none - Ticks are not shown.
17
17
  * {% codeBlock src='slider/placement/index.md' %}{% endcodeBlock %}
18
+ *
18
19
  * @default 'None'
19
20
  */
20
21
  placement?: Placement;
@@ -22,6 +23,7 @@ export interface TicksDataModel {
22
23
  /**
23
24
  * It is used to denote the distance between two major (large) ticks from the scale of the Slider.
24
25
  * {% codeBlock src='slider/largestep/index.md' %}{% endcodeBlock %}
26
+ *
25
27
  * @default 10
26
28
  */
27
29
  largeStep?: number;
@@ -29,12 +31,14 @@ export interface TicksDataModel {
29
31
  /**
30
32
  * It is used to denote the distance between two minor (small) ticks from the scale of the Slider.
31
33
  * {% codeBlock src='slider/smallstep/index.md' %}{% endcodeBlock %}
34
+ *
32
35
  * @default 1
33
36
  */
34
37
  smallStep?: number;
35
38
 
36
39
  /**
37
40
  * We can show or hide the small ticks in the Slider, which will be appeared in between the largeTicks.
41
+ *
38
42
  * @default false
39
43
  */
40
44
  showSmallTicks?: boolean;
@@ -54,18 +58,21 @@ export interface ColorRangeDataModel {
54
58
 
55
59
  /**
56
60
  * It is used to set the color in the slider bar.
61
+ *
57
62
  * @default ''
58
63
  */
59
64
  color?: string;
60
65
 
61
66
  /**
62
67
  * It is used to get the starting value for applying color.
68
+ *
63
69
  * @default null
64
70
  */
65
71
  start?: number;
66
72
 
67
73
  /**
68
74
  * It is used to get the end value for applying color.
75
+ *
69
76
  * @default null
70
77
  */
71
78
  end?: number;
@@ -79,30 +86,35 @@ export interface LimitDataModel {
79
86
 
80
87
  /**
81
88
  * It is used to enable the limit in the slider.
89
+ *
82
90
  * @default false
83
91
  */
84
92
  enabled?: boolean;
85
93
 
86
94
  /**
87
95
  * It is used to set the minimum start limit value.
96
+ *
88
97
  * @default null
89
98
  */
90
99
  minStart?: number;
91
100
 
92
101
  /**
93
102
  * It is used to set the minimum end limit value.
103
+ *
94
104
  * @default null
95
105
  */
96
106
  minEnd?: number;
97
107
 
98
108
  /**
99
109
  * It is used to set the maximum start limit value.
110
+ *
100
111
  * @default null
101
112
  */
102
113
  maxStart?: number;
103
114
 
104
115
  /**
105
116
  * It is used to set the maximum end limit value.
117
+ *
106
118
  * @default null
107
119
  */
108
120
  maxEnd?: number;
@@ -110,6 +122,7 @@ export interface LimitDataModel {
110
122
  /**
111
123
  * It is used to lock the first handle.
112
124
  * {% codeBlock src='slider/limitStartHandleFixed/index.md' %}{% endcodeBlock %}
125
+ *
113
126
  * @default false
114
127
  */
115
128
  startHandleFixed?: boolean;
@@ -117,6 +130,7 @@ export interface LimitDataModel {
117
130
  /**
118
131
  * It is used to lock the second handle.
119
132
  * {% codeBlock src='slider/limitEndHandleFixed/index.md' %}{% endcodeBlock %}
133
+ *
120
134
  * @default false
121
135
  */
122
136
  endHandleFixed?: boolean;
@@ -131,6 +145,7 @@ export interface TooltipDataModel {
131
145
  /**
132
146
  * It is used to customize the Tooltip which accepts custom CSS class names that define
133
147
  * specific user-defined styles and themes to be applied on the Tooltip element.
148
+ *
134
149
  * @default ''
135
150
  */
136
151
  cssClass?: string;
@@ -148,6 +163,7 @@ export interface TooltipDataModel {
148
163
  * If it is in desktop, it will show the Tooltip content when hovering on the target element.
149
164
  * If it is in touch device. It will show the Tooltip content when tap and holding on the target element.
150
165
  * {% codeBlock src='slider/tooltipShowOn/index.md' %}{% endcodeBlock %}
166
+ *
151
167
  * @default 'Auto'
152
168
  */
153
169
  showOn?: TooltipShowOn;
@@ -176,6 +192,7 @@ export interface SliderModel extends ComponentModel{
176
192
  * The value should be specified in array of number when render Slider type as range.
177
193
  *
178
194
  * {% codeBlock src="slider/value-api/index.ts" %}{% endcodeBlock %}
195
+ *
179
196
  * @default null
180
197
  * @isGenericType true
181
198
  */
@@ -184,23 +201,26 @@ export interface SliderModel extends ComponentModel{
184
201
  /**
185
202
  * Specifies an array of slider values in number or string type.
186
203
  * The min and max step values are not considered.
204
+ *
187
205
  * @default null
188
206
  */
189
207
  customValues?: string[] | number[];
190
208
 
191
209
  /**
192
210
  * Specifies the step value for each value change when the increase / decrease
193
- * button is clicked or on arrow keys press or on dragging the thumb.
211
+ * button is clicked or on arrow keys press or on dragging the thumb.
194
212
  * Refer the documentation [here](../../slider/ticks#step)
195
213
  * to know more about this property.
196
214
  *
197
215
  * {% codeBlock src="slider/step-api/index.ts" %}{% endcodeBlock %}
216
+ *
198
217
  * @default 1
199
218
  */
200
219
  step?: number;
201
220
 
202
221
  /**
203
222
  * Specifies the width of the Slider.
223
+ *
204
224
  * @default null
205
225
  */
206
226
  width?: number | string;
@@ -209,6 +229,7 @@ export interface SliderModel extends ComponentModel{
209
229
  * Gets/Sets the minimum value of the slider.
210
230
  *
211
231
  * {% codeBlock src="slider/min-max-api/index.ts" %}{% endcodeBlock %}
232
+ *
212
233
  * @default 0
213
234
  */
214
235
  min?: number;
@@ -217,6 +238,7 @@ export interface SliderModel extends ComponentModel{
217
238
  * Gets/Sets the maximum value of the slider.
218
239
  *
219
240
  * {% codeBlock src="slider/min-max-api/index.ts" %}{% endcodeBlock %}
241
+ *
220
242
  * @default 100
221
243
  */
222
244
  max?: number;
@@ -224,6 +246,7 @@ export interface SliderModel extends ComponentModel{
224
246
  /**
225
247
  * Specifies whether the render the slider in read-only mode to restrict any user interaction.
226
248
  * The slider rendered with user defined values and can’t be interacted with user actions.
249
+ *
227
250
  * @default false
228
251
  */
229
252
  readonly?: boolean;
@@ -234,6 +257,8 @@ export interface SliderModel extends ComponentModel{
234
257
  * * minRange - Allows to select a single value in the Slider. It display’s a shadow from the start to the current value.
235
258
  * * range - Allows to select a range of values in the Slider. It displays shadow in-between the selection range.
236
259
  * {% codeBlock src='slider/types/index.md' %}{% endcodeBlock %}
260
+ *
261
+ * @default 'Default'
237
262
  */
238
263
  type?: SliderType;
239
264
 
@@ -248,6 +273,7 @@ export interface SliderModel extends ComponentModel{
248
273
  * to know more about this property with demo.
249
274
  * {% codeBlock src='slider/ticks/index.md' %}{% endcodeBlock %}
250
275
  * {% codeBlock src="slider/ticks-api/index.ts" %}{% endcodeBlock %}
276
+ *
251
277
  * @default { placement: 'before' }
252
278
  */
253
279
  ticks?: TicksDataModel;
@@ -258,12 +284,14 @@ export interface SliderModel extends ComponentModel{
258
284
  * to know more about this property.
259
285
  *
260
286
  * {% codeBlock src="slider/limits-api/index.ts" %}{% endcodeBlock %}
287
+ *
261
288
  * @default { enabled: false }
262
289
  */
263
290
  limits?: LimitDataModel;
264
291
 
265
292
  /**
266
- * Enables or Disables the slider.
293
+ * Enable or Disable the slider.
294
+ *
267
295
  * @default true
268
296
  */
269
297
  enabled?: boolean;
@@ -272,31 +300,35 @@ export interface SliderModel extends ComponentModel{
272
300
  * Specifies the visibility, position of the tooltip over the slider element.
273
301
  *
274
302
  * {% codeBlock src="slider/tooltip-api/index.ts" %}{% endcodeBlock %}
303
+ *
275
304
  * @default { placement: 'Before', isVisible: false, showOn: 'Focus', format: null }
276
305
  */
277
306
  tooltip?: TooltipDataModel;
278
307
 
279
308
  /**
280
- * Specifies whether to show or hide the increase/decrease buttons
309
+ * Specifies whether to show or hide the increase/decrease buttons
281
310
  * of Slider to change the slider value.
282
311
  * Refer the documentation [here](../../slider/getting-started#buttons)
283
312
  * to know more about this property.
284
313
  *
285
314
  * {% codeBlock src="slider/showButtons-api/index.ts" %}{% endcodeBlock %}
315
+ *
286
316
  * @default false
287
317
  */
288
318
  showButtons?: boolean;
289
319
 
290
320
  /**
291
- * Enables/Disables the animation for slider movement.
321
+ * Enable or Disable the animation for slider movement.
322
+ *
292
323
  * @default true
293
324
  */
294
325
  enableAnimation?: boolean;
295
326
 
296
327
  /**
297
328
  * Specifies whether to render the slider in vertical or horizontal orientation.
298
- * Refer the documentation [here](../../slider/getting-started#orientation)
329
+ * Refer the documentation [here](../../slider/orientation/)
299
330
  * to know more about this property.
331
+ *
300
332
  * @default 'Horizontal'
301
333
  */
302
334
  orientation?: SliderOrientation;
@@ -304,18 +336,21 @@ export interface SliderModel extends ComponentModel{
304
336
  /**
305
337
  * Specifies the custom classes to be added to the element used to customize the slider.
306
338
  * {% codeBlock src='slider/cssClass/index.md' %}{% endcodeBlock %}
339
+ *
307
340
  * @default ''
308
341
  */
309
342
  cssClass?: string;
310
343
 
311
344
  /**
312
345
  * Defines whether to allow the cross-scripting site or not.
346
+ *
313
347
  * @default false
314
348
  */
315
349
  enableHtmlSanitizer?: boolean;
316
350
 
317
351
  /**
318
352
  * Triggers when the Slider is successfully created.
353
+ *
319
354
  * @event
320
355
  */
321
356
  created?: EmitType<Object>;
@@ -336,7 +371,7 @@ export interface SliderModel extends ComponentModel{
336
371
  changed?: EmitType<SliderChangeEventArgs>;
337
372
 
338
373
  /**
339
- * Triggers on rendering the ticks element in the Slider,
374
+ * Triggers on rendering the ticks element in the Slider,
340
375
  * which is used to customize the ticks labels dynamically.
341
376
  * {% codeBlock src='slider/renderingticksEvent/index.md' %}{% endcodeBlock %}
342
377
  * @event