@progress/kendo-vue-upload 3.7.4-dev.202212300853 → 3.7.4-dev.202301091431

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 (41) hide show
  1. package/dist/cdn/js/kendo-vue-upload.js +1 -1
  2. package/dist/es/ExternalDropZone.js +6 -3
  3. package/dist/es/UploadAddButton.js +28 -5
  4. package/dist/es/UploadDropZone.js +3 -2
  5. package/dist/es/UploadInput.d.ts +1 -0
  6. package/dist/es/UploadInput.js +4 -1
  7. package/dist/es/UploadListActionButton.d.ts +1 -0
  8. package/dist/es/UploadListActionButton.js +40 -27
  9. package/dist/es/UploadListGroup.js +9 -1
  10. package/dist/es/UploadListMultiItem.js +25 -21
  11. package/dist/es/UploadListSingleItem.js +82 -33
  12. package/dist/es/UploadStatus.js +12 -6
  13. package/dist/es/UploadUI.js +1 -1
  14. package/dist/es/package-metadata.js +1 -1
  15. package/dist/esm/ExternalDropZone.js +6 -3
  16. package/dist/esm/UploadAddButton.js +28 -5
  17. package/dist/esm/UploadDropZone.js +3 -2
  18. package/dist/esm/UploadInput.d.ts +1 -0
  19. package/dist/esm/UploadInput.js +4 -1
  20. package/dist/esm/UploadListActionButton.d.ts +1 -0
  21. package/dist/esm/UploadListActionButton.js +40 -27
  22. package/dist/esm/UploadListGroup.js +9 -1
  23. package/dist/esm/UploadListMultiItem.js +25 -21
  24. package/dist/esm/UploadListSingleItem.js +82 -33
  25. package/dist/esm/UploadStatus.js +12 -6
  26. package/dist/esm/UploadUI.js +1 -1
  27. package/dist/esm/package-metadata.js +1 -1
  28. package/dist/npm/ExternalDropZone.js +6 -3
  29. package/dist/npm/UploadAddButton.js +27 -4
  30. package/dist/npm/UploadDropZone.js +3 -2
  31. package/dist/npm/UploadInput.d.ts +1 -0
  32. package/dist/npm/UploadInput.js +4 -1
  33. package/dist/npm/UploadListActionButton.d.ts +1 -0
  34. package/dist/npm/UploadListActionButton.js +40 -27
  35. package/dist/npm/UploadListGroup.js +9 -1
  36. package/dist/npm/UploadListMultiItem.js +24 -20
  37. package/dist/npm/UploadListSingleItem.js +81 -32
  38. package/dist/npm/UploadStatus.js +11 -5
  39. package/dist/npm/UploadUI.js +1 -1
  40. package/dist/npm/package-metadata.js +1 -1
  41. package/package.json +9 -6
@@ -7,6 +7,7 @@ var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
8
  import { classNames, getListeners, getTabIndex, getTemplate, Icon, setRef, templateRendering, validatePackage } from '@progress/kendo-vue-common';
9
9
  import { dropZoneHint, dropZoneNote, messages } from './messages/main.js';
10
+ import { uploadIcon } from '@progress/kendo-svg-icons';
10
11
  import { packageMetadata } from './package-metadata.js';
11
12
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
12
13
  /**
@@ -147,14 +148,16 @@ var ExternalDropZoneVue2 = {
147
148
  }, [h(Icon, {
148
149
  name: 'upload',
149
150
  attrs: this.v3 ? undefined : {
150
- name: 'upload'
151
- }
151
+ name: 'upload',
152
+ icon: uploadIcon
153
+ },
154
+ icon: uploadIcon
152
155
  }), h("span", {
153
156
  "class": 'k-dropzone-hint'
154
157
  }, [hintElement]), h("span", {
155
158
  "class": 'k-dropzone-note'
156
159
  }, [noteElement])]), h("div", {
157
- "class": 'k-widget k-upload'
160
+ "class": 'k-upload'
158
161
  })]);
159
162
  }
160
163
  };
@@ -5,10 +5,11 @@ var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
- import { classNames, setRef } from '@progress/kendo-vue-common';
8
+ import { classNames, guid, setRef } from '@progress/kendo-vue-common';
9
9
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
10
  import { messages, select } from './messages/main.js';
11
11
  import { UploadInput } from './UploadInput.js';
12
+ import { Button } from '@progress/kendo-vue-buttons';
12
13
  /**
13
14
  * @hidden
14
15
  */
@@ -48,6 +49,9 @@ var UploadAddButtonVue2 = {
48
49
  kendoLocalizationService: kendoLocalizationService
49
50
  };
50
51
  },
52
+ created: function created() {
53
+ this.uploadInputId = guid();
54
+ },
51
55
  mounted: function mounted() {
52
56
  this.element = this.v3 ? this.elementRef : this.$refs.element;
53
57
  this.uploadInput = this.v3 ? this.uploadInputRef : this.$refs.uploadInput;
@@ -104,30 +108,49 @@ var UploadAddButtonVue2 = {
104
108
  accept = _a.accept;
105
109
  var localizationService = provideLocalizationService(this);
106
110
  var selectMessage = localizationService.toLanguageString(select, messages[select]);
107
- 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' : '');
111
+ var buttonClassName = classNames('k-upload-button', navigationIndex === addButtonIndex ? 'k-focus' : '');
108
112
  return h("div", {
113
+ "class": "k-upload-button-wrap"
114
+ }, [h("label", {
115
+ "for": this.uploadInputId,
116
+ attrs: this.v3 ? undefined : {
117
+ "for": this.uploadInputId
118
+ }
119
+ }, [
120
+ // @ts-ignore function children
121
+ h(Button, {
109
122
  id: id,
110
123
  attrs: this.v3 ? undefined : {
111
124
  id: id,
125
+ role: 'button',
126
+ disabled: disabled,
127
+ ariaLabel: selectMessage,
112
128
  tabindex: tabIndex
113
129
  },
114
130
  ref: setRef(this, 'element'),
131
+ role: 'button',
132
+ disabled: disabled,
133
+ ariaLabel: selectMessage,
115
134
  "class": buttonClassName,
116
135
  tabindex: tabIndex,
117
136
  onClick: this.onClick,
118
137
  on: this.v3 ? undefined : {
119
138
  "click": this.onClick
120
139
  }
121
- }, [
140
+ }, this.v3 ? function () {
141
+ return [selectMessage];
142
+ } : [selectMessage])]),
122
143
  // @ts-ignore function children
123
144
  h(UploadInput, {
124
- async: async,
145
+ id: this.uploadInputId,
125
146
  attrs: this.v3 ? undefined : {
147
+ id: this.uploadInputId,
126
148
  async: async,
127
149
  multiple: multiple,
128
150
  disabled: disabled,
129
151
  accept: accept
130
152
  },
153
+ async: async,
131
154
  multiple: multiple,
132
155
  disabled: disabled,
133
156
  accept: accept,
@@ -140,7 +163,7 @@ var UploadAddButtonVue2 = {
140
163
  ref: this.v3 ? function (el) {
141
164
  _this.uploadInputRef = el;
142
165
  } : 'uploadInput'
143
- }), h("span", [selectMessage])]);
166
+ })]);
144
167
  }
145
168
  };
146
169
  /**
@@ -103,8 +103,9 @@ var UploadDropZoneVue2 = {
103
103
  dropZoneClasses: function dropZoneClasses() {
104
104
  return {
105
105
  'k-dropzone': true,
106
- 'k-dropzone-active': this.currentDocumentActive,
107
- 'k-dropzone-hovered': this.currentElementActive
106
+ 'k-upload-dropzone': true,
107
+ 'k-active': this.currentDocumentActive,
108
+ 'k-hover': this.currentElementActive
108
109
  };
109
110
  }
110
111
  },
@@ -8,6 +8,7 @@ import { UploadAsyncProps } from './interfaces/UploadAsyncProps';
8
8
  * @hidden
9
9
  */
10
10
  export interface UploadInputProps {
11
+ id: String;
11
12
  async: UploadAsyncProps;
12
13
  multiple?: boolean;
13
14
  disabled?: boolean;
@@ -16,6 +16,7 @@ var UploadInputVue2 = {
16
16
  name: 'KendoVueUploadInput',
17
17
  props: {
18
18
  async: Object,
19
+ id: String,
19
20
  multiple: {
20
21
  type: Boolean,
21
22
  default: undefined
@@ -105,8 +106,9 @@ var UploadInputVue2 = {
105
106
  var selectLabel = localizationService.toLanguageString(select, messages[select]);
106
107
  return h("input", {
107
108
  ref: setRef(this, 'input'),
108
- autocomplete: 'off',
109
+ id: this.id,
109
110
  attrs: this.v3 ? undefined : {
111
+ id: this.id,
110
112
  autocomplete: 'off',
111
113
  name: async.saveField,
112
114
  accept: accept,
@@ -119,6 +121,7 @@ var UploadInputVue2 = {
119
121
  "aria-labelledby": ariaLabelledBy,
120
122
  "aria-describedby": ariaDescribedBy
121
123
  },
124
+ autocomplete: 'off',
122
125
  name: async.saveField,
123
126
  accept: accept,
124
127
  type: 'file',
@@ -14,6 +14,7 @@ export interface UploadListActionButtonProps {
14
14
  status: UploadFileStatus;
15
15
  async: UploadAsyncProps;
16
16
  disabled: boolean;
17
+ files: any[];
17
18
  }
18
19
  /**
19
20
  * @hidden
@@ -6,6 +6,7 @@ var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
8
  import { classNames } from '@progress/kendo-vue-common';
9
+ import { Button as KButton } from '@progress/kendo-vue-buttons';
9
10
  import { UploadFileStatus } from './interfaces/UploadFileStatus.js';
10
11
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
11
12
  import { messages, cancel, retry, remove } from './messages/main.js';
@@ -19,7 +20,8 @@ var UploadListActionButtonVue2 = {
19
20
  uid: String,
20
21
  status: Number,
21
22
  async: Object,
22
- disabled: Boolean
23
+ disabled: Boolean,
24
+ files: Array
23
25
  },
24
26
  // @ts-ignore
25
27
  emits: {
@@ -49,7 +51,7 @@ var UploadListActionButtonVue2 = {
49
51
  return localizationService.toLanguageString(retry, messages[retry]);
50
52
  },
51
53
  buttonClassNames: function buttonClassNames(type) {
52
- return classNames('k-button k-button-icon k-flat k-upload-action', this.$props.disabled ? 'k-disabled' : '', this.actionFocused && type === 'action' || this.retryFocused && type === 'retry' ? 'k-focus' : '');
54
+ return classNames(this.actionFocused && type === 'action' || this.retryFocused && type === 'retry' ? 'k-focus' : '');
53
55
  },
54
56
  onRetryFocus: function onRetryFocus() {
55
57
  this.retryFocused = true;
@@ -101,24 +103,37 @@ var UploadListActionButtonVue2 = {
101
103
  var _a = this.$props,
102
104
  status = _a.status,
103
105
  progress = _a.progress;
104
- var actionButtonClassNames = classNames('k-icon', status === UploadFileStatus.Uploading ? 'k-cancel k-i-deny' : '', status !== UploadFileStatus.Uploading ? 'k-delete k-i-x' : '');
105
106
  var isRetryVisible = status === UploadFileStatus.UploadFailed;
106
107
  var isProgressVisible = status === UploadFileStatus.Uploading;
107
108
  var isActionHidden = (status === UploadFileStatus.Uploaded || status === UploadFileStatus.Initial) && !this.$props.async.removeUrl;
108
109
  var localizationService = provideLocalizationService(this);
109
110
  var percent = '%';
110
- return h("strong", {
111
- "class": 'k-upload-status'
111
+ return h("div", {
112
+ "class": 'k-upload-actions'
112
113
  }, [isProgressVisible ? h("span", {
113
114
  "class": 'k-upload-pct'
114
- }, [progress, percent]) : undefined, isRetryVisible ? h("button", {
115
+ }, [progress, percent]) : undefined, isRetryVisible ?
116
+ // @ts-ignore
117
+ h(KButton, {
115
118
  type: "button",
116
119
  attrs: this.v3 ? undefined : {
117
120
  type: "button",
118
- tabindex: -1
121
+ tabindex: -1,
122
+ disabled: this.disabled,
123
+ icon: 'arrow-rotate-cw-small'
124
+ // svgIcon={isProgressVisible ? denyIcon : xIcon}
125
+ ,
126
+ iconClass: 'k-retry',
127
+ ariaLabel: this.retryButtonTitle(localizationService),
128
+ title: this.retryButtonTitle(localizationService)
119
129
  },
120
130
  tabindex: -1,
131
+ disabled: this.disabled,
121
132
  "class": this.buttonClassNames('retry'),
133
+ icon: 'arrow-rotate-cw-small',
134
+ iconClass: 'k-retry',
135
+ ariaLabel: this.retryButtonTitle(localizationService),
136
+ title: this.retryButtonTitle(localizationService),
122
137
  onFocus: this.onRetryFocus,
123
138
  on: this.v3 ? undefined : {
124
139
  "focus": this.onRetryFocus,
@@ -127,21 +142,24 @@ var UploadListActionButtonVue2 = {
127
142
  },
128
143
  onBlur: this.onRetryBlur,
129
144
  onClick: this.onRetryClick
130
- }, [h("span", {
131
- "aria-label": this.retryButtonTitle(localizationService),
132
- attrs: this.v3 ? undefined : {
133
- "aria-label": this.retryButtonTitle(localizationService),
134
- title: this.retryButtonTitle(localizationService)
135
- },
136
- title: this.retryButtonTitle(localizationService),
137
- "class": 'k-icon k-retry k-i-arrow-rotate-cw-small'
138
- })]) : undefined, !isActionHidden ? h("button", {
145
+ }) : undefined, !isActionHidden ?
146
+ // @ts-ignore
147
+ h(KButton, {
139
148
  type: "button",
140
149
  attrs: this.v3 ? undefined : {
141
150
  type: "button",
142
- tabindex: -1
151
+ fillMode: 'flat',
152
+ tabindex: -1,
153
+ disabled: this.disabled,
154
+ icon: isProgressVisible ? 'deny' : 'x'
155
+ // svgIcon={isProgressVisible ? denyIcon : xIcon}
156
+ ,
157
+ ariaLabel: this.actionButtonTitle(status, localizationService),
158
+ title: this.actionButtonTitle(status, localizationService)
143
159
  },
160
+ fillMode: 'flat',
144
161
  tabindex: -1,
162
+ disabled: this.disabled,
145
163
  "class": this.buttonClassNames('action'),
146
164
  onFocus: this.onActionFocus,
147
165
  on: this.v3 ? undefined : {
@@ -150,16 +168,11 @@ var UploadListActionButtonVue2 = {
150
168
  "click": this.onActionClick
151
169
  },
152
170
  onBlur: this.onActionBlur,
153
- onClick: this.onActionClick
154
- }, [h("span", {
155
- "aria-label": this.actionButtonTitle(status, localizationService),
156
- attrs: this.v3 ? undefined : {
157
- "aria-label": this.actionButtonTitle(status, localizationService),
158
- title: this.actionButtonTitle(status, localizationService)
159
- },
160
- title: this.actionButtonTitle(status, localizationService),
161
- "class": actionButtonClassNames
162
- })]) : undefined]);
171
+ onClick: this.onActionClick,
172
+ icon: isProgressVisible ? 'deny' : 'x',
173
+ ariaLabel: this.actionButtonTitle(status, localizationService),
174
+ title: this.actionButtonTitle(status, localizationService)
175
+ }) : undefined]);
163
176
  }
164
177
  };
165
178
  /**
@@ -74,7 +74,15 @@ var UploadListGroupVue2 = {
74
74
  list = _a.list;
75
75
  var firstFile = files[0];
76
76
  var isFileSuccess = firstFile.status === UploadFileStatus.Uploaded || firstFile.status === UploadFileStatus.Initial;
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' : '');
77
+ var validationErrors = utils.filesHaveValidationErrors(files);
78
+ var actionFailed = firstFile.status === UploadFileStatus.UploadFailed || firstFile.status === UploadFileStatus.RemoveFailed;
79
+ var liClassName = classNames('k-file', {
80
+ 'k-file-invalid': validationErrors,
81
+ 'k-file-error': actionFailed,
82
+ 'k-file-progress': firstFile.status === UploadFileStatus.Uploading,
83
+ 'k-file-success': isFileSuccess,
84
+ 'k-focus': navigationIndex === index
85
+ });
78
86
  var itemComponent;
79
87
  var defaultItemRendering = files.length === 1 ?
80
88
  // @ts-ignore
@@ -5,11 +5,13 @@ var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
- import { classNames } from '@progress/kendo-vue-common';
8
+ import { classNames, Icon } from '@progress/kendo-vue-common';
9
9
  import utils from './utils/utils.js';
10
10
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
11
11
  import { messages, total, files as filesM, statusUploadFailed, statusUploaded } from './messages/main.js';
12
12
  import { UploadListActionButton } from './UploadListActionButton.js';
13
+ import { ProgressBar } from '@progress/kendo-vue-progressbars';
14
+ import { copyIcon } from '@progress/kendo-svg-icons';
13
15
  /**
14
16
  * @hidden
15
17
  */
@@ -90,7 +92,7 @@ var UploadListMultiItemVue2 = {
90
92
  return files.map(function (file) {
91
93
  return h("span", {
92
94
  key: file.name,
93
- "class": 'k-file-name-size-wrapper'
95
+ "class": 'k-file-info'
94
96
  }, [h("span", {
95
97
  "class": 'k-file-name',
96
98
  title: file.name,
@@ -98,7 +100,7 @@ var UploadListMultiItemVue2 = {
98
100
  title: file.name
99
101
  }
100
102
  }, [file.name]), utils.fileHasValidationErrors(file) ? h("span", {
101
- "class": 'k-file-validation-message k-text-error'
103
+ "class": 'k-file-validation-message'
102
104
  }, [this.getFileValidationMessage(file)]) : h("span", {
103
105
  key: "".concat(file.name, "-size"),
104
106
  "class": 'k-file-size'
@@ -107,29 +109,31 @@ var UploadListMultiItemVue2 = {
107
109
  };
108
110
  return h("div", {
109
111
  "class": itemClassName
110
- }, [h("div", {
111
- "class": 'k-progressbar',
112
- style: {
113
- transition: 'opacity 1s ease-in-out',
114
- opacity: showProgressBar ? 1 : 0
115
- }
116
- }, [h("span", {
117
- "class": 'k-progress',
118
- style: {
119
- width: (progress || 0) + '%'
120
- }
121
- })]), h("span", {
122
- "class": 'k-multiple-files-group-wrapper'
123
- }, [h("span", {
124
- "class": 'k-file-group k-icon k-i-copy'
112
+ }, [showProgressBar && h(ProgressBar, {
113
+ value: progress || 0,
114
+ attrs: this.v3 ? undefined : {
115
+ value: progress || 0,
116
+ labelVisible: false
117
+ },
118
+ labelVisible: false
119
+ }), h("span", {
120
+ "class": 'k-file-icon-wrapper'
121
+ }, [h(Icon, {
122
+ name: 'copy',
123
+ attrs: this.v3 ? undefined : {
124
+ name: 'copy',
125
+ icon: copyIcon
126
+ },
127
+ icon: copyIcon,
128
+ "class": 'k-file-icon'
125
129
  })]), h("span", {
126
130
  "class": "k-multiple-files-wrapper"
127
131
  }, [mapFiles.call(this), !isUploadFailed ? progress !== 100 ? h("span", {
128
- "class": 'k-file-information'
132
+ "class": 'k-file-summary'
129
133
  }, ["".concat(totalMessage, ": ").concat(files.length, " ").concat(filesMessage, ", ").concat(utils.getTotalFilesSizeMessage(files))]) : h("span", {
130
- "class": 'k-file-information k-text-success'
134
+ "class": 'k-file-summary k-text-success'
131
135
  }, ["".concat(files.length, " ").concat(successMessage)]) : h("span", {
132
- "class": 'k-file-validation-message k-text-error'
136
+ "class": 'k-file-validation-message'
133
137
  }, ["".concat(files.length, " ").concat(uploadFailedMessage)])]),
134
138
  // @ts-ignore function children
135
139
  h(UploadListActionButton, {
@@ -5,11 +5,13 @@ var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
6
  var ref = allVue.ref;
7
7
  var inject = allVue.inject;
8
- import { classNames } from '@progress/kendo-vue-common';
8
+ import { classNames, Icon } from '@progress/kendo-vue-common';
9
9
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
+ import { ProgressBar } from '@progress/kendo-vue-progressbars';
10
11
  import { messages, statusUploaded, statusUploadFailed } from './messages/main.js';
11
12
  import utils from './utils/utils.js';
12
13
  import { UploadListActionButton } from './UploadListActionButton.js';
14
+ import { fileAudioIcon, fileConfigIcon, fileDataIcon, fileIcon, fileImageIcon, filePdfIcon, filePresentationIcon, fileProgrammingIcon, fileTxtIcon, fileVideoIcon, fileZipIcon } from '@progress/kendo-svg-icons';
13
15
  /**
14
16
  * @hidden
15
17
  */
@@ -55,7 +57,7 @@ var UploadListSingleItemVue2 = {
55
57
  }
56
58
  return validationMessage;
57
59
  },
58
- getFileExtensionIcon: function getFileExtensionIcon(file) {
60
+ getFileExtensionName: function getFileExtensionName(file) {
59
61
  switch (file.extension) {
60
62
  case '.png':
61
63
  case '.jpg':
@@ -63,41 +65,86 @@ var UploadListSingleItemVue2 = {
63
65
  case '.tiff':
64
66
  case '.bmp':
65
67
  case '.gif':
66
- return 'k-i-file-image';
68
+ return 'file-image';
67
69
  case '.mp3':
68
70
  case '.mp4':
69
71
  case '.wav':
70
- return 'k-i-file-audio';
72
+ return 'file-audio';
71
73
  case '.mkv':
72
74
  case '.webm':
73
75
  case '.flv':
74
76
  case '.gifv':
75
77
  case '.avi':
76
78
  case '.wmv':
77
- return 'k-i-file-video';
79
+ return 'file-video';
78
80
  case '.txt':
79
- return 'k-i-file-txt';
81
+ return 'file-txt';
80
82
  case '.pdf':
81
- return 'k-i-file-pdf';
83
+ return 'file-pdf';
82
84
  case '.ppt':
83
85
  case '.pptx':
84
- return 'k-i-file-presentation';
86
+ return 'file-presentation';
85
87
  case '.csv':
86
88
  case '.xls':
87
89
  case '.xlsx':
88
- return 'k-i-file-data';
90
+ return 'file-data';
89
91
  case '.html':
90
92
  case '.css':
91
93
  case '.js':
92
94
  case '.ts':
93
- return 'k-i-file-programming';
95
+ return 'file-programming';
94
96
  case '.exe':
95
- return 'k-i-file-config';
97
+ return 'file-config';
96
98
  case '.zip':
97
99
  case '.rar':
98
- return 'k-i-file-zip';
100
+ return 'file-zip';
99
101
  default:
100
- return 'k-i-file';
102
+ return 'file';
103
+ }
104
+ },
105
+ getFileExtensionSVG: function getFileExtensionSVG(file) {
106
+ switch (file.extension) {
107
+ case '.png':
108
+ case '.jpg':
109
+ case '.jpeg':
110
+ case '.tiff':
111
+ case '.bmp':
112
+ case '.gif':
113
+ return fileImageIcon;
114
+ case '.mp3':
115
+ case '.mp4':
116
+ case '.wav':
117
+ return fileAudioIcon;
118
+ case '.mkv':
119
+ case '.webm':
120
+ case '.flv':
121
+ case '.gifv':
122
+ case '.avi':
123
+ case '.wmv':
124
+ return fileVideoIcon;
125
+ case '.txt':
126
+ return fileTxtIcon;
127
+ case '.pdf':
128
+ return filePdfIcon;
129
+ case '.ppt':
130
+ case '.pptx':
131
+ return filePresentationIcon;
132
+ case '.csv':
133
+ case '.xls':
134
+ case '.xlsx':
135
+ return fileDataIcon;
136
+ case '.html':
137
+ case '.css':
138
+ case '.js':
139
+ case '.ts':
140
+ return fileProgrammingIcon;
141
+ case '.exe':
142
+ return fileConfigIcon;
143
+ case '.zip':
144
+ case '.rar':
145
+ return fileZipIcon;
146
+ default:
147
+ return fileIcon;
101
148
  }
102
149
  }
103
150
  },
@@ -125,23 +172,23 @@ var UploadListSingleItemVue2 = {
125
172
  var showProgressBar = !isUploadValidationFailed && !isUploaded && !isUploadFailed;
126
173
  var renderValidationError = function renderValidationError(currentFile, isCurrentUploadFailed) {
127
174
  return h("span", {
128
- "class": 'k-file-name-size-wrapper',
175
+ "class": 'k-file-info',
129
176
  key: '2'
130
177
  }, [h("span", {
131
- "class": 'k-file-name k-file-name-invalid',
178
+ "class": 'k-file-name',
132
179
  title: currentFile.name,
133
180
  attrs: this.v3 ? undefined : {
134
181
  title: currentFile.name
135
182
  }
136
183
  }, [currentFile.name]), h("span", {
137
- "class": 'k-file-validation-message k-text-error'
184
+ "class": 'k-file-validation-message'
138
185
  }, [this.getFileValidationMessage(currentFile, isCurrentUploadFailed)])]);
139
186
  };
140
187
  var renderFileDetails = function renderFileDetails(currentFile) {
141
188
  var localizationService = provideLocalizationService(this);
142
189
  var successMessage = localizationService.toLanguageString(statusUploaded, messages[statusUploaded]);
143
190
  return h("span", {
144
- "class": 'k-file-name-size-wrapper',
191
+ "class": 'k-file-info',
145
192
  key: '2'
146
193
  }, [h("span", {
147
194
  "class": 'k-file-name',
@@ -152,27 +199,29 @@ var UploadListSingleItemVue2 = {
152
199
  }, [currentFile.name]), currentFile.progress !== 100 ? h("span", {
153
200
  "class": 'k-file-size'
154
201
  }, [utils.getTotalFilesSizeMessage([currentFile])]) : h("span", {
155
- "class": 'k-file-validation-message k-text-success'
202
+ "class": 'k-file-validation-message'
156
203
  }, [successMessage])]);
157
204
  };
158
205
  return h("div", {
159
206
  "class": itemClassName
160
- }, [h("div", {
161
- "class": 'k-progressbar',
162
- style: {
163
- transition: 'opacity 1s ease-in-out',
164
- opacity: showProgressBar ? 1 : 0
165
- }
166
- }, [h("span", {
167
- "class": 'k-progress',
168
- style: {
169
- width: (file.progress || 0) + '%'
170
- }
171
- })]), h("span", {
172
- "class": 'k-file-group-wrapper',
207
+ }, [showProgressBar && h(ProgressBar, {
208
+ value: file.progress || 0,
209
+ attrs: this.v3 ? undefined : {
210
+ value: file.progress || 0,
211
+ labelVisible: false
212
+ },
213
+ labelVisible: false
214
+ }), h("span", {
215
+ "class": 'k-file-icon-wrapper',
173
216
  key: '1'
174
- }, [h("span", {
175
- "class": 'k-file-group k-icon ' + this.getFileExtensionIcon(file)
217
+ }, [h(Icon, {
218
+ name: this.getFileExtensionName(file),
219
+ attrs: this.v3 ? undefined : {
220
+ name: this.getFileExtensionName(file),
221
+ icon: this.getFileExtensionSVG(file)
222
+ },
223
+ icon: this.getFileExtensionSVG(file),
224
+ "class": 'k-file-icon'
176
225
  }), h("span", {
177
226
  "class": 'k-file-state'
178
227
  })]), isUploadValidationFailed || isUploadFailed ? renderValidationError.call(this, file, isUploadFailed) : renderFileDetails.call(this, file),
@@ -3,11 +3,11 @@ import * as Vue from 'vue';
3
3
  var allVue = Vue;
4
4
  var gh = allVue.h;
5
5
  var isV3 = allVue.version && allVue.version[0] === '3';
6
- var ref = allVue.ref;
7
6
  var inject = allVue.inject;
8
- import { classNames } from '@progress/kendo-vue-common';
7
+ import { classNames, Icon } from '@progress/kendo-vue-common';
9
8
  import { provideLocalizationService } from '@progress/kendo-vue-intl';
10
9
  import { messages, headerStatusUploading, headerStatusUploaded } from './messages/main.js';
10
+ import { checkIcon, exclamationCircleIcon } from '@progress/kendo-svg-icons';
11
11
  /**
12
12
  * @hidden
13
13
  */
@@ -37,7 +37,6 @@ var UploadStatusVue2 = {
37
37
  isUploading = _a.isUploading,
38
38
  isUploaded = _a.isUploaded,
39
39
  isUploadFailed = _a.isUploadFailed;
40
- var statusClassName = classNames(!isUploading && !isUploadFailed && isUploaded ? 'k-i-checkmark' : '', !isUploading && isUploadFailed ? 'k-i-exception' : '', isUploading ? 'k-i-loading' : '', 'k-icon');
41
40
  var statusText = '';
42
41
  var localizationService = provideLocalizationService(this);
43
42
  if (isUploading) {
@@ -46,9 +45,16 @@ var UploadStatusVue2 = {
46
45
  statusText = localizationService.toLanguageString(headerStatusUploaded, messages[headerStatusUploaded]);
47
46
  }
48
47
  return h("div", {
49
- "class": classNames('k-upload-status', 'k-upload-status-total')
50
- }, [h("span", {
51
- "class": statusClassName
48
+ "class": classNames('k-upload-status')
49
+ }, [isUploading ? h("span", {
50
+ "class": 'k-icon k-i-loading'
51
+ }) : h(Icon, {
52
+ name: isUploadFailed ? 'exclamation-circle' : isUploaded ? 'check' : '',
53
+ attrs: this.v3 ? undefined : {
54
+ name: isUploadFailed ? 'exclamation-circle' : isUploaded ? 'check' : '',
55
+ icon: isUploadFailed ? exclamationCircleIcon : isUploaded ? checkIcon : undefined
56
+ },
57
+ icon: isUploadFailed ? exclamationCircleIcon : isUploaded ? checkIcon : undefined
52
58
  }), statusText]);
53
59
  }
54
60
  };
@@ -157,7 +157,7 @@ var UploadUIVue2 = {
157
157
  ariaLabelledBy = _a.ariaLabelledBy,
158
158
  ariaDescribedBy = _a.ariaDescribedBy,
159
159
  async = _a.async;
160
- var className = classNames('k-widget', 'k-upload', this.$props.className, disabled ? 'k-disabled' : '');
160
+ var className = classNames('k-upload', 'k-upload-async', this.$props.className, disabled ? 'k-disabled' : '');
161
161
  return h("div", {
162
162
  ref: setRef(this, 'container'),
163
163
  "class": className,
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-vue-upload',
6
6
  productName: 'Kendo UI for Vue',
7
7
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1672390325,
8
+ publishDate: 1673274481,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
11
  };