@progress/kendo-vue-upload 3.7.4-dev.202212020747 → 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.
- package/README.md +1 -1
- package/dist/cdn/js/kendo-vue-upload.js +1 -1
- package/dist/es/ExternalDropZone.js +10 -4
- package/dist/es/UploadAddButton.d.ts +0 -2
- package/dist/es/UploadAddButton.js +29 -18
- package/dist/es/UploadDropZone.js +3 -2
- package/dist/es/UploadInput.d.ts +4 -0
- package/dist/es/UploadInput.js +41 -4
- package/dist/es/UploadListActionButton.d.ts +1 -0
- package/dist/es/UploadListActionButton.js +40 -27
- package/dist/es/UploadListGroup.js +9 -1
- package/dist/es/UploadListMultiItem.js +25 -21
- package/dist/es/UploadListSingleItem.js +82 -33
- package/dist/es/UploadStatus.js +12 -6
- package/dist/es/UploadUI.js +1 -1
- package/dist/es/messages/main.d.ts +10 -0
- package/dist/es/messages/main.js +10 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/ExternalDropZone.js +10 -4
- package/dist/esm/UploadAddButton.d.ts +0 -2
- package/dist/esm/UploadAddButton.js +29 -18
- package/dist/esm/UploadDropZone.js +3 -2
- package/dist/esm/UploadInput.d.ts +4 -0
- package/dist/esm/UploadInput.js +41 -4
- package/dist/esm/UploadListActionButton.d.ts +1 -0
- package/dist/esm/UploadListActionButton.js +40 -27
- package/dist/esm/UploadListGroup.js +9 -1
- package/dist/esm/UploadListMultiItem.js +25 -21
- package/dist/esm/UploadListSingleItem.js +82 -33
- package/dist/esm/UploadStatus.js +12 -6
- package/dist/esm/UploadUI.js +1 -1
- package/dist/esm/messages/main.d.ts +10 -0
- package/dist/esm/messages/main.js +10 -0
- package/dist/esm/package-metadata.js +1 -1
- package/dist/npm/ExternalDropZone.js +9 -3
- package/dist/npm/UploadAddButton.d.ts +0 -2
- package/dist/npm/UploadAddButton.js +28 -17
- package/dist/npm/UploadDropZone.js +3 -2
- package/dist/npm/UploadInput.d.ts +4 -0
- package/dist/npm/UploadInput.js +41 -4
- package/dist/npm/UploadListActionButton.d.ts +1 -0
- package/dist/npm/UploadListActionButton.js +40 -27
- package/dist/npm/UploadListGroup.js +9 -1
- package/dist/npm/UploadListMultiItem.js +24 -20
- package/dist/npm/UploadListSingleItem.js +81 -32
- package/dist/npm/UploadStatus.js +11 -5
- package/dist/npm/UploadUI.js +1 -1
- package/dist/npm/messages/main.d.ts +10 -0
- package/dist/npm/messages/main.js +11 -1
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +9 -6
|
@@ -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(
|
|
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("
|
|
111
|
-
"class": 'k-upload-
|
|
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 ?
|
|
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
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
|
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-
|
|
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
|
|
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(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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-
|
|
132
|
+
"class": 'k-file-summary'
|
|
129
133
|
}, ["".concat(totalMessage, ": ").concat(files.length, " ").concat(filesMessage, ", ").concat(utils.getTotalFilesSizeMessage(files))]) : h("span", {
|
|
130
|
-
"class": 'k-file-
|
|
134
|
+
"class": 'k-file-summary k-text-success'
|
|
131
135
|
}, ["".concat(files.length, " ").concat(successMessage)]) : h("span", {
|
|
132
|
-
"class": 'k-file-validation-message
|
|
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
|
-
|
|
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 '
|
|
68
|
+
return 'file-image';
|
|
67
69
|
case '.mp3':
|
|
68
70
|
case '.mp4':
|
|
69
71
|
case '.wav':
|
|
70
|
-
return '
|
|
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 '
|
|
79
|
+
return 'file-video';
|
|
78
80
|
case '.txt':
|
|
79
|
-
return '
|
|
81
|
+
return 'file-txt';
|
|
80
82
|
case '.pdf':
|
|
81
|
-
return '
|
|
83
|
+
return 'file-pdf';
|
|
82
84
|
case '.ppt':
|
|
83
85
|
case '.pptx':
|
|
84
|
-
return '
|
|
86
|
+
return 'file-presentation';
|
|
85
87
|
case '.csv':
|
|
86
88
|
case '.xls':
|
|
87
89
|
case '.xlsx':
|
|
88
|
-
return '
|
|
90
|
+
return 'file-data';
|
|
89
91
|
case '.html':
|
|
90
92
|
case '.css':
|
|
91
93
|
case '.js':
|
|
92
94
|
case '.ts':
|
|
93
|
-
return '
|
|
95
|
+
return 'file-programming';
|
|
94
96
|
case '.exe':
|
|
95
|
-
return '
|
|
97
|
+
return 'file-config';
|
|
96
98
|
case '.zip':
|
|
97
99
|
case '.rar':
|
|
98
|
-
return '
|
|
100
|
+
return 'file-zip';
|
|
99
101
|
default:
|
|
100
|
-
return '
|
|
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-
|
|
175
|
+
"class": 'k-file-info',
|
|
129
176
|
key: '2'
|
|
130
177
|
}, [h("span", {
|
|
131
|
-
"class": 'k-file-name
|
|
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
|
|
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-
|
|
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
|
|
202
|
+
"class": 'k-file-validation-message'
|
|
156
203
|
}, [successMessage])]);
|
|
157
204
|
};
|
|
158
205
|
return h("div", {
|
|
159
206
|
"class": itemClassName
|
|
160
|
-
}, [h(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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(
|
|
175
|
-
|
|
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),
|
package/dist/esm/UploadStatus.js
CHANGED
|
@@ -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'
|
|
50
|
-
}, [h("span", {
|
|
51
|
-
"class":
|
|
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
|
};
|
package/dist/esm/UploadUI.js
CHANGED
|
@@ -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-
|
|
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,
|
|
@@ -46,6 +46,14 @@ export declare const retry = "upload.retry";
|
|
|
46
46
|
* @hidden
|
|
47
47
|
*/
|
|
48
48
|
export declare const select = "upload.select";
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export declare const selectTitle = "upload.selectTitle";
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
export declare const selectNoFilesTitle = "upload.selectNoFilesTitle";
|
|
49
57
|
/**
|
|
50
58
|
* @hidden
|
|
51
59
|
*/
|
|
@@ -90,6 +98,8 @@ export declare const messages: {
|
|
|
90
98
|
"upload.remove": string;
|
|
91
99
|
"upload.retry": string;
|
|
92
100
|
"upload.select": string;
|
|
101
|
+
"upload.selectTitle": string;
|
|
102
|
+
"upload.selectNoFilesTitle": string;
|
|
93
103
|
"upload.uploadSelectedFiles": string;
|
|
94
104
|
"upload.total": string;
|
|
95
105
|
"upload.files": string;
|
|
@@ -47,6 +47,14 @@ export var retry = 'upload.retry';
|
|
|
47
47
|
* @hidden
|
|
48
48
|
*/
|
|
49
49
|
export var select = 'upload.select';
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
export var selectTitle = 'upload.selectTitle';
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
export var selectNoFilesTitle = 'upload.selectNoFilesTitle';
|
|
50
58
|
/**
|
|
51
59
|
* @hidden
|
|
52
60
|
*/
|
|
@@ -91,6 +99,8 @@ export var messages = (_a = {},
|
|
|
91
99
|
_a[remove] = 'Remove',
|
|
92
100
|
_a[retry] = 'Retry',
|
|
93
101
|
_a[select] = 'Select files...',
|
|
102
|
+
_a[selectTitle] = 'Press to select more files',
|
|
103
|
+
_a[selectNoFilesTitle] = 'No files selected',
|
|
94
104
|
_a[uploadSelectedFiles] = 'Upload',
|
|
95
105
|
_a[total] = 'Total',
|
|
96
106
|
_a[files] = 'files',
|
|
@@ -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:
|
|
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
|
};
|
|
@@ -13,6 +13,7 @@ var ref = allVue.ref;
|
|
|
13
13
|
var inject = allVue.inject;
|
|
14
14
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
15
15
|
var main_1 = require("./messages/main");
|
|
16
|
+
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
16
17
|
var package_metadata_1 = require("./package-metadata");
|
|
17
18
|
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
18
19
|
/**
|
|
@@ -150,14 +151,19 @@ var ExternalDropZoneVue2 = {
|
|
|
150
151
|
}, [h("div", {
|
|
151
152
|
style: this.$props.innerStyle,
|
|
152
153
|
"class": 'k-dropzone-inner'
|
|
153
|
-
}, [h(
|
|
154
|
-
|
|
154
|
+
}, [h(kendo_vue_common_1.Icon, {
|
|
155
|
+
name: 'upload',
|
|
156
|
+
attrs: this.v3 ? undefined : {
|
|
157
|
+
name: 'upload',
|
|
158
|
+
icon: kendo_svg_icons_1.uploadIcon
|
|
159
|
+
},
|
|
160
|
+
icon: kendo_svg_icons_1.uploadIcon
|
|
155
161
|
}), h("span", {
|
|
156
162
|
"class": 'k-dropzone-hint'
|
|
157
163
|
}, [hintElement]), h("span", {
|
|
158
164
|
"class": 'k-dropzone-note'
|
|
159
165
|
}, [noteElement])]), h("div", {
|
|
160
|
-
"class": 'k-
|
|
166
|
+
"class": 'k-upload'
|
|
161
167
|
})]);
|
|
162
168
|
}
|
|
163
169
|
};
|