@vaadin/upload 24.6.0-alpha3 → 24.6.0-alpha5

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": "24.6.0-alpha3",
3
+ "version": "24.6.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,11 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/vaadin-lit-upload-file-list.js",
25
- "!src/vaadin-lit-upload-file.js",
26
- "!src/vaadin-lit-upload-icon.js",
27
- "!src/vaadin-lit-upload.d.ts",
28
- "!src/vaadin-lit-upload.js",
29
24
  "theme",
30
25
  "vaadin-*.d.ts",
31
26
  "vaadin-*.js",
@@ -42,17 +37,17 @@
42
37
  "dependencies": {
43
38
  "@open-wc/dedupe-mixin": "^1.3.0",
44
39
  "@polymer/polymer": "^3.0.0",
45
- "@vaadin/a11y-base": "24.6.0-alpha3",
46
- "@vaadin/button": "24.6.0-alpha3",
47
- "@vaadin/component-base": "24.6.0-alpha3",
48
- "@vaadin/progress-bar": "24.6.0-alpha3",
49
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha3",
50
- "@vaadin/vaadin-material-styles": "24.6.0-alpha3",
51
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha3",
40
+ "@vaadin/a11y-base": "24.6.0-alpha5",
41
+ "@vaadin/button": "24.6.0-alpha5",
42
+ "@vaadin/component-base": "24.6.0-alpha5",
43
+ "@vaadin/progress-bar": "24.6.0-alpha5",
44
+ "@vaadin/vaadin-lumo-styles": "24.6.0-alpha5",
45
+ "@vaadin/vaadin-material-styles": "24.6.0-alpha5",
46
+ "@vaadin/vaadin-themable-mixin": "24.6.0-alpha5",
52
47
  "lit": "^3.0.0"
53
48
  },
54
49
  "devDependencies": {
55
- "@vaadin/chai-plugins": "24.6.0-alpha3",
50
+ "@vaadin/chai-plugins": "24.6.0-alpha5",
56
51
  "@vaadin/testing-helpers": "^1.0.0",
57
52
  "sinon": "^18.0.0"
58
53
  },
@@ -60,5 +55,5 @@
60
55
  "web-types.json",
61
56
  "web-types.lit.json"
62
57
  ],
63
- "gitHead": "f917e587caaf86b3d55598233811409b0f34ff69"
58
+ "gitHead": "cbfa46fe276f254dcaa99a622710d56df7f0a539"
64
59
  }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import './vaadin-lit-upload-file.js';
7
+ import { css, html, LitElement } from 'lit';
8
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
+ import { UploadFileListMixin } from './vaadin-upload-file-list-mixin.js';
12
+
13
+ /**
14
+ * An element used internally by `<vaadin-upload>`. Not intended to be used separately.
15
+ *
16
+ * @extends HTMLElement
17
+ * @mixes ThemableMixin
18
+ * @mixes UploadFileListMixin
19
+ * @private
20
+ */
21
+ class UploadFileList extends UploadFileListMixin(ThemableMixin(PolylitMixin(LitElement))) {
22
+ static get is() {
23
+ return 'vaadin-upload-file-list';
24
+ }
25
+
26
+ static get styles() {
27
+ return css`
28
+ :host {
29
+ display: block;
30
+ }
31
+
32
+ :host([hidden]) {
33
+ display: none !important;
34
+ }
35
+
36
+ [part='list'] {
37
+ padding: 0;
38
+ margin: 0;
39
+ list-style-type: none;
40
+ }
41
+ `;
42
+ }
43
+
44
+ /** @protected */
45
+ render() {
46
+ return html`
47
+ <ul part="list">
48
+ <slot></slot>
49
+ </ul>
50
+ `;
51
+ }
52
+ }
53
+
54
+ defineCustomElement(UploadFileList);
55
+
56
+ export { UploadFileList };
@@ -0,0 +1,84 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/progress-bar/src/vaadin-progress-bar.js';
7
+ import './vaadin-upload-icons.js';
8
+ import { html, LitElement } from 'lit';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { UploadFileMixin } from './vaadin-upload-file-mixin.js';
13
+ import { uploadFileStyles } from './vaadin-upload-file-styles.js';
14
+
15
+ /**
16
+ * LitElement based version of `<vaadin-upload-file>` web component.
17
+ *
18
+ * ## Disclaimer
19
+ *
20
+ * This component is an experiment and not yet a part of Vaadin platform.
21
+ * There is no ETA regarding specific Vaadin version where it'll land.
22
+ * Feel free to try this code in your apps as per Apache 2.0 license.
23
+ */
24
+ class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LitElement))) {
25
+ static get is() {
26
+ return 'vaadin-upload-file';
27
+ }
28
+
29
+ static get styles() {
30
+ return uploadFileStyles;
31
+ }
32
+
33
+ /** @protected */
34
+ render() {
35
+ return html`
36
+ <div part="row">
37
+ <div part="info">
38
+ <div part="done-icon" ?hidden="${!this.complete}" aria-hidden="true"></div>
39
+ <div part="warning-icon" ?hidden="${!this.errorMessage}" aria-hidden="true"></div>
40
+
41
+ <div part="meta">
42
+ <div part="name" id="name">${this.fileName}</div>
43
+ <div part="status" ?hidden="${!this.status}" id="status">${this.status}</div>
44
+ <div part="error" id="error" ?hidden="${!this.errorMessage}">${this.errorMessage}</div>
45
+ </div>
46
+ </div>
47
+ <div part="commands">
48
+ <button
49
+ type="button"
50
+ part="start-button"
51
+ file-event="file-start"
52
+ @click="${this._fireFileEvent}"
53
+ ?hidden="${!this.held}"
54
+ aria-label="${this.i18n.file.start}"
55
+ aria-describedby="name"
56
+ ></button>
57
+ <button
58
+ type="button"
59
+ part="retry-button"
60
+ file-event="file-retry"
61
+ @click="${this._fireFileEvent}"
62
+ ?hidden="${!this.errorMessage}"
63
+ aria-label="${this.i18n.file.retry}"
64
+ aria-describedby="name"
65
+ ></button>
66
+ <button
67
+ type="button"
68
+ part="remove-button"
69
+ file-event="file-abort"
70
+ @click="${this._fireFileEvent}"
71
+ aria-label="${this.i18n.file.remove}"
72
+ aria-describedby="name"
73
+ ></button>
74
+ </div>
75
+ </div>
76
+
77
+ <slot name="progress"></slot>
78
+ `;
79
+ }
80
+ }
81
+
82
+ defineCustomElement(UploadFile);
83
+
84
+ export { UploadFile };
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css, html, LitElement } from 'lit';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
+
10
+ /**
11
+ * An element used internally by `<vaadin-upload>`. Not intended to be used separately.
12
+ *
13
+ * @extends HTMLElement
14
+ * @private
15
+ */
16
+ class UploadIcon extends ThemableMixin(LitElement) {
17
+ static get is() {
18
+ return 'vaadin-upload-icon';
19
+ }
20
+
21
+ static get styles() {
22
+ return css`
23
+ :host {
24
+ display: inline-block;
25
+ }
26
+
27
+ :host([hidden]) {
28
+ display: none !important;
29
+ }
30
+ `;
31
+ }
32
+
33
+ /** @protected */
34
+ render() {
35
+ return html``;
36
+ }
37
+ }
38
+
39
+ defineCustomElement(UploadIcon);
40
+
41
+ export { UploadIcon };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ export * from './vaadin-upload.js';
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2016 - 2024 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/button/src/vaadin-button.js';
7
+ import './vaadin-lit-upload-icon.js';
8
+ import './vaadin-upload-icons.js';
9
+ import './vaadin-lit-upload-file-list.js';
10
+ import { css, html, LitElement } from 'lit';
11
+ import { ifDefined } from 'lit/directives/if-defined.js';
12
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
13
+ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
14
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
15
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
16
+ import { UploadMixin } from './vaadin-upload-mixin.js';
17
+
18
+ /**
19
+ * LitElement based version of `<vaadin-upload>` web component.
20
+ *
21
+ * ## Disclaimer
22
+ *
23
+ * This component is an experiment and not yet a part of Vaadin platform.
24
+ * There is no ETA regarding specific Vaadin version where it'll land.
25
+ * Feel free to try this code in your apps as per Apache 2.0 license.
26
+ */
27
+ class Upload extends UploadMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
28
+ static get is() {
29
+ return 'vaadin-upload';
30
+ }
31
+
32
+ static get styles() {
33
+ return css`
34
+ :host {
35
+ display: block;
36
+ position: relative;
37
+ box-sizing: border-box;
38
+ }
39
+
40
+ :host([hidden]) {
41
+ display: none !important;
42
+ }
43
+
44
+ [hidden] {
45
+ display: none !important;
46
+ }
47
+ `;
48
+ }
49
+
50
+ /** @protected */
51
+ render() {
52
+ return html`
53
+ <div part="primary-buttons">
54
+ <slot name="add-button"></slot>
55
+ <div part="drop-label" ?hidden="${this.nodrop}" id="dropLabelContainer" aria-hidden="true">
56
+ <slot name="drop-label-icon"></slot>
57
+ <slot name="drop-label"></slot>
58
+ </div>
59
+ </div>
60
+ <slot name="file-list"></slot>
61
+ <slot></slot>
62
+ <input
63
+ type="file"
64
+ id="fileInput"
65
+ hidden
66
+ @change="${this._onFileInputChange}"
67
+ accept="${this.accept}"
68
+ ?multiple="${this._isMultiple(this.maxFiles)}"
69
+ capture="${ifDefined(this.capture)}"
70
+ />
71
+ `;
72
+ }
73
+ }
74
+
75
+ defineCustomElement(Upload);
76
+
77
+ export { Upload };
@@ -198,7 +198,7 @@ export declare class UploadMixinClass {
198
198
  * many: 'Drop files here'
199
199
  * },
200
200
  * addFiles: {
201
- * one: 'Select File...',
201
+ * one: 'Upload File...',
202
202
  * many: 'Upload Files...'
203
203
  * },
204
204
  * error: {
@@ -218,9 +218,9 @@ export declare class UploadMixinClass {
218
218
  * unknown: 'unknown remaining time'
219
219
  * },
220
220
  * error: {
221
- * serverUnavailable: 'Server Unavailable',
222
- * unexpectedServerError: 'Unexpected Server Error',
223
- * forbidden: 'Forbidden'
221
+ * serverUnavailable: 'Upload failed, please try again later',
222
+ * unexpectedServerError: 'Upload failed due to server error',
223
+ * forbidden: 'Upload forbidden'
224
224
  * }
225
225
  * },
226
226
  * file: {
@@ -276,7 +276,7 @@ export const UploadMixin = (superClass) =>
276
276
  * many: 'Drop files here'
277
277
  * },
278
278
  * addFiles: {
279
- * one: 'Select File...',
279
+ * one: 'Upload File...',
280
280
  * many: 'Upload Files...'
281
281
  * },
282
282
  * error: {
@@ -296,9 +296,9 @@ export const UploadMixin = (superClass) =>
296
296
  * unknown: 'unknown remaining time'
297
297
  * },
298
298
  * error: {
299
- * serverUnavailable: 'Server Unavailable',
300
- * unexpectedServerError: 'Unexpected Server Error',
301
- * forbidden: 'Forbidden'
299
+ * serverUnavailable: 'Upload failed, please try again later',
300
+ * unexpectedServerError: 'Upload failed due to server error',
301
+ * forbidden: 'Upload forbidden'
302
302
  * }
303
303
  * },
304
304
  * file: {
@@ -558,12 +558,49 @@ export const UploadMixin = (superClass) =>
558
558
  }
559
559
 
560
560
  /** @private */
561
- _onDrop(event) {
561
+ async _onDrop(event) {
562
562
  if (!this.nodrop) {
563
563
  event.preventDefault();
564
564
  this._dragover = this._dragoverValid = false;
565
- this._addFiles(event.dataTransfer.files);
565
+
566
+ const files = await this.__getFilesFromDropEvent(event);
567
+ this._addFiles(files);
568
+ }
569
+ }
570
+
571
+ /**
572
+ * Get the files from the drop event. The dropped items may contain a
573
+ * combination of files and directories. If a dropped item is a directory,
574
+ * it will be recursively traversed to get all files.
575
+ *
576
+ * @param {!DragEvent} dropEvent - The drop event
577
+ * @returns {Promise<File[]>} - The files from the drop event
578
+ * @private
579
+ */
580
+ __getFilesFromDropEvent(dropEvent) {
581
+ async function getFilesFromEntry(entry) {
582
+ if (entry.isFile) {
583
+ return new Promise((resolve) => {
584
+ // In case of an error, resolve without any files
585
+ entry.file(resolve, () => resolve([]));
586
+ });
587
+ } else if (entry.isDirectory) {
588
+ const reader = entry.createReader();
589
+ const entries = await new Promise((resolve) => {
590
+ // In case of an error, resolve without any files
591
+ reader.readEntries(resolve, () => resolve([]));
592
+ });
593
+ const files = await Promise.all(entries.map(getFilesFromEntry));
594
+ return files.flat();
595
+ }
566
596
  }
597
+
598
+ const filePromises = Array.from(dropEvent.dataTransfer.items)
599
+ .map((item) => item.webkitGetAsEntry())
600
+ .filter((entry) => !!entry)
601
+ .map(getFilesFromEntry);
602
+
603
+ return Promise.all(filePromises).then((files) => files.flat());
567
604
  }
568
605
 
569
606
  /** @private */
@@ -0,0 +1,2 @@
1
+ import './vaadin-upload-styles.js';
2
+ import '../../src/vaadin-lit-upload.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-upload-styles.js';
2
+ import '../../src/vaadin-lit-upload.js';
@@ -4,5 +4,5 @@ import '@vaadin/vaadin-lumo-styles/sizing.js';
4
4
  import '@vaadin/vaadin-lumo-styles/spacing.js';
5
5
  import '@vaadin/vaadin-lumo-styles/style.js';
6
6
  import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import '@vaadin/button/theme/lumo/vaadin-button.js';
8
- import '@vaadin/progress-bar/theme/lumo/vaadin-progress-bar.js';
7
+ import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
8
+ import '@vaadin/progress-bar/theme/lumo/vaadin-progress-bar-styles.js';
@@ -4,8 +4,8 @@ import '@vaadin/vaadin-lumo-styles/sizing.js';
4
4
  import '@vaadin/vaadin-lumo-styles/spacing.js';
5
5
  import '@vaadin/vaadin-lumo-styles/style.js';
6
6
  import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import '@vaadin/button/theme/lumo/vaadin-button.js';
8
- import '@vaadin/progress-bar/theme/lumo/vaadin-progress-bar.js';
7
+ import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
8
+ import '@vaadin/progress-bar/theme/lumo/vaadin-progress-bar-styles.js';
9
9
  import { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';
10
10
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
11
 
@@ -0,0 +1,2 @@
1
+ import './vaadin-upload-styles.js';
2
+ import '../../src/vaadin-lit-upload.js';
@@ -0,0 +1,2 @@
1
+ import './vaadin-upload-styles.js';
2
+ import '../../src/vaadin-lit-upload.js';
@@ -1,5 +1,5 @@
1
1
  import '@vaadin/vaadin-material-styles/color.js';
2
2
  import '@vaadin/vaadin-material-styles/font-icons.js';
3
3
  import '@vaadin/vaadin-material-styles/typography.js';
4
- import '@vaadin/button/theme/material/vaadin-button.js';
5
- import '@vaadin/progress-bar/theme/material/vaadin-progress-bar.js';
4
+ import '@vaadin/button/theme/material/vaadin-button-styles.js';
5
+ import '@vaadin/progress-bar/theme/material/vaadin-progress-bar-styles.js';
@@ -1,8 +1,8 @@
1
1
  import '@vaadin/vaadin-material-styles/color.js';
2
2
  import '@vaadin/vaadin-material-styles/font-icons.js';
3
3
  import '@vaadin/vaadin-material-styles/typography.js';
4
- import '@vaadin/button/theme/material/vaadin-button.js';
5
- import '@vaadin/progress-bar/theme/material/vaadin-progress-bar.js';
4
+ import '@vaadin/button/theme/material/vaadin-button-styles.js';
5
+ import '@vaadin/progress-bar/theme/material/vaadin-progress-bar-styles.js';
6
6
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
7
 
8
8
  registerStyles(
@@ -0,0 +1 @@
1
+ export * from './src/vaadin-upload.js';
@@ -0,0 +1,2 @@
1
+ import './theme/lumo/vaadin-lit-upload.js';
2
+ export * from './src/vaadin-lit-upload.js';
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": "24.6.0-alpha3",
4
+ "version": "24.6.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -480,7 +480,7 @@
480
480
  },
481
481
  {
482
482
  "name": "i18n",
483
- "description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\n{\n dropFiles: {\n one: 'Drop file here',\n many: 'Drop files here'\n },\n addFiles: {\n one: 'Select 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: 'Server Unavailable',\n unexpectedServerError: 'Unexpected Server Error',\n forbidden: '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```",
483
+ "description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\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```",
484
484
  "value": {
485
485
  "type": [
486
486
  "UploadI18n"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.6.0-alpha3",
4
+ "version": "24.6.0-alpha5",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -210,7 +210,7 @@
210
210
  },
211
211
  {
212
212
  "name": ".i18n",
213
- "description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\n{\n dropFiles: {\n one: 'Drop file here',\n many: 'Drop files here'\n },\n addFiles: {\n one: 'Select 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: 'Server Unavailable',\n unexpectedServerError: 'Unexpected Server Error',\n forbidden: '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```",
213
+ "description": "The object used to localize this component.\nFor changing the default localization, change the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n\n```\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```",
214
214
  "value": {
215
215
  "kind": "expression"
216
216
  }