@vaadin/upload 25.0.0-alpha17 → 25.0.0-alpha19
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/progress-bar": "25.0.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha19",
|
|
38
|
+
"@vaadin/button": "25.0.0-alpha19",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha19",
|
|
40
|
+
"@vaadin/progress-bar": "25.0.0-alpha19",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha19",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-alpha19",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha19",
|
|
47
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha19",
|
|
49
49
|
"sinon": "^21.0.0"
|
|
50
50
|
},
|
|
51
51
|
"web-types": [
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "1f9af1ce5f0bae8daff044176c8a8df697763881"
|
|
56
56
|
}
|
|
@@ -7,7 +7,6 @@ import './vaadin-upload-file.js';
|
|
|
7
7
|
import { html, LitElement } from 'lit';
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
-
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
11
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
11
|
import { uploadFileListStyles } from './styles/vaadin-upload-file-list-base-styles.js';
|
|
13
12
|
import { UploadFileListMixin } from './vaadin-upload-file-list-mixin.js';
|
|
@@ -21,7 +20,7 @@ import { UploadFileListMixin } from './vaadin-upload-file-list-mixin.js';
|
|
|
21
20
|
* @mixes UploadFileListMixin
|
|
22
21
|
* @private
|
|
23
22
|
*/
|
|
24
|
-
class UploadFileList extends UploadFileListMixin(ThemableMixin(PolylitMixin(
|
|
23
|
+
class UploadFileList extends UploadFileListMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
25
24
|
static get is() {
|
|
26
25
|
return 'vaadin-upload-file-list';
|
|
27
26
|
}
|
|
@@ -101,7 +101,7 @@ export declare class UploadMixinClass {
|
|
|
101
101
|
/**
|
|
102
102
|
* Key-Value map to send to the server. If you set this property as an
|
|
103
103
|
* attribute, use a valid JSON string, for example:
|
|
104
|
-
* ```
|
|
104
|
+
* ```html
|
|
105
105
|
* <vaadin-upload headers='{"X-Foo": "Bar"}'></vaadin-upload>
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
@@ -201,7 +201,7 @@ export declare class UploadMixinClass {
|
|
|
201
201
|
*
|
|
202
202
|
* The object has the following JSON structure and default values:
|
|
203
203
|
*
|
|
204
|
-
* ```
|
|
204
|
+
* ```js
|
|
205
205
|
* {
|
|
206
206
|
* dropFiles: {
|
|
207
207
|
* one: 'Drop file here',
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { announce } from '@vaadin/a11y-base/src/announce.js';
|
|
7
|
+
import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
7
8
|
import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
|
|
8
9
|
import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
|
|
9
10
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
@@ -157,7 +158,7 @@ export const UploadMixin = (superClass) =>
|
|
|
157
158
|
/**
|
|
158
159
|
* Key-Value map to send to the server. If you set this property as an
|
|
159
160
|
* attribute, use a valid JSON string, for example:
|
|
160
|
-
* ```
|
|
161
|
+
* ```html
|
|
161
162
|
* <vaadin-upload headers='{"X-Foo": "Bar"}'></vaadin-upload>
|
|
162
163
|
* ```
|
|
163
164
|
* @type {object | string}
|
|
@@ -352,7 +353,7 @@ export const UploadMixin = (superClass) =>
|
|
|
352
353
|
*
|
|
353
354
|
* The object has the following JSON structure and default values:
|
|
354
355
|
*
|
|
355
|
-
* ```
|
|
356
|
+
* ```js
|
|
356
357
|
* {
|
|
357
358
|
* dropFiles: {
|
|
358
359
|
* one: 'Drop file here',
|
|
@@ -894,14 +895,14 @@ export const UploadMixin = (superClass) =>
|
|
|
894
895
|
/** @private */
|
|
895
896
|
_updateFocus(fileIndex) {
|
|
896
897
|
if (this.files.length === 0) {
|
|
897
|
-
this._addButton.focus();
|
|
898
|
+
this._addButton.focus({ focusVisible: isKeyboardActive() });
|
|
898
899
|
return;
|
|
899
900
|
}
|
|
900
901
|
const lastFileRemoved = fileIndex === this.files.length;
|
|
901
902
|
if (lastFileRemoved) {
|
|
902
903
|
fileIndex -= 1;
|
|
903
904
|
}
|
|
904
|
-
this._fileList.children[fileIndex].firstElementChild.focus();
|
|
905
|
+
this._fileList.children[fileIndex].firstElementChild.focus({ focusVisible: isKeyboardActive() });
|
|
905
906
|
}
|
|
906
907
|
|
|
907
908
|
/**
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/upload",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha19",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -391,7 +391,7 @@
|
|
|
391
391
|
"properties": [
|
|
392
392
|
{
|
|
393
393
|
"name": "i18n",
|
|
394
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n
|
|
394
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n dropFiles: {\n one: 'Drop file here',\n many: 'Drop files here'\n },\n addFiles: {\n one: 'Upload File...',\n many: 'Upload Files...'\n },\n error: {\n tooManyFiles: 'Too Many Files.',\n fileIsTooBig: 'File is Too Big.',\n incorrectFileType: 'Incorrect File Type.'\n },\n uploading: {\n status: {\n connecting: 'Connecting...',\n stalled: 'Stalled',\n processing: 'Processing File...',\n held: 'Queued'\n },\n remainingTime: {\n prefix: 'remaining time: ',\n unknown: 'unknown remaining time'\n },\n error: {\n serverUnavailable: 'Upload failed, please try again later',\n unexpectedServerError: 'Upload failed due to server error',\n forbidden: 'Upload forbidden'\n }\n },\n file: {\n retry: 'Retry',\n start: 'Start',\n remove: 'Remove'\n },\n units: {\n size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n sizeBase: 1000\n },\n formatSize: function(bytes) {\n // returns the size followed by the best suitable unit\n },\n formatTime: function(seconds, [secs, mins, hours]) {\n // returns a 'HH:MM:SS' string\n }\n}\n```",
|
|
395
395
|
"value": {
|
|
396
396
|
"type": [
|
|
397
397
|
"UploadI18n"
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
},
|
|
437
437
|
{
|
|
438
438
|
"name": "headers",
|
|
439
|
-
"description": "Key-Value map to send to the server. If you set this property as an\nattribute, use a valid JSON string, for example:\n
|
|
439
|
+
"description": "Key-Value map to send to the server. If you set this property as an\nattribute, use a valid JSON string, for example:\n```html\n<vaadin-upload headers='{\"X-Foo\": \"Bar\"}'></vaadin-upload>\n```",
|
|
440
440
|
"value": {
|
|
441
441
|
"type": [
|
|
442
442
|
"object",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/upload",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha19",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"name": ".i18n",
|
|
157
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n
|
|
157
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n\n```js\n{\n dropFiles: {\n one: 'Drop file here',\n many: 'Drop files here'\n },\n addFiles: {\n one: 'Upload File...',\n many: 'Upload Files...'\n },\n error: {\n tooManyFiles: 'Too Many Files.',\n fileIsTooBig: 'File is Too Big.',\n incorrectFileType: 'Incorrect File Type.'\n },\n uploading: {\n status: {\n connecting: 'Connecting...',\n stalled: 'Stalled',\n processing: 'Processing File...',\n held: 'Queued'\n },\n remainingTime: {\n prefix: 'remaining time: ',\n unknown: 'unknown remaining time'\n },\n error: {\n serverUnavailable: 'Upload failed, please try again later',\n unexpectedServerError: 'Upload failed due to server error',\n forbidden: 'Upload forbidden'\n }\n },\n file: {\n retry: 'Retry',\n start: 'Start',\n remove: 'Remove'\n },\n units: {\n size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],\n sizeBase: 1000\n },\n formatSize: function(bytes) {\n // returns the size followed by the best suitable unit\n },\n formatTime: function(seconds, [secs, mins, hours]) {\n // returns a 'HH:MM:SS' string\n }\n}\n```",
|
|
158
158
|
"value": {
|
|
159
159
|
"kind": "expression"
|
|
160
160
|
}
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"name": ".headers",
|
|
178
|
-
"description": "Key-Value map to send to the server. If you set this property as an\nattribute, use a valid JSON string, for example:\n
|
|
178
|
+
"description": "Key-Value map to send to the server. If you set this property as an\nattribute, use a valid JSON string, for example:\n```html\n<vaadin-upload headers='{\"X-Foo\": \"Bar\"}'></vaadin-upload>\n```",
|
|
179
179
|
"value": {
|
|
180
180
|
"kind": "expression"
|
|
181
181
|
}
|