@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
|
@@ -4192,7 +4192,7 @@ let Slider = class Slider extends Component {
|
|
|
4192
4192
|
this.setCSSClass();
|
|
4193
4193
|
}
|
|
4194
4194
|
setElementWidth(width) {
|
|
4195
|
-
if (!isNullOrUndefined(width)) {
|
|
4195
|
+
if (!isNullOrUndefined(width) && !isNullOrUndefined(this.sliderContainer)) {
|
|
4196
4196
|
if (typeof width === 'number') {
|
|
4197
4197
|
this.sliderContainer.style.width = formatUnit(width);
|
|
4198
4198
|
}
|
|
@@ -4752,10 +4752,12 @@ let Slider = class Slider extends Component {
|
|
|
4752
4752
|
this.tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate;
|
|
4753
4753
|
}
|
|
4754
4754
|
if (this.type === 'Default') {
|
|
4755
|
-
setTimeout(() => { this.tooltipElement
|
|
4755
|
+
setTimeout(() => { if (this.tooltipElement)
|
|
4756
|
+
this.tooltipElement.style.transition = this.transition.handle; }, 2500);
|
|
4756
4757
|
}
|
|
4757
4758
|
else {
|
|
4758
|
-
setTimeout(() => { this.tooltipElement
|
|
4759
|
+
setTimeout(() => { if (this.tooltipElement)
|
|
4760
|
+
this.tooltipElement.style.transition = 'none'; }, 2500);
|
|
4759
4761
|
}
|
|
4760
4762
|
}
|
|
4761
4763
|
}
|
|
@@ -4773,7 +4775,8 @@ let Slider = class Slider extends Component {
|
|
|
4773
4775
|
this.tooltipElement.classList.remove(classNames.materialTooltipOpen);
|
|
4774
4776
|
this.setTooltipTransform();
|
|
4775
4777
|
this.tooltipTarget = undefined;
|
|
4776
|
-
setTimeout(() => { this.tooltipElement
|
|
4778
|
+
setTimeout(() => { if (this.tooltipElement)
|
|
4779
|
+
this.tooltipElement.style.transition = 'none'; }, 2500);
|
|
4777
4780
|
}
|
|
4778
4781
|
}
|
|
4779
4782
|
checkTooltipPosition(args) {
|
|
@@ -4799,6 +4802,8 @@ let Slider = class Slider extends Component {
|
|
|
4799
4802
|
}
|
|
4800
4803
|
setTooltipTransform() {
|
|
4801
4804
|
let transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
|
|
4805
|
+
if (isNullOrUndefined(this.tooltipElement))
|
|
4806
|
+
return;
|
|
4802
4807
|
if (this.tooltipElement.firstElementChild.innerText.length > 4) {
|
|
4803
4808
|
this.tooltipElement.style.transform = `${transformProperties.translate} scale(0.01)`;
|
|
4804
4809
|
}
|
|
@@ -5336,7 +5341,7 @@ let Slider = class Slider extends Component {
|
|
|
5336
5341
|
}
|
|
5337
5342
|
}
|
|
5338
5343
|
setRangeBar() {
|
|
5339
|
-
if (this.orientation === 'Horizontal') {
|
|
5344
|
+
if (this.orientation === 'Horizontal' && !isNullOrUndefined(this.rangeBar)) {
|
|
5340
5345
|
if (this.type === 'MinRange') {
|
|
5341
5346
|
// eslint-disable-next-line
|
|
5342
5347
|
this.enableRtl ? (this.rangeBar.style.right = '0px') : (this.rangeBar.style.left = '0px');
|
|
@@ -5349,7 +5354,7 @@ let Slider = class Slider extends Component {
|
|
|
5349
5354
|
setStyleAttribute(this.rangeBar, { 'width': this.handlePos2 - this.handlePos1 + 'px' });
|
|
5350
5355
|
}
|
|
5351
5356
|
}
|
|
5352
|
-
else {
|
|
5357
|
+
else if (!isNullOrUndefined(this.rangeBar)) {
|
|
5353
5358
|
if (this.type === 'MinRange') {
|
|
5354
5359
|
this.rangeBar.style.bottom = this.min > this.max ? this.handlePos1 + 'px' : '0px';
|
|
5355
5360
|
setStyleAttribute(this.rangeBar, { 'height': isNullOrUndefined(this.handlePos1) ? 0 : this.min > this.max ? this.element.clientHeight - this.handlePos1 + 'px' : this.handlePos1 + 'px' });
|
|
@@ -5486,7 +5491,7 @@ let Slider = class Slider extends Component {
|
|
|
5486
5491
|
this.setRangeValue();
|
|
5487
5492
|
}
|
|
5488
5493
|
modifyZindex() {
|
|
5489
|
-
if (this.type === 'Range') {
|
|
5494
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.firstHandle) && !isNullOrUndefined(this.secondHandle)) {
|
|
5490
5495
|
if (this.activeHandle === 1) {
|
|
5491
5496
|
this.firstHandle.style.zIndex = (this.zIndex + 4) + '';
|
|
5492
5497
|
this.secondHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
@@ -5669,11 +5674,12 @@ let Slider = class Slider extends Component {
|
|
|
5669
5674
|
* @returns void
|
|
5670
5675
|
*/
|
|
5671
5676
|
reposition() {
|
|
5672
|
-
this.firstHandle
|
|
5673
|
-
|
|
5677
|
+
if (!isNullOrUndefined(this.firstHandle))
|
|
5678
|
+
this.firstHandle.style.transition = 'none';
|
|
5679
|
+
if (this.type !== 'Default' && !isNullOrUndefined(this.rangeBar)) {
|
|
5674
5680
|
this.rangeBar.style.transition = 'none';
|
|
5675
5681
|
}
|
|
5676
|
-
if (this.type === 'Range') {
|
|
5682
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
5677
5683
|
this.secondHandle.style.transition = 'none';
|
|
5678
5684
|
}
|
|
5679
5685
|
this.handlePos1 = this.checkHandlePosition(this.handleVal1);
|
|
@@ -5684,17 +5690,17 @@ let Slider = class Slider extends Component {
|
|
|
5684
5690
|
// eslint-disable-next-line
|
|
5685
5691
|
this.enableRtl ? this.firstHandle.style.right =
|
|
5686
5692
|
`${this.handlePos1}px` : this.firstHandle.style.left = `${this.handlePos1}px`;
|
|
5687
|
-
if (this.isMaterialTooltip) {
|
|
5693
|
+
if (this.isMaterialTooltip && !isNullOrUndefined(this.materialHandle)) {
|
|
5688
5694
|
// eslint-disable-next-line
|
|
5689
5695
|
this.enableRtl ? this.materialHandle.style.right =
|
|
5690
5696
|
`${this.handlePos1}px` : this.materialHandle.style.left = `${this.handlePos1}px`;
|
|
5691
5697
|
}
|
|
5692
|
-
if (this.type === 'MinRange') {
|
|
5698
|
+
if (this.type === 'MinRange' && !isNullOrUndefined(this.rangeBar)) {
|
|
5693
5699
|
// eslint-disable-next-line
|
|
5694
5700
|
this.enableRtl ? (this.rangeBar.style.right = '0px') : (this.rangeBar.style.left = '0px');
|
|
5695
5701
|
setStyleAttribute(this.rangeBar, { 'width': isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + 'px' });
|
|
5696
5702
|
}
|
|
5697
|
-
else if (this.type === 'Range') {
|
|
5703
|
+
else if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle) && !isNullOrUndefined(this.rangeBar)) {
|
|
5698
5704
|
// eslint-disable-next-line
|
|
5699
5705
|
this.enableRtl ? this.secondHandle.style.right =
|
|
5700
5706
|
`${this.handlePos2}px` : this.secondHandle.style.left = `${this.handlePos2}px`;
|
|
@@ -5730,8 +5736,9 @@ let Slider = class Slider extends Component {
|
|
|
5730
5736
|
this.handleStart();
|
|
5731
5737
|
if (!this.tooltip.isVisible) {
|
|
5732
5738
|
setTimeout(() => {
|
|
5733
|
-
this.firstHandle
|
|
5734
|
-
|
|
5739
|
+
if (!isNullOrUndefined(this.firstHandle))
|
|
5740
|
+
this.firstHandle.style.transition = this.scaleTransform;
|
|
5741
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
5735
5742
|
this.secondHandle.style.transition = this.scaleTransform;
|
|
5736
5743
|
}
|
|
5737
5744
|
});
|
|
@@ -6529,6 +6536,24 @@ let Slider = class Slider extends Component {
|
|
|
6529
6536
|
this.tooltipObj.destroy();
|
|
6530
6537
|
}
|
|
6531
6538
|
this.element.innerHTML = '';
|
|
6539
|
+
this.hiddenInput = null;
|
|
6540
|
+
this.sliderContainer = null;
|
|
6541
|
+
this.sliderTrack = null;
|
|
6542
|
+
this.rangeBar = null;
|
|
6543
|
+
this.firstHandle = null;
|
|
6544
|
+
this.secondHandle = null;
|
|
6545
|
+
this.tickElementCollection = null;
|
|
6546
|
+
this.ul = null;
|
|
6547
|
+
this.firstBtn = null;
|
|
6548
|
+
this.secondBtn = null;
|
|
6549
|
+
this.materialHandle = null;
|
|
6550
|
+
this.tooltipObj = null;
|
|
6551
|
+
this.tooltipTarget = null;
|
|
6552
|
+
this.limitBarFirst = null;
|
|
6553
|
+
this.limitBarSecond = null;
|
|
6554
|
+
this.firstChild = null;
|
|
6555
|
+
this.lastChild = null;
|
|
6556
|
+
this.tooltipElement = null;
|
|
6532
6557
|
}
|
|
6533
6558
|
/**
|
|
6534
6559
|
* Calls internally if any of the property value is changed.
|
|
@@ -6684,15 +6709,16 @@ let Slider = class Slider extends Component {
|
|
|
6684
6709
|
}
|
|
6685
6710
|
setZindex() {
|
|
6686
6711
|
this.zIndex = 6;
|
|
6687
|
-
if (!isNullOrUndefined(this.ticks) && this.ticks.placement !== 'None') {
|
|
6712
|
+
if (!isNullOrUndefined(this.ticks) && this.ticks.placement !== 'None' && !isNullOrUndefined(this.ul) && !isNullOrUndefined(this.element)) {
|
|
6688
6713
|
this.ul.style.zIndex = (this.zIndex + -7) + '';
|
|
6689
6714
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6690
6715
|
}
|
|
6691
6716
|
if (!this.isMaterial && !this.isMaterial3 && !isNullOrUndefined(this.ticks) && this.ticks.placement === 'Both') {
|
|
6692
6717
|
this.element.style.zIndex = (this.zIndex + 2) + '';
|
|
6693
6718
|
}
|
|
6694
|
-
|
|
6695
|
-
|
|
6719
|
+
if (!isNullOrUndefined(this.firstHandle))
|
|
6720
|
+
this.firstHandle.style.zIndex = (this.zIndex + 3) + '';
|
|
6721
|
+
if (this.type === 'Range' && !isNullOrUndefined(this.secondHandle)) {
|
|
6696
6722
|
this.secondHandle.style.zIndex = (this.zIndex + 4) + '';
|
|
6697
6723
|
}
|
|
6698
6724
|
}
|
|
@@ -8915,7 +8941,17 @@ let Uploader = class Uploader extends Component {
|
|
|
8915
8941
|
for (let i = 0; i < fileData.length; i++) {
|
|
8916
8942
|
const sanitizeFile = SanitizeHtmlHelper.beforeSanitize();
|
|
8917
8943
|
const sanitizeFileName = SanitizeHtmlHelper.serializeValue(sanitizeFile, fileData[parseInt(i.toString())].name);
|
|
8918
|
-
|
|
8944
|
+
const currentFileName = fileData[parseInt(i.toString())].name;
|
|
8945
|
+
let isUTF8 = false;
|
|
8946
|
+
for (let i = 0; i < currentFileName.length; i++) {
|
|
8947
|
+
if (currentFileName.charCodeAt(i) > 127) {
|
|
8948
|
+
isUTF8 = true;
|
|
8949
|
+
break;
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8952
|
+
let htmlTagRegex = /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i;
|
|
8953
|
+
let hasHTMLString = htmlTagRegex.test(currentFileName);
|
|
8954
|
+
if ((sanitizeFileName !== fileData[parseInt(i.toString())].name) && !(isUTF8 && !hasHTMLString)) {
|
|
8919
8955
|
const encodedFileName = targetFiles[parseInt(i.toString())].name.replace(/[\u00A0-\u9999<>\&]/g, function (i) {
|
|
8920
8956
|
return '&#' + i.charCodeAt(0) + ';';
|
|
8921
8957
|
});
|
|
@@ -14360,18 +14396,28 @@ class SignatureBase extends Component {
|
|
|
14360
14396
|
* @param {string} text - specify text to be drawn as signature.
|
|
14361
14397
|
* @param {string} fontFamily - specify font family of a signature.
|
|
14362
14398
|
* @param {number} fontSize - specify font size of a signature.
|
|
14399
|
+
* @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.
|
|
14400
|
+
* @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.
|
|
14363
14401
|
*
|
|
14364
14402
|
* @returns {void}.
|
|
14365
14403
|
*/
|
|
14366
|
-
draw(text, fontFamily, fontSize) {
|
|
14404
|
+
draw(text, fontFamily, fontSize, x, y) {
|
|
14367
14405
|
const args = { actionName: 'draw-text' };
|
|
14368
14406
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14369
14407
|
fontFamily = fontFamily || 'Arial';
|
|
14370
14408
|
fontSize = fontSize || 30;
|
|
14371
14409
|
this.canvasContext.font = fontSize + 'px ' + fontFamily;
|
|
14372
|
-
this.
|
|
14373
|
-
this.
|
|
14374
|
-
|
|
14410
|
+
let startX = this.element.width / 2;
|
|
14411
|
+
let startY = this.element.height / 2;
|
|
14412
|
+
if (isNullOrUndefined(x) && isNullOrUndefined(y)) {
|
|
14413
|
+
this.canvasContext.textAlign = 'center';
|
|
14414
|
+
this.canvasContext.textBaseline = 'middle';
|
|
14415
|
+
}
|
|
14416
|
+
else {
|
|
14417
|
+
startX = isNullOrUndefined(x) ? startX : x;
|
|
14418
|
+
startY = isNullOrUndefined(y) ? startY + fontSize / 2 : (y + fontSize / 2);
|
|
14419
|
+
}
|
|
14420
|
+
this.canvasContext.fillText(text, startX, startY);
|
|
14375
14421
|
this.updateSnapCollection();
|
|
14376
14422
|
this.isSignatureEmpty = false;
|
|
14377
14423
|
this.trigger('change', args);
|