Socket
Socket
Sign inDemoInstall

@de-dan/capacitor-file-select

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

DeDanCapacitorFileSelect.podspec

882

dist/docs.json

@@ -10,3 +10,3 @@ {

"name": "select",
"signature": "(options: FileSelectOptions) => Promise<{ files: FileSelectResult[]; }>",
"signature": "(options: FileSelectOptions) => Promise<{ files?: FileSelectResult[]; webFiles?: FileList; }>",
"parameters": [

@@ -19,3 +19,3 @@ {

],
"returns": "Promise<{ files: FileSelectResult[]; }>",
"returns": "Promise<{ files?: FileSelectResult[] | undefined; webFiles?: any; }>",
"tags": [],

@@ -25,3 +25,4 @@ "docs": "Opens the File Selector",

"FileSelectResult",
"FileSelectOptions"
"FileSelectOptions",
"FileList"
],

@@ -82,11 +83,882 @@ "slug": "select"

"docs": "Extensions to select",
"complexTypes": [
"Array",
"FileType"
],
"type": "Array<string | FileType>"
}
]
},
{
"name": "Array",
"slug": "array",
"docs": "",
"tags": [],
"methods": [
{
"name": "toString",
"signature": "() => string",
"parameters": [],
"returns": "string",
"tags": [],
"docs": "Returns a string representation of an array.",
"complexTypes": [],
"type": "string[]"
"slug": "tostring"
},
{
"name": "toLocaleString",
"signature": "() => string",
"parameters": [],
"returns": "string",
"tags": [],
"docs": "Returns a string representation of an array. The elements are converted to string using their toLocalString methods.",
"complexTypes": [],
"slug": "tolocalestring"
},
{
"name": "pop",
"signature": "() => T | undefined",
"parameters": [],
"returns": "T | undefined",
"tags": [],
"docs": "Removes the last element from an array and returns it.\r\nIf the array is empty, undefined is returned and the array is not modified.",
"complexTypes": [
"T"
],
"slug": "pop"
},
{
"name": "push",
"signature": "(...items: T[]) => number",
"parameters": [
{
"name": "items",
"docs": "New elements to add to the array.",
"type": "T[]"
}
],
"returns": "number",
"tags": [
{
"name": "param",
"text": "items New elements to add to the array."
}
],
"docs": "Appends new elements to the end of an array, and returns the new length of the array.",
"complexTypes": [
"T"
],
"slug": "push"
},
{
"name": "concat",
"signature": "(...items: ConcatArray<T>[]) => T[]",
"parameters": [
{
"name": "items",
"docs": "Additional arrays and/or items to add to the end of the array.",
"type": "ConcatArray<T>[]"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "items Additional arrays and/or items to add to the end of the array."
}
],
"docs": "Combines two or more arrays.\r\nThis method returns a new array without modifying any existing arrays.",
"complexTypes": [
"T",
"ConcatArray"
],
"slug": "concat"
},
{
"name": "concat",
"signature": "(...items: (T | ConcatArray<T>)[]) => T[]",
"parameters": [
{
"name": "items",
"docs": "Additional arrays and/or items to add to the end of the array.",
"type": "(T | ConcatArray<T>)[]"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "items Additional arrays and/or items to add to the end of the array."
}
],
"docs": "Combines two or more arrays.\r\nThis method returns a new array without modifying any existing arrays.",
"complexTypes": [
"T",
"ConcatArray"
],
"slug": "concat"
},
{
"name": "join",
"signature": "(separator?: string | undefined) => string",
"parameters": [
{
"name": "separator",
"docs": "A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.",
"type": "string | undefined"
}
],
"returns": "string",
"tags": [
{
"name": "param",
"text": "separator A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma."
}
],
"docs": "Adds all the elements of an array into a string, separated by the specified separator string.",
"complexTypes": [],
"slug": "join"
},
{
"name": "reverse",
"signature": "() => T[]",
"parameters": [],
"returns": "T[]",
"tags": [],
"docs": "Reverses the elements in an array in place.\r\nThis method mutates the array and returns a reference to the same array.",
"complexTypes": [
"T"
],
"slug": "reverse"
},
{
"name": "shift",
"signature": "() => T | undefined",
"parameters": [],
"returns": "T | undefined",
"tags": [],
"docs": "Removes the first element from an array and returns it.\r\nIf the array is empty, undefined is returned and the array is not modified.",
"complexTypes": [
"T"
],
"slug": "shift"
},
{
"name": "slice",
"signature": "(start?: number | undefined, end?: number | undefined) => T[]",
"parameters": [
{
"name": "start",
"docs": "The beginning index of the specified portion of the array.\r\nIf start is undefined, then the slice begins at index 0.",
"type": "number | undefined"
},
{
"name": "end",
"docs": "The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.\r\nIf end is undefined, then the slice extends to the end of the array.",
"type": "number | undefined"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "start The beginning index of the specified portion of the array.\r\nIf start is undefined, then the slice begins at index 0."
},
{
"name": "param",
"text": "end The end index of the specified portion of the array. This is exclusive of the element at the index 'end'.\r\nIf end is undefined, then the slice extends to the end of the array."
}
],
"docs": "Returns a copy of a section of an array.\r\nFor both start and end, a negative index can be used to indicate an offset from the end of the array.\r\nFor example, -2 refers to the second to last element of the array.",
"complexTypes": [
"T"
],
"slug": "slice"
},
{
"name": "sort",
"signature": "(compareFn?: ((a: T, b: T) => number) | undefined) => this",
"parameters": [
{
"name": "compareFn",
"docs": "Function used to determine the order of the elements. It is expected to return\r\na negative value if first argument is less than second argument, zero if they're equal and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11,2,22,1].sort((a, b) => a - b)\r\n```",
"type": "((a: T, b: T) => number) | undefined"
}
],
"returns": "this",
"tags": [
{
"name": "param",
"text": "compareFn Function used to determine the order of the elements. It is expected to return\r\na negative value if first argument is less than second argument, zero if they're equal and a positive\r\nvalue otherwise. If omitted, the elements are sorted in ascending, ASCII character order.\r\n```ts\r\n[11,2,22,1].sort((a, b) => a - b)\r\n```"
}
],
"docs": "Sorts an array in place.\r\nThis method mutates the array and returns a reference to the same array.",
"complexTypes": [
"T"
],
"slug": "sort"
},
{
"name": "splice",
"signature": "(start: number, deleteCount?: number | undefined) => T[]",
"parameters": [
{
"name": "start",
"docs": "The zero-based location in the array from which to start removing elements.",
"type": "number"
},
{
"name": "deleteCount",
"docs": "The number of elements to remove.",
"type": "number | undefined"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "start The zero-based location in the array from which to start removing elements."
},
{
"name": "param",
"text": "deleteCount The number of elements to remove."
},
{
"name": "returns",
"text": "An array containing the elements that were deleted."
}
],
"docs": "Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.",
"complexTypes": [
"T"
],
"slug": "splice"
},
{
"name": "splice",
"signature": "(start: number, deleteCount: number, ...items: T[]) => T[]",
"parameters": [
{
"name": "start",
"docs": "The zero-based location in the array from which to start removing elements.",
"type": "number"
},
{
"name": "deleteCount",
"docs": "The number of elements to remove.",
"type": "number"
},
{
"name": "items",
"docs": "Elements to insert into the array in place of the deleted elements.",
"type": "T[]"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "start The zero-based location in the array from which to start removing elements."
},
{
"name": "param",
"text": "deleteCount The number of elements to remove."
},
{
"name": "param",
"text": "items Elements to insert into the array in place of the deleted elements."
},
{
"name": "returns",
"text": "An array containing the elements that were deleted."
}
],
"docs": "Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.",
"complexTypes": [
"T"
],
"slug": "splice"
},
{
"name": "unshift",
"signature": "(...items: T[]) => number",
"parameters": [
{
"name": "items",
"docs": "Elements to insert at the start of the array.",
"type": "T[]"
}
],
"returns": "number",
"tags": [
{
"name": "param",
"text": "items Elements to insert at the start of the array."
}
],
"docs": "Inserts new elements at the start of an array, and returns the new length of the array.",
"complexTypes": [
"T"
],
"slug": "unshift"
},
{
"name": "indexOf",
"signature": "(searchElement: T, fromIndex?: number | undefined) => number",
"parameters": [
{
"name": "searchElement",
"docs": "The value to locate in the array.",
"type": "T"
},
{
"name": "fromIndex",
"docs": "The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.",
"type": "number | undefined"
}
],
"returns": "number",
"tags": [
{
"name": "param",
"text": "searchElement The value to locate in the array."
},
{
"name": "param",
"text": "fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0."
}
],
"docs": "Returns the index of the first occurrence of a value in an array, or -1 if it is not present.",
"complexTypes": [
"T"
],
"slug": "indexof"
},
{
"name": "lastIndexOf",
"signature": "(searchElement: T, fromIndex?: number | undefined) => number",
"parameters": [
{
"name": "searchElement",
"docs": "The value to locate in the array.",
"type": "T"
},
{
"name": "fromIndex",
"docs": "The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.",
"type": "number | undefined"
}
],
"returns": "number",
"tags": [
{
"name": "param",
"text": "searchElement The value to locate in the array."
},
{
"name": "param",
"text": "fromIndex The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array."
}
],
"docs": "Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.",
"complexTypes": [
"T"
],
"slug": "lastindexof"
},
{
"name": "every",
"signature": "<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => this is S[]",
"parameters": [
{
"name": "predicate",
"docs": "A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.",
"type": "(value: T, index: number, array: T[]) => value is S"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "boolean",
"tags": [
{
"name": "param",
"text": "predicate A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Determines whether all the members of an array satisfy the specified test.",
"complexTypes": [
"T",
"S"
],
"slug": "every"
},
{
"name": "every",
"signature": "(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean",
"parameters": [
{
"name": "predicate",
"docs": "A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array.",
"type": "(value: T, index: number, array: T[]) => unknown"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "boolean",
"tags": [
{
"name": "param",
"text": "predicate A function that accepts up to three arguments. The every method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value false, or until the end of the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Determines whether all the members of an array satisfy the specified test.",
"complexTypes": [
"T"
],
"slug": "every"
},
{
"name": "some",
"signature": "(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => boolean",
"parameters": [
{
"name": "predicate",
"docs": "A function that accepts up to three arguments. The some method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value true, or until the end of the array.",
"type": "(value: T, index: number, array: T[]) => unknown"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "boolean",
"tags": [
{
"name": "param",
"text": "predicate A function that accepts up to three arguments. The some method calls\r\nthe predicate function for each element in the array until the predicate returns a value\r\nwhich is coercible to the Boolean value true, or until the end of the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the predicate function.\r\nIf thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Determines whether the specified callback function returns true for any element of an array.",
"complexTypes": [
"T"
],
"slug": "some"
},
{
"name": "forEach",
"signature": "(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any) => void",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.",
"type": "(value: T, index: number, array: T[]) => void"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "void",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Performs the specified action for each element in an array.",
"complexTypes": [
"T"
],
"slug": "foreach"
},
{
"name": "map",
"signature": "<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.",
"type": "(value: T, index: number, array: T[]) => U"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "U[]",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Calls a defined callback function on each element of an array, and returns an array that contains the results.",
"complexTypes": [
"U",
"T"
],
"slug": "map"
},
{
"name": "filter",
"signature": "<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any) => S[]",
"parameters": [
{
"name": "predicate",
"docs": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.",
"type": "(value: T, index: number, array: T[]) => value is S"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "S[]",
"tags": [
{
"name": "param",
"text": "predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Returns the elements of an array that meet the condition specified in a callback function.",
"complexTypes": [
"S",
"T"
],
"slug": "filter"
},
{
"name": "filter",
"signature": "(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any) => T[]",
"parameters": [
{
"name": "predicate",
"docs": "A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.",
"type": "(value: T, index: number, array: T[]) => unknown"
},
{
"name": "thisArg",
"docs": "An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.",
"type": "any"
}
],
"returns": "T[]",
"tags": [
{
"name": "param",
"text": "predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array."
},
{
"name": "param",
"text": "thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value."
}
],
"docs": "Returns the elements of an array that meet the condition specified in a callback function.",
"complexTypes": [
"T"
],
"slug": "filter"
},
{
"name": "reduce",
"signature": "(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.",
"type": "(previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T"
}
],
"returns": "T",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."
}
],
"docs": "Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
"complexTypes": [
"T"
],
"slug": "reduce"
},
{
"name": "reduce",
"signature": "(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T",
"parameters": [
{
"name": "callbackfn",
"docs": "",
"type": "(previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T"
},
{
"name": "initialValue",
"docs": "",
"type": "T"
}
],
"returns": "T",
"tags": [],
"docs": "",
"complexTypes": [
"T"
],
"slug": "reduce"
},
{
"name": "reduce",
"signature": "<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.",
"type": "(previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U"
},
{
"name": "initialValue",
"docs": "If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.",
"type": "U"
}
],
"returns": "U",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."
}
],
"docs": "Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
"complexTypes": [
"U",
"T"
],
"slug": "reduce"
},
{
"name": "reduceRight",
"signature": "(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T) => T",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.",
"type": "(previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T"
}
],
"returns": "T",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."
}
],
"docs": "Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
"complexTypes": [
"T"
],
"slug": "reduceright"
},
{
"name": "reduceRight",
"signature": "(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T) => T",
"parameters": [
{
"name": "callbackfn",
"docs": "",
"type": "(previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T"
},
{
"name": "initialValue",
"docs": "",
"type": "T"
}
],
"returns": "T",
"tags": [],
"docs": "",
"complexTypes": [
"T"
],
"slug": "reduceright"
},
{
"name": "reduceRight",
"signature": "<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U) => U",
"parameters": [
{
"name": "callbackfn",
"docs": "A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.",
"type": "(previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U"
},
{
"name": "initialValue",
"docs": "If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.",
"type": "U"
}
],
"returns": "U",
"tags": [
{
"name": "param",
"text": "callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array."
},
{
"name": "param",
"text": "initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value."
}
],
"docs": "Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
"complexTypes": [
"U",
"T"
],
"slug": "reduceright"
}
],
"properties": [
{
"name": "length",
"tags": [],
"docs": "Gets or sets the length of the array. This is a number one higher than the highest index in the array.",
"complexTypes": [],
"type": "number"
}
]
},
{
"name": "ConcatArray",
"slug": "concatarray",
"docs": "",
"tags": [],
"methods": [
{
"name": "join",
"signature": "(separator?: string | undefined) => string",
"parameters": [
{
"name": "separator",
"docs": "",
"type": "string | undefined"
}
],
"returns": "string",
"tags": [],
"docs": "",
"complexTypes": [],
"slug": "join"
},
{
"name": "slice",
"signature": "(start?: number | undefined, end?: number | undefined) => T[]",
"parameters": [
{
"name": "start",
"docs": "",
"type": "number | undefined"
},
{
"name": "end",
"docs": "",
"type": "number | undefined"
}
],
"returns": "T[]",
"tags": [],
"docs": "",
"complexTypes": [
"T"
],
"slug": "slice"
}
],
"properties": [
{
"name": "length",
"tags": [],
"docs": "",
"complexTypes": [],
"type": "number"
}
]
}
],
"enums": [],
"enums": [
{
"name": "FileType",
"slug": "filetype",
"members": [
{
"name": "AUDIO",
"value": "'audios'",
"tags": [],
"docs": ""
},
{
"name": "IMAGE",
"value": "'images'",
"tags": [],
"docs": ""
},
{
"name": "VIDEO",
"value": "'videos'",
"tags": [],
"docs": ""
},
{
"name": "EVERY",
"value": "'*'",
"tags": [],
"docs": ""
}
]
}
],
"typeAliases": [],
"pluginConfigs": []
}

@@ -6,5 +6,12 @@ export interface FileSelectPlugin {

select(options: FileSelectOptions): Promise<{
files: FileSelectResult[];
files?: FileSelectResult[];
webFiles?: FileList;
}>;
}
export declare enum FileType {
AUDIO = "audios",
IMAGE = "images",
VIDEO = "videos",
EVERY = "*"
}
export interface FileSelectOptions {

@@ -18,3 +25,3 @@ /**

*/
extensions: string[];
extensions: Array<string | FileType>;
}

@@ -21,0 +28,0 @@ export interface FileSelectResult {

@@ -1,2 +0,8 @@

export {};
export var FileType;
(function (FileType) {
FileType["AUDIO"] = "audios";
FileType["IMAGE"] = "images";
FileType["VIDEO"] = "videos";
FileType["EVERY"] = "*";
})(FileType || (FileType = {}));
//# sourceMappingURL=definitions.js.map

7

dist/esm/web.d.ts
import { WebPlugin } from '@capacitor/core';
import type { FileSelectOptions, FileSelectPlugin } from './definitions';
import { FileSelectOptions, FileSelectPlugin, FileSelectResult } from './definitions';
export declare class FileSelectWeb extends WebPlugin implements FileSelectPlugin {
select(options: FileSelectOptions): Promise<any>;
select(options: FileSelectOptions): Promise<{
files?: FileSelectResult[];
webFiles?: FileList;
}>;
}

@@ -38,7 +38,10 @@ import { WebPlugin } from '@capacitor/core';

}
return new Promise(resolve => {
return new Promise((resolve, reject) => {
x.addEventListener('change', () => {
if (document != null) {
resolve(x.files);
if (document != null && x.files) {
resolve({ webFiles: x.files });
}
else {
reject('No files selected');
}
});

@@ -45,0 +48,0 @@ x.click();

@@ -7,2 +7,10 @@ 'use strict';

exports.FileType = void 0;
(function (FileType) {
FileType["AUDIO"] = "audios";
FileType["IMAGE"] = "images";
FileType["VIDEO"] = "videos";
FileType["EVERY"] = "*";
})(exports.FileType || (exports.FileType = {}));
const FileSelect = core.registerPlugin('FileSelect', {

@@ -48,7 +56,10 @@ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.FileSelectWeb()),

}
return new Promise(resolve => {
return new Promise((resolve, reject) => {
x.addEventListener('change', () => {
if (document != null) {
resolve(x.files);
if (document != null && x.files) {
resolve({ webFiles: x.files });
}
else {
reject('No files selected');
}
});

@@ -55,0 +66,0 @@ x.click();

var capacitorFileSelect = (function (exports, core) {
'use strict';
exports.FileType = void 0;
(function (FileType) {
FileType["AUDIO"] = "audios";
FileType["IMAGE"] = "images";
FileType["VIDEO"] = "videos";
FileType["EVERY"] = "*";
})(exports.FileType || (exports.FileType = {}));
const FileSelect = core.registerPlugin('FileSelect', {

@@ -44,7 +52,10 @@ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.FileSelectWeb()),

}
return new Promise(resolve => {
return new Promise((resolve, reject) => {
x.addEventListener('change', () => {
if (document != null) {
resolve(x.files);
if (document != null && x.files) {
resolve({ webFiles: x.files });
}
else {
reject('No files selected');
}
});

@@ -51,0 +62,0 @@ x.click();

{
"name": "@de-dan/capacitor-file-select",
"version": "1.1.1",
"version": "1.1.2",
"description": "A Capacitor Plugin to select Files",

@@ -14,3 +14,3 @@ "main": "dist/plugin.cjs.js",

"ios/Plugin/",
"CapacitorFileSelect.podspec"
"DeDanCapacitorFileSelect.podspec"
],

@@ -17,0 +17,0 @@ "author": "EinfachHans",

@@ -36,2 +36,3 @@ # Capacitor File Select

* [Interfaces](#interfaces)
* [Enums](#enums)

@@ -46,3 +47,3 @@ </docgen-index>

```typescript
select(options: FileSelectOptions) => Promise<{ files: FileSelectResult[]; }>
select(options: FileSelectOptions) => Promise<{ files?: FileSelectResult[]; webFiles?: FileList; }>
```

@@ -56,3 +57,3 @@

**Returns:** <code>Promise&lt;{ files: FileSelectResult[]; }&gt;</code>
**Returns:** <code>Promise&lt;{ files?: FileSelectResult[]; webFiles?: any; }&gt;</code>

@@ -76,7 +77,71 @@ --------------------

| Prop | Type | Description |
| ---------------- | --------------------- | --------------------- |
| **`multiple`** | <code>boolean</code> | Select multiple Files |
| **`extensions`** | <code>string[]</code> | Extensions to select |
| Prop | Type | Description |
| ---------------- | ----------------------------------------------------------------------------------------- | --------------------- |
| **`multiple`** | <code>boolean</code> | Select multiple Files |
| **`extensions`** | <code><a href="#array">Array</a>&lt;string \| <a href="#filetype">FileType</a>&gt;</code> | Extensions to select |
#### Array
| Prop | Type | Description |
| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------ |
| **`length`** | <code>number</code> | Gets or sets the length of the array. This is a number one higher than the highest index in the array. |
| Method | Signature | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **toString** | () =&gt; string | Returns a string representation of an array. |
| **toLocaleString** | () =&gt; string | Returns a string representation of an array. The elements are converted to string using their toLocalString methods. |
| **pop** | () =&gt; T \| undefined | Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
| **push** | (...items: T[]) =&gt; number | Appends new elements to the end of an array, and returns the new length of the array. |
| **concat** | (...items: <a href="#concatarray">ConcatArray</a>&lt;T&gt;[]) =&gt; T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
| **concat** | (...items: (T \| <a href="#concatarray">ConcatArray</a>&lt;T&gt;)[]) =&gt; T[] | Combines two or more arrays. This method returns a new array without modifying any existing arrays. |
| **join** | (separator?: string \| undefined) =&gt; string | Adds all the elements of an array into a string, separated by the specified separator string. |
| **reverse** | () =&gt; T[] | Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array. |
| **shift** | () =&gt; T \| undefined | Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified. |
| **slice** | (start?: number \| undefined, end?: number \| undefined) =&gt; T[] | Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array. |
| **sort** | (compareFn?: ((a: T, b: T) =&gt; number) \| undefined) =&gt; this | Sorts an array in place. This method mutates the array and returns a reference to the same array. |
| **splice** | (start: number, deleteCount?: number \| undefined) =&gt; T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
| **splice** | (start: number, deleteCount: number, ...items: T[]) =&gt; T[] | Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements. |
| **unshift** | (...items: T[]) =&gt; number | Inserts new elements at the start of an array, and returns the new length of the array. |
| **indexOf** | (searchElement: T, fromIndex?: number \| undefined) =&gt; number | Returns the index of the first occurrence of a value in an array, or -1 if it is not present. |
| **lastIndexOf** | (searchElement: T, fromIndex?: number \| undefined) =&gt; number | Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present. |
| **every** | &lt;S extends T&gt;(predicate: (value: T, index: number, array: T[]) =&gt; value is S, thisArg?: any) =&gt; this is S[] | Determines whether all the members of an array satisfy the specified test. |
| **every** | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; boolean | Determines whether all the members of an array satisfy the specified test. |
| **some** | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; boolean | Determines whether the specified callback function returns true for any element of an array. |
| **forEach** | (callbackfn: (value: T, index: number, array: T[]) =&gt; void, thisArg?: any) =&gt; void | Performs the specified action for each element in an array. |
| **map** | &lt;U&gt;(callbackfn: (value: T, index: number, array: T[]) =&gt; U, thisArg?: any) =&gt; U[] | Calls a defined callback function on each element of an array, and returns an array that contains the results. |
| **filter** | &lt;S extends T&gt;(predicate: (value: T, index: number, array: T[]) =&gt; value is S, thisArg?: any) =&gt; S[] | Returns the elements of an array that meet the condition specified in a callback function. |
| **filter** | (predicate: (value: T, index: number, array: T[]) =&gt; unknown, thisArg?: any) =&gt; T[] | Returns the elements of an array that meet the condition specified in a callback function. |
| **reduce** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T) =&gt; T | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
| **reduce** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T, initialValue: T) =&gt; T | |
| **reduce** | &lt;U&gt;(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) =&gt; U, initialValue: U) =&gt; U | Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
| **reduceRight** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T) =&gt; T | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
| **reduceRight** | (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) =&gt; T, initialValue: T) =&gt; T | |
| **reduceRight** | &lt;U&gt;(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) =&gt; U, initialValue: U) =&gt; U | Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. |
#### ConcatArray
| Prop | Type |
| ------------ | ------------------- |
| **`length`** | <code>number</code> |
| Method | Signature |
| --------- | ------------------------------------------------------------------ |
| **join** | (separator?: string \| undefined) =&gt; string |
| **slice** | (start?: number \| undefined, end?: number \| undefined) =&gt; T[] |
### Enums
#### FileType
| Members | Value |
| ----------- | --------------------- |
| **`AUDIO`** | <code>'audios'</code> |
| **`IMAGE`** | <code>'images'</code> |
| **`VIDEO`** | <code>'videos'</code> |
| **`EVERY`** | <code>'*'</code> |
</docgen-api>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc