@vaadin/upload 24.7.0-alpha8 → 24.7.0-beta1
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/package.json +11 -11
- package/src/vaadin-upload.d.ts +14 -12
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "24.7.0-
|
|
3
|
+
"version": "24.7.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/a11y-base": "24.7.0-
|
|
41
|
-
"@vaadin/button": "24.7.0-
|
|
42
|
-
"@vaadin/component-base": "24.7.0-
|
|
43
|
-
"@vaadin/progress-bar": "24.7.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.7.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.7.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.7.0-
|
|
40
|
+
"@vaadin/a11y-base": "24.7.0-beta1",
|
|
41
|
+
"@vaadin/button": "24.7.0-beta1",
|
|
42
|
+
"@vaadin/component-base": "24.7.0-beta1",
|
|
43
|
+
"@vaadin/progress-bar": "24.7.0-beta1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.7.0-beta1",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.7.0-beta1",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.7.0-beta1",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "24.7.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "24.7.0-
|
|
50
|
+
"@vaadin/chai-plugins": "24.7.0-beta1",
|
|
51
|
+
"@vaadin/test-runner-commands": "24.7.0-beta1",
|
|
52
52
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
53
53
|
"sinon": "^18.0.0"
|
|
54
54
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "4043c518ef9b915cde612d2907ddc9bd10e5af17"
|
|
60
60
|
}
|
package/src/vaadin-upload.d.ts
CHANGED
|
@@ -10,47 +10,49 @@ import { type UploadFile, UploadMixin } from './vaadin-upload-mixin.js';
|
|
|
10
10
|
|
|
11
11
|
export { UploadFile, UploadI18n, UploadMethod } from './vaadin-upload-mixin.js';
|
|
12
12
|
|
|
13
|
+
type UploadEvent<T> = CustomEvent<T> & { target: Upload };
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* Fired when a file cannot be added to the queue due to a constrain:
|
|
15
17
|
* file-size, file-type or maxFiles
|
|
16
18
|
*/
|
|
17
|
-
export type UploadFileRejectEvent =
|
|
19
|
+
export type UploadFileRejectEvent = UploadEvent<{ file: UploadFile; error: string }>;
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* Fired when the `files` property changes.
|
|
21
23
|
*/
|
|
22
|
-
export type UploadFilesChangedEvent =
|
|
24
|
+
export type UploadFilesChangedEvent = UploadEvent<{ value: UploadFile[] }>;
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Fired when the `max-files-reached` property changes.
|
|
26
28
|
*/
|
|
27
|
-
export type UploadMaxFilesReachedChangedEvent =
|
|
29
|
+
export type UploadMaxFilesReachedChangedEvent = UploadEvent<{ value: boolean }>;
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* Fired before the XHR is opened. Could be used for changing the request
|
|
31
33
|
* URL. If the default is prevented, then XHR would not be opened.
|
|
32
34
|
*/
|
|
33
|
-
export type UploadBeforeEvent =
|
|
35
|
+
export type UploadBeforeEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* Fired when the XHR is sent.
|
|
37
39
|
*/
|
|
38
|
-
export type UploadStartEvent =
|
|
40
|
+
export type UploadStartEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* Fired as many times as the progress is updated.
|
|
42
44
|
*/
|
|
43
|
-
export type UploadProgressEvent =
|
|
45
|
+
export type UploadProgressEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
44
46
|
|
|
45
47
|
/**
|
|
46
48
|
* Fired in case the upload process succeeded.
|
|
47
49
|
*/
|
|
48
|
-
export type UploadSuccessEvent =
|
|
50
|
+
export type UploadSuccessEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
53
|
* Fired in case the upload process failed.
|
|
52
54
|
*/
|
|
53
|
-
export type UploadErrorEvent =
|
|
55
|
+
export type UploadErrorEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
54
56
|
|
|
55
57
|
/**
|
|
56
58
|
* Fired when we have the actual server response, and before the component
|
|
@@ -62,19 +64,19 @@ export type UploadErrorEvent = CustomEvent<{ xhr: XMLHttpRequest; file: UploadFi
|
|
|
62
64
|
* with the normal workflow checking the `xhr.status` and `file.error`
|
|
63
65
|
* which also might be modified by the user to force a customized response,
|
|
64
66
|
*/
|
|
65
|
-
export type UploadResponseEvent =
|
|
67
|
+
export type UploadResponseEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* Fired when retry upload is requested. If the default is prevented, then
|
|
69
71
|
* retry would not be performed.
|
|
70
72
|
*/
|
|
71
|
-
export type UploadRetryEvent =
|
|
73
|
+
export type UploadRetryEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
72
74
|
|
|
73
75
|
/**
|
|
74
76
|
* Fired when upload abort is requested. If the default is prevented, then the
|
|
75
77
|
* file upload would not be aborted.
|
|
76
78
|
*/
|
|
77
|
-
export type UploadAbortEvent =
|
|
79
|
+
export type UploadAbortEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile }>;
|
|
78
80
|
|
|
79
81
|
/**
|
|
80
82
|
* Fired when the XHR has been opened but not sent yet. Useful for appending
|
|
@@ -82,7 +84,7 @@ export type UploadAbortEvent = CustomEvent<{ xhr: XMLHttpRequest; file: UploadFi
|
|
|
82
84
|
* headers, etc. If the event is defaultPrevented, `vaadin-upload` will not
|
|
83
85
|
* send the request allowing the user to do something on his own.
|
|
84
86
|
*/
|
|
85
|
-
export type UploadRequestEvent =
|
|
87
|
+
export type UploadRequestEvent = UploadEvent<{ xhr: XMLHttpRequest; file: UploadFile; formData: FormData }>;
|
|
86
88
|
|
|
87
89
|
export interface UploadCustomEventMap {
|
|
88
90
|
'file-reject': UploadFileRejectEvent;
|
package/web-types.json
CHANGED