@progress/kendo-vue-upload 3.7.4-dev.202211301436 → 3.7.4-dev.202212300853
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 +6 -3
- package/dist/es/Upload.js +2 -1
- package/dist/es/UploadAddButton.d.ts +0 -2
- package/dist/es/UploadAddButton.js +1 -13
- package/dist/es/UploadInput.d.ts +3 -0
- package/dist/es/UploadInput.js +37 -3
- package/dist/es/interfaces/UploadProps.d.ts +4 -0
- package/dist/es/main.d.ts +2 -1
- package/dist/es/main.js +2 -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/es/utils/validationUtils.js +4 -1
- package/dist/esm/ExternalDropZone.js +6 -3
- package/dist/esm/Upload.js +2 -1
- package/dist/esm/UploadAddButton.d.ts +0 -2
- package/dist/esm/UploadAddButton.js +1 -13
- package/dist/esm/UploadInput.d.ts +3 -0
- package/dist/esm/UploadInput.js +37 -3
- package/dist/esm/interfaces/UploadProps.d.ts +4 -0
- package/dist/esm/main.d.ts +2 -1
- package/dist/esm/main.js +2 -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/esm/utils/validationUtils.js +4 -1
- package/dist/npm/ExternalDropZone.js +5 -2
- package/dist/npm/Upload.js +2 -1
- package/dist/npm/UploadAddButton.d.ts +0 -2
- package/dist/npm/UploadAddButton.js +1 -13
- package/dist/npm/UploadInput.d.ts +3 -0
- package/dist/npm/UploadInput.js +37 -3
- package/dist/npm/interfaces/UploadProps.d.ts +4 -0
- package/dist/npm/main.d.ts +2 -1
- package/dist/npm/main.js +3 -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/dist/npm/utils/validationUtils.js +4 -1
- package/package.json +5 -5
|
@@ -29,9 +29,7 @@ var UploadAddButtonVue2 = {
|
|
|
29
29
|
multiple: Boolean,
|
|
30
30
|
disabled: Boolean,
|
|
31
31
|
accept: String,
|
|
32
|
-
id: String
|
|
33
|
-
ariaLabelledBy: String,
|
|
34
|
-
ariaDescribedBy: String
|
|
32
|
+
id: String
|
|
35
33
|
},
|
|
36
34
|
inject: {
|
|
37
35
|
kendoLocalizationService: {
|
|
@@ -106,8 +104,6 @@ var UploadAddButtonVue2 = {
|
|
|
106
104
|
addButtonIndex = _a.addButtonIndex,
|
|
107
105
|
tabIndex = _a.tabIndex,
|
|
108
106
|
id = _a.id,
|
|
109
|
-
ariaLabelledBy = _a.ariaLabelledBy,
|
|
110
|
-
ariaDescribedBy = _a.ariaDescribedBy,
|
|
111
107
|
async = _a.async,
|
|
112
108
|
multiple = _a.multiple,
|
|
113
109
|
disabled = _a.disabled,
|
|
@@ -119,18 +115,10 @@ var UploadAddButtonVue2 = {
|
|
|
119
115
|
id: id,
|
|
120
116
|
attrs: this.v3 ? undefined : {
|
|
121
117
|
id: id,
|
|
122
|
-
role: "button",
|
|
123
|
-
"aria-label": selectMessage,
|
|
124
|
-
"aria-labelledby": ariaLabelledBy,
|
|
125
|
-
"aria-describedby": ariaDescribedBy,
|
|
126
118
|
tabindex: tabIndex
|
|
127
119
|
},
|
|
128
120
|
ref: (0, kendo_vue_common_1.setRef)(this, 'element'),
|
|
129
|
-
role: "button",
|
|
130
121
|
"class": buttonClassName,
|
|
131
|
-
"aria-label": selectMessage,
|
|
132
|
-
"aria-labelledby": ariaLabelledBy,
|
|
133
|
-
"aria-describedby": ariaDescribedBy,
|
|
134
122
|
tabindex: tabIndex,
|
|
135
123
|
onClick: this.onClick,
|
|
136
124
|
on: this.v3 ? undefined : {
|
package/dist/npm/UploadInput.js
CHANGED
|
@@ -6,11 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.UploadInputVue2 = exports.UploadInput = void 0;
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
9
|
+
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
9
10
|
var Vue = require("vue");
|
|
10
11
|
var allVue = Vue;
|
|
11
12
|
var gh = allVue.h;
|
|
12
13
|
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
13
14
|
var ref = allVue.ref;
|
|
15
|
+
var main_1 = require("./messages/main");
|
|
14
16
|
var CHROME_REGEX = /(chrome)[ \/]([\w.]+)/i;
|
|
15
17
|
var SAFARI_REGEX = /(webkit)[ \/]([\w.]+)/i;
|
|
16
18
|
/**
|
|
@@ -31,6 +33,18 @@ var UploadInputVue2 = {
|
|
|
31
33
|
accept: {
|
|
32
34
|
type: String,
|
|
33
35
|
default: undefined
|
|
36
|
+
},
|
|
37
|
+
hasFiles: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
ariaLabelledBy: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: undefined
|
|
44
|
+
},
|
|
45
|
+
ariaDescribedBy: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: undefined
|
|
34
48
|
}
|
|
35
49
|
},
|
|
36
50
|
// @ts-ignore
|
|
@@ -38,6 +52,11 @@ var UploadInputVue2 = {
|
|
|
38
52
|
'mousedown': null,
|
|
39
53
|
'add': null
|
|
40
54
|
},
|
|
55
|
+
inject: {
|
|
56
|
+
kendoLocalizationService: {
|
|
57
|
+
default: null
|
|
58
|
+
}
|
|
59
|
+
},
|
|
41
60
|
mounted: function mounted() {
|
|
42
61
|
this._input = this.v3 ? this.inputRef : this.$refs.input;
|
|
43
62
|
},
|
|
@@ -82,7 +101,14 @@ var UploadInputVue2 = {
|
|
|
82
101
|
multiple = _a.multiple,
|
|
83
102
|
async = _a.async,
|
|
84
103
|
disabled = _a.disabled,
|
|
85
|
-
accept = _a.accept
|
|
104
|
+
accept = _a.accept,
|
|
105
|
+
hasFiles = _a.hasFiles,
|
|
106
|
+
ariaLabelledBy = _a.ariaLabelledBy,
|
|
107
|
+
ariaDescribedBy = _a.ariaDescribedBy;
|
|
108
|
+
var localizationService = (0, kendo_vue_intl_1.provideLocalizationService)(this);
|
|
109
|
+
var message = hasFiles ? main_1.selectTitle : main_1.selectNoFilesTitle;
|
|
110
|
+
var selectMessage = localizationService.toLanguageString(message, main_1.messages[message]);
|
|
111
|
+
var selectLabel = localizationService.toLanguageString(main_1.select, main_1.messages[main_1.select]);
|
|
86
112
|
return h("input", {
|
|
87
113
|
ref: (0, kendo_vue_common_1.setRef)(this, 'input'),
|
|
88
114
|
autocomplete: 'off',
|
|
@@ -93,7 +119,11 @@ var UploadInputVue2 = {
|
|
|
93
119
|
type: 'file',
|
|
94
120
|
tabindex: -1,
|
|
95
121
|
multiple: multiple,
|
|
96
|
-
disabled: disabled
|
|
122
|
+
disabled: disabled,
|
|
123
|
+
title: selectMessage,
|
|
124
|
+
"aria-label": ariaLabelledBy !== undefined ? undefined : selectLabel,
|
|
125
|
+
"aria-labelledby": ariaLabelledBy,
|
|
126
|
+
"aria-describedby": ariaDescribedBy
|
|
97
127
|
},
|
|
98
128
|
name: async.saveField,
|
|
99
129
|
accept: accept,
|
|
@@ -106,7 +136,11 @@ var UploadInputVue2 = {
|
|
|
106
136
|
"change": this.onAdd,
|
|
107
137
|
"mousedown": this.onMouseDown
|
|
108
138
|
},
|
|
109
|
-
onMousedown: this.onMouseDown
|
|
139
|
+
onMousedown: this.onMouseDown,
|
|
140
|
+
title: selectMessage,
|
|
141
|
+
"aria-label": ariaLabelledBy !== undefined ? undefined : selectLabel,
|
|
142
|
+
"aria-labelledby": ariaLabelledBy,
|
|
143
|
+
"aria-describedby": ariaDescribedBy
|
|
110
144
|
});
|
|
111
145
|
}
|
|
112
146
|
};
|
|
@@ -68,6 +68,10 @@ export interface UploadProps extends UploadAsyncProps {
|
|
|
68
68
|
* Sets the restrictions for the selected files ([see example]({% slug filerestrictions_upload %})).
|
|
69
69
|
*/
|
|
70
70
|
restrictions?: UploadFileRestrictions;
|
|
71
|
+
/**
|
|
72
|
+
* Sets the custom restrictions for the selected files ([see example]({% slug filerestrictions_upload %})).
|
|
73
|
+
*/
|
|
74
|
+
validateFile?: (file: UploadFileInfo) => void;
|
|
71
75
|
/**
|
|
72
76
|
* The list of files which are displayed when the Upload is in controlled mode
|
|
73
77
|
* ([see example]({% slug controleduncontroled_upload %})).
|
package/dist/npm/main.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ import { UploadListItemProps } from './interfaces/UploadListItemProps';
|
|
|
21
21
|
import { UploadProps } from './interfaces/UploadProps';
|
|
22
22
|
import { UploadOnCancelEvent } from './interfaces/UploadOnCancelEvent';
|
|
23
23
|
import { UploadActionsLayout } from './interfaces/UploadActionsLayout';
|
|
24
|
+
import { messages } from './messages/main';
|
|
24
25
|
import { ExternalDropZone, ExternalDropZoneVue2 } from './ExternalDropZone';
|
|
25
|
-
export { UploadUI, UploadUIVue2, UploadUIProps, UploadFileRestrictions, Upload, UploadVue2, UploadProps, UploadOnAddEvent, UploadOnBeforeRemoveEvent, UploadOnBeforeUploadEvent, UploadOnProgressEvent, UploadOnRemoveEvent, UploadOnStatusChangeEvent, UploadOnCancelEvent, UploadResponse, UploadFileStatus, UploadAdditionalData, UploadAsyncProps, UploadFileInfo, UploadHttpHeaders, UploadListItemProps, UploadActionsLayout, ExternalDropZone, ExternalDropZoneVue2, UploadListSingleItem, UploadListSingleItemVue2, UploadListMultiItem, UploadListMultiItemVue2, UploadListActionButton, UploadListActionButtonVue2, utils };
|
|
26
|
+
export { UploadUI, UploadUIVue2, UploadUIProps, UploadFileRestrictions, Upload, UploadVue2, UploadProps, UploadOnAddEvent, UploadOnBeforeRemoveEvent, UploadOnBeforeUploadEvent, UploadOnProgressEvent, UploadOnRemoveEvent, UploadOnStatusChangeEvent, UploadOnCancelEvent, UploadResponse, UploadFileStatus, UploadAdditionalData, UploadAsyncProps, UploadFileInfo, UploadHttpHeaders, UploadListItemProps, UploadActionsLayout, ExternalDropZone, ExternalDropZoneVue2, UploadListSingleItem, UploadListSingleItemVue2, UploadListMultiItem, UploadListMultiItemVue2, UploadListActionButton, UploadListActionButtonVue2, utils, messages };
|
package/dist/npm/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.utils = exports.UploadListActionButtonVue2 = exports.UploadListActionButton = exports.UploadListMultiItemVue2 = exports.UploadListMultiItem = exports.UploadListSingleItemVue2 = exports.UploadListSingleItem = exports.ExternalDropZoneVue2 = exports.ExternalDropZone = exports.UploadFileStatus = exports.UploadVue2 = exports.Upload = exports.UploadUIVue2 = exports.UploadUI = void 0;
|
|
3
|
+
exports.messages = exports.utils = exports.UploadListActionButtonVue2 = exports.UploadListActionButton = exports.UploadListMultiItemVue2 = exports.UploadListMultiItem = exports.UploadListSingleItemVue2 = exports.UploadListSingleItem = exports.ExternalDropZoneVue2 = exports.ExternalDropZone = exports.UploadFileStatus = exports.UploadVue2 = exports.Upload = exports.UploadUIVue2 = exports.UploadUI = void 0;
|
|
4
4
|
var UploadUI_1 = require("./UploadUI");
|
|
5
5
|
Object.defineProperty(exports, "UploadUI", { enumerable: true, get: function () { return UploadUI_1.UploadUI; } });
|
|
6
6
|
Object.defineProperty(exports, "UploadUIVue2", { enumerable: true, get: function () { return UploadUI_1.UploadUIVue2; } });
|
|
@@ -20,6 +20,8 @@ Object.defineProperty(exports, "UploadListActionButton", { enumerable: true, get
|
|
|
20
20
|
Object.defineProperty(exports, "UploadListActionButtonVue2", { enumerable: true, get: function () { return UploadListActionButton_1.UploadListActionButtonVue2; } });
|
|
21
21
|
var UploadFileStatus_1 = require("./interfaces/UploadFileStatus");
|
|
22
22
|
Object.defineProperty(exports, "UploadFileStatus", { enumerable: true, get: function () { return UploadFileStatus_1.UploadFileStatus; } });
|
|
23
|
+
var main_1 = require("./messages/main");
|
|
24
|
+
Object.defineProperty(exports, "messages", { enumerable: true, get: function () { return main_1.messages; } });
|
|
23
25
|
var ExternalDropZone_1 = require("./ExternalDropZone");
|
|
24
26
|
Object.defineProperty(exports, "ExternalDropZone", { enumerable: true, get: function () { return ExternalDropZone_1.ExternalDropZone; } });
|
|
25
27
|
Object.defineProperty(exports, "ExternalDropZoneVue2", { enumerable: true, get: function () { return ExternalDropZone_1.ExternalDropZoneVue2; } });
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.messages = exports.dropZoneNote = exports.dropZoneHint = exports.statusUploadFailed = exports.statusUploaded = exports.files = exports.total = exports.uploadSelectedFiles = exports.select = exports.retry = exports.remove = exports.invalidMinFileSize = exports.invalidMaxFileSize = exports.invalidFiles = exports.invalidFileExtension = exports.headerStatusUploading = exports.headerStatusUploaded = exports.dropFilesHere = exports.clearSelectedFiles = exports.cancel = void 0;
|
|
4
|
+
exports.messages = exports.dropZoneNote = exports.dropZoneHint = exports.statusUploadFailed = exports.statusUploaded = exports.files = exports.total = exports.uploadSelectedFiles = exports.selectNoFilesTitle = exports.selectTitle = exports.select = exports.retry = exports.remove = exports.invalidMinFileSize = exports.invalidMaxFileSize = exports.invalidFiles = exports.invalidFileExtension = exports.headerStatusUploading = exports.headerStatusUploaded = exports.dropFilesHere = exports.clearSelectedFiles = exports.cancel = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
@@ -50,6 +50,14 @@ exports.retry = 'upload.retry';
|
|
|
50
50
|
* @hidden
|
|
51
51
|
*/
|
|
52
52
|
exports.select = 'upload.select';
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
exports.selectTitle = 'upload.selectTitle';
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
exports.selectNoFilesTitle = 'upload.selectNoFilesTitle';
|
|
53
61
|
/**
|
|
54
62
|
* @hidden
|
|
55
63
|
*/
|
|
@@ -94,6 +102,8 @@ exports.messages = (_a = {},
|
|
|
94
102
|
_a[exports.remove] = 'Remove',
|
|
95
103
|
_a[exports.retry] = 'Retry',
|
|
96
104
|
_a[exports.select] = 'Select files...',
|
|
105
|
+
_a[exports.selectTitle] = 'Press to select more files',
|
|
106
|
+
_a[exports.selectNoFilesTitle] = 'No files selected',
|
|
97
107
|
_a[exports.uploadSelectedFiles] = 'Upload',
|
|
98
108
|
_a[exports.total] = 'Total',
|
|
99
109
|
_a[exports.files] = 'files',
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-vue-upload',
|
|
9
9
|
productName: 'Kendo UI for Vue',
|
|
10
10
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1672390325,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|
|
@@ -34,7 +34,7 @@ var parseAllowedExtensions = function (extensions) {
|
|
|
34
34
|
});
|
|
35
35
|
return allowedExtensions;
|
|
36
36
|
};
|
|
37
|
-
var validateFiles = function (files, restrictionInfo) {
|
|
37
|
+
var validateFiles = function (files, restrictionInfo, validateFile) {
|
|
38
38
|
var allowedExtensions = parseAllowedExtensions(restrictionInfo.allowedExtensions || []);
|
|
39
39
|
var maxFileSize = restrictionInfo.maxFileSize || 0;
|
|
40
40
|
var minFileSize = restrictionInfo.minFileSize || 0;
|
|
@@ -42,6 +42,9 @@ var validateFiles = function (files, restrictionInfo) {
|
|
|
42
42
|
for (i = 0; i < files.length; i++) {
|
|
43
43
|
validateFileExtension(files[i], allowedExtensions);
|
|
44
44
|
validateFileSize(files[i], minFileSize, maxFileSize);
|
|
45
|
+
if (validateFile) {
|
|
46
|
+
validateFile(files[i]);
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
};
|
|
47
50
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-vue-upload",
|
|
3
3
|
"description": "Kendo UI for Vue Upload package",
|
|
4
|
-
"version": "3.7.4-dev.
|
|
4
|
+
"version": "3.7.4-dev.202212300853",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/telerik/kendo-vue.git"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "cd ../../ && npm run test -- --testPathPattern=/packages/upload/.*",
|
|
21
|
-
"start": "gulp start",
|
|
21
|
+
"start": "gulp start --notsc",
|
|
22
22
|
"build-package": "gulp build-package"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"vue": "^2.6.12 || ^3.0.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@progress/kendo-vue-buttons": "3.7.4-dev.
|
|
36
|
-
"@progress/kendo-vue-common": "3.7.4-dev.
|
|
35
|
+
"@progress/kendo-vue-buttons": "3.7.4-dev.202212300853",
|
|
36
|
+
"@progress/kendo-vue-common": "3.7.4-dev.202212300853",
|
|
37
37
|
"axios": "0.24.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@progress/kendo-licensing": "^1.1.0",
|
|
41
|
-
"@progress/kendo-vue-intl": "3.7.4-dev.
|
|
41
|
+
"@progress/kendo-vue-intl": "3.7.4-dev.202212300853"
|
|
42
42
|
},
|
|
43
43
|
"@progress": {
|
|
44
44
|
"friendlyName": "Upload",
|