@syncfusion/ej2-inputs 20.4.40 → 20.4.42

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.
@@ -17,7 +17,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
17
17
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
18
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
19
  };
20
- import { addClass, Event, attributes, compile, Component, EventHandler, getUniqueID, select } from '@syncfusion/ej2-base';
20
+ import { addClass, Event, attributes, compile, Component, EventHandler, getUniqueID, select, Browser } from '@syncfusion/ej2-base';
21
21
  import { isNullOrUndefined, KeyboardEvents, NotifyPropertyChanges, Property, remove, removeClass } from '@syncfusion/ej2-base';
22
22
  import { Tooltip } from '@syncfusion/ej2-popups';
23
23
  var ICONCSS = 'e-rating-icon e-icons e-star-filled';
@@ -37,49 +37,64 @@ var EMPTYTEMPLATE = 'e-rating-empty';
37
37
  var SELECTEDVALUE = 'e-selected-value';
38
38
  var RATINGVALUE = '--rating-value';
39
39
  /**
40
- * Defines the position of the label in the rating.
40
+ * Defines where to position the label in rating
41
41
  */
42
42
  export var LabelPosition;
43
43
  (function (LabelPosition) {
44
44
  /**
45
- * Shows the label above the rating.
45
+ * The label is positioned at the top center of the rating component.
46
46
  */
47
47
  LabelPosition["Top"] = "Top";
48
48
  /**
49
- * Shows the label below the rating.
49
+ * The label is positioned at the bottom center of the rating component.
50
50
  */
51
51
  LabelPosition["Bottom"] = "Bottom";
52
52
  /**
53
- * Shows the label to the left of rating.
53
+ * The label is positioned at the left side of the rating component.
54
54
  */
55
55
  LabelPosition["Left"] = "Left";
56
56
  /**
57
- * Shows the label to the right of rating.
57
+ * The label is positioned at the right side of the rating component.
58
58
  */
59
59
  LabelPosition["Right"] = "Right";
60
60
  })(LabelPosition || (LabelPosition = {}));
61
61
  /**
62
- * Defines the minimum increase in the value in Rating Control.
62
+ * Defines the precision type of the rating.
63
+ * It is used to component the granularity of the rating, allowing users to provide ratings with varying levels of precision.
63
64
  */
64
65
  export var PrecisionType;
65
66
  (function (PrecisionType) {
66
67
  /**
67
- * Process the value as whole numbers.
68
+ * The rating is increased in whole number increments.
68
69
  */
69
70
  PrecisionType["Full"] = "Full";
70
71
  /**
71
- * Process the value in terms of 0.5 (half).
72
+ * The rating is increased in increments of 0.5 (half).
72
73
  */
73
74
  PrecisionType["Half"] = "Half";
74
75
  /**
75
- * Process the value in terms of 0.25 (quarter).
76
+ * The rating is increased in increments of 0.25 (quarter).
76
77
  */
77
78
  PrecisionType["Quarter"] = "Quarter";
78
79
  /**
79
- * Process the value in terms of 0.1.
80
+ * The rating is increased in increments of 0.1.
80
81
  */
81
82
  PrecisionType["Exact"] = "Exact";
82
83
  })(PrecisionType || (PrecisionType = {}));
84
+ /**
85
+ * The Rating component allows the user to rate something by clicking on a set of symbols on a numeric scale.
86
+ * This allows users to provide feedback or ratings for products, services, or content.
87
+ *
88
+ * ```html
89
+ * <input id="rating">
90
+ * ```
91
+ * ```typescript
92
+ * <script>
93
+ * let ratingObj: Rating = new Rating();
94
+ * ratingObj.appendTo('#rating');
95
+ * </script>
96
+ * ```
97
+ */
83
98
  var Rating = /** @class */ (function (_super) {
84
99
  __extends(Rating, _super);
85
100
  /**
@@ -158,7 +173,7 @@ var Rating = /** @class */ (function (_super) {
158
173
  attributes(this.ratingItemList, { 'aria-label': 'rating', 'role': 'slider' });
159
174
  this.wrapper.appendChild(this.ratingItemList);
160
175
  EventHandler.add(this.ratingItemList, 'touchmove', function (e) { return _this.touchMoveHandler(e); }, this);
161
- EventHandler.add(this.ratingItemList, 'touchend', this.touchEndHandler, this);
176
+ EventHandler.add(this.ratingItemList, Browser.touchEndEvent, this.touchEndHandler, this);
162
177
  };
163
178
  Rating.prototype.touchMoveHandler = function (e) {
164
179
  var rect = this.ratingItemList.getBoundingClientRect();
@@ -246,7 +261,7 @@ var Rating = /** @class */ (function (_super) {
246
261
  target: '.e-rating-item-container', windowCollision: true,
247
262
  opensOn: 'Custom', cssClass: 'e-rating-tooltip'
248
263
  });
249
- this.tooltipObj.appendTo('#' + this.ratingItemList.id);
264
+ this.tooltipObj.appendTo(this.ratingItemList);
250
265
  }
251
266
  else {
252
267
  if (!isNullOrUndefined(this.tooltipObj)) {
@@ -718,12 +733,12 @@ var Rating = /** @class */ (function (_super) {
718
733
  __decorate([
719
734
  Property(false)
720
735
  ], Rating.prototype, "disabled", void 0);
721
- __decorate([
722
- Property(true)
723
- ], Rating.prototype, "enableAnimation", void 0);
724
736
  __decorate([
725
737
  Property('')
726
738
  ], Rating.prototype, "emptyTemplate", void 0);
739
+ __decorate([
740
+ Property(true)
741
+ ], Rating.prototype, "enableAnimation", void 0);
727
742
  __decorate([
728
743
  Property(false)
729
744
  ], Rating.prototype, "enableSingleSelection", void 0);
@@ -718,13 +718,6 @@ var Uploader = /** @class */ (function (_super) {
718
718
  }
719
719
  };
720
720
  Uploader.prototype.setCSSClass = function (oldCSSClass) {
721
- var updatedCssClassValue = this.cssClass;
722
- if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
723
- updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
724
- }
725
- if (!isNullOrUndefined(this.cssClass) && updatedCssClassValue !== '') {
726
- addClass([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));
727
- }
728
721
  var updatedOldCssClass = oldCSSClass;
729
722
  if (!isNullOrUndefined(oldCSSClass)) {
730
723
  updatedOldCssClass = (oldCSSClass.replace(/\s+/g, ' ')).trim();
@@ -732,6 +725,13 @@ var Uploader = /** @class */ (function (_super) {
732
725
  if (!isNullOrUndefined(oldCSSClass) && updatedOldCssClass !== '') {
733
726
  removeClass([this.uploadWrapper], updatedOldCssClass.split(' '));
734
727
  }
728
+ var updatedCssClassValue = this.cssClass;
729
+ if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {
730
+ updatedCssClassValue = (this.cssClass.replace(/\s+/g, ' ')).trim();
731
+ }
732
+ if (!isNullOrUndefined(this.cssClass) && updatedCssClassValue !== '') {
733
+ addClass([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));
734
+ }
735
735
  };
736
736
  Uploader.prototype.wireEvents = function () {
737
737
  EventHandler.add(this.browseButton, 'click', this.browseButtonClick, this);
@@ -3324,7 +3324,7 @@ var Uploader = /** @class */ (function (_super) {
3324
3324
  var files = this.getFiles(fileData);
3325
3325
  for (var i = 0; i < files.length; i++) {
3326
3326
  if (files[i].statusCode === '5' || files[i].statusCode === '0') {
3327
- if (this.asyncSettings.chunkSize > 0) {
3327
+ if (this.asyncSettings.chunkSize > 0 && this.getCurrentMetaData(files[i], null)) {
3328
3328
  this.retryUpload(this.getCurrentMetaData(files[i], null), fromcanceledStage);
3329
3329
  }
3330
3330
  else {