fix types for FileUploader component

This commit is contained in:
Daniel Miedzik 2020-11-27 08:43:47 +01:00
commit ee91140fe2
20 changed files with 248 additions and 284 deletions

View file

@ -1205,12 +1205,12 @@
],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [
{ "type": "forwarded", "name": "blur", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "keydown", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "div" }
{ "type": "forwarded", "name": "keydown", "element": "div" }
],
"typedefs": [
{
@ -2896,10 +2896,10 @@
"name": "mouseleave",
"element": "SearchSkeleton"
},
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "dispatched", "name": "clear" }
],
"typedefs": [],
@ -3998,7 +3998,7 @@
"name": "accept",
"kind": "let",
"description": "Specify the accepted file types",
"type": "Files",
"type": "string[]",
"value": "[]",
"isFunction": false,
"constant": false,
@ -4111,9 +4111,7 @@
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "click", "element": "input" }
],
"typedefs": [
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "input" }
},
{
@ -4134,7 +4132,7 @@
"name": "accept",
"kind": "let",
"description": "Specify the accepted file types",
"type": "Files",
"type": "string[]",
"value": "[]",
"isFunction": false,
"constant": false,
@ -4144,7 +4142,7 @@
"name": "files",
"kind": "let",
"description": "Obtain the uploaded file names",
"type": "Files",
"type": "string[]",
"value": "[]",
"isFunction": false,
"constant": false,
@ -4233,8 +4231,8 @@
],
"slots": [],
"events": [
{ "type": "dispatched", "name": "add", "detail": "Files" },
{ "type": "dispatched", "name": "remove", "detail": "Files" },
{ "type": "dispatched", "name": "add", "detail": "FileList" },
{ "type": "dispatched", "name": "remove", "detail": "FileList" },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
@ -4246,9 +4244,7 @@
},
{ "type": "forwarded", "name": "keydown", "element": "Filename" }
],
"typedefs": [
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
},
{
@ -4344,7 +4340,7 @@
"name": "accept",
"kind": "let",
"description": "Specify the accepted file types",
"type": "Files",
"type": "string[]",
"value": "[]",
"isFunction": false,
"constant": false,
@ -4364,7 +4360,7 @@
"name": "validateFiles",
"kind": "let",
"description": "Override the default behavior of validating uploaded files\nThe default behavior does not validate files",
"type": "(files: Files) => Files",
"type": "(files: FileList) => FileList",
"value": "(files) => files",
"isFunction": true,
"constant": false,
@ -4443,7 +4439,7 @@
],
"slots": [],
"events": [
{ "type": "dispatched", "name": "add", "detail": "Files" },
{ "type": "dispatched", "name": "add", "detail": "FileList" },
{ "type": "forwarded", "name": "dragover", "element": "div" },
{ "type": "forwarded", "name": "dragleave", "element": "div" },
{ "type": "forwarded", "name": "drop", "element": "div" },
@ -4451,9 +4447,7 @@
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "click", "element": "input" }
],
"typedefs": [
{ "type": "string[]", "name": "Files", "ts": "type Files = string[]" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
},
{
@ -5487,11 +5481,11 @@
}
],
"events": [
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "keydown", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "dispatched", "name": "submit" },
{ "type": "dispatched", "name": "click:button--secondary" },
{ "type": "dispatched", "name": "close" },
@ -7857,10 +7851,10 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "textarea" },
{ "type": "forwarded", "name": "change", "element": "textarea" },
{ "type": "forwarded", "name": "input", "element": "textarea" },
{ "type": "forwarded", "name": "focus", "element": "textarea" },
{ "type": "forwarded", "name": "blur", "element": "textarea" }
{ "type": "forwarded", "name": "focus", "element": "textarea" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "textarea" }
@ -8079,11 +8073,11 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }
{ "type": "forwarded", "name": "focus", "element": "input" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
@ -8300,11 +8294,11 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }
{ "type": "forwarded", "name": "focus", "element": "input" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
@ -8479,11 +8473,11 @@
{ "name": "below", "default": false, "slot_props": "{}" }
],
"events": [
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "keypress", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" }
{ "type": "forwarded", "name": "mouseenter", "element": "div" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
@ -8879,10 +8873,10 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }
{ "type": "forwarded", "name": "focus", "element": "input" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "div" }
@ -9070,8 +9064,8 @@
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
{ "type": "forwarded", "name": "mouseleave", "element": "div" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "keyup", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" }
],
@ -9840,13 +9834,13 @@
"slots": [],
"events": [
{ "type": "forwarded", "name": "click", "element": "a" },
{ "type": "forwarded", "name": "blur", "element": "a" },
{ "type": "forwarded", "name": "mouseover", "element": "a" },
{ "type": "forwarded", "name": "mouseenter", "element": "a" },
{ "type": "forwarded", "name": "mouseleave", "element": "a" },
{ "type": "forwarded", "name": "keyup", "element": "a" },
{ "type": "forwarded", "name": "keydown", "element": "a" },
{ "type": "forwarded", "name": "focus", "element": "a" },
{ "type": "forwarded", "name": "blur", "element": "a" }
{ "type": "forwarded", "name": "focus", "element": "a" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "a" }
@ -9907,14 +9901,14 @@
],
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
"events": [
{ "type": "forwarded", "name": "blur", "element": "a" },
{ "type": "forwarded", "name": "keydown", "element": "a" },
{ "type": "forwarded", "name": "click", "element": "a" },
{ "type": "forwarded", "name": "mouseover", "element": "a" },
{ "type": "forwarded", "name": "mouseenter", "element": "a" },
{ "type": "forwarded", "name": "mouseleave", "element": "a" },
{ "type": "forwarded", "name": "keyup", "element": "a" },
{ "type": "forwarded", "name": "focus", "element": "a" },
{ "type": "forwarded", "name": "blur", "element": "a" }
{ "type": "forwarded", "name": "focus", "element": "a" }
],
"typedefs": [],
"rest_props": { "type": "Element", "name": "a" }
@ -10346,11 +10340,11 @@
"name": "select",
"detail": "{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }"
},
{ "type": "forwarded", "name": "keydown", "element": "input" },
{ "type": "forwarded", "name": "change", "element": "input" },
{ "type": "forwarded", "name": "input", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" },
{ "type": "forwarded", "name": "keydown", "element": "input" }
{ "type": "forwarded", "name": "blur", "element": "input" }
],
"typedefs": [
{