@progress/kendo-vue-upload 3.6.4 → 3.7.0-dev.202210250731

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.
Files changed (47) hide show
  1. package/dist/cdn/js/kendo-vue-upload.js +1 -1
  2. package/dist/es/ExternalDropZone.js +2 -9
  3. package/dist/es/Upload.js +40 -113
  4. package/dist/es/UploadActionButtons.js +12 -17
  5. package/dist/es/UploadAddButton.js +15 -18
  6. package/dist/es/UploadDropZone.js +25 -37
  7. package/dist/es/UploadInput.js +4 -9
  8. package/dist/es/UploadList.js +7 -8
  9. package/dist/es/UploadListActionButton.js +7 -14
  10. package/dist/es/UploadListGroup.js +12 -13
  11. package/dist/es/UploadListMultiItem.js +8 -15
  12. package/dist/es/UploadListSingleItem.js +8 -26
  13. package/dist/es/UploadNavigation.js +17 -47
  14. package/dist/es/UploadStatus.js +3 -7
  15. package/dist/es/UploadUI.js +21 -21
  16. package/dist/es/package-metadata.js +1 -1
  17. package/dist/esm/ExternalDropZone.js +2 -9
  18. package/dist/esm/Upload.js +40 -113
  19. package/dist/esm/UploadActionButtons.js +12 -17
  20. package/dist/esm/UploadAddButton.js +15 -18
  21. package/dist/esm/UploadDropZone.js +25 -37
  22. package/dist/esm/UploadInput.js +4 -9
  23. package/dist/esm/UploadList.js +7 -8
  24. package/dist/esm/UploadListActionButton.js +7 -14
  25. package/dist/esm/UploadListGroup.js +12 -13
  26. package/dist/esm/UploadListMultiItem.js +8 -15
  27. package/dist/esm/UploadListSingleItem.js +8 -26
  28. package/dist/esm/UploadNavigation.js +17 -47
  29. package/dist/esm/UploadStatus.js +3 -7
  30. package/dist/esm/UploadUI.js +21 -21
  31. package/dist/esm/package-metadata.js +1 -1
  32. package/dist/npm/ExternalDropZone.js +4 -17
  33. package/dist/npm/Upload.js +40 -124
  34. package/dist/npm/UploadActionButtons.js +14 -25
  35. package/dist/npm/UploadAddButton.js +17 -26
  36. package/dist/npm/UploadDropZone.js +27 -47
  37. package/dist/npm/UploadInput.js +6 -13
  38. package/dist/npm/UploadList.js +9 -14
  39. package/dist/npm/UploadListActionButton.js +9 -22
  40. package/dist/npm/UploadListGroup.js +14 -22
  41. package/dist/npm/UploadListMultiItem.js +10 -24
  42. package/dist/npm/UploadListSingleItem.js +10 -35
  43. package/dist/npm/UploadNavigation.js +19 -53
  44. package/dist/npm/UploadStatus.js +5 -14
  45. package/dist/npm/UploadUI.js +23 -29
  46. package/dist/npm/package-metadata.js +1 -1
  47. package/package.json +4 -4
@@ -12,7 +12,6 @@ import { UploadInput } from './UploadInput';
12
12
  /**
13
13
  * @hidden
14
14
  */
15
-
16
15
  var UploadAddButtonVue2 = {
17
16
  name: 'KendoVueUploadAddButton',
18
17
  props: {
@@ -62,10 +61,9 @@ var UploadAddButtonVue2 = {
62
61
  },
63
62
  updated: function updated() {
64
63
  var _a = this.$props,
65
- navigationIndex = _a.navigationIndex,
66
- addButtonIndex = _a.addButtonIndex,
67
- notFocusedIndex = _a.notFocusedIndex;
68
-
64
+ navigationIndex = _a.navigationIndex,
65
+ addButtonIndex = _a.addButtonIndex,
66
+ notFocusedIndex = _a.notFocusedIndex;
69
67
  if (navigationIndex !== this._prevNavigationIndex && this._prevNavigationIndex !== notFocusedIndex && navigationIndex === addButtonIndex && this.element) {
70
68
  this.element.focus();
71
69
  }
@@ -96,19 +94,18 @@ var UploadAddButtonVue2 = {
96
94
  },
97
95
  render: function render(createElement) {
98
96
  var _this = this;
99
-
100
97
  var h = gh || createElement;
101
98
  var _a = this.$props,
102
- navigationIndex = _a.navigationIndex,
103
- addButtonIndex = _a.addButtonIndex,
104
- tabIndex = _a.tabIndex,
105
- id = _a.id,
106
- ariaLabelledBy = _a.ariaLabelledBy,
107
- ariaDescribedBy = _a.ariaDescribedBy,
108
- async = _a.async,
109
- multiple = _a.multiple,
110
- disabled = _a.disabled,
111
- accept = _a.accept;
99
+ navigationIndex = _a.navigationIndex,
100
+ addButtonIndex = _a.addButtonIndex,
101
+ tabIndex = _a.tabIndex,
102
+ id = _a.id,
103
+ ariaLabelledBy = _a.ariaLabelledBy,
104
+ ariaDescribedBy = _a.ariaDescribedBy,
105
+ async = _a.async,
106
+ multiple = _a.multiple,
107
+ disabled = _a.disabled,
108
+ accept = _a.accept;
112
109
  var localizationService = provideLocalizationService(this);
113
110
  var selectMessage = localizationService.toLanguageString(select, messages[select]);
114
111
  var buttonClassName = classNames('k-button', 'k-button-md', 'k-button-solid', 'k-button-solid-base', 'k-rounded-md', 'k-upload-button', navigationIndex === addButtonIndex ? 'k-focus' : '');
@@ -133,7 +130,8 @@ var UploadAddButtonVue2 = {
133
130
  on: this.v3 ? undefined : {
134
131
  "click": this.onClick
135
132
  }
136
- }, [// @ts-ignore function children
133
+ }, [
134
+ // @ts-ignore function children
137
135
  h(UploadInput, {
138
136
  async: async,
139
137
  attrs: this.v3 ? undefined : {
@@ -160,6 +158,5 @@ var UploadAddButtonVue2 = {
160
158
  /**
161
159
  * @hidden
162
160
  */
163
-
164
161
  var UploadAddButton = UploadAddButtonVue2;
165
162
  export { UploadAddButton, UploadAddButtonVue2 };
@@ -14,12 +14,10 @@ import { UploadStatus } from './UploadStatus';
14
14
  /**
15
15
  * @hidden
16
16
  */
17
-
18
17
  var TIME_TO_CHECK_DRAG = 100;
19
18
  /**
20
19
  * @hidden
21
20
  */
22
-
23
21
  var UploadDropZoneVue2 = {
24
22
  name: 'KendoVueUploadDropZone',
25
23
  props: {
@@ -123,10 +121,8 @@ var UploadDropZoneVue2 = {
123
121
  },
124
122
  onDocumentDragEnter: function onDocumentDragEnter() {
125
123
  var _this = this;
126
-
127
124
  if (!this.currentDocumentActive) {
128
125
  this.currentDocumentActive = true;
129
-
130
126
  var documentInterval = function documentInterval() {
131
127
  if (_this.isDragOver(_this._lastDocumentDragOver)) {
132
128
  _this.currentDocumentActive = false;
@@ -135,7 +131,6 @@ var UploadDropZoneVue2 = {
135
131
  _this._lastDocumentDragOver = null;
136
132
  }
137
133
  };
138
-
139
134
  this._documentInterval = setInterval(documentInterval, TIME_TO_CHECK_DRAG);
140
135
  }
141
136
  },
@@ -144,10 +139,8 @@ var UploadDropZoneVue2 = {
144
139
  },
145
140
  onElementDragEnter: function onElementDragEnter() {
146
141
  var _this = this;
147
-
148
142
  if (!this.currentElementActive) {
149
143
  this.currentElementActive = true;
150
-
151
144
  var elementInterval = function elementInterval() {
152
145
  if (_this.isDragOver(_this._lastElementDragOver)) {
153
146
  _this.currentElementActive = false;
@@ -156,7 +149,6 @@ var UploadDropZoneVue2 = {
156
149
  _this._lastElementDragOver = null;
157
150
  }
158
151
  };
159
-
160
152
  this._elementInterval = setInterval(elementInterval, TIME_TO_CHECK_DRAG);
161
153
  }
162
154
  },
@@ -167,7 +159,6 @@ var UploadDropZoneVue2 = {
167
159
  onDrop: function onDrop(event) {
168
160
  event.preventDefault();
169
161
  var droppedFiles = event.dataTransfer.files;
170
-
171
162
  if (droppedFiles.length > 0 && !this.$props.disabled) {
172
163
  this.$emit('add', droppedFiles);
173
164
  }
@@ -185,38 +176,36 @@ var UploadDropZoneVue2 = {
185
176
  render: function render(createElement) {
186
177
  var h = gh || createElement;
187
178
  var _a = this.$props,
188
- multiple = _a.multiple,
189
- disabled = _a.disabled,
190
- tabIndex = _a.tabIndex,
191
- fileGroup = _a.fileGroup,
192
- accept = _a.accept,
193
- showFileList = _a.showFileList,
194
- groupedFiles = _a.groupedFiles,
195
- navigationIndex = _a.navigationIndex,
196
- showActionButtons = _a.showActionButtons,
197
- actionsLayout = _a.actionsLayout,
198
- notFocusedIndex = _a.notFocusedIndex,
199
- list = _a.list,
200
- id = _a.id,
201
- ariaLabelledBy = _a.ariaLabelledBy,
202
- ariaDescribedBy = _a.ariaDescribedBy;
179
+ multiple = _a.multiple,
180
+ disabled = _a.disabled,
181
+ tabIndex = _a.tabIndex,
182
+ fileGroup = _a.fileGroup,
183
+ accept = _a.accept,
184
+ showFileList = _a.showFileList,
185
+ groupedFiles = _a.groupedFiles,
186
+ navigationIndex = _a.navigationIndex,
187
+ showActionButtons = _a.showActionButtons,
188
+ actionsLayout = _a.actionsLayout,
189
+ notFocusedIndex = _a.notFocusedIndex,
190
+ list = _a.list,
191
+ id = _a.id,
192
+ ariaLabelledBy = _a.ariaLabelledBy,
193
+ ariaDescribedBy = _a.ariaDescribedBy;
203
194
  var localizationService = provideLocalizationService(this);
204
195
  var dropFilesMessage = localizationService.toLanguageString(dropFilesHere, messages[dropFilesHere]);
205
-
206
196
  var _b = utils.getFileStatus(fileGroup),
207
- isUploading = _b[0],
208
- isUploaded = _b[1],
209
- isUploadFailed = _b[2],
210
- isUploadValidationFailed = _b[3];
211
-
212
- var dropZoneClassName = classNames('k-dropzone-hint', {// Unsure about that, since it hides the "Drop Files Message" when we remove all uploaded components.
197
+ isUploading = _b[0],
198
+ isUploaded = _b[1],
199
+ isUploadFailed = _b[2],
200
+ isUploadValidationFailed = _b[3];
201
+ var dropZoneClassName = classNames('k-dropzone-hint', {
202
+ // Unsure about that, since it hides the "Drop Files Message" when we remove all uploaded components.
213
203
  // 'k-hidden': this.isDragged && !this.elementActive
214
204
  });
215
-
216
205
  var addButtonComponent = function addButtonComponent() {
217
206
  var _this = this;
218
-
219
- return (// @ts-ignore function children
207
+ return (
208
+ // @ts-ignore function children
220
209
  h(UploadAddButton, {
221
210
  id: id,
222
211
  attrs: this.v3 ? undefined : {
@@ -254,7 +243,6 @@ var UploadDropZoneVue2 = {
254
243
  })
255
244
  );
256
245
  };
257
-
258
246
  return h("div", {
259
247
  "class": this.dropZoneClasses,
260
248
  onDrop: this.onDrop,
@@ -265,7 +253,8 @@ var UploadDropZoneVue2 = {
265
253
  },
266
254
  onDragenter: this.onElementDragEnter,
267
255
  onDragover: this.onElementDragOver
268
- }, [addButtonComponent.call(this), isUploading || isUploaded || isUploadFailed || isUploadValidationFailed ? // @ts-ignore function children
256
+ }, [addButtonComponent.call(this), isUploading || isUploaded || isUploadFailed || isUploadValidationFailed ?
257
+ // @ts-ignore function children
269
258
  h(UploadStatus, {
270
259
  isUploading: isUploading,
271
260
  attrs: this.v3 ? undefined : {
@@ -283,6 +272,5 @@ var UploadDropZoneVue2 = {
283
272
  /**
284
273
  * @hidden
285
274
  */
286
-
287
275
  var UploadDropZone = UploadDropZoneVue2;
288
276
  export { UploadDropZone, UploadDropZoneVue2 };
@@ -10,7 +10,6 @@ var SAFARI_REGEX = /(webkit)[ \/]([\w.]+)/i;
10
10
  /**
11
11
  * @hidden
12
12
  */
13
-
14
13
  var UploadInputVue2 = {
15
14
  name: 'KendoVueUploadInput',
16
15
  props: {
@@ -43,7 +42,6 @@ var UploadInputVue2 = {
43
42
  onAdd: function onAdd() {
44
43
  var ua = navigator.userAgent;
45
44
  var input = this._input;
46
-
47
45
  if (input) {
48
46
  if (input.files) {
49
47
  this.$emit('add', input.files);
@@ -53,8 +51,6 @@ var UploadInputVue2 = {
53
51
  when a file with the same name is selected a number of consecutive times.
54
52
  As a workaround, clear the input value after handling the file.
55
53
  */
56
-
57
-
58
54
  if (!(!ua.match(CHROME_REGEX) && ua.match(SAFARI_REGEX))) {
59
55
  input.type = '';
60
56
  input.type = 'file';
@@ -77,10 +73,10 @@ var UploadInputVue2 = {
77
73
  render: function render(createElement) {
78
74
  var h = gh || createElement;
79
75
  var _a = this.$props,
80
- multiple = _a.multiple,
81
- async = _a.async,
82
- disabled = _a.disabled,
83
- accept = _a.accept;
76
+ multiple = _a.multiple,
77
+ async = _a.async,
78
+ disabled = _a.disabled,
79
+ accept = _a.accept;
84
80
  return h("input", {
85
81
  ref: setRef(this, 'input'),
86
82
  autocomplete: 'off',
@@ -111,6 +107,5 @@ var UploadInputVue2 = {
111
107
  /**
112
108
  * @hidden
113
109
  */
114
-
115
110
  var UploadInput = UploadInputVue2;
116
111
  export { UploadInput, UploadInputVue2 };
@@ -9,7 +9,6 @@ import { UploadListGroup } from './UploadListGroup';
9
9
  /**
10
10
  * @hidden
11
11
  */
12
-
13
12
  var UploadListVue2 = {
14
13
  name: 'KendoVueUploadList',
15
14
  props: {
@@ -53,17 +52,18 @@ var UploadListVue2 = {
53
52
  render: function render(createElement) {
54
53
  var h = gh || createElement;
55
54
  var _a = this.$props,
56
- groupedFiles = _a.groupedFiles,
57
- navigationIndex = _a.navigationIndex,
58
- async = _a.async,
59
- disabled = _a.disabled,
60
- list = _a.list;
55
+ groupedFiles = _a.groupedFiles,
56
+ navigationIndex = _a.navigationIndex,
57
+ async = _a.async,
58
+ disabled = _a.disabled,
59
+ list = _a.list;
61
60
  var ulClassName = classNames('k-upload-files', 'k-reset');
62
61
  return h("ul", {
63
62
  "class": ulClassName
64
63
  }, [Object.keys(groupedFiles).map(function (key, index) {
65
64
  var files = groupedFiles[key];
66
- return (// @ts-ignore function children
65
+ return (
66
+ // @ts-ignore function children
67
67
  h(UploadListGroup, {
68
68
  key: key,
69
69
  files: files,
@@ -98,6 +98,5 @@ var UploadListVue2 = {
98
98
  /**
99
99
  * @hidden
100
100
  */
101
-
102
101
  var UploadList = UploadListVue2;
103
102
  export { UploadList, UploadListVue2 };
@@ -12,7 +12,6 @@ import { messages, cancel, retry, remove } from './messages/main';
12
12
  /**
13
13
  * @hidden
14
14
  */
15
-
16
15
  var UploadListActionButtonVue2 = {
17
16
  name: 'KendoVueUploadListActionButton',
18
17
  props: {
@@ -44,7 +43,6 @@ var UploadListActionButtonVue2 = {
44
43
  if (status === UploadFileStatus.Uploading) {
45
44
  return localizationService.toLanguageString(cancel, messages[cancel]);
46
45
  }
47
-
48
46
  return localizationService.toLanguageString(remove, messages[remove]);
49
47
  },
50
48
  retryButtonTitle: function retryButtonTitle(localizationService) {
@@ -67,14 +65,12 @@ var UploadListActionButtonVue2 = {
67
65
  },
68
66
  onActionClick: function onActionClick() {
69
67
  var _a = this.$props,
70
- status = _a.status,
71
- uid = _a.uid,
72
- disabled = _a.disabled;
73
-
68
+ status = _a.status,
69
+ uid = _a.uid,
70
+ disabled = _a.disabled;
74
71
  if (disabled || status === UploadFileStatus.Removing) {
75
72
  return;
76
73
  }
77
-
78
74
  if (status === UploadFileStatus.Uploading) {
79
75
  this.$emit('cancel', uid);
80
76
  } else {
@@ -83,13 +79,11 @@ var UploadListActionButtonVue2 = {
83
79
  },
84
80
  onRetryClick: function onRetryClick() {
85
81
  var _a = this.$props,
86
- uid = _a.uid,
87
- disabled = _a.disabled;
88
-
82
+ uid = _a.uid,
83
+ disabled = _a.disabled;
89
84
  if (disabled) {
90
85
  return;
91
86
  }
92
-
93
87
  this.$emit('retry', uid);
94
88
  }
95
89
  },
@@ -105,8 +99,8 @@ var UploadListActionButtonVue2 = {
105
99
  render: function render(createElement) {
106
100
  var h = gh || createElement;
107
101
  var _a = this.$props,
108
- status = _a.status,
109
- progress = _a.progress;
102
+ status = _a.status,
103
+ progress = _a.progress;
110
104
  var actionButtonClassNames = classNames('k-icon', status === UploadFileStatus.Uploading ? 'k-cancel k-i-deny' : '', status !== UploadFileStatus.Uploading ? 'k-delete k-i-x' : '');
111
105
  var isRetryVisible = status === UploadFileStatus.UploadFailed;
112
106
  var isProgressVisible = status === UploadFileStatus.Uploading;
@@ -171,6 +165,5 @@ var UploadListActionButtonVue2 = {
171
165
  /**
172
166
  * @hidden
173
167
  */
174
-
175
168
  var UploadListActionButton = UploadListActionButtonVue2;
176
169
  export { UploadListActionButton, UploadListActionButtonVue2 };
@@ -12,7 +12,6 @@ import utils from './utils/utils';
12
12
  /**
13
13
  * @hidden
14
14
  */
15
-
16
15
  var UploadListGroupVue2 = {
17
16
  name: 'KendoVueUploadListGroup',
18
17
  props: {
@@ -35,9 +34,8 @@ var UploadListGroupVue2 = {
35
34
  },
36
35
  updated: function updated() {
37
36
  var _a = this.$props,
38
- navigationIndex = _a.navigationIndex,
39
- index = _a.index;
40
-
37
+ navigationIndex = _a.navigationIndex,
38
+ index = _a.index;
41
39
  if (navigationIndex === index && this._element && canUseDOM && document.activeElement !== this._element) {
42
40
  this._element.focus();
43
41
  }
@@ -68,17 +66,18 @@ var UploadListGroupVue2 = {
68
66
  render: function render(createElement) {
69
67
  var h = gh || createElement;
70
68
  var _a = this.$props,
71
- files = _a.files,
72
- async = _a.async,
73
- disabled = _a.disabled,
74
- navigationIndex = _a.navigationIndex,
75
- index = _a.index,
76
- list = _a.list;
69
+ files = _a.files,
70
+ async = _a.async,
71
+ disabled = _a.disabled,
72
+ navigationIndex = _a.navigationIndex,
73
+ index = _a.index,
74
+ list = _a.list;
77
75
  var firstFile = files[0];
78
76
  var isFileSuccess = firstFile.status === UploadFileStatus.Uploaded || firstFile.status === UploadFileStatus.Initial;
79
77
  var liClassName = classNames('k-file', utils.filesHaveValidationErrors(files) ? 'k-file-invalid' : '', firstFile.status === UploadFileStatus.UploadFailed || firstFile.status === UploadFileStatus.RemoveFailed ? 'k-file-error' : '', firstFile.status === UploadFileStatus.Uploading ? 'k-file-progress' : '', isFileSuccess ? 'k-file-success' : '', navigationIndex === index ? 'k-focus' : '');
80
78
  var itemComponent;
81
- var defaultItemRendering = files.length === 1 ? // @ts-ignore
79
+ var defaultItemRendering = files.length === 1 ?
80
+ // @ts-ignore
82
81
  h(UploadListSingleItem, {
83
82
  files: files,
84
83
  attrs: this.v3 ? undefined : {
@@ -96,7 +95,8 @@ var UploadListGroupVue2 = {
96
95
  },
97
96
  onRemove: this.onRemove,
98
97
  onRetry: this.onRetry
99
- }) : // @ts-ignore
98
+ }) :
99
+ // @ts-ignore
100
100
  h(UploadListMultiItem, {
101
101
  files: files,
102
102
  attrs: this.v3 ? undefined : {
@@ -145,6 +145,5 @@ var UploadListGroupVue2 = {
145
145
  /**
146
146
  * @hidden
147
147
  */
148
-
149
148
  var UploadListGroup = UploadListGroupVue2;
150
149
  export { UploadListGroup, UploadListGroupVue2 };
@@ -13,7 +13,6 @@ import { UploadListActionButton } from './UploadListActionButton';
13
13
  /**
14
14
  * @hidden
15
15
  */
16
-
17
16
  var UploadListMultiItemVue2 = {
18
17
  name: 'KendoVueUploadListMultiItem',
19
18
  props: {
@@ -45,12 +44,10 @@ var UploadListMultiItemVue2 = {
45
44
  getFileValidationMessage: function getFileValidationMessage(file) {
46
45
  var localizationService = provideLocalizationService(this);
47
46
  var validationMessage = '';
48
-
49
47
  if (file.validationErrors && file.validationErrors.length > 0) {
50
48
  var messageKey = "upload.".concat(file.validationErrors[0]);
51
49
  validationMessage = localizationService.toLanguageString(messageKey, messages[messageKey]);
52
50
  }
53
-
54
51
  return validationMessage;
55
52
  },
56
53
  progress: function progress() {
@@ -74,16 +71,14 @@ var UploadListMultiItemVue2 = {
74
71
  render: function render(createElement) {
75
72
  var h = gh || createElement;
76
73
  var _a = this.$props,
77
- files = _a.files,
78
- disabled = _a.disabled,
79
- async = _a.async;
74
+ files = _a.files,
75
+ disabled = _a.disabled,
76
+ async = _a.async;
80
77
  var itemClassName = classNames('k-file-multiple');
81
-
82
78
  var _b = utils.getFileStatus(files),
83
- isUploaded = _b[1],
84
- isUploadFailed = _b[2],
85
- isUploadValidationFailed = _b[3];
86
-
79
+ isUploaded = _b[1],
80
+ isUploadFailed = _b[2],
81
+ isUploadValidationFailed = _b[3];
87
82
  var localizationService = provideLocalizationService(this);
88
83
  var totalMessage = localizationService.toLanguageString(total, messages[total]);
89
84
  var filesMessage = localizationService.toLanguageString(filesM, messages[filesM]);
@@ -91,7 +86,6 @@ var UploadListMultiItemVue2 = {
91
86
  var successMessage = localizationService.toLanguageString(statusUploaded, messages[statusUploaded]);
92
87
  var progress = this.progress();
93
88
  var showProgressBar = !isUploadValidationFailed && !isUploaded && !isUploadFailed;
94
-
95
89
  var mapFiles = function mapFiles() {
96
90
  return files.map(function (file) {
97
91
  return h("span", {
@@ -111,7 +105,6 @@ var UploadListMultiItemVue2 = {
111
105
  }, [utils.getTotalFilesSizeMessage([file])])]);
112
106
  }, this);
113
107
  };
114
-
115
108
  return h("div", {
116
109
  "class": itemClassName
117
110
  }, [h("div", {
@@ -137,7 +130,8 @@ var UploadListMultiItemVue2 = {
137
130
  "class": 'k-file-information k-text-success'
138
131
  }, ["".concat(files.length, " ").concat(successMessage)]) : h("span", {
139
132
  "class": 'k-file-validation-message k-text-error'
140
- }, ["".concat(files.length, " ").concat(uploadFailedMessage)])]), // @ts-ignore function children
133
+ }, ["".concat(files.length, " ").concat(uploadFailedMessage)])]),
134
+ // @ts-ignore function children
141
135
  h(UploadListActionButton, {
142
136
  uid: files[0].uid,
143
137
  attrs: this.v3 ? undefined : {
@@ -167,6 +161,5 @@ var UploadListMultiItemVue2 = {
167
161
  /**
168
162
  * @hidden
169
163
  */
170
-
171
164
  var UploadListMultiItem = UploadListMultiItemVue2;
172
165
  export { UploadListMultiItem, UploadListMultiItemVue2 };
@@ -13,7 +13,6 @@ import { UploadListActionButton } from './UploadListActionButton';
13
13
  /**
14
14
  * @hidden
15
15
  */
16
-
17
16
  var UploadListSingleItemVue2 = {
18
17
  name: 'KendoVueUploadListSingleItem',
19
18
  props: {
@@ -48,14 +47,12 @@ var UploadListSingleItemVue2 = {
48
47
  getFileValidationMessage: function getFileValidationMessage(file, isUploadFailed) {
49
48
  var localizationService = provideLocalizationService(this);
50
49
  var validationMessage = '';
51
-
52
50
  if (isUploadFailed) {
53
51
  validationMessage = localizationService.toLanguageString(statusUploadFailed, messages[statusUploadFailed]);
54
52
  } else if (file.validationErrors && file.validationErrors.length > 0) {
55
53
  var messageKey = "upload.".concat(file.validationErrors[0]);
56
54
  validationMessage = localizationService.toLanguageString(messageKey, messages[messageKey]);
57
55
  }
58
-
59
56
  return validationMessage;
60
57
  },
61
58
  getFileExtensionIcon: function getFileExtensionIcon(file) {
@@ -67,12 +64,10 @@ var UploadListSingleItemVue2 = {
67
64
  case '.bmp':
68
65
  case '.gif':
69
66
  return 'k-i-file-image';
70
-
71
67
  case '.mp3':
72
68
  case '.mp4':
73
69
  case '.wav':
74
70
  return 'k-i-file-audio';
75
-
76
71
  case '.mkv':
77
72
  case '.webm':
78
73
  case '.flv':
@@ -80,35 +75,27 @@ var UploadListSingleItemVue2 = {
80
75
  case '.avi':
81
76
  case '.wmv':
82
77
  return 'k-i-file-video';
83
-
84
78
  case '.txt':
85
79
  return 'k-i-file-txt';
86
-
87
80
  case '.pdf':
88
81
  return 'k-i-file-pdf';
89
-
90
82
  case '.ppt':
91
83
  case '.pptx':
92
84
  return 'k-i-file-presentation';
93
-
94
85
  case '.csv':
95
86
  case '.xls':
96
87
  case '.xlsx':
97
88
  return 'k-i-file-data';
98
-
99
89
  case '.html':
100
90
  case '.css':
101
91
  case '.js':
102
92
  case '.ts':
103
93
  return 'k-i-file-programming';
104
-
105
94
  case '.exe':
106
95
  return 'k-i-file-config';
107
-
108
96
  case '.zip':
109
97
  case '.rar':
110
98
  return 'k-i-file-zip';
111
-
112
99
  default:
113
100
  return 'k-i-file';
114
101
  }
@@ -126,19 +113,16 @@ var UploadListSingleItemVue2 = {
126
113
  render: function render(createElement) {
127
114
  var h = gh || createElement;
128
115
  var _a = this.$props,
129
- files = _a.files,
130
- disabled = _a.disabled,
131
- async = _a.async;
116
+ files = _a.files,
117
+ disabled = _a.disabled,
118
+ async = _a.async;
132
119
  var file = files[0];
133
120
  var itemClassName = classNames('k-file-single');
134
-
135
121
  var _b = utils.getFileStatus([file]),
136
- isUploaded = _b[1],
137
- isUploadFailed = _b[2],
138
- isUploadValidationFailed = _b[3];
139
-
122
+ isUploaded = _b[1],
123
+ isUploadFailed = _b[2],
124
+ isUploadValidationFailed = _b[3];
140
125
  var showProgressBar = !isUploadValidationFailed && !isUploaded && !isUploadFailed;
141
-
142
126
  var renderValidationError = function renderValidationError(currentFile, isCurrentUploadFailed) {
143
127
  return h("span", {
144
128
  "class": 'k-file-name-size-wrapper',
@@ -153,7 +137,6 @@ var UploadListSingleItemVue2 = {
153
137
  "class": 'k-file-validation-message k-text-error'
154
138
  }, [this.getFileValidationMessage(currentFile, isCurrentUploadFailed)])]);
155
139
  };
156
-
157
140
  var renderFileDetails = function renderFileDetails(currentFile) {
158
141
  var localizationService = provideLocalizationService(this);
159
142
  var successMessage = localizationService.toLanguageString(statusUploaded, messages[statusUploaded]);
@@ -172,7 +155,6 @@ var UploadListSingleItemVue2 = {
172
155
  "class": 'k-file-validation-message k-text-success'
173
156
  }, [successMessage])]);
174
157
  };
175
-
176
158
  return h("div", {
177
159
  "class": itemClassName
178
160
  }, [h("div", {
@@ -193,7 +175,8 @@ var UploadListSingleItemVue2 = {
193
175
  "class": 'k-file-group k-icon ' + this.getFileExtensionIcon(file)
194
176
  }), h("span", {
195
177
  "class": 'k-file-state'
196
- })]), isUploadValidationFailed || isUploadFailed ? renderValidationError.call(this, file, isUploadFailed) : renderFileDetails.call(this, file), // @ts-ignore function children
178
+ })]), isUploadValidationFailed || isUploadFailed ? renderValidationError.call(this, file, isUploadFailed) : renderFileDetails.call(this, file),
179
+ // @ts-ignore function children
197
180
  h(UploadListActionButton, {
198
181
  uid: file.uid,
199
182
  attrs: this.v3 ? undefined : {
@@ -223,6 +206,5 @@ var UploadListSingleItemVue2 = {
223
206
  /**
224
207
  * @hidden
225
208
  */
226
-
227
209
  var UploadListSingleItem = UploadListSingleItemVue2;
228
210
  export { UploadListSingleItem, UploadListSingleItemVue2 };