@vaadin/upload 25.1.0-beta1 → 25.1.0-beta3
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 +84 -184
- package/package.json +12 -12
- package/src/styles/vaadin-upload-file-base-styles.js +72 -50
- package/src/vaadin-upload-button.js +0 -2
- package/src/vaadin-upload-drop-zone.js +0 -2
- package/src/vaadin-upload-file.d.ts +4 -0
- package/src/vaadin-upload-file.js +10 -1
- package/src/vaadin-upload-mixin.d.ts +0 -1
- package/src/vaadin-upload-mixin.js +4 -16
- package/src/vaadin-upload.d.ts +8 -0
- package/src/vaadin-upload.js +1 -0
- package/web-types.json +118 -37
- package/web-types.lit.json +1 -1
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.1.0-
|
|
4
|
+
"version": "25.1.0-beta3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"description": "Capture attribute for mobile file input.",
|
|
16
16
|
"value": {
|
|
17
17
|
"type": [
|
|
18
|
-
"string"
|
|
18
|
+
"string",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
19
21
|
]
|
|
20
22
|
}
|
|
21
23
|
},
|
|
@@ -35,7 +37,9 @@
|
|
|
35
37
|
"description": "True when max files has been reached on the manager.",
|
|
36
38
|
"value": {
|
|
37
39
|
"type": [
|
|
38
|
-
"boolean"
|
|
40
|
+
"boolean",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
39
43
|
]
|
|
40
44
|
}
|
|
41
45
|
},
|
|
@@ -58,7 +62,9 @@
|
|
|
58
62
|
"description": "Capture attribute for mobile file input.",
|
|
59
63
|
"value": {
|
|
60
64
|
"type": [
|
|
61
|
-
"string"
|
|
65
|
+
"string",
|
|
66
|
+
"null",
|
|
67
|
+
"undefined"
|
|
62
68
|
]
|
|
63
69
|
}
|
|
64
70
|
},
|
|
@@ -86,7 +92,9 @@
|
|
|
86
92
|
"description": "True when max files has been reached on the manager.",
|
|
87
93
|
"value": {
|
|
88
94
|
"type": [
|
|
89
|
-
"boolean"
|
|
95
|
+
"boolean",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
90
98
|
]
|
|
91
99
|
}
|
|
92
100
|
}
|
|
@@ -103,7 +111,9 @@
|
|
|
103
111
|
"description": "Whether the drop zone is disabled.\nReturns true if either explicitly disabled, manager is disabled, or no manager is set.",
|
|
104
112
|
"value": {
|
|
105
113
|
"type": [
|
|
106
|
-
"boolean"
|
|
114
|
+
"boolean",
|
|
115
|
+
"null",
|
|
116
|
+
"undefined"
|
|
107
117
|
]
|
|
108
118
|
}
|
|
109
119
|
},
|
|
@@ -112,7 +122,9 @@
|
|
|
112
122
|
"description": "True when max files has been reached on the manager.",
|
|
113
123
|
"value": {
|
|
114
124
|
"type": [
|
|
115
|
-
"boolean"
|
|
125
|
+
"boolean",
|
|
126
|
+
"null",
|
|
127
|
+
"undefined"
|
|
116
128
|
]
|
|
117
129
|
}
|
|
118
130
|
},
|
|
@@ -135,7 +147,9 @@
|
|
|
135
147
|
"description": "Whether the drop zone is disabled.\nReturns true if either explicitly disabled, manager is disabled, or no manager is set.",
|
|
136
148
|
"value": {
|
|
137
149
|
"type": [
|
|
138
|
-
"boolean"
|
|
150
|
+
"boolean",
|
|
151
|
+
"null",
|
|
152
|
+
"undefined"
|
|
139
153
|
]
|
|
140
154
|
}
|
|
141
155
|
},
|
|
@@ -154,7 +168,9 @@
|
|
|
154
168
|
"description": "True when max files has been reached on the manager.",
|
|
155
169
|
"value": {
|
|
156
170
|
"type": [
|
|
157
|
-
"boolean"
|
|
171
|
+
"boolean",
|
|
172
|
+
"null",
|
|
173
|
+
"undefined"
|
|
158
174
|
]
|
|
159
175
|
}
|
|
160
176
|
}
|
|
@@ -432,6 +448,17 @@
|
|
|
432
448
|
]
|
|
433
449
|
}
|
|
434
450
|
},
|
|
451
|
+
{
|
|
452
|
+
"name": "i18n",
|
|
453
|
+
"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\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
454
|
+
"value": {
|
|
455
|
+
"type": [
|
|
456
|
+
"Object",
|
|
457
|
+
"null",
|
|
458
|
+
"undefined"
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
},
|
|
435
462
|
{
|
|
436
463
|
"name": "theme",
|
|
437
464
|
"description": "The theme variants to apply to the component.",
|
|
@@ -462,7 +489,9 @@
|
|
|
462
489
|
"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\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
463
490
|
"value": {
|
|
464
491
|
"type": [
|
|
465
|
-
"Object"
|
|
492
|
+
"Object",
|
|
493
|
+
"null",
|
|
494
|
+
"undefined"
|
|
466
495
|
]
|
|
467
496
|
}
|
|
468
497
|
},
|
|
@@ -500,7 +529,9 @@
|
|
|
500
529
|
"description": "Specifies the types of files that the server accepts.\nSyntax: a comma-separated list of MIME type patterns (wildcards are\nallowed) or file extensions.\nNotice that MIME types are widely supported, while file extensions\nare only implemented in certain browsers, so avoid using it.\nExample: accept=\"video/*,image/tiff\" or accept=\".pdf,audio/mp3\"",
|
|
501
530
|
"value": {
|
|
502
531
|
"type": [
|
|
503
|
-
"string"
|
|
532
|
+
"string",
|
|
533
|
+
"null",
|
|
534
|
+
"undefined"
|
|
504
535
|
]
|
|
505
536
|
}
|
|
506
537
|
},
|
|
@@ -520,7 +551,9 @@
|
|
|
520
551
|
"description": "If true, the user cannot interact with this element.",
|
|
521
552
|
"value": {
|
|
522
553
|
"type": [
|
|
523
|
-
"boolean"
|
|
554
|
+
"boolean",
|
|
555
|
+
"null",
|
|
556
|
+
"undefined"
|
|
524
557
|
]
|
|
525
558
|
}
|
|
526
559
|
},
|
|
@@ -529,7 +562,9 @@
|
|
|
529
562
|
"description": "Specifies the 'name' property at Content-Disposition for multipart uploads.\nThis property is ignored when uploadFormat is 'raw'.",
|
|
530
563
|
"value": {
|
|
531
564
|
"type": [
|
|
532
|
-
"string"
|
|
565
|
+
"string",
|
|
566
|
+
"null",
|
|
567
|
+
"undefined"
|
|
533
568
|
]
|
|
534
569
|
}
|
|
535
570
|
},
|
|
@@ -538,7 +573,9 @@
|
|
|
538
573
|
"description": "Specifies the maximum number of files that can be uploaded simultaneously.\nThis helps prevent browser performance degradation and XHR limitations when\nuploading large numbers of files. Files exceeding this limit will be queued\nand uploaded as active uploads complete.",
|
|
539
574
|
"value": {
|
|
540
575
|
"type": [
|
|
541
|
-
"number"
|
|
576
|
+
"number",
|
|
577
|
+
"null",
|
|
578
|
+
"undefined"
|
|
542
579
|
]
|
|
543
580
|
}
|
|
544
581
|
},
|
|
@@ -547,7 +584,9 @@
|
|
|
547
584
|
"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.",
|
|
548
585
|
"value": {
|
|
549
586
|
"type": [
|
|
550
|
-
"number"
|
|
587
|
+
"number",
|
|
588
|
+
"null",
|
|
589
|
+
"undefined"
|
|
551
590
|
]
|
|
552
591
|
}
|
|
553
592
|
},
|
|
@@ -556,7 +595,9 @@
|
|
|
556
595
|
"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.",
|
|
557
596
|
"value": {
|
|
558
597
|
"type": [
|
|
559
|
-
"number"
|
|
598
|
+
"number",
|
|
599
|
+
"null",
|
|
600
|
+
"undefined"
|
|
560
601
|
]
|
|
561
602
|
}
|
|
562
603
|
},
|
|
@@ -565,7 +606,9 @@
|
|
|
565
606
|
"description": "HTTP Method used to send the files. Only POST and PUT are allowed.",
|
|
566
607
|
"value": {
|
|
567
608
|
"type": [
|
|
568
|
-
"
|
|
609
|
+
"string",
|
|
610
|
+
"null",
|
|
611
|
+
"undefined"
|
|
569
612
|
]
|
|
570
613
|
}
|
|
571
614
|
},
|
|
@@ -574,7 +617,9 @@
|
|
|
574
617
|
"description": "Prevents upload(s) from immediately uploading upon adding file(s).\nWhen set, you must manually trigger uploads using the `uploadFiles` method",
|
|
575
618
|
"value": {
|
|
576
619
|
"type": [
|
|
577
|
-
"boolean"
|
|
620
|
+
"boolean",
|
|
621
|
+
"null",
|
|
622
|
+
"undefined"
|
|
578
623
|
]
|
|
579
624
|
}
|
|
580
625
|
},
|
|
@@ -583,7 +628,9 @@
|
|
|
583
628
|
"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.",
|
|
584
629
|
"value": {
|
|
585
630
|
"type": [
|
|
586
|
-
"boolean"
|
|
631
|
+
"boolean",
|
|
632
|
+
"null",
|
|
633
|
+
"undefined"
|
|
587
634
|
]
|
|
588
635
|
}
|
|
589
636
|
},
|
|
@@ -592,7 +639,9 @@
|
|
|
592
639
|
"description": "The server URL. The default value is an empty string, which means that\n_window.location_ will be used.",
|
|
593
640
|
"value": {
|
|
594
641
|
"type": [
|
|
595
|
-
"string"
|
|
642
|
+
"string",
|
|
643
|
+
"null",
|
|
644
|
+
"undefined"
|
|
596
645
|
]
|
|
597
646
|
}
|
|
598
647
|
},
|
|
@@ -612,7 +661,9 @@
|
|
|
612
661
|
"description": "Max time in milliseconds for the entire upload process, if exceeded the\nrequest will be aborted. Zero means that there is no timeout.",
|
|
613
662
|
"value": {
|
|
614
663
|
"type": [
|
|
615
|
-
"number"
|
|
664
|
+
"number",
|
|
665
|
+
"null",
|
|
666
|
+
"undefined"
|
|
616
667
|
]
|
|
617
668
|
}
|
|
618
669
|
},
|
|
@@ -621,7 +672,9 @@
|
|
|
621
672
|
"description": "Specifies the upload format to use when sending files to the server.\n- 'raw': Send file as raw binary data with the file's MIME type as Content-Type (default)\n- 'multipart': Send file using multipart/form-data encoding",
|
|
622
673
|
"value": {
|
|
623
674
|
"type": [
|
|
624
|
-
"string"
|
|
675
|
+
"string",
|
|
676
|
+
"null",
|
|
677
|
+
"undefined"
|
|
625
678
|
]
|
|
626
679
|
}
|
|
627
680
|
},
|
|
@@ -630,7 +683,9 @@
|
|
|
630
683
|
"description": "Set the withCredentials flag on the request.",
|
|
631
684
|
"value": {
|
|
632
685
|
"type": [
|
|
633
|
-
"boolean"
|
|
686
|
+
"boolean",
|
|
687
|
+
"null",
|
|
688
|
+
"undefined"
|
|
634
689
|
]
|
|
635
690
|
}
|
|
636
691
|
}
|
|
@@ -642,7 +697,9 @@
|
|
|
642
697
|
"description": "Specifies the types of files that the server accepts.\nSyntax: a comma-separated list of MIME type patterns (wildcards are\nallowed) or file extensions.\nNotice that MIME types are widely supported, while file extensions\nare only implemented in certain browsers, so avoid using it.\nExample: accept=\"video/*,image/tiff\" or accept=\".pdf,audio/mp3\"",
|
|
643
698
|
"value": {
|
|
644
699
|
"type": [
|
|
645
|
-
"string"
|
|
700
|
+
"string",
|
|
701
|
+
"null",
|
|
702
|
+
"undefined"
|
|
646
703
|
]
|
|
647
704
|
}
|
|
648
705
|
},
|
|
@@ -662,7 +719,9 @@
|
|
|
662
719
|
"description": "If true, the user cannot interact with this element.",
|
|
663
720
|
"value": {
|
|
664
721
|
"type": [
|
|
665
|
-
"boolean"
|
|
722
|
+
"boolean",
|
|
723
|
+
"null",
|
|
724
|
+
"undefined"
|
|
666
725
|
]
|
|
667
726
|
}
|
|
668
727
|
},
|
|
@@ -680,7 +739,9 @@
|
|
|
680
739
|
"description": "Specifies the 'name' property at Content-Disposition for multipart uploads.\nThis property is ignored when uploadFormat is 'raw'.",
|
|
681
740
|
"value": {
|
|
682
741
|
"type": [
|
|
683
|
-
"string"
|
|
742
|
+
"string",
|
|
743
|
+
"null",
|
|
744
|
+
"undefined"
|
|
684
745
|
]
|
|
685
746
|
}
|
|
686
747
|
},
|
|
@@ -699,7 +760,7 @@
|
|
|
699
760
|
"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```",
|
|
700
761
|
"value": {
|
|
701
762
|
"type": [
|
|
702
|
-
"
|
|
763
|
+
"?"
|
|
703
764
|
]
|
|
704
765
|
}
|
|
705
766
|
},
|
|
@@ -708,7 +769,9 @@
|
|
|
708
769
|
"description": "Specifies the maximum number of files that can be uploaded simultaneously.\nThis helps prevent browser performance degradation and XHR limitations when\nuploading large numbers of files. Files exceeding this limit will be queued\nand uploaded as active uploads complete.",
|
|
709
770
|
"value": {
|
|
710
771
|
"type": [
|
|
711
|
-
"number"
|
|
772
|
+
"number",
|
|
773
|
+
"null",
|
|
774
|
+
"undefined"
|
|
712
775
|
]
|
|
713
776
|
}
|
|
714
777
|
},
|
|
@@ -717,7 +780,9 @@
|
|
|
717
780
|
"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.",
|
|
718
781
|
"value": {
|
|
719
782
|
"type": [
|
|
720
|
-
"number"
|
|
783
|
+
"number",
|
|
784
|
+
"null",
|
|
785
|
+
"undefined"
|
|
721
786
|
]
|
|
722
787
|
}
|
|
723
788
|
},
|
|
@@ -726,7 +791,9 @@
|
|
|
726
791
|
"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.",
|
|
727
792
|
"value": {
|
|
728
793
|
"type": [
|
|
729
|
-
"number"
|
|
794
|
+
"number",
|
|
795
|
+
"null",
|
|
796
|
+
"undefined"
|
|
730
797
|
]
|
|
731
798
|
}
|
|
732
799
|
},
|
|
@@ -735,7 +802,9 @@
|
|
|
735
802
|
"description": "HTTP Method used to send the files. Only POST and PUT are allowed.",
|
|
736
803
|
"value": {
|
|
737
804
|
"type": [
|
|
738
|
-
"
|
|
805
|
+
"string",
|
|
806
|
+
"null",
|
|
807
|
+
"undefined"
|
|
739
808
|
]
|
|
740
809
|
}
|
|
741
810
|
},
|
|
@@ -744,7 +813,9 @@
|
|
|
744
813
|
"description": "Prevents upload(s) from immediately uploading upon adding file(s).\nWhen set, you must manually trigger uploads using the `uploadFiles` method",
|
|
745
814
|
"value": {
|
|
746
815
|
"type": [
|
|
747
|
-
"boolean"
|
|
816
|
+
"boolean",
|
|
817
|
+
"null",
|
|
818
|
+
"undefined"
|
|
748
819
|
]
|
|
749
820
|
}
|
|
750
821
|
},
|
|
@@ -753,7 +824,9 @@
|
|
|
753
824
|
"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.",
|
|
754
825
|
"value": {
|
|
755
826
|
"type": [
|
|
756
|
-
"boolean"
|
|
827
|
+
"boolean",
|
|
828
|
+
"null",
|
|
829
|
+
"undefined"
|
|
757
830
|
]
|
|
758
831
|
}
|
|
759
832
|
},
|
|
@@ -762,7 +835,9 @@
|
|
|
762
835
|
"description": "The server URL. The default value is an empty string, which means that\n_window.location_ will be used.",
|
|
763
836
|
"value": {
|
|
764
837
|
"type": [
|
|
765
|
-
"string"
|
|
838
|
+
"string",
|
|
839
|
+
"null",
|
|
840
|
+
"undefined"
|
|
766
841
|
]
|
|
767
842
|
}
|
|
768
843
|
},
|
|
@@ -771,7 +846,9 @@
|
|
|
771
846
|
"description": "Max time in milliseconds for the entire upload process, if exceeded the\nrequest will be aborted. Zero means that there is no timeout.",
|
|
772
847
|
"value": {
|
|
773
848
|
"type": [
|
|
774
|
-
"number"
|
|
849
|
+
"number",
|
|
850
|
+
"null",
|
|
851
|
+
"undefined"
|
|
775
852
|
]
|
|
776
853
|
}
|
|
777
854
|
},
|
|
@@ -780,7 +857,9 @@
|
|
|
780
857
|
"description": "Specifies the upload format to use when sending files to the server.\n- 'raw': Send file as raw binary data with the file's MIME type as Content-Type (default)\n- 'multipart': Send file using multipart/form-data encoding",
|
|
781
858
|
"value": {
|
|
782
859
|
"type": [
|
|
783
|
-
"string"
|
|
860
|
+
"string",
|
|
861
|
+
"null",
|
|
862
|
+
"undefined"
|
|
784
863
|
]
|
|
785
864
|
}
|
|
786
865
|
},
|
|
@@ -789,7 +868,9 @@
|
|
|
789
868
|
"description": "Set the withCredentials flag on the request.",
|
|
790
869
|
"value": {
|
|
791
870
|
"type": [
|
|
792
|
-
"boolean"
|
|
871
|
+
"boolean",
|
|
872
|
+
"null",
|
|
873
|
+
"undefined"
|
|
793
874
|
]
|
|
794
875
|
}
|
|
795
876
|
}
|