one 2.0.0-beta.100.1 → 2.0.0-beta.101.1
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/margelo/nitro/one/HybridOneDocumentPicker.kt +147 -0
- package/dist/cjs/one.cjs +1 -0
- package/dist/cjs/one.native.cjs +1 -0
- package/dist/cjs/one.native.js +1 -0
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/platform/document-picker/index.cjs +58 -0
- package/dist/cjs/platform/document-picker/index.native.cjs +57 -0
- package/dist/cjs/platform/document-picker/index.native.js +59 -0
- package/dist/cjs/platform/document-picker/index.native.js.map +1 -0
- package/dist/cjs/platform/document-picker/options.cjs +42 -0
- package/dist/cjs/platform/document-picker/options.native.cjs +64 -0
- package/dist/cjs/platform/document-picker/options.native.js +66 -0
- package/dist/cjs/platform/document-picker/options.native.js.map +1 -0
- package/dist/cjs/platform/document-picker/types.cjs +16 -0
- package/dist/cjs/platform/document-picker/types.native.cjs +18 -0
- package/dist/cjs/platform/document-picker/types.native.js +20 -0
- package/dist/cjs/platform/document-picker/types.native.js.map +1 -0
- package/dist/cjs/platform/index.cjs +2 -0
- package/dist/cjs/platform/index.native.cjs +2 -0
- package/dist/cjs/platform/index.native.js +2 -0
- package/dist/cjs/platform/index.native.js.map +1 -1
- package/dist/cjs/platform/specs/OneDocumentPicker.nitro.cjs +16 -0
- package/dist/cjs/platform/specs/OneDocumentPicker.nitro.native.cjs +18 -0
- package/dist/cjs/platform/specs/OneDocumentPicker.nitro.native.js +20 -0
- package/dist/cjs/platform/specs/OneDocumentPicker.nitro.native.js.map +1 -0
- package/dist/cjs/platform/ui/Image.native.cjs +32 -5
- package/dist/cjs/platform/ui/Image.native.js +32 -5
- package/dist/cjs/platform/ui/Image.native.js.map +1 -1
- package/dist/esm/one.mjs +2 -1
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +2 -1
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/platform/document-picker/index.mjs +39 -0
- package/dist/esm/platform/document-picker/index.mjs.map +1 -0
- package/dist/esm/platform/document-picker/index.native.js +36 -0
- package/dist/esm/platform/document-picker/index.native.js.map +1 -0
- package/dist/esm/platform/document-picker/options.mjs +22 -0
- package/dist/esm/platform/document-picker/options.mjs.map +1 -0
- package/dist/esm/platform/document-picker/options.native.js +42 -0
- package/dist/esm/platform/document-picker/options.native.js.map +1 -0
- package/dist/esm/platform/document-picker/types.mjs +0 -0
- package/dist/esm/platform/document-picker/types.native.js +0 -0
- package/dist/esm/platform/index.mjs +2 -1
- package/dist/esm/platform/index.mjs.map +1 -1
- package/dist/esm/platform/index.native.js +2 -1
- package/dist/esm/platform/index.native.js.map +1 -1
- package/dist/esm/platform/specs/OneDocumentPicker.nitro.mjs +0 -0
- package/dist/esm/platform/specs/OneDocumentPicker.nitro.native.js +0 -0
- package/dist/esm/platform/ui/Image.native.js +32 -5
- package/dist/esm/platform/ui/Image.native.js.map +1 -1
- package/ios/Nitro/HybridOneDocumentPicker.swift +156 -0
- package/ios/Nitro/HybridOneNotifications.swift +12 -16
- package/ios/OneNotificationsLaunch.mm +37 -0
- package/nitrogen/generated/android/One+autolinking.cmake +2 -0
- package/nitrogen/generated/android/OneOnLoad.cpp +16 -0
- package/nitrogen/generated/android/c++/JDocumentPickerAsset.hpp +70 -0
- package/nitrogen/generated/android/c++/JDocumentPickerNativeResult.hpp +83 -0
- package/nitrogen/generated/android/c++/JHybridOneDocumentPickerSpec.cpp +79 -0
- package/nitrogen/generated/android/c++/JHybridOneDocumentPickerSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JResolvedDocumentPickerOptions.hpp +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/DocumentPickerAsset.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/DocumentPickerNativeResult.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneDocumentPickerSpec.kt +57 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/ResolvedDocumentPickerOptions.kt +56 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.cpp +25 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +118 -15
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +14 -0
- package/nitrogen/generated/ios/OneAutolinking.mm +8 -0
- package/nitrogen/generated/ios/OneAutolinking.swift +12 -0
- package/nitrogen/generated/ios/c++/HybridOneDocumentPickerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridOneDocumentPickerSpecSwift.hpp +93 -0
- package/nitrogen/generated/ios/swift/DocumentPickerAsset.swift +70 -0
- package/nitrogen/generated/ios/swift/DocumentPickerNativeResult.swift +53 -0
- package/nitrogen/generated/ios/swift/Func_void_DocumentPickerNativeResult.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridOneDocumentPickerSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridOneDocumentPickerSpec_cxx.swift +145 -0
- package/nitrogen/generated/ios/swift/ResolvedDocumentPickerOptions.swift +40 -0
- package/nitrogen/generated/shared/c++/DocumentPickerAsset.hpp +96 -0
- package/nitrogen/generated/shared/c++/DocumentPickerNativeResult.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridOneDocumentPickerSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridOneDocumentPickerSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/ResolvedDocumentPickerOptions.hpp +88 -0
- package/package.json +10 -10
- package/src/one.ts +3 -0
- package/src/platform/document-picker/index.native.ts +50 -0
- package/src/platform/document-picker/index.ts +51 -0
- package/src/platform/document-picker/options.ts +30 -0
- package/src/platform/document-picker/types.ts +34 -0
- package/src/platform/index.native.ts +8 -0
- package/src/platform/index.ts +8 -0
- package/src/platform/specs/OneDocumentPicker.nitro.ts +16 -0
- package/src/platform/ui/Image.native.tsx +43 -8
- package/types/one.d.ts +2 -1
- package/types/one.d.ts.map +1 -1
- package/types/platform/document-picker/index.d.ts +7 -0
- package/types/platform/document-picker/index.d.ts.map +1 -0
- package/types/platform/document-picker/index.native.d.ts +7 -0
- package/types/platform/document-picker/index.native.d.ts.map +1 -0
- package/types/platform/document-picker/options.d.ts +7 -0
- package/types/platform/document-picker/options.d.ts.map +1 -0
- package/types/platform/document-picker/types.d.ts +20 -0
- package/types/platform/document-picker/types.d.ts.map +1 -0
- package/types/platform/index.d.ts +2 -0
- package/types/platform/index.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +2 -0
- package/types/platform/index.native.d.ts.map +1 -1
- package/types/platform/specs/OneDocumentPicker.nitro.d.ts +14 -0
- package/types/platform/specs/OneDocumentPicker.nitro.d.ts.map +1 -0
- package/types/platform/ui/Image.native.d.ts +16 -2
- package/types/platform/ui/Image.native.d.ts.map +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
package com.margelo.nitro.one
|
|
2
|
+
|
|
3
|
+
import android.app.Activity
|
|
4
|
+
import android.content.ActivityNotFoundException
|
|
5
|
+
import android.content.Intent
|
|
6
|
+
import android.net.Uri
|
|
7
|
+
import android.provider.OpenableColumns
|
|
8
|
+
import com.facebook.react.bridge.ActivityEventListener
|
|
9
|
+
import com.margelo.nitro.NitroModules
|
|
10
|
+
import com.margelo.nitro.core.Promise
|
|
11
|
+
import java.io.File
|
|
12
|
+
import java.io.FileOutputStream
|
|
13
|
+
import java.util.UUID
|
|
14
|
+
|
|
15
|
+
// imperative document picker: ACTION_OPEN_DOCUMENT filtered by mime type.
|
|
16
|
+
// each picked file is copied into the app cache under its display name and
|
|
17
|
+
// returned as a file uri, so no provider grant outlives the pick. backing out
|
|
18
|
+
// resolves canceled; only runtime failures reject. calls arrive on the js
|
|
19
|
+
// thread and results on the ui thread, so the pending slot is only taken or
|
|
20
|
+
// settled under the lock.
|
|
21
|
+
class HybridOneDocumentPicker : HybridOneDocumentPickerSpec(), ActivityEventListener {
|
|
22
|
+
private val lock = Any()
|
|
23
|
+
private var pending: Promise<DocumentPickerNativeResult>? = null
|
|
24
|
+
|
|
25
|
+
init {
|
|
26
|
+
NitroModules.applicationContext?.addActivityEventListener(this)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
override fun dispose() {
|
|
30
|
+
NitroModules.applicationContext?.removeActivityEventListener(this)
|
|
31
|
+
takePending()?.reject(OneNativeError(E_FAILED, "DocumentPicker.getDocument: torn down mid-request"))
|
|
32
|
+
super.dispose()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// a hybrid object has no lifecycle owner to register activity result
|
|
36
|
+
// launchers against, so it launches the intent the classic way and reads
|
|
37
|
+
// the result through the activity event listener.
|
|
38
|
+
@Suppress("DEPRECATION")
|
|
39
|
+
override fun getDocument(options: ResolvedDocumentPickerOptions): Promise<DocumentPickerNativeResult> {
|
|
40
|
+
val promise = Promise<DocumentPickerNativeResult>()
|
|
41
|
+
// one pick in flight: native owns the slot, so a second pick rejects
|
|
42
|
+
// instead of clobbering the pending promise.
|
|
43
|
+
synchronized(lock) {
|
|
44
|
+
if (pending != null) {
|
|
45
|
+
promise.reject(OneNativeError(E_FAILED, "DocumentPicker.getDocument: another request is already in flight"))
|
|
46
|
+
return promise
|
|
47
|
+
}
|
|
48
|
+
pending = promise
|
|
49
|
+
}
|
|
50
|
+
val activity = NitroModules.applicationContext?.currentActivity
|
|
51
|
+
if (activity == null) {
|
|
52
|
+
rejectPending("found no activity to present from")
|
|
53
|
+
return promise
|
|
54
|
+
}
|
|
55
|
+
val intent =
|
|
56
|
+
Intent(Intent.ACTION_OPEN_DOCUMENT).apply {
|
|
57
|
+
addCategory(Intent.CATEGORY_OPENABLE)
|
|
58
|
+
if (options.types.size == 1) {
|
|
59
|
+
type = options.types[0]
|
|
60
|
+
} else {
|
|
61
|
+
type = "*/*"
|
|
62
|
+
putExtra(Intent.EXTRA_MIME_TYPES, options.types)
|
|
63
|
+
}
|
|
64
|
+
putExtra(Intent.EXTRA_ALLOW_MULTIPLE, options.multiple)
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
activity.startActivityForResult(intent, REQUEST_DOCUMENT, null)
|
|
68
|
+
} catch (e: ActivityNotFoundException) {
|
|
69
|
+
rejectPending("found no document picker on this device")
|
|
70
|
+
} catch (e: Exception) {
|
|
71
|
+
rejectPending(e.message ?: "could not open the document picker")
|
|
72
|
+
}
|
|
73
|
+
return promise
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
override fun onActivityResult(activity: Activity, requestCode: Int, resultCode: Int, data: Intent?) {
|
|
77
|
+
if (requestCode != REQUEST_DOCUMENT) return
|
|
78
|
+
val uris = pickedUris(resultCode, data)
|
|
79
|
+
if (uris.isEmpty()) {
|
|
80
|
+
takePending()?.resolve(DocumentPickerNativeResult(true, null))
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
// copying can take a while for large files; keep it off the ui thread.
|
|
84
|
+
Thread {
|
|
85
|
+
try {
|
|
86
|
+
val assets = uris.map { copyToCache(it) }.toTypedArray()
|
|
87
|
+
takePending()?.resolve(DocumentPickerNativeResult(false, assets))
|
|
88
|
+
} catch (e: Exception) {
|
|
89
|
+
rejectPending(e.message ?: "could not copy a picked file")
|
|
90
|
+
}
|
|
91
|
+
}.start()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
override fun onNewIntent(intent: Intent) {}
|
|
95
|
+
|
|
96
|
+
private fun pickedUris(resultCode: Int, data: Intent?): List<Uri> {
|
|
97
|
+
if (resultCode != Activity.RESULT_OK || data == null) return emptyList()
|
|
98
|
+
val clip = data.clipData
|
|
99
|
+
if (clip != null) {
|
|
100
|
+
return (0 until clip.itemCount).mapNotNull { clip.getItemAt(it).uri }
|
|
101
|
+
}
|
|
102
|
+
return listOfNotNull(data.data)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// each pick gets its own directory so the display name survives as the
|
|
106
|
+
// file name without colliding with an earlier pick of the same name.
|
|
107
|
+
private fun copyToCache(source: Uri): DocumentPickerAsset {
|
|
108
|
+
val context =
|
|
109
|
+
NitroModules.applicationContext
|
|
110
|
+
?: throw IllegalStateException("the react context is not ready")
|
|
111
|
+
val resolver = context.contentResolver
|
|
112
|
+
var name: String? = null
|
|
113
|
+
resolver.query(source, arrayOf(OpenableColumns.DISPLAY_NAME), null, null, null)?.use {
|
|
114
|
+
val index = it.getColumnIndex(OpenableColumns.DISPLAY_NAME)
|
|
115
|
+
if (it.moveToFirst() && index >= 0) name = it.getString(index)
|
|
116
|
+
}
|
|
117
|
+
// a display name is the provider's word, so strip any path from it.
|
|
118
|
+
val fileName = name?.substringAfterLast('/')?.takeIf { it.isNotBlank() } ?: "document"
|
|
119
|
+
val dir = File(File(context.cacheDir, "one-native-document-picker"), UUID.randomUUID().toString())
|
|
120
|
+
dir.mkdirs()
|
|
121
|
+
val dest = File(dir, fileName)
|
|
122
|
+
(resolver.openInputStream(source) ?: throw IllegalStateException("cannot open $source")).use { input ->
|
|
123
|
+
FileOutputStream(dest).use { output -> input.copyTo(output) }
|
|
124
|
+
}
|
|
125
|
+
return DocumentPickerAsset(
|
|
126
|
+
Uri.fromFile(dest).toString(),
|
|
127
|
+
fileName,
|
|
128
|
+
resolver.getType(source),
|
|
129
|
+
dest.length().toDouble()
|
|
130
|
+
)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private fun takePending(): Promise<DocumentPickerNativeResult>? = synchronized(lock) {
|
|
134
|
+
val promise = pending
|
|
135
|
+
pending = null
|
|
136
|
+
promise
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
private fun rejectPending(message: String) {
|
|
140
|
+
takePending()?.reject(OneNativeError(E_FAILED, "DocumentPicker.getDocument: $message"))
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
companion object {
|
|
144
|
+
private const val E_FAILED = "E_DOCUMENT_PICKER_FAILED"
|
|
145
|
+
private const val REQUEST_DOCUMENT = 0x1B01
|
|
146
|
+
}
|
|
147
|
+
}
|
package/dist/cjs/one.cjs
CHANGED
|
@@ -83,6 +83,7 @@ const One = Object.freeze({
|
|
|
83
83
|
Network: import_platform.Network,
|
|
84
84
|
Browser: import_platform.Browser,
|
|
85
85
|
ImagePicker: import_platform.ImagePicker,
|
|
86
|
+
DocumentPicker: import_platform.DocumentPicker,
|
|
86
87
|
SecureStore: import_platform.SecureStore,
|
|
87
88
|
useNetworkState: import_platform.useNetworkState
|
|
88
89
|
});
|
package/dist/cjs/one.native.cjs
CHANGED
|
@@ -86,6 +86,7 @@ var One = Object.freeze({
|
|
|
86
86
|
Network: import_platform.Network,
|
|
87
87
|
Browser: import_platform.Browser,
|
|
88
88
|
ImagePicker: import_platform.ImagePicker,
|
|
89
|
+
DocumentPicker: import_platform.DocumentPicker,
|
|
89
90
|
SecureStore: import_platform.SecureStore,
|
|
90
91
|
useNetworkState: import_platform.useNetworkState
|
|
91
92
|
});
|
package/dist/cjs/one.native.js
CHANGED
|
@@ -86,6 +86,7 @@ var One = Object.freeze({
|
|
|
86
86
|
Network: import_platform.Network,
|
|
87
87
|
Browser: import_platform.Browser,
|
|
88
88
|
ImagePicker: import_platform.ImagePicker,
|
|
89
|
+
DocumentPicker: import_platform.DocumentPicker,
|
|
89
90
|
SecureStore: import_platform.SecureStore,
|
|
90
91
|
useNetworkState: import_platform.useNetworkState
|
|
91
92
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_platform = require(\"./platform\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_platform.Swift,\n Widgets: import_platform.Widgets,\n LiveActivities: import_platform.LiveActivities,\n WidgetUI: import_platform.WidgetUI,\n Color: import_platform.Color.ios,\n MenuAction: import_platform.MenuAction,\n SplitView: import_platform.SplitView,\n ToolbarHost: import_platform.ToolbarHost,\n BarButtonItem: import_platform.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_platform.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_platform.ZoomTransitionEnabler,\n ZoomTransitionSource: import_platform.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_platform.Compose,\n Color: import_platform.Color.android,\n Menu: import_platform.Menu,\n ContextMenu: import_platform.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area_context.SafeAreaProvider,\n View: import_safe_area_context.SafeAreaView,\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n useFrame: import_safe_area_context.useSafeAreaFrame,\n useInsets: import_safe_area_context.useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...import_platform.UI,\n Fonts: import_platform.Fonts,\n SafeArea,\n TextInput: import_platform.TextInput,\n useFonts: import_platform.useFonts,\n useNativeState: import_platform.useNativeState,\n useSizeClass: import_platform.useSizeClass,\n getSizeClass: import_platform.getSizeClass,\n useHinge: import_platform.useHinge,\n getHinge: import_platform.getHinge,\n onHingeChange: import_platform.onHingeChange,\n ReservedRegions: import_platform.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_platform.AppInfo,\n Database: import_platform.Database,\n iOS,\n Android,\n UI,\n Notifications: import_platform.Notifications,\n Clipboard: import_platform.Clipboard,\n Haptics: import_platform.Haptics,\n Network: import_platform.Network,\n Browser: import_platform.Browser,\n ImagePicker: import_platform.ImagePicker,\n SecureStore: import_platform.SecureStore,\n useNetworkState: import_platform.useNetworkState\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,cAAc,CAAC;AACnB,SAAS,aAAa,EACpB,WAAW,IACb,CAAC;AACD,OAAO,UAAU,aAAa,WAAW;AACzC,IAAI,kBAAkB,QAAQ,4BAAY;AAC1C,IAAI,2BAA2B,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AC1B;CACA;CACA;CACA,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,aAAa,gBAAgB;CAC7B,aAAa,gBAAgB;CAC7B,iBAAiB,gBAAgB;AACnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"one.native.js","names":[],"sources":["cjs/one.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar one_exports = {};\n__export(one_exports, {\n One: () => One\n});\nmodule.exports = __toCommonJS(one_exports);\nvar import_platform = require(\"./platform\");\nvar import_safe_area_context = require(\"./safe-area-context\");\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...import_platform.Swift,\n Widgets: import_platform.Widgets,\n LiveActivities: import_platform.LiveActivities,\n WidgetUI: import_platform.WidgetUI,\n Color: import_platform.Color.ios,\n MenuAction: import_platform.MenuAction,\n SplitView: import_platform.SplitView,\n ToolbarHost: import_platform.ToolbarHost,\n BarButtonItem: import_platform.ToolbarItem,\n ZoomTransitionAlignmentRectDetector: import_platform.ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler: import_platform.ZoomTransitionEnabler,\n ZoomTransitionSource: import_platform.ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...import_platform.Compose,\n Color: import_platform.Color.android,\n Menu: import_platform.Menu,\n ContextMenu: import_platform.ContextMenu\n});\nvar SafeArea = Object.freeze({\n Provider: import_safe_area_context.SafeAreaProvider,\n View: import_safe_area_context.SafeAreaView,\n initialMetrics: import_safe_area_context.initialWindowMetrics,\n useFrame: import_safe_area_context.useSafeAreaFrame,\n useInsets: import_safe_area_context.useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...import_platform.UI,\n Fonts: import_platform.Fonts,\n SafeArea,\n TextInput: import_platform.TextInput,\n useFonts: import_platform.useFonts,\n useNativeState: import_platform.useNativeState,\n useSizeClass: import_platform.useSizeClass,\n getSizeClass: import_platform.getSizeClass,\n useHinge: import_platform.useHinge,\n getHinge: import_platform.getHinge,\n onHingeChange: import_platform.onHingeChange,\n ReservedRegions: import_platform.ReservedRegions\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo: import_platform.AppInfo,\n Database: import_platform.Database,\n iOS,\n Android,\n UI,\n Notifications: import_platform.Notifications,\n Clipboard: import_platform.Clipboard,\n Haptics: import_platform.Haptics,\n Network: import_platform.Network,\n Browser: import_platform.Browser,\n ImagePicker: import_platform.ImagePicker,\n DocumentPicker: import_platform.DocumentPicker,\n SecureStore: import_platform.SecureStore,\n useNetworkState: import_platform.useNetworkState\n});\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAA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AO,gBAAgB,MAAM;CAC7B,MAAM,gBAAgB;CACtB,aAAa,gBAAgB;AAC/B,CAAC;AACD,IAAI,WAAW,OAAO,OAAO;CAC3B,UAAU,yBAAyB;CACnC,MAAM,yBAAyB;CAC/B,gBAAgB,yBAAyB;CACzC,UAAU,yBAAyB;CACnC,WAAW,yBAAyB;AACtC,CAAC;AACD,IAAI,KAAK,OAAO,OAAO;CACrB,GAAG,gBAAgB;CACnB,OAAO,gBAAgB;CACvB;CACA,WAAW,gBAAgB;CAC3B,UAAU,gBAAgB;CAC1B,gBAAgB,gBAAgB;CAChC,cAAc,gBAAgB;CAC9B,cAAc,gBAAgB;CAC9B,UAAU,gBAAgB;CAC1B,UAAU,gBAAgB;CAC1B,eAAe,gBAAgB;CAC/B,iBAAiB,gBAAgB;AACnC,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA,SAAS,gBAAgB;CACzB,UAAU,gBAAgB;CAC1B;CACA;CACA;CACA,eAAe,gBAAgB;CAC/B,WAAW,gBAAgB;CAC3B,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,SAAS,gBAAgB;CACzB,aAAa,gBAAgB;CAC7B,gBAAgB,gBAAgB;CAChC,aAAa,gBAAgB;CAC7B,iBAAiB,gBAAgB;AACnC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var document_picker_exports = {};
|
|
22
|
+
__export(document_picker_exports, { DocumentPicker: () => DocumentPicker });
|
|
23
|
+
module.exports = __toCommonJS(document_picker_exports);
|
|
24
|
+
var import_options = require("./options.cjs");
|
|
25
|
+
function pickFiles(accept, multiple) {
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
const input = document.createElement("input");
|
|
28
|
+
input.type = "file";
|
|
29
|
+
input.accept = accept;
|
|
30
|
+
input.multiple = multiple;
|
|
31
|
+
input.onchange = () => resolve(input.files ? [...input.files] : []);
|
|
32
|
+
input.addEventListener("cancel", () => resolve(null));
|
|
33
|
+
input.click();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function getDocument(options = {}) {
|
|
37
|
+
const resolved = (0, import_options.resolveDocumentPickerOptions)(options);
|
|
38
|
+
if (typeof document === "undefined") {
|
|
39
|
+
return Promise.reject(new Error("DocumentPicker.getDocument needs an iOS or Android build"));
|
|
40
|
+
}
|
|
41
|
+
const accept = resolved.types.includes("*/*") ? "" : resolved.types.join(",");
|
|
42
|
+
return pickFiles(accept, resolved.multiple).then((files) => {
|
|
43
|
+
if (!files || files.length === 0) return {
|
|
44
|
+
canceled: true,
|
|
45
|
+
assets: null
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
canceled: false,
|
|
49
|
+
assets: files.map((file) => ({
|
|
50
|
+
uri: URL.createObjectURL(file),
|
|
51
|
+
name: file.name,
|
|
52
|
+
mimeType: file.type || void 0,
|
|
53
|
+
size: file.size
|
|
54
|
+
}))
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const DocumentPicker = Object.freeze({ getDocument });
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var index_native_exports = {};
|
|
24
|
+
__export(index_native_exports, { DocumentPicker: () => DocumentPicker });
|
|
25
|
+
module.exports = __toCommonJS(index_native_exports);
|
|
26
|
+
var import_react_native_nitro_modules = require("react-native-nitro-modules");
|
|
27
|
+
var import_nativeError = require("../nativeError.native.js");
|
|
28
|
+
var import_options = require("./options.native.js");
|
|
29
|
+
var hybrid;
|
|
30
|
+
function native(verb) {
|
|
31
|
+
if (hybrid === void 0) {
|
|
32
|
+
hybrid = import_react_native_nitro_modules.NitroModules.hasHybridObject("OneDocumentPicker") ? import_react_native_nitro_modules.NitroModules.createHybridObject("OneDocumentPicker") : null;
|
|
33
|
+
}
|
|
34
|
+
if (!hybrid) {
|
|
35
|
+
throw new Error(`DocumentPicker.${verb} needs a native build`);
|
|
36
|
+
}
|
|
37
|
+
return hybrid;
|
|
38
|
+
}
|
|
39
|
+
function toResult(result) {
|
|
40
|
+
if (result.canceled) return {
|
|
41
|
+
canceled: true,
|
|
42
|
+
assets: null
|
|
43
|
+
};
|
|
44
|
+
if (!result.assets) {
|
|
45
|
+
throw new Error("DocumentPicker: native returned a pick without assets");
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
canceled: false,
|
|
49
|
+
assets: result.assets
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function getDocument() {
|
|
53
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
54
|
+
var resolved = (0, import_options.resolveDocumentPickerOptions)(options);
|
|
55
|
+
return native("getDocument").getDocument(resolved).then(toResult, import_nativeError.rethrowNativeError);
|
|
56
|
+
}
|
|
57
|
+
var DocumentPicker = Object.freeze({ getDocument });
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var index_native_exports = {};
|
|
24
|
+
__export(index_native_exports, { DocumentPicker: () => DocumentPicker });
|
|
25
|
+
module.exports = __toCommonJS(index_native_exports);
|
|
26
|
+
var import_react_native_nitro_modules = require("react-native-nitro-modules");
|
|
27
|
+
var import_nativeError = require("../nativeError.native.js");
|
|
28
|
+
var import_options = require("./options.native.js");
|
|
29
|
+
var hybrid;
|
|
30
|
+
function native(verb) {
|
|
31
|
+
if (hybrid === void 0) {
|
|
32
|
+
hybrid = import_react_native_nitro_modules.NitroModules.hasHybridObject("OneDocumentPicker") ? import_react_native_nitro_modules.NitroModules.createHybridObject("OneDocumentPicker") : null;
|
|
33
|
+
}
|
|
34
|
+
if (!hybrid) {
|
|
35
|
+
throw new Error(`DocumentPicker.${verb} needs a native build`);
|
|
36
|
+
}
|
|
37
|
+
return hybrid;
|
|
38
|
+
}
|
|
39
|
+
function toResult(result) {
|
|
40
|
+
if (result.canceled) return {
|
|
41
|
+
canceled: true,
|
|
42
|
+
assets: null
|
|
43
|
+
};
|
|
44
|
+
if (!result.assets) {
|
|
45
|
+
throw new Error("DocumentPicker: native returned a pick without assets");
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
canceled: false,
|
|
49
|
+
assets: result.assets
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function getDocument() {
|
|
53
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
54
|
+
var resolved = (0, import_options.resolveDocumentPickerOptions)(options);
|
|
55
|
+
return native("getDocument").getDocument(resolved).then(toResult, import_nativeError.rethrowNativeError);
|
|
56
|
+
}
|
|
57
|
+
var DocumentPicker = Object.freeze({ getDocument });
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/platform/document-picker/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_native_exports = {};\n__export(index_native_exports, {\n DocumentPicker: () => DocumentPicker\n});\nmodule.exports = __toCommonJS(index_native_exports);\nvar import_react_native_nitro_modules = require(\"react-native-nitro-modules\");\nvar import_nativeError = require(\"../nativeError\");\nvar import_options = require(\"./options\");\nvar hybrid;\nfunction native(verb) {\n if (hybrid === void 0) {\n hybrid = import_react_native_nitro_modules.NitroModules.hasHybridObject(\"OneDocumentPicker\") ? import_react_native_nitro_modules.NitroModules.createHybridObject(\"OneDocumentPicker\") : null;\n }\n if (!hybrid) {\n throw new Error(`DocumentPicker.${verb} needs a native build`);\n }\n return hybrid;\n}\nfunction toResult(result) {\n if (result.canceled) return {\n canceled: true,\n assets: null\n };\n if (!result.assets) {\n throw new Error(\"DocumentPicker: native returned a pick without assets\");\n }\n return {\n canceled: false,\n assets: result.assets\n };\n}\nfunction getDocument() {\n var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var resolved = (0, import_options.resolveDocumentPickerOptions)(options);\n return native(\"getDocument\").getDocument(resolved).then(toResult, import_nativeError.rethrowNativeError);\n}\nvar DocumentPicker = Object.freeze({\n getDocument\n});\n//# sourceMappingURL=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CACA,IAAI,CAAC,OAAO,QAAQ;EAClB,MAAM,IAAI,MAAM,uDAAuD;CACzE;CACA,OAAO;EACL,UAAU;EACV,QAAQ,OAAO;CACjB;AACF;AACA,SAAS,cAAc;CACrB,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAChF,IAAI,YAAY,GAAG,eAAe,6BAA4B,CAAE,OAAO;CACvE,OAAO,OAAO,aAAa,CAAC,CAAC,YAAY,QAAQ,CAAC,CAAC,KAAK,UAAU,mBAAmB,kBAAkB;AACzG;AACA,IAAI,iBAAiB,OAAO,OAAO,EACjC,YACF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var options_exports = {};
|
|
22
|
+
__export(options_exports, { resolveDocumentPickerOptions: () => resolveDocumentPickerOptions });
|
|
23
|
+
module.exports = __toCommonJS(options_exports);
|
|
24
|
+
function resolveDocumentPickerOptions(options = {}) {
|
|
25
|
+
const { type = "*/*", multiple = false } = options;
|
|
26
|
+
const list = Array.isArray(type) ? type : [type];
|
|
27
|
+
if (list.length === 0) {
|
|
28
|
+
throw new Error("DocumentPicker type must list at least one mime type");
|
|
29
|
+
}
|
|
30
|
+
for (const mimeType of list) {
|
|
31
|
+
if (typeof mimeType !== "string" || !/^[^\s/]+\/[^\s/]+$/.test(mimeType)) {
|
|
32
|
+
throw new Error(`DocumentPicker type must be a mime type like 'application/pdf' or 'image/*', got '${String(mimeType)}'`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (typeof multiple !== "boolean") {
|
|
36
|
+
throw new Error(`DocumentPicker multiple must be a boolean, got '${String(multiple)}'`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
types: [...new Set(list.map((mimeType) => mimeType.toLowerCase()))],
|
|
40
|
+
multiple
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var options_exports = {};
|
|
24
|
+
__export(options_exports, { resolveDocumentPickerOptions: () => resolveDocumentPickerOptions });
|
|
25
|
+
module.exports = __toCommonJS(options_exports);
|
|
26
|
+
function resolveDocumentPickerOptions() {
|
|
27
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
28
|
+
var { type = "*/*", multiple = false } = options;
|
|
29
|
+
var list = Array.isArray(type) ? type : [type];
|
|
30
|
+
if (list.length === 0) {
|
|
31
|
+
throw new Error("DocumentPicker type must list at least one mime type");
|
|
32
|
+
}
|
|
33
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
34
|
+
try {
|
|
35
|
+
for (var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
36
|
+
var mimeType = _step.value;
|
|
37
|
+
if (typeof mimeType !== "string" || !/^[^\s/]+\/[^\s/]+$/.test(mimeType)) {
|
|
38
|
+
throw new Error(`DocumentPicker type must be a mime type like 'application/pdf' or 'image/*', got '${String(mimeType)}'`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
_didIteratorError = true;
|
|
43
|
+
_iteratorError = err;
|
|
44
|
+
} finally {
|
|
45
|
+
try {
|
|
46
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
47
|
+
_iterator.return();
|
|
48
|
+
}
|
|
49
|
+
} finally {
|
|
50
|
+
if (_didIteratorError) {
|
|
51
|
+
throw _iteratorError;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (typeof multiple !== "boolean") {
|
|
56
|
+
throw new Error(`DocumentPicker multiple must be a boolean, got '${String(multiple)}'`);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
types: [...new Set(list.map(function(mimeType2) {
|
|
60
|
+
return mimeType2.toLowerCase();
|
|
61
|
+
}))],
|
|
62
|
+
multiple
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var options_exports = {};
|
|
24
|
+
__export(options_exports, { resolveDocumentPickerOptions: () => resolveDocumentPickerOptions });
|
|
25
|
+
module.exports = __toCommonJS(options_exports);
|
|
26
|
+
function resolveDocumentPickerOptions() {
|
|
27
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
28
|
+
var { type = "*/*", multiple = false } = options;
|
|
29
|
+
var list = Array.isArray(type) ? type : [type];
|
|
30
|
+
if (list.length === 0) {
|
|
31
|
+
throw new Error("DocumentPicker type must list at least one mime type");
|
|
32
|
+
}
|
|
33
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
34
|
+
try {
|
|
35
|
+
for (var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
36
|
+
var mimeType = _step.value;
|
|
37
|
+
if (typeof mimeType !== "string" || !/^[^\s/]+\/[^\s/]+$/.test(mimeType)) {
|
|
38
|
+
throw new Error(`DocumentPicker type must be a mime type like 'application/pdf' or 'image/*', got '${String(mimeType)}'`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
_didIteratorError = true;
|
|
43
|
+
_iteratorError = err;
|
|
44
|
+
} finally {
|
|
45
|
+
try {
|
|
46
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
47
|
+
_iterator.return();
|
|
48
|
+
}
|
|
49
|
+
} finally {
|
|
50
|
+
if (_didIteratorError) {
|
|
51
|
+
throw _iteratorError;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (typeof multiple !== "boolean") {
|
|
56
|
+
throw new Error(`DocumentPicker multiple must be a boolean, got '${String(multiple)}'`);
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
types: [...new Set(list.map(function(mimeType2) {
|
|
60
|
+
return mimeType2.toLowerCase();
|
|
61
|
+
}))],
|
|
62
|
+
multiple
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=options.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.native.js","names":[],"sources":["cjs/platform/document-picker/options.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar options_exports = {};\n__export(options_exports, {\n resolveDocumentPickerOptions: () => resolveDocumentPickerOptions\n});\nmodule.exports = __toCommonJS(options_exports);\nfunction resolveDocumentPickerOptions() {\n var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var { type = \"*/*\", multiple = false } = options;\n var list = Array.isArray(type) ? type : [\n type\n ];\n if (list.length === 0) {\n throw new Error(\"DocumentPicker type must list at least one mime type\");\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var mimeType = _step.value;\n if (typeof mimeType !== \"string\" || !/^[^\\s/]+\\/[^\\s/]+$/.test(mimeType)) {\n throw new Error(`DocumentPicker type must be a mime type like 'application/pdf' or 'image/*', got '${String(mimeType)}'`);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (typeof multiple !== \"boolean\") {\n throw new Error(`DocumentPicker multiple must be a boolean, got '${String(multiple)}'`);\n }\n return {\n types: [\n ...new Set(list.map(function(mimeType2) {\n return mimeType2.toLowerCase();\n }))\n ],\n multiple\n };\n}\n//# sourceMappingURL=options.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,Q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E,EAAE;GAC1H;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,IAAI,OAAO,aAAa,WAAW;EACjC,MAAM,IAAI,MAAM,mDAAmD,OAAO,QAAQ,EAAE,EAAE;CACxF;CACA,OAAO;EACL,OAAO,CACL,GAAG,IAAI,IAAI,KAAK,IAAI,SAAS,WAAW;GACtC,OAAO,UAAU,YAAY;EAC/B,CAAC,CAAC,CACJ;EACA;CACF;AACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=types.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.native.js","names":[],"sources":["cjs/platform/document-picker/types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar types_exports = {};\nmodule.exports = __toCommonJS(types_exports);\n//# sourceMappingURL=types.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa"}
|
|
@@ -31,6 +31,7 @@ __export(platform_exports, {
|
|
|
31
31
|
Compose: () => import_compose.Compose,
|
|
32
32
|
ContextMenu: () => ContextMenu,
|
|
33
33
|
Database: () => import_database.Database,
|
|
34
|
+
DocumentPicker: () => import_document_picker.DocumentPicker,
|
|
34
35
|
Haptics: () => import_haptics.Haptics,
|
|
35
36
|
ImagePicker: () => import_image_picker.ImagePicker,
|
|
36
37
|
LiveActivities: () => import_widgets.LiveActivities,
|
|
@@ -62,6 +63,7 @@ var import_TextInput = require("./universal/TextInput/index.cjs");
|
|
|
62
63
|
var import_haptics = require("./haptics/index.cjs");
|
|
63
64
|
var import_app_info = require("./app-info/index.cjs");
|
|
64
65
|
var import_image_picker = require("./image-picker/index.cjs");
|
|
66
|
+
var import_document_picker = require("./document-picker/index.cjs");
|
|
65
67
|
var import_database = require("./database/index.cjs");
|
|
66
68
|
const Menu = import_unsupported.Swift.Menu;
|
|
67
69
|
const ContextMenu = import_unsupported.Swift.ContextMenu;
|