@vaadin/upload 25.4.0-alpha3 → 25.4.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/custom-elements.json +41 -231
- package/package.json +11 -11
- package/src/vaadin-upload-manager.js +36 -37
- package/src/vaadin-upload-mixin.js +0 -2
- package/web-types.json +7 -7
- package/web-types.lit.json +5 -5
package/custom-elements.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "javascript-module",
|
|
7
|
-
"path": "vaadin-upload.js",
|
|
7
|
+
"path": "vaadin-upload-button.js",
|
|
8
8
|
"declarations": [],
|
|
9
9
|
"exports": [
|
|
10
10
|
{
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"name": "*",
|
|
13
13
|
"declaration": {
|
|
14
14
|
"name": "*",
|
|
15
|
-
"module": "src/vaadin-upload.js"
|
|
15
|
+
"module": "src/vaadin-upload-button.js"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"kind": "javascript-module",
|
|
22
|
-
"path": "vaadin-upload-
|
|
22
|
+
"path": "vaadin-upload-drop-zone.js",
|
|
23
23
|
"declarations": [],
|
|
24
24
|
"exports": [
|
|
25
25
|
{
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"name": "*",
|
|
28
28
|
"declaration": {
|
|
29
29
|
"name": "*",
|
|
30
|
-
"module": "src/vaadin-upload-
|
|
30
|
+
"module": "src/vaadin-upload-drop-zone.js"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
]
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"kind": "javascript-module",
|
|
52
|
-
"path": "vaadin-upload-
|
|
52
|
+
"path": "vaadin-upload-manager.js",
|
|
53
53
|
"declarations": [],
|
|
54
54
|
"exports": [
|
|
55
55
|
{
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"name": "*",
|
|
58
58
|
"declaration": {
|
|
59
59
|
"name": "*",
|
|
60
|
-
"module": "src/vaadin-upload-
|
|
60
|
+
"module": "src/vaadin-upload-manager.js"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
"kind": "javascript-module",
|
|
67
|
-
"path": "vaadin-upload
|
|
67
|
+
"path": "vaadin-upload.js",
|
|
68
68
|
"declarations": [],
|
|
69
69
|
"exports": [
|
|
70
70
|
{
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"name": "*",
|
|
73
73
|
"declaration": {
|
|
74
74
|
"name": "*",
|
|
75
|
-
"module": "src/vaadin-upload
|
|
75
|
+
"module": "src/vaadin-upload.js"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
]
|
|
@@ -102,7 +102,9 @@
|
|
|
102
102
|
"description": "Whether the button is disabled.\nReturns true if either explicitly disabled, manager is disabled, or maxFilesReached is true.",
|
|
103
103
|
"type": {
|
|
104
104
|
"text": "boolean"
|
|
105
|
-
}
|
|
105
|
+
},
|
|
106
|
+
"privacy": "public",
|
|
107
|
+
"attribute": "disabled"
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
110
|
"kind": "field",
|
|
@@ -111,8 +113,7 @@
|
|
|
111
113
|
"type": {
|
|
112
114
|
"text": "Object | null"
|
|
113
115
|
},
|
|
114
|
-
"description": "Reference to an UploadManager.\nWhen set, the button will automatically disable when maxFilesReached\nbecomes true on the manager."
|
|
115
|
-
"attribute": "manager"
|
|
116
|
+
"description": "Reference to an UploadManager.\nWhen set, the button will automatically disable when maxFilesReached\nbecomes true on the manager."
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
119
|
"kind": "field",
|
|
@@ -151,14 +152,6 @@
|
|
|
151
152
|
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
152
153
|
}
|
|
153
154
|
},
|
|
154
|
-
{
|
|
155
|
-
"name": "manager",
|
|
156
|
-
"type": {
|
|
157
|
-
"text": "Object | null"
|
|
158
|
-
},
|
|
159
|
-
"description": "Reference to an UploadManager.\nWhen set, the button will automatically disable when maxFilesReached\nbecomes true on the manager.",
|
|
160
|
-
"fieldName": "manager"
|
|
161
|
-
},
|
|
162
155
|
{
|
|
163
156
|
"name": "max-files-reached",
|
|
164
157
|
"type": {
|
|
@@ -243,8 +236,7 @@
|
|
|
243
236
|
"type": {
|
|
244
237
|
"text": "Object | null"
|
|
245
238
|
},
|
|
246
|
-
"description": "Reference to an UploadManager.\nWhen set, dropped files will be automatically added to the manager."
|
|
247
|
-
"attribute": "manager"
|
|
239
|
+
"description": "Reference to an UploadManager.\nWhen set, dropped files will be automatically added to the manager."
|
|
248
240
|
},
|
|
249
241
|
{
|
|
250
242
|
"kind": "field",
|
|
@@ -254,8 +246,7 @@
|
|
|
254
246
|
"text": "boolean"
|
|
255
247
|
},
|
|
256
248
|
"description": "True when max files has been reached on the manager.",
|
|
257
|
-
"readonly": true
|
|
258
|
-
"attribute": "max-files-reached"
|
|
249
|
+
"readonly": true
|
|
259
250
|
}
|
|
260
251
|
],
|
|
261
252
|
"attributes": [
|
|
@@ -267,23 +258,6 @@
|
|
|
267
258
|
"description": "Whether the drop zone is disabled.\nReturns true if either explicitly disabled, manager is disabled, or no manager is set.",
|
|
268
259
|
"fieldName": "disabled"
|
|
269
260
|
},
|
|
270
|
-
{
|
|
271
|
-
"name": "manager",
|
|
272
|
-
"type": {
|
|
273
|
-
"text": "Object | null"
|
|
274
|
-
},
|
|
275
|
-
"description": "Reference to an UploadManager.\nWhen set, dropped files will be automatically added to the manager.",
|
|
276
|
-
"fieldName": "manager"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"name": "max-files-reached",
|
|
280
|
-
"type": {
|
|
281
|
-
"text": "boolean"
|
|
282
|
-
},
|
|
283
|
-
"description": "True when max files has been reached on the manager.",
|
|
284
|
-
"readonly": true,
|
|
285
|
-
"fieldName": "maxFilesReached"
|
|
286
|
-
},
|
|
287
261
|
{
|
|
288
262
|
"type": {
|
|
289
263
|
"text": "string"
|
|
@@ -360,16 +334,11 @@
|
|
|
360
334
|
{
|
|
361
335
|
"kind": "field",
|
|
362
336
|
"name": "i18n",
|
|
363
|
-
"
|
|
337
|
+
"description": "The object used to localize this component.\nTo change the default localization, set this to an object\nthat provides all properties, or just the individual properties\nyou want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following JSON structure and default values:\n```js\n{\n file: {\n retry: 'Retry',\n start: 'Start',\n remove: 'Remove'\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 fileTooLarge: 'File is too large'\n }\n },\n units: {\n size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n }\n}\n```",
|
|
364
338
|
"type": {
|
|
365
|
-
"text": "
|
|
339
|
+
"text": "UploadFileListI18n | undefined"
|
|
366
340
|
},
|
|
367
|
-
"
|
|
368
|
-
"attribute": "i18n",
|
|
369
|
-
"inheritedFrom": {
|
|
370
|
-
"name": "I18nMixin",
|
|
371
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
372
|
-
}
|
|
341
|
+
"privacy": "public"
|
|
373
342
|
},
|
|
374
343
|
{
|
|
375
344
|
"kind": "field",
|
|
@@ -379,8 +348,7 @@
|
|
|
379
348
|
"text": "array"
|
|
380
349
|
},
|
|
381
350
|
"description": "The array of files being processed, or already uploaded.",
|
|
382
|
-
"readonly": true
|
|
383
|
-
"attribute": "items"
|
|
351
|
+
"readonly": true
|
|
384
352
|
},
|
|
385
353
|
{
|
|
386
354
|
"kind": "field",
|
|
@@ -389,8 +357,7 @@
|
|
|
389
357
|
"type": {
|
|
390
358
|
"text": "Object | null"
|
|
391
359
|
},
|
|
392
|
-
"description": "Reference to an UploadManager to link this file list to.\nWhen set, the file list automatically:\n- Syncs files from the manager\n- Forwards retry/abort/start/remove events back to the manager"
|
|
393
|
-
"attribute": "manager"
|
|
360
|
+
"description": "Reference to an UploadManager to link this file list to.\nWhen set, the file list automatically:\n- Syncs files from the manager\n- Forwards retry/abort/start/remove events back to the manager"
|
|
394
361
|
}
|
|
395
362
|
],
|
|
396
363
|
"attributes": [
|
|
@@ -401,35 +368,6 @@
|
|
|
401
368
|
},
|
|
402
369
|
"description": "If true, the user cannot interact with this element.",
|
|
403
370
|
"fieldName": "disabled"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"name": "i18n",
|
|
407
|
-
"type": {
|
|
408
|
-
"text": "Object | undefined"
|
|
409
|
-
},
|
|
410
|
-
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
411
|
-
"fieldName": "i18n",
|
|
412
|
-
"inheritedFrom": {
|
|
413
|
-
"name": "I18nMixin",
|
|
414
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"name": "items",
|
|
419
|
-
"type": {
|
|
420
|
-
"text": "array"
|
|
421
|
-
},
|
|
422
|
-
"description": "The array of files being processed, or already uploaded.",
|
|
423
|
-
"readonly": true,
|
|
424
|
-
"fieldName": "items"
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"name": "manager",
|
|
428
|
-
"type": {
|
|
429
|
-
"text": "Object | null"
|
|
430
|
-
},
|
|
431
|
-
"description": "Reference to an UploadManager to link this file list to.\nWhen set, the file list automatically:\n- Syncs files from the manager\n- Forwards retry/abort/start/remove events back to the manager",
|
|
432
|
-
"fieldName": "manager"
|
|
433
371
|
}
|
|
434
372
|
],
|
|
435
373
|
"mixins": [
|
|
@@ -490,15 +428,14 @@
|
|
|
490
428
|
{
|
|
491
429
|
"kind": "field",
|
|
492
430
|
"name": "i18n",
|
|
493
|
-
"
|
|
431
|
+
"description": "The object used to localize this component.\nTo change the default localization, set this to an object\nthat provides all properties, or just the individual properties\nyou want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following JSON structure and default values:\n```js\n{\n file: {\n retry: 'Retry',\n start: 'Start',\n remove: 'Remove'\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 fileTooLarge: 'File is too large'\n }\n },\n units: {\n size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n }\n}\n```",
|
|
494
432
|
"type": {
|
|
495
|
-
"text": "
|
|
433
|
+
"text": "UploadFileListI18n | undefined"
|
|
496
434
|
},
|
|
497
|
-
"
|
|
498
|
-
"attribute": "i18n",
|
|
435
|
+
"privacy": "public",
|
|
499
436
|
"inheritedFrom": {
|
|
500
|
-
"name": "
|
|
501
|
-
"
|
|
437
|
+
"name": "UploadFileListMixin",
|
|
438
|
+
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
502
439
|
}
|
|
503
440
|
},
|
|
504
441
|
{
|
|
@@ -510,7 +447,6 @@
|
|
|
510
447
|
},
|
|
511
448
|
"description": "The array of files being processed, or already uploaded.",
|
|
512
449
|
"readonly": true,
|
|
513
|
-
"attribute": "items",
|
|
514
450
|
"inheritedFrom": {
|
|
515
451
|
"name": "UploadFileListMixin",
|
|
516
452
|
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
@@ -524,7 +460,6 @@
|
|
|
524
460
|
"text": "Object | null"
|
|
525
461
|
},
|
|
526
462
|
"description": "Reference to an UploadManager to link this file list to.\nWhen set, the file list automatically:\n- Syncs files from the manager\n- Forwards retry/abort/start/remove events back to the manager",
|
|
527
|
-
"attribute": "manager",
|
|
528
463
|
"inheritedFrom": {
|
|
529
464
|
"name": "UploadFileListMixin",
|
|
530
465
|
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
@@ -544,43 +479,6 @@
|
|
|
544
479
|
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
545
480
|
}
|
|
546
481
|
},
|
|
547
|
-
{
|
|
548
|
-
"name": "i18n",
|
|
549
|
-
"type": {
|
|
550
|
-
"text": "Object | undefined"
|
|
551
|
-
},
|
|
552
|
-
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
553
|
-
"fieldName": "i18n",
|
|
554
|
-
"inheritedFrom": {
|
|
555
|
-
"name": "I18nMixin",
|
|
556
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
557
|
-
}
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
"name": "items",
|
|
561
|
-
"type": {
|
|
562
|
-
"text": "array"
|
|
563
|
-
},
|
|
564
|
-
"description": "The array of files being processed, or already uploaded.",
|
|
565
|
-
"readonly": true,
|
|
566
|
-
"fieldName": "items",
|
|
567
|
-
"inheritedFrom": {
|
|
568
|
-
"name": "UploadFileListMixin",
|
|
569
|
-
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"name": "manager",
|
|
574
|
-
"type": {
|
|
575
|
-
"text": "Object | null"
|
|
576
|
-
},
|
|
577
|
-
"description": "Reference to an UploadManager to link this file list to.\nWhen set, the file list automatically:\n- Syncs files from the manager\n- Forwards retry/abort/start/remove events back to the manager",
|
|
578
|
-
"fieldName": "manager",
|
|
579
|
-
"inheritedFrom": {
|
|
580
|
-
"name": "UploadFileListMixin",
|
|
581
|
-
"module": "src/vaadin-upload-file-list-mixin.js"
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
482
|
{
|
|
585
483
|
"type": {
|
|
586
484
|
"text": "string"
|
|
@@ -669,8 +567,7 @@
|
|
|
669
567
|
"type": {
|
|
670
568
|
"text": "object"
|
|
671
569
|
},
|
|
672
|
-
"description": "The object representing a file."
|
|
673
|
-
"attribute": "file"
|
|
570
|
+
"description": "The object representing a file."
|
|
674
571
|
},
|
|
675
572
|
{
|
|
676
573
|
"kind": "field",
|
|
@@ -699,8 +596,7 @@
|
|
|
699
596
|
"type": {
|
|
700
597
|
"text": "object"
|
|
701
598
|
},
|
|
702
|
-
"description": "The object used to localize this component."
|
|
703
|
-
"attribute": "i18n"
|
|
599
|
+
"description": "The object used to localize this component."
|
|
704
600
|
},
|
|
705
601
|
{
|
|
706
602
|
"kind": "field",
|
|
@@ -901,7 +797,6 @@
|
|
|
901
797
|
"text": "object"
|
|
902
798
|
},
|
|
903
799
|
"description": "The object representing a file.",
|
|
904
|
-
"attribute": "file",
|
|
905
800
|
"inheritedFrom": {
|
|
906
801
|
"name": "UploadFileMixin",
|
|
907
802
|
"module": "src/vaadin-upload-file-mixin.js"
|
|
@@ -943,7 +838,6 @@
|
|
|
943
838
|
"text": "object"
|
|
944
839
|
},
|
|
945
840
|
"description": "The object used to localize this component.",
|
|
946
|
-
"attribute": "i18n",
|
|
947
841
|
"inheritedFrom": {
|
|
948
842
|
"name": "UploadFileMixin",
|
|
949
843
|
"module": "src/vaadin-upload-file-mixin.js"
|
|
@@ -1264,10 +1158,6 @@
|
|
|
1264
1158
|
"description": "Override accessor from `UploadManager` to accept assigned files as-is,\nwithout validating them against the maxFiles, maxFileSize and accept\nconstraints, e.g. to show previously uploaded files.",
|
|
1265
1159
|
"type": {
|
|
1266
1160
|
"text": "Array<UploadFile>"
|
|
1267
|
-
},
|
|
1268
|
-
"inheritedFrom": {
|
|
1269
|
-
"name": "UploadManager",
|
|
1270
|
-
"module": "src/vaadin-upload-manager.js"
|
|
1271
1161
|
}
|
|
1272
1162
|
},
|
|
1273
1163
|
{
|
|
@@ -1381,11 +1271,7 @@
|
|
|
1381
1271
|
"name": "file"
|
|
1382
1272
|
}
|
|
1383
1273
|
],
|
|
1384
|
-
"description": "Override method from `UploadManager` to not restart the upload of a\nfile that is already uploading or queued, like the component\nhistorically does; only the `upload-retry` event is dispatched."
|
|
1385
|
-
"inheritedFrom": {
|
|
1386
|
-
"name": "UploadManager",
|
|
1387
|
-
"module": "src/vaadin-upload-manager.js"
|
|
1388
|
-
}
|
|
1274
|
+
"description": "Override method from `UploadManager` to not restart the upload of a\nfile that is already uploading or queued, like the component\nhistorically does; only the `upload-retry` event is dispatched."
|
|
1389
1275
|
},
|
|
1390
1276
|
{
|
|
1391
1277
|
"kind": "method",
|
|
@@ -1580,11 +1466,7 @@
|
|
|
1580
1466
|
"type": {
|
|
1581
1467
|
"text": "CustomEvent"
|
|
1582
1468
|
},
|
|
1583
|
-
"description": "Fired when retry is requested"
|
|
1584
|
-
"inheritedFrom": {
|
|
1585
|
-
"name": "UploadManager",
|
|
1586
|
-
"module": "src/vaadin-upload-manager.js"
|
|
1587
|
-
}
|
|
1469
|
+
"description": "Fired when retry is requested"
|
|
1588
1470
|
},
|
|
1589
1471
|
{
|
|
1590
1472
|
"name": "upload-start",
|
|
@@ -1985,8 +1867,7 @@
|
|
|
1985
1867
|
"type": {
|
|
1986
1868
|
"text": "!Array<!UploadFile>"
|
|
1987
1869
|
},
|
|
1988
|
-
"description": "The array of files being processed, or already uploaded.\n\nEach element is a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)\nobject with a number of extra properties to track the upload process:\n- `uploadTarget`: The target URL used to upload this file.\n- `elapsed`: Elapsed time since the upload started.\n- `elapsedStr`: Human-readable elapsed time.\n- `remaining`: Number of seconds remaining for the upload to finish.\n- `remainingStr`: Human-readable remaining time for the upload to finish.\n- `progress`: Percentage of the file already uploaded.\n- `speed`: Upload speed in kB/s.\n- `size`: File size in bytes.\n- `totalStr`: Human-readable total size of the file.\n- `loaded`: Bytes transferred so far.\n- `loadedStr`: Human-readable uploaded size at the moment.\n- `status`: Status of the upload process.\n- `error`: Error message in case the upload failed.\n- `abort`: True if the file was canceled by the user.\n- `complete`: True when the file was transferred to the server.\n- `uploading`: True while transferring data to the server."
|
|
1989
|
-
"attribute": "files"
|
|
1870
|
+
"description": "The array of files being processed, or already uploaded.\n\nEach element is a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)\nobject with a number of extra properties to track the upload process:\n- `uploadTarget`: The target URL used to upload this file.\n- `elapsed`: Elapsed time since the upload started.\n- `elapsedStr`: Human-readable elapsed time.\n- `remaining`: Number of seconds remaining for the upload to finish.\n- `remainingStr`: Human-readable remaining time for the upload to finish.\n- `progress`: Percentage of the file already uploaded.\n- `speed`: Upload speed in kB/s.\n- `size`: File size in bytes.\n- `totalStr`: Human-readable total size of the file.\n- `loaded`: Bytes transferred so far.\n- `loadedStr`: Human-readable uploaded size at the moment.\n- `status`: Status of the upload process.\n- `error`: Error message in case the upload failed.\n- `abort`: True if the file was canceled by the user.\n- `complete`: True when the file was transferred to the server.\n- `uploading`: True while transferring data to the server."
|
|
1990
1871
|
},
|
|
1991
1872
|
{
|
|
1992
1873
|
"kind": "field",
|
|
@@ -2005,22 +1886,16 @@
|
|
|
2005
1886
|
"type": {
|
|
2006
1887
|
"text": "object | string"
|
|
2007
1888
|
},
|
|
2008
|
-
"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```"
|
|
2009
|
-
"attribute": "headers"
|
|
1889
|
+
"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```"
|
|
2010
1890
|
},
|
|
2011
1891
|
{
|
|
2012
1892
|
"kind": "field",
|
|
2013
1893
|
"name": "i18n",
|
|
2014
|
-
"
|
|
1894
|
+
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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 fileTooLarge: 'File is too large'\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```",
|
|
2015
1895
|
"type": {
|
|
2016
|
-
"text": "
|
|
1896
|
+
"text": "UploadI18n | undefined"
|
|
2017
1897
|
},
|
|
2018
|
-
"
|
|
2019
|
-
"attribute": "i18n",
|
|
2020
|
-
"inheritedFrom": {
|
|
2021
|
-
"name": "I18nMixin",
|
|
2022
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
2023
|
-
}
|
|
1898
|
+
"privacy": "public"
|
|
2024
1899
|
},
|
|
2025
1900
|
{
|
|
2026
1901
|
"kind": "field",
|
|
@@ -2060,7 +1935,6 @@
|
|
|
2060
1935
|
"text": "boolean"
|
|
2061
1936
|
},
|
|
2062
1937
|
"description": "Specifies if the maximum number of files have been uploaded",
|
|
2063
|
-
"attribute": "max-files-reached",
|
|
2064
1938
|
"readonly": true
|
|
2065
1939
|
},
|
|
2066
1940
|
{
|
|
@@ -2091,7 +1965,6 @@
|
|
|
2091
1965
|
"text": "boolean"
|
|
2092
1966
|
},
|
|
2093
1967
|
"description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
|
|
2094
|
-
"default": "true in touch-devices, false otherwise.",
|
|
2095
1968
|
"attribute": "nodrop"
|
|
2096
1969
|
},
|
|
2097
1970
|
{
|
|
@@ -2203,18 +2076,6 @@
|
|
|
2203
2076
|
"description": "Specifies the 'name' property at Content-Disposition for multipart uploads.\nThis property is ignored when uploadFormat is 'raw'.",
|
|
2204
2077
|
"fieldName": "formDataName"
|
|
2205
2078
|
},
|
|
2206
|
-
{
|
|
2207
|
-
"name": "i18n",
|
|
2208
|
-
"type": {
|
|
2209
|
-
"text": "Object | undefined"
|
|
2210
|
-
},
|
|
2211
|
-
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
2212
|
-
"fieldName": "i18n",
|
|
2213
|
-
"inheritedFrom": {
|
|
2214
|
-
"name": "I18nMixin",
|
|
2215
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
2216
|
-
}
|
|
2217
|
-
},
|
|
2218
2079
|
{
|
|
2219
2080
|
"name": "max-concurrent-uploads",
|
|
2220
2081
|
"type": {
|
|
@@ -2239,14 +2100,6 @@
|
|
|
2239
2100
|
"description": "Limit of files to upload, by default it is unlimited. If the value is\nset to one, native file browser will prevent selecting multiple files.",
|
|
2240
2101
|
"fieldName": "maxFiles"
|
|
2241
2102
|
},
|
|
2242
|
-
{
|
|
2243
|
-
"name": "max-files-reached",
|
|
2244
|
-
"type": {
|
|
2245
|
-
"text": "boolean"
|
|
2246
|
-
},
|
|
2247
|
-
"description": "Specifies if the maximum number of files have been uploaded",
|
|
2248
|
-
"fieldName": "maxFilesReached"
|
|
2249
|
-
},
|
|
2250
2103
|
{
|
|
2251
2104
|
"name": "method",
|
|
2252
2105
|
"type": {
|
|
@@ -2269,7 +2122,6 @@
|
|
|
2269
2122
|
"text": "boolean"
|
|
2270
2123
|
},
|
|
2271
2124
|
"description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
|
|
2272
|
-
"default": "true in touch-devices, false otherwise.",
|
|
2273
2125
|
"fieldName": "nodrop"
|
|
2274
2126
|
},
|
|
2275
2127
|
{
|
|
@@ -2396,7 +2248,6 @@
|
|
|
2396
2248
|
"text": "!Array<!UploadFile>"
|
|
2397
2249
|
},
|
|
2398
2250
|
"description": "The array of files being processed, or already uploaded.\n\nEach element is a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)\nobject with a number of extra properties to track the upload process:\n- `uploadTarget`: The target URL used to upload this file.\n- `elapsed`: Elapsed time since the upload started.\n- `elapsedStr`: Human-readable elapsed time.\n- `remaining`: Number of seconds remaining for the upload to finish.\n- `remainingStr`: Human-readable remaining time for the upload to finish.\n- `progress`: Percentage of the file already uploaded.\n- `speed`: Upload speed in kB/s.\n- `size`: File size in bytes.\n- `totalStr`: Human-readable total size of the file.\n- `loaded`: Bytes transferred so far.\n- `loadedStr`: Human-readable uploaded size at the moment.\n- `status`: Status of the upload process.\n- `error`: Error message in case the upload failed.\n- `abort`: True if the file was canceled by the user.\n- `complete`: True when the file was transferred to the server.\n- `uploading`: True while transferring data to the server.",
|
|
2399
|
-
"attribute": "files",
|
|
2400
2251
|
"inheritedFrom": {
|
|
2401
2252
|
"name": "UploadMixin",
|
|
2402
2253
|
"module": "src/vaadin-upload-mixin.js"
|
|
@@ -2424,7 +2275,6 @@
|
|
|
2424
2275
|
"text": "object | string"
|
|
2425
2276
|
},
|
|
2426
2277
|
"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```",
|
|
2427
|
-
"attribute": "headers",
|
|
2428
2278
|
"inheritedFrom": {
|
|
2429
2279
|
"name": "UploadMixin",
|
|
2430
2280
|
"module": "src/vaadin-upload-mixin.js"
|
|
@@ -2433,15 +2283,14 @@
|
|
|
2433
2283
|
{
|
|
2434
2284
|
"kind": "field",
|
|
2435
2285
|
"name": "i18n",
|
|
2436
|
-
"
|
|
2286
|
+
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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 fileTooLarge: 'File is too large'\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```",
|
|
2437
2287
|
"type": {
|
|
2438
|
-
"text": "
|
|
2288
|
+
"text": "UploadI18n | undefined"
|
|
2439
2289
|
},
|
|
2440
|
-
"
|
|
2441
|
-
"attribute": "i18n",
|
|
2290
|
+
"privacy": "public",
|
|
2442
2291
|
"inheritedFrom": {
|
|
2443
|
-
"name": "
|
|
2444
|
-
"
|
|
2292
|
+
"name": "UploadMixin",
|
|
2293
|
+
"module": "src/vaadin-upload-mixin.js"
|
|
2445
2294
|
}
|
|
2446
2295
|
},
|
|
2447
2296
|
{
|
|
@@ -2494,7 +2343,6 @@
|
|
|
2494
2343
|
"text": "boolean"
|
|
2495
2344
|
},
|
|
2496
2345
|
"description": "Specifies if the maximum number of files have been uploaded",
|
|
2497
|
-
"attribute": "max-files-reached",
|
|
2498
2346
|
"readonly": true,
|
|
2499
2347
|
"inheritedFrom": {
|
|
2500
2348
|
"name": "UploadMixin",
|
|
@@ -2537,7 +2385,6 @@
|
|
|
2537
2385
|
"text": "boolean"
|
|
2538
2386
|
},
|
|
2539
2387
|
"description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
|
|
2540
|
-
"default": "true in touch-devices, false otherwise.",
|
|
2541
2388
|
"attribute": "nodrop",
|
|
2542
2389
|
"inheritedFrom": {
|
|
2543
2390
|
"name": "UploadMixin",
|
|
@@ -2622,26 +2469,18 @@
|
|
|
2622
2469
|
],
|
|
2623
2470
|
"events": [
|
|
2624
2471
|
{
|
|
2625
|
-
"name": "file-reject",
|
|
2626
2472
|
"type": {
|
|
2627
2473
|
"text": "CustomEvent"
|
|
2628
2474
|
},
|
|
2629
2475
|
"description": "Fired when a file cannot be added to the queue due to a constraint: file size, file type, or maxFiles.",
|
|
2630
|
-
"
|
|
2631
|
-
"name": "UploadMixin",
|
|
2632
|
-
"module": "src/vaadin-upload-mixin.js"
|
|
2633
|
-
}
|
|
2476
|
+
"name": "file-reject"
|
|
2634
2477
|
},
|
|
2635
2478
|
{
|
|
2636
|
-
"name": "file-remove",
|
|
2637
2479
|
"type": {
|
|
2638
2480
|
"text": "CustomEvent"
|
|
2639
2481
|
},
|
|
2640
2482
|
"description": "Fired when a file is removed from the list.",
|
|
2641
|
-
"
|
|
2642
|
-
"name": "UploadMixin",
|
|
2643
|
-
"module": "src/vaadin-upload-mixin.js"
|
|
2644
|
-
}
|
|
2483
|
+
"name": "file-remove"
|
|
2645
2484
|
},
|
|
2646
2485
|
{
|
|
2647
2486
|
"type": {
|
|
@@ -2672,15 +2511,11 @@
|
|
|
2672
2511
|
"name": "upload-before"
|
|
2673
2512
|
},
|
|
2674
2513
|
{
|
|
2675
|
-
"name": "upload-error",
|
|
2676
2514
|
"type": {
|
|
2677
2515
|
"text": "CustomEvent"
|
|
2678
2516
|
},
|
|
2679
2517
|
"description": "Fired when the upload process fails.",
|
|
2680
|
-
"
|
|
2681
|
-
"name": "UploadMixin",
|
|
2682
|
-
"module": "src/vaadin-upload-mixin.js"
|
|
2683
|
-
}
|
|
2518
|
+
"name": "upload-error"
|
|
2684
2519
|
},
|
|
2685
2520
|
{
|
|
2686
2521
|
"type": {
|
|
@@ -2774,18 +2609,6 @@
|
|
|
2774
2609
|
"module": "src/vaadin-upload-mixin.js"
|
|
2775
2610
|
}
|
|
2776
2611
|
},
|
|
2777
|
-
{
|
|
2778
|
-
"name": "i18n",
|
|
2779
|
-
"type": {
|
|
2780
|
-
"text": "Object | undefined"
|
|
2781
|
-
},
|
|
2782
|
-
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
2783
|
-
"fieldName": "i18n",
|
|
2784
|
-
"inheritedFrom": {
|
|
2785
|
-
"name": "I18nMixin",
|
|
2786
|
-
"package": "@vaadin/component-base/src/i18n-mixin.js"
|
|
2787
|
-
}
|
|
2788
|
-
},
|
|
2789
2612
|
{
|
|
2790
2613
|
"name": "max-concurrent-uploads",
|
|
2791
2614
|
"type": {
|
|
@@ -2822,18 +2645,6 @@
|
|
|
2822
2645
|
"module": "src/vaadin-upload-mixin.js"
|
|
2823
2646
|
}
|
|
2824
2647
|
},
|
|
2825
|
-
{
|
|
2826
|
-
"name": "max-files-reached",
|
|
2827
|
-
"type": {
|
|
2828
|
-
"text": "boolean"
|
|
2829
|
-
},
|
|
2830
|
-
"description": "Specifies if the maximum number of files have been uploaded",
|
|
2831
|
-
"fieldName": "maxFilesReached",
|
|
2832
|
-
"inheritedFrom": {
|
|
2833
|
-
"name": "UploadMixin",
|
|
2834
|
-
"module": "src/vaadin-upload-mixin.js"
|
|
2835
|
-
}
|
|
2836
|
-
},
|
|
2837
2648
|
{
|
|
2838
2649
|
"name": "method",
|
|
2839
2650
|
"type": {
|
|
@@ -2864,7 +2675,6 @@
|
|
|
2864
2675
|
"text": "boolean"
|
|
2865
2676
|
},
|
|
2866
2677
|
"description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
|
|
2867
|
-
"default": "true in touch-devices, false otherwise.",
|
|
2868
2678
|
"fieldName": "nodrop",
|
|
2869
2679
|
"inheritedFrom": {
|
|
2870
2680
|
"name": "UploadMixin",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
39
|
-
"@vaadin/button": "25.4.0-
|
|
40
|
-
"@vaadin/component-base": "25.4.0-
|
|
41
|
-
"@vaadin/progress-bar": "25.4.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.4.0-alpha5",
|
|
39
|
+
"@vaadin/button": "25.4.0-alpha5",
|
|
40
|
+
"@vaadin/component-base": "25.4.0-alpha5",
|
|
41
|
+
"@vaadin/progress-bar": "25.4.0-alpha5",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha5",
|
|
43
43
|
"lit": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@vaadin/aura": "25.4.0-
|
|
47
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
46
|
+
"@vaadin/aura": "25.4.0-alpha5",
|
|
47
|
+
"@vaadin/chai-plugins": "25.4.0-alpha5",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha5",
|
|
49
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha5",
|
|
51
51
|
"sinon": "^22.0.0"
|
|
52
52
|
},
|
|
53
53
|
"customElements": "custom-elements.json",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
|
|
59
59
|
}
|
|
@@ -542,49 +542,47 @@ export class UploadManager extends EventTarget {
|
|
|
542
542
|
this.#notifyFilesChanged();
|
|
543
543
|
};
|
|
544
544
|
|
|
545
|
-
xhr.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
file.indeterminate = file.uploading = false;
|
|
545
|
+
xhr.onload = xhr.onerror = () => {
|
|
546
|
+
clearTimeout(stalledId);
|
|
547
|
+
file.indeterminate = file.uploading = false;
|
|
549
548
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
549
|
+
this.#activeUploads -= 1;
|
|
550
|
+
this._processUploadQueue();
|
|
551
|
+
this.#cleanupXhr(xhr);
|
|
553
552
|
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
553
|
+
// Return early if already handled (abort or timeout)
|
|
554
|
+
if (file.abort || file.errorKey) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
file.status = '';
|
|
559
558
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
559
|
+
const evt = this.dispatchEvent(
|
|
560
|
+
new CustomEvent('upload-response', {
|
|
561
|
+
detail: { file, xhr },
|
|
562
|
+
cancelable: true,
|
|
563
|
+
}),
|
|
564
|
+
);
|
|
566
565
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
566
|
+
if (!evt) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
if (xhr.status === 0) {
|
|
570
|
+
file.errorKey = 'serverUnavailable';
|
|
571
|
+
} else if (xhr.status >= 500) {
|
|
572
|
+
file.errorKey = 'unexpectedServerError';
|
|
573
|
+
} else if (xhr.status === 413) {
|
|
574
|
+
file.errorKey = 'fileTooLarge';
|
|
575
|
+
} else if (xhr.status >= 400) {
|
|
576
|
+
file.errorKey = 'forbidden';
|
|
577
|
+
}
|
|
579
578
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
579
|
+
file.complete = !file.errorKey;
|
|
580
|
+
const eventName = file.errorKey ? 'upload-error' : 'upload-success';
|
|
581
|
+
this.dispatchEvent(new CustomEvent(eventName, { detail: { file, xhr } }));
|
|
583
582
|
|
|
584
|
-
|
|
583
|
+
this._clearFileXhr(file);
|
|
585
584
|
|
|
586
|
-
|
|
587
|
-
}
|
|
585
|
+
this.#notifyFilesChanged();
|
|
588
586
|
};
|
|
589
587
|
|
|
590
588
|
const isRawUpload = this.uploadFormat === 'raw';
|
|
@@ -724,7 +722,8 @@ export class UploadManager extends EventTarget {
|
|
|
724
722
|
if (xhr) {
|
|
725
723
|
xhr.upload.onprogress = null;
|
|
726
724
|
xhr.upload.onloadstart = null;
|
|
727
|
-
xhr.
|
|
725
|
+
xhr.onload = null;
|
|
726
|
+
xhr.onerror = null;
|
|
728
727
|
xhr.onabort = null;
|
|
729
728
|
xhr.ontimeout = null;
|
|
730
729
|
}
|
|
@@ -47,8 +47,6 @@ export const UploadMixin = (superClass) =>
|
|
|
47
47
|
* because mobile devices do not support drag events in general. Setting
|
|
48
48
|
* it false means that drop is enabled even in touch-devices, and true
|
|
49
49
|
* disables drop in all devices.
|
|
50
|
-
*
|
|
51
|
-
* @default true in touch-devices, false otherwise.
|
|
52
50
|
*/
|
|
53
51
|
nodrop: {
|
|
54
52
|
type: Boolean,
|
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.4.0-
|
|
4
|
+
"version": "25.4.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"description": "The object used to localize this component.\nTo change the default localization, set this to an object\nthat provides all properties, or just the individual properties\nyou want to change.\n\nWhen not set, defaults to `undefined`.\n\nThe object has the following JSON structure and default values:\n```js\n{\n file: {\n retry: 'Retry',\n start: 'Start',\n remove: 'Remove'\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 fileTooLarge: 'File is too large'\n }\n },\n units: {\n size: ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n }\n}\n```",
|
|
178
178
|
"value": {
|
|
179
179
|
"type": [
|
|
180
|
-
"
|
|
180
|
+
"UploadFileListI18n",
|
|
181
181
|
"undefined"
|
|
182
182
|
]
|
|
183
183
|
}
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
"description": "The object used to localize this component. To change the default\nlocalization, set this to an object that provides all properties, or\njust the individual properties you want to change.\n\nWhen not set, defaults to `undefined`.\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 fileTooLarge: 'File is too large'\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```",
|
|
612
612
|
"value": {
|
|
613
613
|
"type": [
|
|
614
|
-
"
|
|
614
|
+
"UploadI18n",
|
|
615
615
|
"undefined"
|
|
616
616
|
]
|
|
617
617
|
}
|
|
@@ -626,8 +626,8 @@
|
|
|
626
626
|
}
|
|
627
627
|
},
|
|
628
628
|
{
|
|
629
|
-
"name": "
|
|
630
|
-
"description": "
|
|
629
|
+
"name": "maxFileSize",
|
|
630
|
+
"description": "Specifies the maximum file size in bytes allowed to upload.\nNotice that it is a client-side constraint, which will be checked before\nsending the request. Obviously you need to do the same validation in\nthe server-side and be sure that they are aligned.",
|
|
631
631
|
"value": {
|
|
632
632
|
"type": [
|
|
633
633
|
"number"
|
|
@@ -635,8 +635,8 @@
|
|
|
635
635
|
}
|
|
636
636
|
},
|
|
637
637
|
{
|
|
638
|
-
"name": "
|
|
639
|
-
"description": "
|
|
638
|
+
"name": "maxFiles",
|
|
639
|
+
"description": "Limit of files to upload, by default it is unlimited. If the value is\nset to one, native file browser will prevent selecting multiple files.",
|
|
640
640
|
"value": {
|
|
641
641
|
"type": [
|
|
642
642
|
"number"
|
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.4.0-
|
|
4
|
+
"version": "25.4.0-alpha5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -265,15 +265,15 @@
|
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
|
-
"name": ".
|
|
269
|
-
"description": "
|
|
268
|
+
"name": ".maxFileSize",
|
|
269
|
+
"description": "Specifies the maximum file size in bytes allowed to upload.\nNotice that it is a client-side constraint, which will be checked before\nsending the request. Obviously you need to do the same validation in\nthe server-side and be sure that they are aligned.",
|
|
270
270
|
"value": {
|
|
271
271
|
"kind": "expression"
|
|
272
272
|
}
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
|
-
"name": ".
|
|
276
|
-
"description": "
|
|
275
|
+
"name": ".maxFiles",
|
|
276
|
+
"description": "Limit of files to upload, by default it is unlimited. If the value is\nset to one, native file browser will prevent selecting multiple files.",
|
|
277
277
|
"value": {
|
|
278
278
|
"kind": "expression"
|
|
279
279
|
}
|