@progress/kendo-angular-upload 7.1.3-dev.202110111502 → 7.1.4

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.
@@ -34,8 +34,8 @@ let FileSelectDirective = class FileSelectDirective {
34
34
  }
35
35
  onInputChange(event) {
36
36
  const ua = navigator.userAgent;
37
- const chrome = /(chrome)[ \/]([\w.]+)/i;
38
- const safari = /(webkit)[ \/]([\w.]+)/i;
37
+ const webkit = /(webkit)[ \/]([\w.]+)/i;
38
+ const ie = /(windows)[ \/]([\w.]+)/i;
39
39
  let selectedFiles = inputFiles(event.target);
40
40
  selectedFiles = assignGuidToFiles(selectedFiles, !this.uploadService.async.batch);
41
41
  validateFiles(selectedFiles, this.restrictions);
@@ -44,12 +44,12 @@ let FileSelectDirective = class FileSelectDirective {
44
44
  }
45
45
  this.uploadService.addFiles(selectedFiles);
46
46
  /*
47
- Chrome and Internet Explorer do not trigger a `change` event
47
+ Chrome, IE, Edge and Safari do not trigger a `change` event
48
48
  when a file with the same name is selected a number of consecutive times.
49
49
  As a workaround, clear the input value after handling the file.
50
50
  */
51
51
  const native = this.element.nativeElement;
52
- if (!(!ua.match(chrome) && ua.match(safari))) {
52
+ if (ua.match(webkit) || ua.match(ie)) {
53
53
  native.type = "";
54
54
  native.type = "file";
55
55
  }
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-upload',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1633964482,
12
+ publishDate: 1635939353,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -178,7 +178,7 @@ let UploadService = class UploadService {
178
178
  filesToUpload = this.fileList.filesToUpload;
179
179
  }
180
180
  if (!this.async.concurrent && !this.fileList.hasFileWithState([FileState.Uploading])) {
181
- filesToUpload = [this.fileList.firstFileToUpload];
181
+ filesToUpload = this.fileList.firstFileToUpload ? [this.fileList.firstFileToUpload] : [];
182
182
  }
183
183
  if (filesToUpload && filesToUpload.length > 0) {
184
184
  this._uploadFiles(filesToUpload);
@@ -21,7 +21,7 @@ const packageMetadata = {
21
21
  name: '@progress/kendo-angular-upload',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1633964482,
24
+ publishDate: 1635939353,
25
25
  version: '',
26
26
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
27
27
  };
@@ -1040,7 +1040,7 @@ let UploadService = class UploadService {
1040
1040
  filesToUpload = this.fileList.filesToUpload;
1041
1041
  }
1042
1042
  if (!this.async.concurrent && !this.fileList.hasFileWithState([FileState.Uploading])) {
1043
- filesToUpload = [this.fileList.firstFileToUpload];
1043
+ filesToUpload = this.fileList.firstFileToUpload ? [this.fileList.firstFileToUpload] : [];
1044
1044
  }
1045
1045
  if (filesToUpload && filesToUpload.length > 0) {
1046
1046
  this._uploadFiles(filesToUpload);
@@ -2995,8 +2995,8 @@ let FileSelectDirective = class FileSelectDirective {
2995
2995
  }
2996
2996
  onInputChange(event) {
2997
2997
  const ua = navigator.userAgent;
2998
- const chrome = /(chrome)[ \/]([\w.]+)/i;
2999
- const safari = /(webkit)[ \/]([\w.]+)/i;
2998
+ const webkit = /(webkit)[ \/]([\w.]+)/i;
2999
+ const ie = /(windows)[ \/]([\w.]+)/i;
3000
3000
  let selectedFiles = inputFiles(event.target);
3001
3001
  selectedFiles = assignGuidToFiles(selectedFiles, !this.uploadService.async.batch);
3002
3002
  validateFiles(selectedFiles, this.restrictions);
@@ -3005,12 +3005,12 @@ let FileSelectDirective = class FileSelectDirective {
3005
3005
  }
3006
3006
  this.uploadService.addFiles(selectedFiles);
3007
3007
  /*
3008
- Chrome and Internet Explorer do not trigger a `change` event
3008
+ Chrome, IE, Edge and Safari do not trigger a `change` event
3009
3009
  when a file with the same name is selected a number of consecutive times.
3010
3010
  As a workaround, clear the input value after handling the file.
3011
3011
  */
3012
3012
  const native = this.element.nativeElement;
3013
- if (!(!ua.match(chrome) && ua.match(safari))) {
3013
+ if (ua.match(webkit) || ua.match(ie)) {
3014
3014
  native.type = "";
3015
3015
  native.type = "file";
3016
3016
  }
@@ -21,7 +21,7 @@ var packageMetadata = {
21
21
  name: '@progress/kendo-angular-upload',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1633964482,
24
+ publishDate: 1635939353,
25
25
  version: '',
26
26
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
27
27
  };
@@ -1099,7 +1099,7 @@ var UploadService = /** @class */ (function () {
1099
1099
  filesToUpload = this.fileList.filesToUpload;
1100
1100
  }
1101
1101
  if (!this.async.concurrent && !this.fileList.hasFileWithState([FileState.Uploading])) {
1102
- filesToUpload = [this.fileList.firstFileToUpload];
1102
+ filesToUpload = this.fileList.firstFileToUpload ? [this.fileList.firstFileToUpload] : [];
1103
1103
  }
1104
1104
  if (filesToUpload && filesToUpload.length > 0) {
1105
1105
  this._uploadFiles(filesToUpload);
@@ -3063,8 +3063,8 @@ var FileSelectDirective = /** @class */ (function () {
3063
3063
  FileSelectDirective.prototype.onInputChange = function (event) {
3064
3064
  var _this = this;
3065
3065
  var ua = navigator.userAgent;
3066
- var chrome = /(chrome)[ \/]([\w.]+)/i;
3067
- var safari = /(webkit)[ \/]([\w.]+)/i;
3066
+ var webkit = /(webkit)[ \/]([\w.]+)/i;
3067
+ var ie = /(windows)[ \/]([\w.]+)/i;
3068
3068
  var selectedFiles = inputFiles(event.target);
3069
3069
  selectedFiles = assignGuidToFiles(selectedFiles, !this.uploadService.async.batch);
3070
3070
  validateFiles(selectedFiles, this.restrictions);
@@ -3073,12 +3073,12 @@ var FileSelectDirective = /** @class */ (function () {
3073
3073
  }
3074
3074
  this.uploadService.addFiles(selectedFiles);
3075
3075
  /*
3076
- Chrome and Internet Explorer do not trigger a `change` event
3076
+ Chrome, IE, Edge and Safari do not trigger a `change` event
3077
3077
  when a file with the same name is selected a number of consecutive times.
3078
3078
  As a workaround, clear the input value after handling the file.
3079
3079
  */
3080
3080
  var native = this.element.nativeElement;
3081
- if (!(!ua.match(chrome) && ua.match(safari))) {
3081
+ if (ua.match(webkit) || ua.match(ie)) {
3082
3082
  native.type = "";
3083
3083
  native.type = "file";
3084
3084
  }
@@ -53,8 +53,8 @@ var FileSelectDirective = /** @class */ (function () {
53
53
  FileSelectDirective.prototype.onInputChange = function (event) {
54
54
  var _this = this;
55
55
  var ua = navigator.userAgent;
56
- var chrome = /(chrome)[ \/]([\w.]+)/i;
57
- var safari = /(webkit)[ \/]([\w.]+)/i;
56
+ var webkit = /(webkit)[ \/]([\w.]+)/i;
57
+ var ie = /(windows)[ \/]([\w.]+)/i;
58
58
  var selectedFiles = util_1.inputFiles(event.target);
59
59
  selectedFiles = util_1.assignGuidToFiles(selectedFiles, !this.uploadService.async.batch);
60
60
  validation_util_1.validateFiles(selectedFiles, this.restrictions);
@@ -63,12 +63,12 @@ var FileSelectDirective = /** @class */ (function () {
63
63
  }
64
64
  this.uploadService.addFiles(selectedFiles);
65
65
  /*
66
- Chrome and Internet Explorer do not trigger a `change` event
66
+ Chrome, IE, Edge and Safari do not trigger a `change` event
67
67
  when a file with the same name is selected a number of consecutive times.
68
68
  As a workaround, clear the input value after handling the file.
69
69
  */
70
70
  var native = this.element.nativeElement;
71
- if (!(!ua.match(chrome) && ua.match(safari))) {
71
+ if (ua.match(webkit) || ua.match(ie)) {
72
72
  native.type = "";
73
73
  native.type = "file";
74
74
  }
@@ -11,7 +11,7 @@ exports.packageMetadata = {
11
11
  name: '@progress/kendo-angular-upload',
12
12
  productName: 'Kendo UI for Angular',
13
13
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
14
- publishDate: 1633964482,
14
+ publishDate: 1635939353,
15
15
  version: '',
16
16
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
17
17
  };
@@ -188,7 +188,7 @@ var UploadService = /** @class */ (function () {
188
188
  filesToUpload = this.fileList.filesToUpload;
189
189
  }
190
190
  if (!this.async.concurrent && !this.fileList.hasFileWithState([types_1.FileState.Uploading])) {
191
- filesToUpload = [this.fileList.firstFileToUpload];
191
+ filesToUpload = this.fileList.firstFileToUpload ? [this.fileList.firstFileToUpload] : [];
192
192
  }
193
193
  if (filesToUpload && filesToUpload.length > 0) {
194
194
  this._uploadFiles(filesToUpload);