@syncfusion/ej2-inputs 25.1.37 → 25.1.40

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.
@@ -88,7 +88,7 @@ var Input;
88
88
  if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
89
89
  parent.classList.add('e-input-focus');
90
90
  }
91
- if (args.floatLabelType === 'Auto') {
91
+ if (args.floatLabelType !== 'Never') {
92
92
  setTimeout(function () {
93
93
  Input.calculateWidth(args.element, parent);
94
94
  }, 80);
@@ -99,7 +99,7 @@ var Input;
99
99
  if (parent.classList.contains('e-input-group') || parent.classList.contains('e-outline') || parent.classList.contains('e-filled')) {
100
100
  parent.classList.remove('e-input-focus');
101
101
  }
102
- if (args.floatLabelType === 'Auto' && args.element.value === '') {
102
+ if (args.floatLabelType !== 'Never') {
103
103
  setTimeout(function () {
104
104
  Input.calculateWidth(args.element, parent);
105
105
  }, 80);
@@ -504,7 +504,7 @@ var Input;
504
504
  */
505
505
  function setValue$$1(value, element, floatLabelType, clearButton) {
506
506
  element.value = value;
507
- if (floatLabelType === 'Auto' && value === '') {
507
+ if (floatLabelType !== 'Never') {
508
508
  calculateWidth(element, element.parentElement);
509
509
  }
510
510
  if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
@@ -10006,7 +10006,10 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
10006
10006
  var li;
10007
10007
  for (var i = 0; i < files.length; i++) {
10008
10008
  li = this.getLiElement(files[i]);
10009
- if (!li.classList.contains(UPLOAD_SUCCESS)) {
10009
+ if (!isNullOrUndefined(li) && !li.classList.contains(UPLOAD_SUCCESS)) {
10010
+ filterFiles.push(files[i]);
10011
+ }
10012
+ else if (!this.showFileList && files[i].status !== "File uploaded successfully") {
10010
10013
  filterFiles.push(files[i]);
10011
10014
  }
10012
10015
  }
@@ -10211,7 +10214,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
10211
10214
  var status = e.target;
10212
10215
  if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {
10213
10216
  var li = this.getLiElement(file);
10214
- if (isNullOrUndefined(li) && (!customUI || isNullOrUndefined(customUI))) {
10217
+ if (isNullOrUndefined(li) && (!customUI || isNullOrUndefined(customUI)) && this.showFileList) {
10215
10218
  return;
10216
10219
  }
10217
10220
  if (!isNullOrUndefined(li)) {
@@ -11823,9 +11826,10 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
11823
11826
  createPopupOnClick: this.createPopupOnClick,
11824
11827
  open: this.onOpen.bind(this),
11825
11828
  click: function () {
11829
+ var ev = new MouseEvent('click', { bubbles: true, cancelable: false });
11826
11830
  _this.trigger('change', {
11827
11831
  currentValue: { hex: _this.value.slice(0, 7), rgba: _this.convertToRgbString(_this.hexToRgb(_this.value)) },
11828
- previousValue: { hex: null, rgba: null }, value: _this.value
11832
+ previousValue: { hex: null, rgba: null }, value: _this.value, event: ev
11829
11833
  });
11830
11834
  }
11831
11835
  });
@@ -12326,7 +12330,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12326
12330
  this.hsv[2] = this.hsv[2] > 100 ? 100 : this.hsv[2];
12327
12331
  this.setHandlerPosition();
12328
12332
  };
12329
- ColorPicker.prototype.convertToOtherFormat = function (isKey) {
12333
+ ColorPicker.prototype.convertToOtherFormat = function (isKey, e) {
12330
12334
  if (isKey === void 0) { isKey = false; }
12331
12335
  var pValue = this.rgbToHex(this.rgb);
12332
12336
  this.rgb = this.hsvToRgb.apply(this, this.hsv);
@@ -12334,7 +12338,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12334
12338
  var rgba = this.convertToRgbString(this.rgb);
12335
12339
  this.updatePreview(rgba);
12336
12340
  this.updateInput(cValue);
12337
- this.triggerEvent(cValue, pValue, rgba, isKey);
12341
+ this.triggerEvent(cValue, pValue, rgba, isKey, e);
12338
12342
  };
12339
12343
  ColorPicker.prototype.updateInput = function (value) {
12340
12344
  var wrapper = this.getWrapper();
@@ -12567,10 +12571,10 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12567
12571
  }
12568
12572
  });
12569
12573
  };
12570
- ColorPicker.prototype.triggerChangeEvent = function (value) {
12574
+ ColorPicker.prototype.triggerChangeEvent = function (value, e) {
12571
12575
  var hex = value.slice(0, 7);
12572
12576
  this.trigger('change', {
12573
- currentValue: { hex: hex, rgba: this.convertToRgbString(this.rgb) },
12577
+ currentValue: { hex: hex, rgba: this.convertToRgbString(this.rgb) }, event: e,
12574
12578
  previousValue: { hex: this.value.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(this.value)) },
12575
12579
  value: this.enableOpacity ? value : hex
12576
12580
  });
@@ -12589,7 +12593,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12589
12593
  this.hsv[prob] = 0;
12590
12594
  }
12591
12595
  this.updateHsv();
12592
- this.convertToOtherFormat(true);
12596
+ this.convertToOtherFormat(true, e);
12593
12597
  };
12594
12598
  ColorPicker.prototype.handlerDown = function (e) {
12595
12599
  e.preventDefault();
@@ -12606,7 +12610,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12606
12610
  this.setHsv(this.clientX, this.clientY);
12607
12611
  this.getDragHandler().style.transition = 'left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)';
12608
12612
  this.updateHsv();
12609
- this.convertToOtherFormat();
12613
+ this.convertToOtherFormat(false, e);
12610
12614
  this.getDragHandler().focus();
12611
12615
  EventHandler.add(document, 'mousemove touchmove', this.handlerMove, this);
12612
12616
  EventHandler.add(document, 'mouseup touchend', this.handlerEnd, this);
@@ -12628,7 +12632,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12628
12632
  this.setHsv(x, y);
12629
12633
  var dragHandler = this.getDragHandler();
12630
12634
  this.updateHsv();
12631
- this.convertToOtherFormat();
12635
+ this.convertToOtherFormat(false, e);
12632
12636
  this.getTooltipInst().refresh(dragHandler);
12633
12637
  if (!this.tooltipEle.style.transform) {
12634
12638
  if (Math.abs(this.clientX - x) > 8 || Math.abs(this.clientY - y) > 8) {
@@ -12772,7 +12776,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12772
12776
  this.setHandlerPosition();
12773
12777
  this.updateInput(cValue);
12774
12778
  select('.' + PREVIEW + ' .' + CURRENT, this.container).style.backgroundColor = this.convertToRgbString(this.rgb);
12775
- this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
12779
+ this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
12776
12780
  };
12777
12781
  ColorPicker.prototype.paletteClickHandler = function (e) {
12778
12782
  e.preventDefault();
@@ -12791,7 +12795,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12791
12795
  if (this.getWrapper().classList.contains(SHOWVALUE)) {
12792
12796
  this.updateInput(cValue);
12793
12797
  }
12794
- this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
12798
+ this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
12795
12799
  }
12796
12800
  if (!this.inline && !this.showButtons) {
12797
12801
  this.closePopup(e);
@@ -12850,7 +12854,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12850
12854
  ColorPicker.prototype.ctrlBtnClick = function (ele, e) {
12851
12855
  if (ele.classList.contains(APPLY)) {
12852
12856
  var cValue = this.rgbToHex(this.rgb);
12853
- this.triggerChangeEvent(cValue);
12857
+ this.triggerChangeEvent(cValue, e);
12854
12858
  }
12855
12859
  if (!this.inline) {
12856
12860
  this.closePopup(e);
@@ -12958,7 +12962,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12958
12962
  if (value.length === 9) {
12959
12963
  pValue = this.rgbToHex(this.rgb);
12960
12964
  this.rgb = this.hexToRgb(value + value.substr(-2));
12961
- this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value);
12965
+ this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value, e);
12962
12966
  }
12963
12967
  else {
12964
12968
  return;
@@ -12970,7 +12974,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12970
12974
  pValue = this.rgbToHex(this.rgb);
12971
12975
  this.rgb[0] = Number(target.value);
12972
12976
  hsv = this.rgbToHsv.apply(this, this.rgb);
12973
- this.inputValueChange(hsv, pValue);
12977
+ this.inputValueChange(hsv, pValue, null, e);
12974
12978
  }
12975
12979
  break;
12976
12980
  case 'G':
@@ -12978,7 +12982,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12978
12982
  pValue = this.rgbToHex(this.rgb);
12979
12983
  this.rgb[1] = Number(target.value);
12980
12984
  hsv = this.rgbToHsv.apply(this, this.rgb);
12981
- this.inputValueChange(hsv, pValue);
12985
+ this.inputValueChange(hsv, pValue, null, e);
12982
12986
  }
12983
12987
  break;
12984
12988
  case 'B':
@@ -12986,7 +12990,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12986
12990
  pValue = this.rgbToHex(this.rgb);
12987
12991
  this.rgb[2] = Number(target.value);
12988
12992
  hsv = this.rgbToHsv.apply(this, this.rgb);
12989
- this.inputValueChange(hsv, pValue);
12993
+ this.inputValueChange(hsv, pValue, null, e);
12990
12994
  }
12991
12995
  break;
12992
12996
  case 'H':
@@ -12996,14 +13000,14 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
12996
13000
  if (this.hsv[1] !== Number(target.value)) {
12997
13001
  this.hsv[1] = Number(target.value);
12998
13002
  this.updateHsv();
12999
- this.convertToOtherFormat();
13003
+ this.convertToOtherFormat(false, e);
13000
13004
  }
13001
13005
  break;
13002
13006
  case 'V':
13003
13007
  if (this.hsv[2] !== Number(target.value)) {
13004
13008
  this.hsv[2] = Number(target.value);
13005
13009
  this.updateHsv();
13006
- this.convertToOtherFormat();
13010
+ this.convertToOtherFormat(false, e);
13007
13011
  }
13008
13012
  break;
13009
13013
  case 'A':
@@ -13011,7 +13015,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
13011
13015
  break;
13012
13016
  }
13013
13017
  };
13014
- ColorPicker.prototype.inputValueChange = function (hsv, pValue, value) {
13018
+ ColorPicker.prototype.inputValueChange = function (hsv, pValue, value, e) {
13015
13019
  if (hsv[0] !== this.hsv[0]) {
13016
13020
  this.hueSlider.setProperties({ 'value': hsv[0] }, true);
13017
13021
  this.hueSlider.refresh();
@@ -13023,13 +13027,16 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
13023
13027
  this.updateInput(value ? value : cValue);
13024
13028
  var rgba = this.convertToRgbString(this.rgb);
13025
13029
  this.updatePreview(rgba);
13026
- this.triggerEvent(cValue, pValue, rgba);
13030
+ this.triggerEvent(cValue, pValue, rgba, false, e);
13027
13031
  };
13028
- ColorPicker.prototype.triggerEvent = function (cValue, pValue, rgba, isKey) {
13032
+ ColorPicker.prototype.triggerEvent = function (cValue, pValue, rgba, isKey, e) {
13029
13033
  if (isKey === void 0) { isKey = false; }
13030
13034
  var hex = cValue.slice(0, 7);
13035
+ if (isNullOrUndefined(e)) {
13036
+ e = new MouseEvent('click', { bubbles: true, cancelable: false });
13037
+ }
13031
13038
  if (!this.showButtons && !isKey) {
13032
- this.trigger('change', { currentValue: { hex: hex, rgba: rgba },
13039
+ this.trigger('change', { currentValue: { hex: hex, rgba: rgba }, event: e,
13033
13040
  previousValue: { hex: this.value.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(this.value)) }, value: cValue });
13034
13041
  if (this.enableOpacity) {
13035
13042
  this.setProperties({ 'value': cValue }, true);
@@ -13041,7 +13048,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
13041
13048
  }
13042
13049
  else {
13043
13050
  this.trigger('select', {
13044
- currentValue: { hex: hex, rgba: rgba },
13051
+ currentValue: { hex: hex, rgba: rgba }, event: e,
13045
13052
  previousValue: { hex: pValue.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(pValue)) }
13046
13053
  });
13047
13054
  }
@@ -15333,6 +15340,10 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15333
15340
  this.lastWidth = newWidth;
15334
15341
  };
15335
15342
  SignatureBase.prototype.endDraw = function () {
15343
+ if (isNullOrUndefined(this.pointColl)) {
15344
+ return;
15345
+ }
15346
+
15336
15347
  var canDrawCurve = this.pointColl.length > 2;
15337
15348
  var point = this.pointColl[0];
15338
15349
  if (!canDrawCurve && point) {
@@ -15602,7 +15613,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
15602
15613
  var args = { actionName: 'clear' };
15603
15614
  this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
15604
15615
  this.tempContext.clearRect(0, 0, this.tempContext.canvas.width, this.tempContext.canvas.height);
15605
- if (this.saveWithBackground) {
15616
+ if (this.saveWithBackground && this.backgroundImage) {
15606
15617
  this.setBackgroundImage(this.backgroundImage, 'temp');
15607
15618
  }
15608
15619
  this.internalRefresh();