@syncfusion/ej2-inputs 20.4.51 → 20.4.52
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 +12 -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 +30 -42
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +30 -42
- 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 +6 -6
- package/src/common/signature-base.d.ts +3 -23
- package/src/common/signature-base.js +28 -40
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/uploader/uploader.js +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.4.
|
|
3
|
+
* version : 20.4.52
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-inputs@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-inputs@20.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-inputs@20.4.51",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-rkBLNwRsKM1GSsSwj3U1D0KvLrfCxASc5KGcVPOsdIOagN5KgR6AgftuKqUsekqbfmNqq1VXSBhSnHFOECNBqg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-inputs",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"/@syncfusion/ej2-schedule",
|
|
40
40
|
"/@syncfusion/ej2-vue-inputs"
|
|
41
41
|
],
|
|
42
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-20.4.
|
|
43
|
-
"_shasum": "
|
|
42
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-inputs/-/ej2-inputs-20.4.51.tgz",
|
|
43
|
+
"_shasum": "d23dae3576a8fda8c3988eaf9b836be68fb11a44",
|
|
44
44
|
"_spec": "@syncfusion/ej2-inputs@*",
|
|
45
45
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
46
46
|
"author": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@syncfusion/ej2-base": "~20.4.51",
|
|
52
52
|
"@syncfusion/ej2-buttons": "~20.4.50",
|
|
53
|
-
"@syncfusion/ej2-popups": "~20.4.
|
|
53
|
+
"@syncfusion/ej2-popups": "~20.4.52",
|
|
54
54
|
"@syncfusion/ej2-splitbuttons": "~20.4.50"
|
|
55
55
|
},
|
|
56
56
|
"deprecated": false,
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/inputs"
|
|
120
120
|
},
|
|
121
121
|
"typings": "index.d.ts",
|
|
122
|
-
"version": "20.4.
|
|
122
|
+
"version": "20.4.52",
|
|
123
123
|
"sideEffects": false,
|
|
124
124
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
125
125
|
}
|
|
@@ -26,10 +26,8 @@ export declare abstract class SignatureBase extends Component<HTMLCanvasElement>
|
|
|
26
26
|
private isBlazor;
|
|
27
27
|
private isResponsive;
|
|
28
28
|
private dotnetRef;
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
-
protected canvasRatio: Dimension;
|
|
32
|
-
protected imageEditorPointsColl: Point[];
|
|
29
|
+
private signPointsColl;
|
|
30
|
+
private signRatioPointsColl;
|
|
33
31
|
/**
|
|
34
32
|
* Gets or sets the background color of the component.
|
|
35
33
|
*
|
|
@@ -92,7 +90,7 @@ export declare abstract class SignatureBase extends Component<HTMLCanvasElement>
|
|
|
92
90
|
private wireEvents;
|
|
93
91
|
private unwireEvents;
|
|
94
92
|
private setHTMLProperties;
|
|
95
|
-
protected mouseDownHandler(e: MouseEvent & TouchEvent
|
|
93
|
+
protected mouseDownHandler(e: MouseEvent & TouchEvent): void;
|
|
96
94
|
private mouseMoveHandler;
|
|
97
95
|
private mouseUpHandler;
|
|
98
96
|
private keyboardHandler;
|
|
@@ -249,23 +247,6 @@ export declare abstract class SignatureBase extends Component<HTMLCanvasElement>
|
|
|
249
247
|
*/
|
|
250
248
|
propertyChanged(key: string, value: string | boolean | number): void;
|
|
251
249
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Interface for Point object.
|
|
254
|
-
*/
|
|
255
|
-
interface Point {
|
|
256
|
-
/**
|
|
257
|
-
* Gets or sets the x position of the point.
|
|
258
|
-
*/
|
|
259
|
-
x: number;
|
|
260
|
-
/**
|
|
261
|
-
* Gets or sets the y position of the point.
|
|
262
|
-
*/
|
|
263
|
-
y: number;
|
|
264
|
-
/**
|
|
265
|
-
* Gets or sets the time.
|
|
266
|
-
*/
|
|
267
|
-
time?: number;
|
|
268
|
-
}
|
|
269
250
|
/**
|
|
270
251
|
* Defines the signature file type.
|
|
271
252
|
*/
|
|
@@ -350,4 +331,3 @@ export interface ActivePoint {
|
|
|
350
331
|
*/
|
|
351
332
|
radius?: number;
|
|
352
333
|
}
|
|
353
|
-
export {};
|
|
@@ -28,7 +28,8 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
28
28
|
_this.clearArray = [];
|
|
29
29
|
_this.isBlazor = false;
|
|
30
30
|
_this.isResponsive = false;
|
|
31
|
-
_this.
|
|
31
|
+
_this.signPointsColl = [];
|
|
32
|
+
_this.signRatioPointsColl = [];
|
|
32
33
|
return _this;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
@@ -100,17 +101,12 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
100
101
|
}
|
|
101
102
|
};
|
|
102
103
|
// eslint-disable-next-line
|
|
103
|
-
SignatureBase.prototype.mouseDownHandler = function (e
|
|
104
|
+
SignatureBase.prototype.mouseDownHandler = function (e) {
|
|
104
105
|
if (e.buttons === 1 || e.buttons === 2 || e.type === 'touchstart') {
|
|
105
106
|
if (e.type === 'touchstart') {
|
|
106
107
|
e.preventDefault();
|
|
107
108
|
e.stopPropagation();
|
|
108
109
|
}
|
|
109
|
-
if (canvas) {
|
|
110
|
-
this.canvasContext = canvas.getContext('2d');
|
|
111
|
-
this.scale = zoomState;
|
|
112
|
-
this.panStart = panStart;
|
|
113
|
-
}
|
|
114
110
|
this.beginStroke(e);
|
|
115
111
|
this.wireEvents();
|
|
116
112
|
}
|
|
@@ -145,6 +141,11 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
145
141
|
this.dotnetRef.invokeMethodAsync('TriggerEventAsync', 'mouseUp');
|
|
146
142
|
}
|
|
147
143
|
this.signatureValue = this.snapColl[this.incStep];
|
|
144
|
+
for (var i = 0; i < this.signPointsColl.length; i++) {
|
|
145
|
+
this.signRatioPointsColl.push({ x: (this.signPointsColl[i].x / this.canvasContext.canvas.width),
|
|
146
|
+
y: (this.signPointsColl[i].y / this.canvasContext.canvas.height) });
|
|
147
|
+
}
|
|
148
|
+
this.signPointsColl = [];
|
|
148
149
|
};
|
|
149
150
|
SignatureBase.prototype.keyboardHandler = function (e) {
|
|
150
151
|
var _this = this;
|
|
@@ -182,13 +183,23 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
182
183
|
this.canvasContext.canvas.width = this.element.offsetWidth;
|
|
183
184
|
this.canvasContext.canvas.height = this.element.offsetHeight;
|
|
184
185
|
this.canvasContext.scale(1, 1);
|
|
186
|
+
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
187
|
+
var pointSize = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
|
|
188
|
+
for (var i = 0; i < this.signRatioPointsColl.length; i++) {
|
|
189
|
+
this.arcDraw((this.signRatioPointsColl[i].x * this.canvasContext.canvas.width), (this.signRatioPointsColl[i].y * this.canvasContext.canvas.height), pointSize);
|
|
190
|
+
}
|
|
191
|
+
this.signPointsColl = [];
|
|
192
|
+
this.canvasContext.closePath();
|
|
193
|
+
this.canvasContext.fill();
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
var restoreImg_1 = new Image();
|
|
197
|
+
restoreImg_1.src = this.snapColl[this.incStep];
|
|
198
|
+
restoreImg_1.onload = function () {
|
|
199
|
+
proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
|
|
200
|
+
proxy.canvasContext.drawImage(restoreImg_1, 0, 0, proxy.element.width, proxy.element.height);
|
|
201
|
+
};
|
|
185
202
|
}
|
|
186
|
-
var restoreImg = new Image();
|
|
187
|
-
restoreImg.src = this.snapColl[this.incStep];
|
|
188
|
-
restoreImg.onload = function () {
|
|
189
|
-
proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
|
|
190
|
-
proxy.canvasContext.drawImage(restoreImg, 0, 0, proxy.element.width, proxy.element.height);
|
|
191
|
-
};
|
|
192
203
|
};
|
|
193
204
|
SignatureBase.prototype.beginStroke = function (e) {
|
|
194
205
|
this.refresh();
|
|
@@ -228,34 +239,10 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
228
239
|
SignatureBase.prototype.createPoint = function (e) {
|
|
229
240
|
var rect = this.canvasContext.canvas.getBoundingClientRect();
|
|
230
241
|
if (e.type === 'mousedown' || e.type === 'mousemove') {
|
|
231
|
-
|
|
232
|
-
if (this.canvasRatio === undefined) {
|
|
233
|
-
return this.point(e.clientX - rect.left, e.clientY - rect.top, new Date().getTime());
|
|
234
|
-
}
|
|
235
|
-
// image editor
|
|
236
|
-
else if (this.scale === 1) {
|
|
237
|
-
return this.point(((e.clientX - rect.left) * this.canvasRatio.width) / this.scale, ((e.clientY - rect.top) * this.canvasRatio.height) / this.scale, new Date().getTime());
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
return this.point((((e.clientX - rect.left) + ((this.panStart.startX) / this.canvasRatio.width
|
|
241
|
-
* this.scale)) / this.scale) * this.canvasRatio.width, (((e.clientY - rect.top) + ((this.panStart.startY) / this.canvasRatio.height
|
|
242
|
-
* this.scale)) / this.scale) * this.canvasRatio.height, new Date().getTime());
|
|
243
|
-
}
|
|
242
|
+
return this.point(e.clientX - rect.left, e.clientY - rect.top, new Date().getTime());
|
|
244
243
|
}
|
|
245
244
|
else {
|
|
246
|
-
|
|
247
|
-
if (this.canvasRatio === undefined) {
|
|
248
|
-
return this.point(e.touches[0].clientX - rect.left, e.touches[0].clientY - rect.top, new Date().getTime());
|
|
249
|
-
}
|
|
250
|
-
// image editor
|
|
251
|
-
else if (this.scale === 1) {
|
|
252
|
-
return this.point(((e.touches[0].clientX - rect.left) * this.canvasRatio.width) / this.scale, ((e.touches[0].clientY - rect.top) * this.canvasRatio.height) / this.scale, new Date().getTime());
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
return this.point((e.touches[0].clientX - rect.left) + this.panStart.startX / (this.canvasRatio.width
|
|
256
|
-
* this.scale), (e.touches[0].clientY - rect.top) + this.panStart.startY / (this.canvasRatio.height
|
|
257
|
-
* this.scale), new Date().getTime());
|
|
258
|
-
}
|
|
245
|
+
return this.point(e.touches[0].clientX - rect.left, e.touches[0].clientY - rect.top, new Date().getTime());
|
|
259
246
|
}
|
|
260
247
|
};
|
|
261
248
|
/* Returns the current point corrdinates(x, y) and time.*/
|
|
@@ -273,7 +260,6 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
273
260
|
var isLastPointTooClose = lastPoint ? this.distanceTo(lastPoint) <= this.minDistance : false;
|
|
274
261
|
if (!lastPoint || !(lastPoint && isLastPointTooClose)) {
|
|
275
262
|
points.push(point);
|
|
276
|
-
this.imageEditorPointsColl.push(point);
|
|
277
263
|
if (points.length > 2) {
|
|
278
264
|
if (points.length === 3) {
|
|
279
265
|
points.unshift(points[0]);
|
|
@@ -354,6 +340,7 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
354
340
|
this.isSignatureEmpty = false;
|
|
355
341
|
};
|
|
356
342
|
SignatureBase.prototype.arcDraw = function (x, y, size) {
|
|
343
|
+
this.signPointsColl.push({ x: x, y: y });
|
|
357
344
|
var context = this.canvasContext;
|
|
358
345
|
context.moveTo(x, y);
|
|
359
346
|
context.arc(x, y, size, 0, 2 * Math.PI, false);
|
|
@@ -554,6 +541,7 @@ var SignatureBase = /** @class */ (function (_super) {
|
|
|
554
541
|
var args = { actionName: 'clear' };
|
|
555
542
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
556
543
|
this.refresh();
|
|
544
|
+
this.signRatioPointsColl = [];
|
|
557
545
|
this.updateSnapCollection(true);
|
|
558
546
|
this.isSignatureEmpty = true;
|
|
559
547
|
if (!this.isBlazor) {
|
|
@@ -675,7 +675,7 @@ function removeMaskInputValues(event) {
|
|
|
675
675
|
function maskInputKeyPressHandler(event) {
|
|
676
676
|
if (this.mask && !this.readonly) {
|
|
677
677
|
var oldValue = this.element.value;
|
|
678
|
-
if ((
|
|
678
|
+
if (!(event.ctrlKey || event.metaKey) || ((event.ctrlKey || event.metaKey) && event.code !== 'KeyA' && event.code !== 'KeyY'
|
|
679
679
|
&& event.code !== 'KeyZ' && event.code !== 'KeyX' && event.code !== 'KeyC' && event.code !== 'KeyV')) {
|
|
680
680
|
this.maskKeyPress = true;
|
|
681
681
|
var key = event.key;
|
package/src/uploader/uploader.js
CHANGED
|
@@ -2200,7 +2200,7 @@ var Uploader = /** @class */ (function (_super) {
|
|
|
2200
2200
|
for (var selectFileIndex = 0; selectFileIndex < selectedFiles.length; selectFileIndex++) {
|
|
2201
2201
|
var selectedFileData = selectedFiles[selectFileIndex];
|
|
2202
2202
|
for (var fileDataIndex = 0; fileDataIndex < this.filesData.length; fileDataIndex++) {
|
|
2203
|
-
if (this.filesData[fileDataIndex].name === selectedFileData.name) {
|
|
2203
|
+
if (this.filesData[fileDataIndex].name === selectedFileData.name && this.filesData[fileDataIndex].status === selectedFileData.status) {
|
|
2204
2204
|
matchFiles[matchFilesIndex] = this.filesData[fileDataIndex];
|
|
2205
2205
|
++matchFilesIndex;
|
|
2206
2206
|
}
|