@syncfusion/ej2-inputs 22.1.38 → 22.2.5
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/CHANGELOG.md +21 -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 +69 -23
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +69 -23
- 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 +9 -9
- package/src/common/signature-base.d.ts +3 -1
- package/src/common/signature-base.js +14 -4
- package/src/slider/slider.js +44 -18
- package/src/uploader/uploader.js +11 -1
|
@@ -4289,7 +4289,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4289
4289
|
this.setCSSClass();
|
|
4290
4290
|
};
|
|
4291
4291
|
Slider.prototype.setElementWidth = function (width) {
|
|
4292
|
-
if (!isNullOrUndefined(width)) {
|
|
4292
|
+
if (!isNullOrUndefined(width) && !isNullOrUndefined(this.sliderContainer)) {
|
|
4293
4293
|
if (typeof width === 'number') {
|
|
4294
4294
|
this.sliderContainer.style.width = formatUnit(width);
|
|
4295
4295
|
}
|
|
@@ -4852,10 +4852,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4852
4852
|
this.tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
|
|
4853
4853
|
}
|
|
4854
4854
|
if (this.type === 'Default') {
|
|
4855
|
-
setTimeout(function () { _this.tooltipElement
|
|
4855
|
+
setTimeout(function () { if (_this.tooltipElement)
|
|
4856
|
+
_this.tooltipElement.style.transition = _this.transition.handle; }, 2500);
|
|
4856
4857
|
}
|
|
4857
4858
|
else {
|
|
4858
|
-
setTimeout(function () { _this.tooltipElement
|
|
4859
|
+
setTimeout(function () { if (_this.tooltipElement)
|
|
4860
|
+
_this.tooltipElement.style.transition = 'none'; }, 2500);
|
|
4859
4861
|
}
|
|
4860
4862
|
}
|
|
4861
4863
|
};
|
|
@@ -4874,7 +4876,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4874
4876
|
this.tooltipElement.classList.remove(classNames.materialTooltipOpen);
|
|
4875
4877
|
this.setTooltipTransform();
|
|
4876
4878
|
this.tooltipTarget = undefined;
|
|
4877
|
-
setTimeout(function () { _this.tooltipElement
|
|
4879
|
+
setTimeout(function () { if (_this.tooltipElement)
|
|
4880
|
+
_this.tooltipElement.style.transition = 'none'; }, 2500);
|
|
4878
4881
|
}
|
|
4879
4882
|
};
|
|
4880
4883
|
Slider.prototype.checkTooltipPosition = function (args) {
|
|
@@ -4900,6 +4903,8 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
4900
4903
|
};
|
|
4901
4904
|
Slider.prototype.setTooltipTransform = function () {
|
|
4902
4905
|
var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
|
|
4906
|
+
if (isNullOrUndefined(this.tooltipElement))
|
|
4907
|
+
return;
|
|
4903
4908
|
if (this.tooltipElement.firstElementChild.innerText.length > 4) {
|
|
4904
4909
|
this.tooltipElement.style.transform = transformProperties.translate + " scale(0.01)";
|
|
4905
4910
|
}
|
|
@@ -5439,7 +5444,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5439
5444
|
}
|
|
5440
5445
|
};
|
|
5441
5446
|
Slider.prototype.setRangeBar = function () {
|
|
5442
|
-
if (this.orientation === 'Horizontal') {
|
|
5447
|
+
if (this.orientation === 'Horizontal' && !isNullOrUndefined(this.rangeBar)) {
|
|
5443
5448
|
if (this.type === 'MinRange') {
|
|
5444
5449
|
// eslint-disable-next-line
|
|
5445
5450
|
this.enableRtl ? (this.rangeBar.style.right = '0px') : (this.rangeBar.style.left = '0px');
|
|
@@ -5452,7 +5457,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5452
5457
|
setStyleAttribute(this.rangeBar, { 'width': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5453
5458
|
}
|
|
5454
5459
|
}
|
|
5455
|
-
else {
|
|
5460
|
+
else if (!isNullOrUndefined(this.rangeBar)) {
|
|
5456
5461
|
if (this.type === 'MinRange') {
|
|
5457
5462
|
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5458
5463
|
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
@@ -5589,7 +5594,7 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5589
5594
|
this.setRangeValue();
|
|
5590
5595
|
};
|
|
5591
5596
|
Slider.prototype.modifyZindex = function () {
|
|
5592
|
-
if (this.type === 'Range') {
|
|
5597
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.firstHandle) && !isNullOrUndefined(this.secondHandle)) {
|
|
5593
5598
|
if (this.activeHandle === 1) {
|
|
5594
5599
|
this.firstHandle.style.zIndex = (this.zIndex + 4) + '';
|
|
5595
5600
|
this.secondHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
@@ -5774,11 +5779,12 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5774
5779
|
*/
|
|
5775
5780
|
Slider.prototype.reposition = function () {
|
|
5776
5781
|
var _this = this;
|
|
5777
|
-
this.firstHandle
|
|
5778
|
-
|
|
5782
|
+
if (!isNullOrUndefined(this.firstHandle))
|
|
5783
|
+
this.firstHandle.style.transition = 'none';
|
|
5784
|
+
if (this.type !== 'Default' && !isNullOrUndefined(this.rangeBar)) {
|
|
5779
5785
|
this.rangeBar.style.transition = 'none';
|
|
5780
5786
|
}
|
|
5781
|
-
if (this.type === 'Range') {
|
|
5787
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
5782
5788
|
this.secondHandle.style.transition = 'none';
|
|
5783
5789
|
}
|
|
5784
5790
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
@@ -5789,17 +5795,17 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5789
5795
|
// eslint-disable-next-line
|
|
5790
5796
|
this.enableRtl ? this.firstHandle.style.right =
|
|
5791
5797
|
this.handlePos1 + "px" : this.firstHandle.style.left = this.handlePos1 + "px";
|
|
5792
|
-
if (this.isMaterialTooltip) {
|
|
5798
|
+
if (this.isMaterialTooltip && !isNullOrUndefined(this.materialHandle)) {
|
|
5793
5799
|
// eslint-disable-next-line
|
|
5794
5800
|
this.enableRtl ? this.materialHandle.style.right =
|
|
5795
5801
|
this.handlePos1 + "px" : this.materialHandle.style.left = this.handlePos1 + "px";
|
|
5796
5802
|
}
|
|
5797
|
-
if (this.type === 'MinRange') {
|
|
5803
|
+
if (this.type === 'MinRange' && !isNullOrUndefined(this.rangeBar)) {
|
|
5798
5804
|
// eslint-disable-next-line
|
|
5799
5805
|
this.enableRtl ? (this.rangeBar.style.right = '0px') : (this.rangeBar.style.left = '0px');
|
|
5800
5806
|
setStyleAttribute(this.rangeBar, { 'width': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5801
5807
|
}
|
|
5802
|
-
else if (this.type === 'Range') {
|
|
5808
|
+
else if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle) && !isNullOrUndefined(this.rangeBar)) {
|
|
5803
5809
|
// eslint-disable-next-line
|
|
5804
5810
|
this.enableRtl ? this.secondHandle.style.right =
|
|
5805
5811
|
this.handlePos2 + "px" : this.secondHandle.style.left = this.handlePos2 + "px";
|
|
@@ -5835,8 +5841,9 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
5835
5841
|
this.handleStart();
|
|
5836
5842
|
if (!this.tooltip.isVisible) {
|
|
5837
5843
|
setTimeout(function () {
|
|
5838
|
-
_this.firstHandle
|
|
5839
|
-
|
|
5844
|
+
if (!isNullOrUndefined(_this.firstHandle))
|
|
5845
|
+
_this.firstHandle.style.transition = _this.scaleTransform;
|
|
5846
|
+
if (_this.type === 'Range' && !isNullOrUndefined(_this.secondHandle)) {
|
|
5840
5847
|
_this.secondHandle.style.transition = _this.scaleTransform;
|
|
5841
5848
|
}
|
|
5842
5849
|
});
|
|
@@ -6636,6 +6643,24 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6636
6643
|
this.tooltipObj.destroy();
|
|
6637
6644
|
}
|
|
6638
6645
|
this.element.innerHTML = '';
|
|
6646
|
+
this.hiddenInput = null;
|
|
6647
|
+
this.sliderContainer = null;
|
|
6648
|
+
this.sliderTrack = null;
|
|
6649
|
+
this.rangeBar = null;
|
|
6650
|
+
this.firstHandle = null;
|
|
6651
|
+
this.secondHandle = null;
|
|
6652
|
+
this.tickElementCollection = null;
|
|
6653
|
+
this.ul = null;
|
|
6654
|
+
this.firstBtn = null;
|
|
6655
|
+
this.secondBtn = null;
|
|
6656
|
+
this.materialHandle = null;
|
|
6657
|
+
this.tooltipObj = null;
|
|
6658
|
+
this.tooltipTarget = null;
|
|
6659
|
+
this.limitBarFirst = null;
|
|
6660
|
+
this.limitBarSecond = null;
|
|
6661
|
+
this.firstChild = null;
|
|
6662
|
+
this.lastChild = null;
|
|
6663
|
+
this.tooltipElement = null;
|
|
6639
6664
|
};
|
|
6640
6665
|
/**
|
|
6641
6666
|
* Calls internally if any of the property value is changed.
|
|
@@ -6794,15 +6819,16 @@ var Slider = /** @__PURE__ @class */ (function (_super) {
|
|
|
6794
6819
|
};
|
|
6795
6820
|
Slider.prototype.setZindex = function () {
|
|
6796
6821
|
this.zIndex = 6;
|
|
6797
|
-
if (!isNullOrUndefined(this.ticks) && this.ticks.placement !== 'None') {
|
|
6822
|
+
if (!isNullOrUndefined(this.ticks) && this.ticks.placement !== 'None' && !isNullOrUndefined(this.ul) && !isNullOrUndefined(this.element)) {
|
|
6798
6823
|
this.ul.style.zIndex = (this.zIndex + -7) + '';
|
|
6799
6824
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6800
6825
|
}
|
|
6801
6826
|
if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6802
6827
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6803
6828
|
}
|
|
6804
|
-
|
|
6805
|
-
|
|
6829
|
+
if (!isNullOrUndefined(this.firstHandle))
|
|
6830
|
+
this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
6831
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
6806
6832
|
this.secondHandle.style.zIndex = (this.zIndex + 4) + '';
|
|
6807
6833
|
}
|
|
6808
6834
|
};
|
|
@@ -9106,7 +9132,17 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9106
9132
|
for (var i = 0; i < fileData.length; i++) {
|
|
9107
9133
|
var sanitizeFile = SanitizeHtmlHelper.beforeSanitize();
|
|
9108
9134
|
var sanitizeFileName = SanitizeHtmlHelper.serializeValue(sanitizeFile, fileData[parseInt(i.toString())].name);
|
|
9109
|
-
|
|
9135
|
+
var currentFileName = fileData[parseInt(i.toString())].name;
|
|
9136
|
+
var isUTF8 = false;
|
|
9137
|
+
for (var i_1 = 0; i_1 < currentFileName.length; i_1++) {
|
|
9138
|
+
if (currentFileName.charCodeAt(i_1) > 127) {
|
|
9139
|
+
isUTF8 = true;
|
|
9140
|
+
break;
|
|
9141
|
+
}
|
|
9142
|
+
}
|
|
9143
|
+
var htmlTagRegex = /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i;
|
|
9144
|
+
var hasHTMLString = htmlTagRegex.test(currentFileName);
|
|
9145
|
+
if ((sanitizeFileName !== fileData[parseInt(i.toString())].name) && !(isUTF8 && !hasHTMLString)) {
|
|
9110
9146
|
var encodedFileName = targetFiles[parseInt(i.toString())].name.replace(/[\u00A0-\u9999<>\&]/g, function (i) {
|
|
9111
9147
|
return '&#' + i.charCodeAt(0) + ';';
|
|
9112
9148
|
});
|
|
@@ -14655,18 +14691,28 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14655
14691
|
* @param {string} text - specify text to be drawn as signature.
|
|
14656
14692
|
* @param {string} fontFamily - specify font family of a signature.
|
|
14657
14693
|
* @param {number} fontSize - specify font size of a signature.
|
|
14694
|
+
* @param {number} x- Specifies the x-coordinate to start the text of a signature. Default to the center point of the image if it not specified.
|
|
14695
|
+
* @param {number} y - Specifies the y-coordinate to start the text of a signature. Default to the center point of the image if it not specified.
|
|
14658
14696
|
*
|
|
14659
14697
|
* @returns {void}.
|
|
14660
14698
|
*/
|
|
14661
|
-
SignatureBase.prototype.draw = function (text, fontFamily, fontSize) {
|
|
14699
|
+
SignatureBase.prototype.draw = function (text, fontFamily, fontSize, x, y) {
|
|
14662
14700
|
var args = { actionName: 'draw-text' };
|
|
14663
14701
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14664
14702
|
fontFamily = fontFamily || 'Arial';
|
|
14665
14703
|
fontSize = fontSize || 30;
|
|
14666
14704
|
this.canvasContext.font = fontSize + 'px ' + fontFamily;
|
|
14667
|
-
this.
|
|
14668
|
-
this.
|
|
14669
|
-
|
|
14705
|
+
var startX = this.element.width / 2;
|
|
14706
|
+
var startY = this.element.height / 2;
|
|
14707
|
+
if (isNullOrUndefined(x) && isNullOrUndefined(y)) {
|
|
14708
|
+
this.canvasContext.textAlign = 'center';
|
|
14709
|
+
this.canvasContext.textBaseline = 'middle';
|
|
14710
|
+
}
|
|
14711
|
+
else {
|
|
14712
|
+
startX = isNullOrUndefined(x) ? startX : x;
|
|
14713
|
+
startY = isNullOrUndefined(y) ? startY + fontSize / 2 : (y + fontSize / 2);
|
|
14714
|
+
}
|
|
14715
|
+
this.canvasContext.fillText(text, startX, startY);
|
|
14670
14716
|
this.updateSnapCollection();
|
|
14671
14717
|
this.isSignatureEmpty = false;
|
|
14672
14718
|
this.trigger('change', args);
|