react-native-my-uploader-android 1.0.28 → 1.0.30
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/android/src/main/java/com/myuploaderandroid/DownloadFileModule.kt +91 -58
- package/android/src/main/java/com/myuploaderandroid/MyUploaderModule.kt +93 -42
- package/lib/commonjs/components/DownloadFile.js +37 -47
- package/lib/commonjs/components/DownloadFile.js.map +1 -1
- package/lib/commonjs/components/MyUploader.js +57 -80
- package/lib/commonjs/components/MyUploader.js.map +1 -1
- package/lib/commonjs/index.d.js.map +1 -1
- package/lib/commonjs/index.js +9 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/components/DownloadFile.js +38 -48
- package/lib/module/components/DownloadFile.js.map +1 -1
- package/lib/module/components/MyUploader.js +55 -79
- package/lib/module/components/MyUploader.js.map +1 -1
- package/lib/module/index.d.js +10 -0
- package/lib/module/index.d.js.map +1 -1
- package/lib/module/index.js +10 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DownloadFile.tsx +40 -61
- package/src/components/MyUploader.tsx +59 -89
- package/src/index.d.ts +12 -5
- package/src/index.ts +12 -6
- package/src/types.ts +98 -41
- package/android/src/main/java/com/myuploader/MyUploaderModule.kt +0 -173
- package/android/src/main/java/com/myuploader/MyUploaderPackage.kt +0 -16
- package/lib/commonjs/NativeMyUploader.js +0 -15
- package/lib/commonjs/NativeMyUploader.js.map +0 -1
- package/lib/module/NativeMyUploader.js +0 -9
- package/lib/module/NativeMyUploader.js.map +0 -1
- package/src/NativeMyUploader.ts +0 -25
|
@@ -3,117 +3,94 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
exports.pickFile = exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
8
|
var _reactNative = require("react-native");
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
throw new Error(LINKING_ERROR);
|
|
15
|
-
}
|
|
16
|
-
});
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
const {
|
|
11
|
+
UploadDocumentPicker: NativeUploadPicker
|
|
12
|
+
} = _reactNative.NativeModules;
|
|
17
13
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
throw new Error('`maxFiles` cannot be greater than 1 when `multipleFiles` is false.');
|
|
29
|
-
}
|
|
30
|
-
let effectiveMaxFiles = maxFiles;
|
|
31
|
-
if (multipleFiles && maxFiles === 0) {
|
|
32
|
-
effectiveMaxFiles = 3;
|
|
33
|
-
}
|
|
34
|
-
const finalOptions = {
|
|
35
|
-
...rest,
|
|
36
|
-
multipleFiles,
|
|
37
|
-
maxFiles: effectiveMaxFiles,
|
|
38
|
-
excludedUris: (_options$excludedUris = options.excludedUris) !== null && _options$excludedUris !== void 0 ? _options$excludedUris : [],
|
|
14
|
+
// 1. Standalone pickFile Fonksiyonu
|
|
15
|
+
const pickFile = async (options = {}) => {
|
|
16
|
+
var _options$multipleFile, _options$maxFiles, _options$maxSize, _options$fileTypes, _options$excludedUris;
|
|
17
|
+
if (!NativeUploadPicker) throw new Error("DocumentPicker module is not linked.");
|
|
18
|
+
|
|
19
|
+
// Native tarafa gönderilecek options
|
|
20
|
+
const nativeOptions = {
|
|
21
|
+
multipleFiles: (_options$multipleFile = options.multipleFiles) !== null && _options$multipleFile !== void 0 ? _options$multipleFile : false,
|
|
22
|
+
maxFiles: (_options$maxFiles = options.maxFiles) !== null && _options$maxFiles !== void 0 ? _options$maxFiles : 0,
|
|
23
|
+
maxSize: (_options$maxSize = options.maxSize) !== null && _options$maxSize !== void 0 ? _options$maxSize : 0,
|
|
39
24
|
fileTypes: (_options$fileTypes = options.fileTypes) !== null && _options$fileTypes !== void 0 ? _options$fileTypes : ['*/*'],
|
|
40
|
-
|
|
25
|
+
excludedUris: (_options$excludedUris = options.excludedUris) !== null && _options$excludedUris !== void 0 ? _options$excludedUris : []
|
|
41
26
|
};
|
|
42
|
-
return
|
|
43
|
-
}
|
|
27
|
+
return await NativeUploadPicker.openDocument(nativeOptions);
|
|
28
|
+
};
|
|
44
29
|
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
maxSize = 0,
|
|
52
|
-
excludedUris = [],
|
|
53
|
-
// UI Props with defaults
|
|
54
|
-
buttonPlaceHolder = 'Dosya Seçin...',
|
|
30
|
+
// 2. MyUploader Bileşeni
|
|
31
|
+
exports.pickFile = pickFile;
|
|
32
|
+
const MyUploader = ({
|
|
33
|
+
onSelect,
|
|
34
|
+
onError,
|
|
35
|
+
buttonPlaceHolder = "Dosya Seç",
|
|
55
36
|
ButtonStyle,
|
|
56
37
|
ButtonTextStyle,
|
|
57
38
|
disabled = false,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
multipleFiles = false,
|
|
40
|
+
fileTypes = ['*/*'],
|
|
41
|
+
maxSize = 0,
|
|
42
|
+
maxFiles = 0,
|
|
43
|
+
excludedUris = []
|
|
61
44
|
}) => {
|
|
45
|
+
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
62
46
|
const handlePress = async () => {
|
|
47
|
+
if (disabled || isLoading) return;
|
|
48
|
+
setIsLoading(true);
|
|
63
49
|
try {
|
|
64
|
-
const
|
|
50
|
+
const files = await pickFile({
|
|
65
51
|
multipleFiles,
|
|
66
|
-
maxFiles,
|
|
67
52
|
fileTypes,
|
|
68
53
|
maxSize,
|
|
54
|
+
maxFiles,
|
|
69
55
|
excludedUris
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// Eğer kullanıcı seçim yapmadan kapatırsa bazı sistemler boş array dönebilir.
|
|
74
|
-
// Sadece doluysa callback'i tetikleyelim.
|
|
75
|
-
if (selectedFiles && selectedFiles.length > 0) {
|
|
76
|
-
onSelect(selectedFiles);
|
|
77
|
-
}
|
|
56
|
+
});
|
|
57
|
+
onSelect(files);
|
|
78
58
|
} catch (error) {
|
|
79
|
-
|
|
80
|
-
// bu yüzden sadece konsola yazdırıp onError'ı tetiklemeyebiliriz.
|
|
81
|
-
// Native kodunuz "E_PICKER_CANCELLED" koduyla reject ediyor.
|
|
82
|
-
if (error.code !== 'E_PICKER_CANCELLED') {
|
|
59
|
+
if (onError) {
|
|
83
60
|
onError(error);
|
|
61
|
+
} else {
|
|
62
|
+
console.error("MyUploader Error:", error);
|
|
84
63
|
}
|
|
64
|
+
} finally {
|
|
65
|
+
setIsLoading(false);
|
|
85
66
|
}
|
|
86
67
|
};
|
|
87
68
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
88
|
-
style: [styles.button, ButtonStyle, disabled && styles.
|
|
69
|
+
style: [styles.button, ButtonStyle, (disabled || isLoading) && styles.disabled],
|
|
89
70
|
onPress: handlePress,
|
|
90
|
-
disabled: disabled
|
|
91
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.
|
|
92
|
-
|
|
71
|
+
disabled: disabled || isLoading
|
|
72
|
+
}, isLoading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
|
|
73
|
+
color: "#FFF"
|
|
74
|
+
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
75
|
+
style: [styles.text, ButtonTextStyle]
|
|
93
76
|
}, buttonPlaceHolder));
|
|
94
77
|
};
|
|
95
|
-
|
|
96
|
-
// Varsayılan stiller
|
|
97
78
|
const styles = _reactNative.StyleSheet.create({
|
|
98
79
|
button: {
|
|
99
|
-
backgroundColor: '#
|
|
100
|
-
|
|
101
|
-
paddingVertical: 10,
|
|
80
|
+
backgroundColor: '#6200EE',
|
|
81
|
+
padding: 12,
|
|
102
82
|
borderRadius: 8,
|
|
103
83
|
alignItems: 'center',
|
|
104
84
|
justifyContent: 'center'
|
|
105
85
|
},
|
|
106
|
-
|
|
107
|
-
color: '#
|
|
108
|
-
|
|
109
|
-
|
|
86
|
+
text: {
|
|
87
|
+
color: '#FFF',
|
|
88
|
+
fontWeight: '600',
|
|
89
|
+
fontSize: 16
|
|
110
90
|
},
|
|
111
|
-
|
|
112
|
-
backgroundColor: '#
|
|
91
|
+
disabled: {
|
|
92
|
+
backgroundColor: '#B0B0B0'
|
|
113
93
|
}
|
|
114
94
|
});
|
|
115
|
-
|
|
116
|
-
// İhtiyaca göre pickFile'ı da export edebilirsiniz.
|
|
117
|
-
// Component'i varsayılan olarak export ediyoruz.
|
|
118
|
-
var _default = exports.default = MyUploaderAndroid;
|
|
95
|
+
var _default = exports.default = MyUploader;
|
|
119
96
|
//# sourceMappingURL=MyUploader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UploadDocumentPicker","NativeUploadPicker","NativeModules","pickFile","options","_options$multipleFile","_options$maxFiles","_options$maxSize","_options$fileTypes","_options$excludedUris","Error","nativeOptions","multipleFiles","maxFiles","maxSize","fileTypes","excludedUris","openDocument","exports","MyUploader","onSelect","onError","buttonPlaceHolder","ButtonStyle","ButtonTextStyle","disabled","isLoading","setIsLoading","useState","handlePress","files","error","console","createElement","TouchableOpacity","style","styles","button","onPress","ActivityIndicator","color","Text","text","StyleSheet","create","backgroundColor","padding","borderRadius","alignItems","justifyContent","fontWeight","fontSize","_default"],"sources":["MyUploader.tsx"],"sourcesContent":["import React, { useState } from 'react';\r\nimport { TouchableOpacity, Text, StyleSheet, ActivityIndicator,NativeModules } from 'react-native';\r\nimport type { MyUploaderProps, DocumentPickerOptions, FileInfo } from '../types';\r\n\r\nconst { UploadDocumentPicker: NativeUploadPicker } = NativeModules;\r\n\r\n// 1. Standalone pickFile Fonksiyonu\r\nexport const pickFile = async (options: DocumentPickerOptions = {}): Promise<FileInfo[]> => {\r\n if (!NativeUploadPicker) throw new Error(\"DocumentPicker module is not linked.\");\r\n \r\n // Native tarafa gönderilecek options\r\n const nativeOptions = {\r\n multipleFiles: options.multipleFiles ?? false,\r\n maxFiles: options.maxFiles ?? 0,\r\n maxSize: options.maxSize ?? 0,\r\n fileTypes: options.fileTypes ?? ['*/*'],\r\n excludedUris: options.excludedUris ?? [],\r\n };\r\n\r\n return await NativeUploadPicker.openDocument(nativeOptions);\r\n};\r\n\r\n// 2. MyUploader Bileşeni\r\nconst MyUploader: React.FC<MyUploaderProps> = ({\r\n onSelect,\r\n onError,\r\n buttonPlaceHolder = \"Dosya Seç\",\r\n ButtonStyle,\r\n ButtonTextStyle,\r\n disabled = false,\r\n multipleFiles = false,\r\n fileTypes = ['*/*'],\r\n maxSize = 0,\r\n maxFiles = 0,\r\n excludedUris = [],\r\n}) => {\r\n const [isLoading, setIsLoading] = useState(false);\r\n\r\n const handlePress = async () => {\r\n if (disabled || isLoading) return;\r\n setIsLoading(true);\r\n\r\n try {\r\n const files = await pickFile({\r\n multipleFiles,\r\n fileTypes,\r\n maxSize,\r\n maxFiles,\r\n excludedUris\r\n });\r\n \r\n onSelect(files);\r\n } catch (error: any) {\r\n if (onError) {\r\n onError(error);\r\n } else {\r\n console.error(\"MyUploader Error:\", error);\r\n }\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n return (\r\n <TouchableOpacity\r\n style={[styles.button, ButtonStyle, (disabled || isLoading) && styles.disabled]}\r\n onPress={handlePress}\r\n disabled={disabled || isLoading}\r\n >\r\n {isLoading ? (\r\n <ActivityIndicator color=\"#FFF\" />\r\n ) : (\r\n <Text style={[styles.text, ButtonTextStyle]}>{buttonPlaceHolder}</Text>\r\n )}\r\n </TouchableOpacity>\r\n );\r\n};\r\n\r\nconst styles = StyleSheet.create({\r\n button: {\r\n backgroundColor: '#6200EE',\r\n padding: 12,\r\n borderRadius: 8,\r\n alignItems: 'center',\r\n justifyContent: 'center'\r\n },\r\n text: {\r\n color: '#FFF',\r\n fontWeight: '600',\r\n fontSize: 16\r\n },\r\n disabled: {\r\n backgroundColor: '#B0B0B0'\r\n }\r\n});\r\n\r\nexport default MyUploader;"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAmG,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,U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AW,EAAE,CAACE,QAAQ,IAAIC,SAAS,KAAKU,MAAM,CAACX,QAAQ,CAAE;IAChFa,OAAO,EAAET,WAAY;IACrBJ,QAAQ,EAAEA,QAAQ,IAAIC;EAAU,GAE/BA,SAAS,gBACRjD,MAAA,CAAAc,OAAA,CAAA0C,aAAA,CAACrD,YAAA,CAAA2D,iBAAiB;IAACC,KAAK,EAAC;EAAM,CAAE,CAAC,gBAElC/D,MAAA,CAAAc,OAAA,CAAA0C,aAAA,CAACrD,YAAA,CAAA6D,IAAI;IAACN,KAAK,EAAE,CAACC,MAAM,CAACM,IAAI,EAAElB,eAAe;EAAE,GAAEF,iBAAwB,CAExD,CAAC;AAEvB,CAAC;AAED,MAAMc,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAC/BP,MAAM,EAAE;IACNQ,eAAe,EAAE,SAAS;IAC1BC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDP,IAAI,EAAE;IACJF,KAAK,EAAE,MAAM;IACbU,UAAU,EAAE,KAAK;IACjBC,QAAQ,EAAE;EACZ,CAAC;EACD1B,QAAQ,EAAE;IACRoB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAO,QAAA,GAAAlC,OAAA,CAAA3B,OAAA,GAEY4B,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.d.ts"],"sourcesContent":["import * as React from 'react';\r\nimport type {
|
|
1
|
+
{"version":3,"names":["_types","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.d.ts"],"sourcesContent":["import * as React from 'react';\r\nimport type { DocumentPickerOptions, MyUploaderProps, FileInfo } from './types';\r\n// import type { DownloadFileProps } from './types';\r\n\r\nexport * from './types';\r\n\r\n// DownloadFile Component Tanımı (3. Bunu ekledik)\r\n// export declare const DownloadFile: React.FC<DownloadFileProps>;\r\n\r\n// pickFile Fonksiyon Tanımı\r\nexport declare function pickFile(options?: DocumentPickerOptions): Promise<FileInfo[]>;\r\n\r\nexport declare const MyUploader: React.FC<MyUploaderProps>;\r\n\r\n// Varsayılan dışa aktarım (İsteğe bağlı, genellikle ana bileşen verilir)\r\ndeclare const _default: React.FC<MyUploaderProps>;\r\nexport default _default;"],"mappings":";;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
MyUploader: true,
|
|
8
|
+
pickFile: true
|
|
9
9
|
};
|
|
10
|
-
Object.defineProperty(exports, "
|
|
10
|
+
Object.defineProperty(exports, "MyUploader", {
|
|
11
11
|
enumerable: true,
|
|
12
12
|
get: function () {
|
|
13
|
-
return
|
|
13
|
+
return _MyUploader.default;
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
exports.default = void 0;
|
|
@@ -21,7 +21,6 @@ Object.defineProperty(exports, "pickFile", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
var _MyUploader = _interopRequireWildcard(require("./components/MyUploader"));
|
|
24
|
-
var _DownloadFile = _interopRequireDefault(require("./components/DownloadFile"));
|
|
25
24
|
var _types = require("./types");
|
|
26
25
|
Object.keys(_types).forEach(function (key) {
|
|
27
26
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -34,8 +33,11 @@ Object.keys(_types).forEach(function (key) {
|
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
35
|
});
|
|
37
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
38
36
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
39
|
-
//
|
|
37
|
+
// import DownloadFile from "./components/DownloadFile";
|
|
38
|
+
// 2. Diğerlerini NAMED olarak dışa aktar (import { DownloadFile, pickFile } ... için)
|
|
39
|
+
// export { DownloadFile, pickFile };
|
|
40
|
+
// Sadece bu paketle ilgili olanları dışa aktar
|
|
41
|
+
// Varsayılan dışa aktarım olarak da ana bileşeni verelim
|
|
40
42
|
var _default = exports.default = _MyUploader.default;
|
|
41
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_MyUploader","_interopRequireWildcard","require","
|
|
1
|
+
{"version":3,"names":["_MyUploader","_interopRequireWildcard","require","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor","_default","MyUploader"],"sources":["index.ts"],"sourcesContent":["import MyUploader,{pickFile} from \"./components/MyUploader\";\r\n// import DownloadFile from \"./components/DownloadFile\";\r\n\r\n// 2. Diğerlerini NAMED olarak dışa aktar (import { DownloadFile, pickFile } ... için)\r\n// export { DownloadFile, pickFile };\r\n\r\n\r\n// Sadece bu paketle ilgili olanları dışa aktar\r\nexport { MyUploader, pickFile };\r\nexport * from './types';\r\n\r\n// Varsayılan dışa aktarım olarak da ana bileşeni verelim\r\nexport default MyUploader;\r\n\r\n\r\n\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAwB,SAAAN,wBAAAe,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAjB,uBAAA,YAAAA,CAAAe,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAP,GAAA,CAAAC,CAAA,GAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAR,cAAA,CAAAC,IAAA,CAAAM,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAlB,MAAA,CAAAS,cAAA,KAAAT,MAAA,CAAAyB,wBAAA,CAAAb,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAR,GAAA,IAAAQ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AARxB;AAEA;AACA;AAGA;AAIA;AAAA,IAAAa,QAAA,GAAAlB,OAAA,CAAAc,OAAA,GACeK,mBAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { StyleProp, TextStyle, ViewStyle } from 'react-native';\r\n\r\
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["// import type { StyleProp, TextStyle, ViewStyle } from 'react-native';\r\n\r\n// export interface FileInfo {\r\n// fileName: string;\r\n// fileSize: number; \r\n// fileType: string | null;\r\n// fileUri: string;\r\n// base64: string;\r\n// }\r\n\r\n// export interface MyUploaderProps{\r\n// onSelect: (files: FileInfo[]) => void;\r\n// onError?: (error: Error) => void;\r\n// buttonPlaceHolder?: string;\r\n// ButtonStyle?: StyleProp<ViewStyle>;\r\n// ButtonTextStyle?: StyleProp<TextStyle>;\r\n// disabled?: boolean; \r\n// multipleFiles?: boolean;\r\n// fileTypes?: string[];\r\n// maxSize?: number;\r\n// maxFiles?: number;\r\n// excludedUris?: string[];\r\n// }\r\n\r\n// export interface DownloadedFileInfo {\r\n// originalUrl: string;\r\n// localUri: string;\r\n// }\r\n\r\n// export interface SkippedFileInfo {\r\n// originalUrl: string;\r\n// reason: string; \r\n// }\r\n\r\n\r\n\r\n// export interface UploadFileProps {\r\n// files: string[];\r\n// multipleLoad?: boolean;\r\n// disabled?: boolean;\r\n// debug?: boolean; \r\n// maxSize?: number;\r\n// fileTypes?: string[];\r\n// buttonPlaceHolder?: string;\r\n// buttonIcon?: React.ReactNode;\r\n// ButtonStyle?: StyleProp<ViewStyle>;\r\n// ButtonTextStyle?: StyleProp<TextStyle>;\r\n// onSuccess?: (result: DownloadResult) => void;\r\n// onError?: (error: Error) => void;\r\n// }\r\n\r\n// export interface DownloadFileProps {\r\n// files: string[];\r\n// multipleDownload?: boolean;\r\n// disabled?: boolean;\r\n// debug?: boolean;\r\n// maxSize?: number; // MB\r\n// fileTypes?: string[];\r\n// buttonPlaceHolder?: string;\r\n// buttonIcon?: React.ReactNode;\r\n// ButtonStyle?: ViewStyle;\r\n// ButtonTextStyle?: TextStyle;\r\n// onSuccess?: (result: DownloadResult) => void;\r\n// onError?: (error: any) => void;\r\n// }\r\n// export interface DownloadResult {\r\n// successful: { originalUrl: string; localUri: string | null }[];\r\n// skipped: { originalUrl: string; reason: string }[];\r\n// }\r\n\r\n\r\nimport type { ViewStyle, TextStyle } from 'react-native';\r\n\r\nexport interface FileInfo {\r\n uri: string;\r\n name: string;\r\n type: string;\r\n size: number;\r\n base64?: string | null;\r\n}\r\n\r\n\r\n// ----- MyUploader & pickFile Props -----\r\nexport interface DocumentPickerOptions {\r\n multipleFiles?: boolean;\r\n fileTypes?: string[]; // örn: ['image/*', 'application/pdf']\r\n maxSize?: number; // MB cinsinden\r\n maxFiles?: number;\r\n excludedUris?: string[];\r\n}\r\n\r\nexport interface MyUploaderProps extends DocumentPickerOptions {\r\n onSelect: (files: FileInfo[]) => void;\r\n onError?: (error: Error) => void;\r\n buttonPlaceHolder?: string;\r\n ButtonStyle?: ViewStyle;\r\n ButtonTextStyle?: TextStyle;\r\n disabled?: boolean;\r\n}\r\n\r\n// ----- DownloadFile Props -----\r\nexport interface DownloadFileProps {\r\n files: string[];\r\n multipleDownload?: boolean; // multipleFiles yerine multipleDownload (İsim karışmaması için)\r\n disabled?: boolean;\r\n debug?: boolean;\r\n maxSize?: number; // MB\r\n fileTypes?: string[]; // İndirilecek dosyanın Content-Type kontrolü\r\n buttonPlaceHolder?: string;\r\n buttonIcon?: React.ReactNode;\r\n ButtonStyle?: ViewStyle;\r\n ButtonTextStyle?: TextStyle;\r\n onSuccess?: (result: DownloadResult) => void;\r\n onError?: (error: any) => void;\r\n}\r\n\r\n\r\nexport interface DownloadResult {\r\n successful: { originalUrl: string; localUri: string | null }[];\r\n skipped: { originalUrl: string; reason: string }[];\r\n}"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, NativeModules } from 'react-native';
|
|
3
3
|
const {
|
|
4
|
-
DownloadFile:
|
|
4
|
+
DownloadFile: NativeDownload
|
|
5
5
|
} = NativeModules;
|
|
6
6
|
const DownloadFile = ({
|
|
7
7
|
files,
|
|
8
|
-
|
|
8
|
+
multipleDownload = false,
|
|
9
9
|
disabled = false,
|
|
10
10
|
debug = false,
|
|
11
11
|
maxSize = 0,
|
|
@@ -14,82 +14,72 @@ const DownloadFile = ({
|
|
|
14
14
|
buttonIcon,
|
|
15
15
|
ButtonStyle,
|
|
16
16
|
ButtonTextStyle,
|
|
17
|
-
onSuccess
|
|
18
|
-
onError
|
|
17
|
+
onSuccess,
|
|
18
|
+
onError
|
|
19
19
|
}) => {
|
|
20
20
|
const [isLoading, setIsLoading] = useState(false);
|
|
21
21
|
const handlePress = async () => {
|
|
22
|
-
if (!
|
|
23
|
-
onError(new Error("DownloadFile native module is not available."));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
22
|
+
if (disabled || isLoading || !files.length) return;
|
|
26
23
|
setIsLoading(true);
|
|
27
|
-
const
|
|
24
|
+
const options = {
|
|
25
|
+
debug,
|
|
28
26
|
maxSize,
|
|
29
|
-
fileTypes
|
|
30
|
-
debug
|
|
27
|
+
fileTypes
|
|
31
28
|
};
|
|
29
|
+
const targetFiles = multipleDownload ? files : [files[0]];
|
|
32
30
|
try {
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const finalResult = {
|
|
31
|
+
const promises = targetFiles.map(url => NativeDownload.downloadFile(url, options));
|
|
32
|
+
const results = await Promise.allSettled(promises);
|
|
33
|
+
const final = {
|
|
37
34
|
successful: [],
|
|
38
35
|
skipped: []
|
|
39
36
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
finalResult.successful.push({
|
|
37
|
+
results.forEach((res, index) => {
|
|
38
|
+
var _targetFiles$index;
|
|
39
|
+
const originalUrl = (_targetFiles$index = targetFiles[index]) !== null && _targetFiles$index !== void 0 ? _targetFiles$index : "";
|
|
40
|
+
if (res.status === 'fulfilled') {
|
|
41
|
+
final.successful.push({
|
|
46
42
|
originalUrl,
|
|
47
|
-
|
|
48
|
-
localUri: result.value
|
|
43
|
+
localUri: res.value
|
|
49
44
|
});
|
|
50
45
|
} else {
|
|
51
|
-
|
|
46
|
+
var _res$reason;
|
|
47
|
+
final.skipped.push({
|
|
52
48
|
originalUrl,
|
|
53
|
-
|
|
54
|
-
reason: result.reason.message
|
|
49
|
+
reason: ((_res$reason = res.reason) === null || _res$reason === void 0 ? void 0 : _res$reason.message) || "Bilinmeyen Hata"
|
|
55
50
|
});
|
|
56
51
|
}
|
|
57
52
|
});
|
|
58
|
-
onSuccess(
|
|
59
|
-
} catch (
|
|
60
|
-
onError(error);
|
|
53
|
+
if (onSuccess) onSuccess(final);
|
|
54
|
+
} catch (e) {
|
|
55
|
+
if (onError) onError(e);else console.error(e);
|
|
61
56
|
} finally {
|
|
62
57
|
setIsLoading(false);
|
|
63
58
|
}
|
|
64
59
|
};
|
|
65
|
-
const content = isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
66
|
-
color: "#FFFFFF"
|
|
67
|
-
}) : buttonIcon || /*#__PURE__*/React.createElement(Text, {
|
|
68
|
-
style: [styles.buttonText, ButtonTextStyle]
|
|
69
|
-
}, buttonPlaceHolder);
|
|
70
60
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
71
|
-
style: [styles.button, ButtonStyle, (disabled || isLoading) && styles.
|
|
61
|
+
style: [styles.button, ButtonStyle, (disabled || isLoading) && styles.disabled],
|
|
72
62
|
onPress: handlePress,
|
|
73
63
|
disabled: disabled || isLoading
|
|
74
|
-
},
|
|
64
|
+
}, isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
65
|
+
color: "#FFF"
|
|
66
|
+
}) : buttonIcon ? buttonIcon : /*#__PURE__*/React.createElement(Text, {
|
|
67
|
+
style: [styles.text, ButtonTextStyle]
|
|
68
|
+
}, buttonPlaceHolder));
|
|
75
69
|
};
|
|
76
70
|
const styles = StyleSheet.create({
|
|
77
71
|
button: {
|
|
78
|
-
backgroundColor: '#
|
|
79
|
-
|
|
80
|
-
paddingVertical: 10,
|
|
72
|
+
backgroundColor: '#03DAC6',
|
|
73
|
+
padding: 12,
|
|
81
74
|
borderRadius: 8,
|
|
82
|
-
alignItems: 'center'
|
|
83
|
-
justifyContent: 'center',
|
|
84
|
-
flexDirection: 'row'
|
|
75
|
+
alignItems: 'center'
|
|
85
76
|
},
|
|
86
|
-
|
|
87
|
-
color: '#
|
|
88
|
-
fontSize: 16,
|
|
77
|
+
text: {
|
|
78
|
+
color: '#000',
|
|
89
79
|
fontWeight: 'bold'
|
|
90
80
|
},
|
|
91
|
-
|
|
92
|
-
backgroundColor: '#
|
|
81
|
+
disabled: {
|
|
82
|
+
backgroundColor: '#AAA'
|
|
93
83
|
}
|
|
94
84
|
});
|
|
95
85
|
export default DownloadFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","
|
|
1
|
+
{"version":3,"names":["React","useState","TouchableOpacity","Text","StyleSheet","ActivityIndicator","NativeModules","DownloadFile","NativeDownload","files","multipleDownload","disabled","debug","maxSize","fileTypes","buttonPlaceHolder","buttonIcon","ButtonStyle","ButtonTextStyle","onSuccess","onError","isLoading","setIsLoading","handlePress","length","options","targetFiles","promises","map","url","downloadFile","results","Promise","allSettled","final","successful","skipped","forEach","res","index","_targetFiles$index","originalUrl","status","push","localUri","value","_res$reason","reason","message","e","console","error","createElement","style","styles","button","onPress","color","text","create","backgroundColor","padding","borderRadius","alignItems","fontWeight"],"sources":["DownloadFile.tsx"],"sourcesContent":["import React, { useState } from 'react';\r\nimport { TouchableOpacity, Text, StyleSheet, ActivityIndicator,NativeModules } from 'react-native';\r\nimport type { DownloadFileProps, DownloadResult } from '../types';\r\n\r\n\r\nconst { DownloadFile: NativeDownload } = NativeModules;\r\n\r\n\r\nconst DownloadFile: React.FC<DownloadFileProps> = ({\r\n files,\r\n multipleDownload = false,\r\n disabled = false,\r\n debug = false,\r\n maxSize = 0,\r\n fileTypes = ['*/*'],\r\n buttonPlaceHolder = 'Dosyaları İndir',\r\n buttonIcon,\r\n ButtonStyle,\r\n ButtonTextStyle,\r\n onSuccess,\r\n onError,\r\n}) => {\r\n const [isLoading, setIsLoading] = useState(false);\r\n\r\n const handlePress = async () => {\r\n if (disabled || isLoading || !files.length) return;\r\n setIsLoading(true);\r\n\r\n const options = { debug, maxSize, fileTypes };\r\n const targetFiles = multipleDownload ? files : [files[0]];\r\n\r\n try {\r\n const promises = targetFiles.map(url => NativeDownload.downloadFile(url, options));\r\n const results = await Promise.allSettled(promises);\r\n \r\n const final: DownloadResult = { successful: [], skipped: [] };\r\n\r\n results.forEach((res, index) => {\r\n const originalUrl = targetFiles[index] ?? \"\";\r\n if (res.status === 'fulfilled') {\r\n final.successful.push({ originalUrl, localUri: res.value });\r\n } else {\r\n final.skipped.push({ \r\n originalUrl, \r\n reason: res.reason?.message || \"Bilinmeyen Hata\" \r\n });\r\n }\r\n });\r\n\r\n if (onSuccess) onSuccess(final);\r\n } catch (e) {\r\n if (onError) onError(e);\r\n else console.error(e);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n return (\r\n <TouchableOpacity\r\n style={[styles.button, ButtonStyle, (disabled || isLoading) && styles.disabled]}\r\n onPress={handlePress}\r\n disabled={disabled || isLoading}\r\n >\r\n {isLoading ? (\r\n <ActivityIndicator color=\"#FFF\" />\r\n ) : (\r\n buttonIcon ? buttonIcon : <Text style={[styles.text, ButtonTextStyle]}>{buttonPlaceHolder}</Text>\r\n )}\r\n </TouchableOpacity>\r\n );\r\n};\r\n\r\nconst styles = StyleSheet.create({\r\n button: {\r\n backgroundColor: '#03DAC6',\r\n padding: 12,\r\n borderRadius: 8,\r\n alignItems: 'center',\r\n },\r\n text: { color: '#000', fontWeight: 'bold' },\r\n disabled: { backgroundColor: '#AAA' }\r\n});\r\n\r\nexport default DownloadFile;"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,EAAEC,iBAAiB,EAACC,aAAa,QAAQ,cAAc;AAIlG,MAAM;EAAEC,YAAY,EAAEC;AAAe,CAAC,GAAGF,aAAa;AAGtD,MAAMC,YAAyC,GAAGA,CAAC;EACjDE,KAAK;EACLC,gBAAgB,GAAG,KAAK;EACxBC,QAAQ,GAAG,KAAK;EAChBC,KAAK,GAAG,KAAK;EACbC,OAAO,GAAG,CAAC;EACXC,SAAS,GAAG,CAAC,KAAK,CAAC;EACnBC,iBAAiB,GAAG,iBAAiB;EACrCC,UAAU;EACVC,WAAW;EACXC,eAAe;EACfC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGrB,QAAQ,CAAC,KAAK,CAAC;EAEjD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