@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
|
@@ -5,8 +5,9 @@ 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, getListeners, getTabIndex, getTemplate, setRef, templateRendering, validatePackage } from '@progress/kendo-vue-common';
|
|
8
|
+
import { classNames, getListeners, getTabIndex, getTemplate, Icon, setRef, templateRendering, validatePackage } from '@progress/kendo-vue-common';
|
|
9
9
|
import { dropZoneHint, dropZoneNote, messages } from './messages/main';
|
|
10
|
+
import { uploadIcon } from '@progress/kendo-svg-icons';
|
|
10
11
|
import { packageMetadata } from './package-metadata';
|
|
11
12
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
12
13
|
/**
|
|
@@ -144,14 +145,19 @@ var ExternalDropZoneVue2 = {
|
|
|
144
145
|
}, [h("div", {
|
|
145
146
|
style: this.$props.innerStyle,
|
|
146
147
|
"class": 'k-dropzone-inner'
|
|
147
|
-
}, [h(
|
|
148
|
-
|
|
148
|
+
}, [h(Icon, {
|
|
149
|
+
name: 'upload',
|
|
150
|
+
attrs: this.v3 ? undefined : {
|
|
151
|
+
name: 'upload',
|
|
152
|
+
icon: uploadIcon
|
|
153
|
+
},
|
|
154
|
+
icon: uploadIcon
|
|
149
155
|
}), h("span", {
|
|
150
156
|
"class": 'k-dropzone-hint'
|
|
151
157
|
}, [hintElement]), h("span", {
|
|
152
158
|
"class": 'k-dropzone-note'
|
|
153
159
|
}, [noteElement])]), h("div", {
|
|
154
|
-
"class": 'k-
|
|
160
|
+
"class": 'k-upload'
|
|
155
161
|
})]);
|
|
156
162
|
}
|
|
157
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';
|
|
11
11
|
import { UploadInput } from './UploadInput';
|
|
12
|
+
import { Button } from '@progress/kendo-vue-buttons';
|
|
12
13
|
/**
|
|
13
14
|
* @hidden
|
|
14
15
|
*/
|
|
@@ -23,9 +24,7 @@ var UploadAddButtonVue2 = {
|
|
|
23
24
|
multiple: Boolean,
|
|
24
25
|
disabled: Boolean,
|
|
25
26
|
accept: String,
|
|
26
|
-
id: String
|
|
27
|
-
ariaLabelledBy: String,
|
|
28
|
-
ariaDescribedBy: String
|
|
27
|
+
id: String
|
|
29
28
|
},
|
|
30
29
|
inject: {
|
|
31
30
|
kendoLocalizationService: {
|
|
@@ -50,6 +49,9 @@ var UploadAddButtonVue2 = {
|
|
|
50
49
|
kendoLocalizationService: kendoLocalizationService
|
|
51
50
|
};
|
|
52
51
|
},
|
|
52
|
+
created: function created() {
|
|
53
|
+
this.uploadInputId = guid();
|
|
54
|
+
},
|
|
53
55
|
mounted: function mounted() {
|
|
54
56
|
this.element = this.v3 ? this.elementRef : this.$refs.element;
|
|
55
57
|
this.uploadInput = this.v3 ? this.uploadInputRef : this.$refs.uploadInput;
|
|
@@ -100,46 +102,55 @@ var UploadAddButtonVue2 = {
|
|
|
100
102
|
addButtonIndex = _a.addButtonIndex,
|
|
101
103
|
tabIndex = _a.tabIndex,
|
|
102
104
|
id = _a.id,
|
|
103
|
-
ariaLabelledBy = _a.ariaLabelledBy,
|
|
104
|
-
ariaDescribedBy = _a.ariaDescribedBy,
|
|
105
105
|
async = _a.async,
|
|
106
106
|
multiple = _a.multiple,
|
|
107
107
|
disabled = _a.disabled,
|
|
108
108
|
accept = _a.accept;
|
|
109
109
|
var localizationService = provideLocalizationService(this);
|
|
110
110
|
var selectMessage = localizationService.toLanguageString(select, messages[select]);
|
|
111
|
-
var buttonClassName = classNames('k-
|
|
111
|
+
var buttonClassName = classNames('k-upload-button', navigationIndex === addButtonIndex ? 'k-focus' : '');
|
|
112
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, {
|
|
113
122
|
id: id,
|
|
114
123
|
attrs: this.v3 ? undefined : {
|
|
115
124
|
id: id,
|
|
116
|
-
role:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"aria-describedby": ariaDescribedBy,
|
|
125
|
+
role: 'button',
|
|
126
|
+
disabled: disabled,
|
|
127
|
+
ariaLabel: selectMessage,
|
|
120
128
|
tabindex: tabIndex
|
|
121
129
|
},
|
|
122
130
|
ref: setRef(this, 'element'),
|
|
123
|
-
role:
|
|
131
|
+
role: 'button',
|
|
132
|
+
disabled: disabled,
|
|
133
|
+
ariaLabel: selectMessage,
|
|
124
134
|
"class": buttonClassName,
|
|
125
|
-
"aria-label": selectMessage,
|
|
126
|
-
"aria-labelledby": ariaLabelledBy,
|
|
127
|
-
"aria-describedby": ariaDescribedBy,
|
|
128
135
|
tabindex: tabIndex,
|
|
129
136
|
onClick: this.onClick,
|
|
130
137
|
on: this.v3 ? undefined : {
|
|
131
138
|
"click": this.onClick
|
|
132
139
|
}
|
|
133
|
-
},
|
|
140
|
+
}, this.v3 ? function () {
|
|
141
|
+
return [selectMessage];
|
|
142
|
+
} : [selectMessage])]),
|
|
134
143
|
// @ts-ignore function children
|
|
135
144
|
h(UploadInput, {
|
|
136
|
-
|
|
145
|
+
id: this.uploadInputId,
|
|
137
146
|
attrs: this.v3 ? undefined : {
|
|
147
|
+
id: this.uploadInputId,
|
|
138
148
|
async: async,
|
|
139
149
|
multiple: multiple,
|
|
140
150
|
disabled: disabled,
|
|
141
151
|
accept: accept
|
|
142
152
|
},
|
|
153
|
+
async: async,
|
|
143
154
|
multiple: multiple,
|
|
144
155
|
disabled: disabled,
|
|
145
156
|
accept: accept,
|
|
@@ -152,7 +163,7 @@ var UploadAddButtonVue2 = {
|
|
|
152
163
|
ref: this.v3 ? function (el) {
|
|
153
164
|
_this.uploadInputRef = el;
|
|
154
165
|
} : 'uploadInput'
|
|
155
|
-
})
|
|
166
|
+
})]);
|
|
156
167
|
}
|
|
157
168
|
};
|
|
158
169
|
/**
|
|
@@ -103,8 +103,9 @@ var UploadDropZoneVue2 = {
|
|
|
103
103
|
dropZoneClasses: function dropZoneClasses() {
|
|
104
104
|
return {
|
|
105
105
|
'k-dropzone': true,
|
|
106
|
-
'k-dropzone
|
|
107
|
-
'k-
|
|
106
|
+
'k-upload-dropzone': true,
|
|
107
|
+
'k-active': this.currentDocumentActive,
|
|
108
|
+
'k-hover': this.currentElementActive
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
},
|
package/dist/es/UploadInput.d.ts
CHANGED
|
@@ -8,10 +8,14 @@ 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;
|
|
14
15
|
accept?: string;
|
|
16
|
+
hasFiles?: boolean;
|
|
17
|
+
ariaLabelledBy?: string;
|
|
18
|
+
ariaDescribedBy?: string;
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* @hidden
|
package/dist/es/UploadInput.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import { setRef } from '@progress/kendo-vue-common';
|
|
3
|
+
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
3
4
|
import * as Vue from 'vue';
|
|
4
5
|
var allVue = Vue;
|
|
5
6
|
var gh = allVue.h;
|
|
6
7
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
7
8
|
var ref = allVue.ref;
|
|
9
|
+
import { selectTitle, selectNoFilesTitle, select, messages } from './messages/main';
|
|
8
10
|
var CHROME_REGEX = /(chrome)[ \/]([\w.]+)/i;
|
|
9
11
|
var SAFARI_REGEX = /(webkit)[ \/]([\w.]+)/i;
|
|
10
12
|
/**
|
|
@@ -14,6 +16,7 @@ var UploadInputVue2 = {
|
|
|
14
16
|
name: 'KendoVueUploadInput',
|
|
15
17
|
props: {
|
|
16
18
|
async: Object,
|
|
19
|
+
id: String,
|
|
17
20
|
multiple: {
|
|
18
21
|
type: Boolean,
|
|
19
22
|
default: undefined
|
|
@@ -25,6 +28,18 @@ var UploadInputVue2 = {
|
|
|
25
28
|
accept: {
|
|
26
29
|
type: String,
|
|
27
30
|
default: undefined
|
|
31
|
+
},
|
|
32
|
+
hasFiles: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
ariaLabelledBy: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: undefined
|
|
39
|
+
},
|
|
40
|
+
ariaDescribedBy: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: undefined
|
|
28
43
|
}
|
|
29
44
|
},
|
|
30
45
|
// @ts-ignore
|
|
@@ -32,6 +47,11 @@ var UploadInputVue2 = {
|
|
|
32
47
|
'mousedown': null,
|
|
33
48
|
'add': null
|
|
34
49
|
},
|
|
50
|
+
inject: {
|
|
51
|
+
kendoLocalizationService: {
|
|
52
|
+
default: null
|
|
53
|
+
}
|
|
54
|
+
},
|
|
35
55
|
mounted: function mounted() {
|
|
36
56
|
this._input = this.v3 ? this.inputRef : this.$refs.input;
|
|
37
57
|
},
|
|
@@ -76,19 +96,32 @@ var UploadInputVue2 = {
|
|
|
76
96
|
multiple = _a.multiple,
|
|
77
97
|
async = _a.async,
|
|
78
98
|
disabled = _a.disabled,
|
|
79
|
-
accept = _a.accept
|
|
99
|
+
accept = _a.accept,
|
|
100
|
+
hasFiles = _a.hasFiles,
|
|
101
|
+
ariaLabelledBy = _a.ariaLabelledBy,
|
|
102
|
+
ariaDescribedBy = _a.ariaDescribedBy;
|
|
103
|
+
var localizationService = provideLocalizationService(this);
|
|
104
|
+
var message = hasFiles ? selectTitle : selectNoFilesTitle;
|
|
105
|
+
var selectMessage = localizationService.toLanguageString(message, messages[message]);
|
|
106
|
+
var selectLabel = localizationService.toLanguageString(select, messages[select]);
|
|
80
107
|
return h("input", {
|
|
81
108
|
ref: setRef(this, 'input'),
|
|
82
|
-
|
|
109
|
+
id: this.id,
|
|
83
110
|
attrs: this.v3 ? undefined : {
|
|
111
|
+
id: this.id,
|
|
84
112
|
autocomplete: 'off',
|
|
85
113
|
name: async.saveField,
|
|
86
114
|
accept: accept,
|
|
87
115
|
type: 'file',
|
|
88
116
|
tabindex: -1,
|
|
89
117
|
multiple: multiple,
|
|
90
|
-
disabled: disabled
|
|
118
|
+
disabled: disabled,
|
|
119
|
+
title: selectMessage,
|
|
120
|
+
"aria-label": ariaLabelledBy !== undefined ? undefined : selectLabel,
|
|
121
|
+
"aria-labelledby": ariaLabelledBy,
|
|
122
|
+
"aria-describedby": ariaDescribedBy
|
|
91
123
|
},
|
|
124
|
+
autocomplete: 'off',
|
|
92
125
|
name: async.saveField,
|
|
93
126
|
accept: accept,
|
|
94
127
|
type: 'file',
|
|
@@ -100,7 +133,11 @@ var UploadInputVue2 = {
|
|
|
100
133
|
"change": this.onAdd,
|
|
101
134
|
"mousedown": this.onMouseDown
|
|
102
135
|
},
|
|
103
|
-
onMousedown: this.onMouseDown
|
|
136
|
+
onMousedown: this.onMouseDown,
|
|
137
|
+
title: selectMessage,
|
|
138
|
+
"aria-label": ariaLabelledBy !== undefined ? undefined : selectLabel,
|
|
139
|
+
"aria-labelledby": ariaLabelledBy,
|
|
140
|
+
"aria-describedby": ariaDescribedBy
|
|
104
141
|
});
|
|
105
142
|
}
|
|
106
143
|
};
|
|
@@ -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';
|
|
10
11
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
11
12
|
import { messages, cancel, retry, remove } from './messages/main';
|
|
@@ -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';
|
|
10
10
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
11
11
|
import { messages, total, files as filesM, statusUploadFailed, statusUploaded } from './messages/main';
|
|
12
12
|
import { UploadListActionButton } from './UploadListActionButton';
|
|
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, {
|