@syncfusion/ej2-inputs 25.1.37 → 25.1.38
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.
- package/.eslintrc.json +260 -0
- package/CHANGELOG.md +20 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +34 -26
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +34 -26
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/color-picker/color-picker-model.d.ts +1 -1
- package/src/color-picker/color-picker.d.ts +1 -0
- package/src/color-picker/color-picker.js +26 -22
- package/src/common/signature-base.js +5 -1
- package/src/input/input.js +3 -3
- package/tslint.json +111 -0
|
@@ -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
|
|
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
|
|
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
|
|
507
|
+
if (floatLabelType !== 'Never') {
|
|
508
508
|
calculateWidth(element, element.parentElement);
|
|
509
509
|
}
|
|
510
510
|
if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
|
|
@@ -11823,9 +11823,10 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
11823
11823
|
createPopupOnClick: this.createPopupOnClick,
|
|
11824
11824
|
open: this.onOpen.bind(this),
|
|
11825
11825
|
click: function () {
|
|
11826
|
+
var ev = new MouseEvent('click', { bubbles: true, cancelable: false });
|
|
11826
11827
|
_this.trigger('change', {
|
|
11827
11828
|
currentValue: { hex: _this.value.slice(0, 7), rgba: _this.convertToRgbString(_this.hexToRgb(_this.value)) },
|
|
11828
|
-
previousValue: { hex: null, rgba: null }, value: _this.value
|
|
11829
|
+
previousValue: { hex: null, rgba: null }, value: _this.value, event: ev
|
|
11829
11830
|
});
|
|
11830
11831
|
}
|
|
11831
11832
|
});
|
|
@@ -12326,7 +12327,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12326
12327
|
this.hsv[2] = this.hsv[2] > 100 ? 100 : this.hsv[2];
|
|
12327
12328
|
this.setHandlerPosition();
|
|
12328
12329
|
};
|
|
12329
|
-
ColorPicker.prototype.convertToOtherFormat = function (isKey) {
|
|
12330
|
+
ColorPicker.prototype.convertToOtherFormat = function (isKey, e) {
|
|
12330
12331
|
if (isKey === void 0) { isKey = false; }
|
|
12331
12332
|
var pValue = this.rgbToHex(this.rgb);
|
|
12332
12333
|
this.rgb = this.hsvToRgb.apply(this, this.hsv);
|
|
@@ -12334,7 +12335,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12334
12335
|
var rgba = this.convertToRgbString(this.rgb);
|
|
12335
12336
|
this.updatePreview(rgba);
|
|
12336
12337
|
this.updateInput(cValue);
|
|
12337
|
-
this.triggerEvent(cValue, pValue, rgba, isKey);
|
|
12338
|
+
this.triggerEvent(cValue, pValue, rgba, isKey, e);
|
|
12338
12339
|
};
|
|
12339
12340
|
ColorPicker.prototype.updateInput = function (value) {
|
|
12340
12341
|
var wrapper = this.getWrapper();
|
|
@@ -12567,10 +12568,10 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12567
12568
|
}
|
|
12568
12569
|
});
|
|
12569
12570
|
};
|
|
12570
|
-
ColorPicker.prototype.triggerChangeEvent = function (value) {
|
|
12571
|
+
ColorPicker.prototype.triggerChangeEvent = function (value, e) {
|
|
12571
12572
|
var hex = value.slice(0, 7);
|
|
12572
12573
|
this.trigger('change', {
|
|
12573
|
-
currentValue: { hex: hex, rgba: this.convertToRgbString(this.rgb) },
|
|
12574
|
+
currentValue: { hex: hex, rgba: this.convertToRgbString(this.rgb) }, event: e,
|
|
12574
12575
|
previousValue: { hex: this.value.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(this.value)) },
|
|
12575
12576
|
value: this.enableOpacity ? value : hex
|
|
12576
12577
|
});
|
|
@@ -12589,7 +12590,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12589
12590
|
this.hsv[prob] = 0;
|
|
12590
12591
|
}
|
|
12591
12592
|
this.updateHsv();
|
|
12592
|
-
this.convertToOtherFormat(true);
|
|
12593
|
+
this.convertToOtherFormat(true, e);
|
|
12593
12594
|
};
|
|
12594
12595
|
ColorPicker.prototype.handlerDown = function (e) {
|
|
12595
12596
|
e.preventDefault();
|
|
@@ -12606,7 +12607,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12606
12607
|
this.setHsv(this.clientX, this.clientY);
|
|
12607
12608
|
this.getDragHandler().style.transition = 'left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)';
|
|
12608
12609
|
this.updateHsv();
|
|
12609
|
-
this.convertToOtherFormat();
|
|
12610
|
+
this.convertToOtherFormat(false, e);
|
|
12610
12611
|
this.getDragHandler().focus();
|
|
12611
12612
|
EventHandler.add(document, 'mousemove touchmove', this.handlerMove, this);
|
|
12612
12613
|
EventHandler.add(document, 'mouseup touchend', this.handlerEnd, this);
|
|
@@ -12628,7 +12629,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12628
12629
|
this.setHsv(x, y);
|
|
12629
12630
|
var dragHandler = this.getDragHandler();
|
|
12630
12631
|
this.updateHsv();
|
|
12631
|
-
this.convertToOtherFormat();
|
|
12632
|
+
this.convertToOtherFormat(false, e);
|
|
12632
12633
|
this.getTooltipInst().refresh(dragHandler);
|
|
12633
12634
|
if (!this.tooltipEle.style.transform) {
|
|
12634
12635
|
if (Math.abs(this.clientX - x) > 8 || Math.abs(this.clientY - y) > 8) {
|
|
@@ -12772,7 +12773,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12772
12773
|
this.setHandlerPosition();
|
|
12773
12774
|
this.updateInput(cValue);
|
|
12774
12775
|
select('.' + PREVIEW + ' .' + CURRENT, this.container).style.backgroundColor = this.convertToRgbString(this.rgb);
|
|
12775
|
-
this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
|
|
12776
|
+
this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
|
|
12776
12777
|
};
|
|
12777
12778
|
ColorPicker.prototype.paletteClickHandler = function (e) {
|
|
12778
12779
|
e.preventDefault();
|
|
@@ -12791,7 +12792,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12791
12792
|
if (this.getWrapper().classList.contains(SHOWVALUE)) {
|
|
12792
12793
|
this.updateInput(cValue);
|
|
12793
12794
|
}
|
|
12794
|
-
this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb));
|
|
12795
|
+
this.triggerEvent(cValue, pValue, this.convertToRgbString(this.rgb), false, e);
|
|
12795
12796
|
}
|
|
12796
12797
|
if (!this.inline && !this.showButtons) {
|
|
12797
12798
|
this.closePopup(e);
|
|
@@ -12850,7 +12851,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12850
12851
|
ColorPicker.prototype.ctrlBtnClick = function (ele, e) {
|
|
12851
12852
|
if (ele.classList.contains(APPLY)) {
|
|
12852
12853
|
var cValue = this.rgbToHex(this.rgb);
|
|
12853
|
-
this.triggerChangeEvent(cValue);
|
|
12854
|
+
this.triggerChangeEvent(cValue, e);
|
|
12854
12855
|
}
|
|
12855
12856
|
if (!this.inline) {
|
|
12856
12857
|
this.closePopup(e);
|
|
@@ -12958,7 +12959,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12958
12959
|
if (value.length === 9) {
|
|
12959
12960
|
pValue = this.rgbToHex(this.rgb);
|
|
12960
12961
|
this.rgb = this.hexToRgb(value + value.substr(-2));
|
|
12961
|
-
this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value);
|
|
12962
|
+
this.inputValueChange(this.rgbToHsv.apply(this, this.rgb), pValue, target.value, e);
|
|
12962
12963
|
}
|
|
12963
12964
|
else {
|
|
12964
12965
|
return;
|
|
@@ -12970,7 +12971,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12970
12971
|
pValue = this.rgbToHex(this.rgb);
|
|
12971
12972
|
this.rgb[0] = Number(target.value);
|
|
12972
12973
|
hsv = this.rgbToHsv.apply(this, this.rgb);
|
|
12973
|
-
this.inputValueChange(hsv, pValue);
|
|
12974
|
+
this.inputValueChange(hsv, pValue, null, e);
|
|
12974
12975
|
}
|
|
12975
12976
|
break;
|
|
12976
12977
|
case 'G':
|
|
@@ -12978,7 +12979,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12978
12979
|
pValue = this.rgbToHex(this.rgb);
|
|
12979
12980
|
this.rgb[1] = Number(target.value);
|
|
12980
12981
|
hsv = this.rgbToHsv.apply(this, this.rgb);
|
|
12981
|
-
this.inputValueChange(hsv, pValue);
|
|
12982
|
+
this.inputValueChange(hsv, pValue, null, e);
|
|
12982
12983
|
}
|
|
12983
12984
|
break;
|
|
12984
12985
|
case 'B':
|
|
@@ -12986,7 +12987,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12986
12987
|
pValue = this.rgbToHex(this.rgb);
|
|
12987
12988
|
this.rgb[2] = Number(target.value);
|
|
12988
12989
|
hsv = this.rgbToHsv.apply(this, this.rgb);
|
|
12989
|
-
this.inputValueChange(hsv, pValue);
|
|
12990
|
+
this.inputValueChange(hsv, pValue, null, e);
|
|
12990
12991
|
}
|
|
12991
12992
|
break;
|
|
12992
12993
|
case 'H':
|
|
@@ -12996,14 +12997,14 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
12996
12997
|
if (this.hsv[1] !== Number(target.value)) {
|
|
12997
12998
|
this.hsv[1] = Number(target.value);
|
|
12998
12999
|
this.updateHsv();
|
|
12999
|
-
this.convertToOtherFormat();
|
|
13000
|
+
this.convertToOtherFormat(false, e);
|
|
13000
13001
|
}
|
|
13001
13002
|
break;
|
|
13002
13003
|
case 'V':
|
|
13003
13004
|
if (this.hsv[2] !== Number(target.value)) {
|
|
13004
13005
|
this.hsv[2] = Number(target.value);
|
|
13005
13006
|
this.updateHsv();
|
|
13006
|
-
this.convertToOtherFormat();
|
|
13007
|
+
this.convertToOtherFormat(false, e);
|
|
13007
13008
|
}
|
|
13008
13009
|
break;
|
|
13009
13010
|
case 'A':
|
|
@@ -13011,7 +13012,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13011
13012
|
break;
|
|
13012
13013
|
}
|
|
13013
13014
|
};
|
|
13014
|
-
ColorPicker.prototype.inputValueChange = function (hsv, pValue, value) {
|
|
13015
|
+
ColorPicker.prototype.inputValueChange = function (hsv, pValue, value, e) {
|
|
13015
13016
|
if (hsv[0] !== this.hsv[0]) {
|
|
13016
13017
|
this.hueSlider.setProperties({ 'value': hsv[0] }, true);
|
|
13017
13018
|
this.hueSlider.refresh();
|
|
@@ -13023,13 +13024,16 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13023
13024
|
this.updateInput(value ? value : cValue);
|
|
13024
13025
|
var rgba = this.convertToRgbString(this.rgb);
|
|
13025
13026
|
this.updatePreview(rgba);
|
|
13026
|
-
this.triggerEvent(cValue, pValue, rgba);
|
|
13027
|
+
this.triggerEvent(cValue, pValue, rgba, false, e);
|
|
13027
13028
|
};
|
|
13028
|
-
ColorPicker.prototype.triggerEvent = function (cValue, pValue, rgba, isKey) {
|
|
13029
|
+
ColorPicker.prototype.triggerEvent = function (cValue, pValue, rgba, isKey, e) {
|
|
13029
13030
|
if (isKey === void 0) { isKey = false; }
|
|
13030
13031
|
var hex = cValue.slice(0, 7);
|
|
13032
|
+
if (isNullOrUndefined(e)) {
|
|
13033
|
+
e = new MouseEvent('click', { bubbles: true, cancelable: false });
|
|
13034
|
+
}
|
|
13031
13035
|
if (!this.showButtons && !isKey) {
|
|
13032
|
-
this.trigger('change', { currentValue: { hex: hex, rgba: rgba },
|
|
13036
|
+
this.trigger('change', { currentValue: { hex: hex, rgba: rgba }, event: e,
|
|
13033
13037
|
previousValue: { hex: this.value.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(this.value)) }, value: cValue });
|
|
13034
13038
|
if (this.enableOpacity) {
|
|
13035
13039
|
this.setProperties({ 'value': cValue }, true);
|
|
@@ -13041,7 +13045,7 @@ var ColorPicker = /** @__PURE__ @class */ (function (_super) {
|
|
|
13041
13045
|
}
|
|
13042
13046
|
else {
|
|
13043
13047
|
this.trigger('select', {
|
|
13044
|
-
currentValue: { hex: hex, rgba: rgba },
|
|
13048
|
+
currentValue: { hex: hex, rgba: rgba }, event: e,
|
|
13045
13049
|
previousValue: { hex: pValue.slice(0, 7), rgba: this.convertToRgbString(this.hexToRgb(pValue)) }
|
|
13046
13050
|
});
|
|
13047
13051
|
}
|
|
@@ -15333,6 +15337,10 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
15333
15337
|
this.lastWidth = newWidth;
|
|
15334
15338
|
};
|
|
15335
15339
|
SignatureBase.prototype.endDraw = function () {
|
|
15340
|
+
if (isNullOrUndefined(this.pointColl)) {
|
|
15341
|
+
return;
|
|
15342
|
+
}
|
|
15343
|
+
|
|
15336
15344
|
var canDrawCurve = this.pointColl.length > 2;
|
|
15337
15345
|
var point = this.pointColl[0];
|
|
15338
15346
|
if (!canDrawCurve && point) {
|
|
@@ -15602,7 +15610,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
15602
15610
|
var args = { actionName: 'clear' };
|
|
15603
15611
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
15604
15612
|
this.tempContext.clearRect(0, 0, this.tempContext.canvas.width, this.tempContext.canvas.height);
|
|
15605
|
-
if (this.saveWithBackground) {
|
|
15613
|
+
if (this.saveWithBackground && this.backgroundImage) {
|
|
15606
15614
|
this.setBackgroundImage(this.backgroundImage, 'temp');
|
|
15607
15615
|
}
|
|
15608
15616
|
this.internalRefresh();
|