@communi/chat-react-native 3.1.12 → 4.0.0
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/build.gradle +14 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/com/piscale/reactnative/chat/files/CachedFileDownloadsModule.java +212 -0
- package/android/src/main/java/com/piscale/reactnative/chat/files/CachedFileDownloadsPackage.java +20 -0
- package/index.js +1 -1
- package/package.json +13 -13
- package/react-native.config.js +12 -0
- package/src/PSChat.d.ts +14 -0
- package/src/PSChat.js +1 -0
- package/src/files/PSFileOpenProvider.d.ts +9 -0
- package/src/files/PSFileOpenProvider.js +1 -0
- package/src/files/saveCachedFileToDownloads.d.ts +2 -0
- package/src/files/saveCachedFileToDownloads.js +1 -0
- package/src/handlers/DatePicker.js +1 -1
- package/src/handlers/Keyboard.js +1 -1
- package/src/handlers/MQTT.js +1 -1
- package/src/handlers/Video.js +1 -1
- package/src/handlers/deleteFile.js +1 -1
- package/src/handlers/getAlbums.d.ts +1 -1
- package/src/handlers/getAlbums.js +1 -1
- package/src/handlers/getLocalAssetUri.js +1 -1
- package/src/handlers/getPhotos.d.ts +1 -1
- package/src/handlers/getPhotos.js +1 -1
- package/src/handlers/iOS14RefreshGallerySelection.js +1 -1
- package/src/handlers/index.js +1 -1
- package/src/handlers/isExistFile.js +1 -1
- package/src/handlers/oniOS14GalleryLibrarySelectionChange.js +1 -1
- package/src/handlers/pickDocument.js +1 -1
- package/src/handlers/pickPhoto.js +1 -1
- package/src/handlers/saveFile.d.ts +1 -1
- package/src/handlers/saveFile.js +1 -1
- package/src/handlers/setClipboardString.js +1 -1
- package/src/handlers/shareImage.d.ts +2 -2
- package/src/handlers/shareImage.js +1 -1
- package/src/handlers/takePhoto.js +1 -1
- package/src/handlers/triggerHaptic.js +1 -1
- package/src/index.d.ts +3 -0
- package/src/index.js +1 -1
- package/src/optionalDependencies/DatePicker.js +1 -1
- package/src/optionalDependencies/Video.js +1 -1
- package/src/optionalDependencies/index.js +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
apply plugin: "com.android.library"
|
|
2
|
+
|
|
3
|
+
android {
|
|
4
|
+
namespace "com.piscale.reactnative.chat.files"
|
|
5
|
+
compileSdkVersion rootProject.ext.has("compileSdkVersion") ? rootProject.ext.compileSdkVersion : 36
|
|
6
|
+
defaultConfig {
|
|
7
|
+
minSdkVersion 24
|
|
8
|
+
targetSdkVersion rootProject.ext.has("targetSdkVersion") ? rootProject.ext.targetSdkVersion : 36
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
dependencies {
|
|
13
|
+
implementation("com.facebook.react:react-android")
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
|
3
|
+
<queries>
|
|
4
|
+
<intent>
|
|
5
|
+
<action android:name="android.intent.action.VIEW" />
|
|
6
|
+
<data android:mimeType="*/*" />
|
|
7
|
+
</intent>
|
|
8
|
+
</queries>
|
|
9
|
+
</manifest>
|
package/android/src/main/java/com/piscale/reactnative/chat/files/CachedFileDownloadsModule.java
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
package com.piscale.reactnative.chat.files;
|
|
2
|
+
|
|
3
|
+
import android.content.ContentResolver;
|
|
4
|
+
import android.content.ContentValues;
|
|
5
|
+
import android.content.Intent;
|
|
6
|
+
import android.app.Activity;
|
|
7
|
+
import android.media.MediaScannerConnection;
|
|
8
|
+
import android.net.Uri;
|
|
9
|
+
import android.os.Build;
|
|
10
|
+
import android.os.Environment;
|
|
11
|
+
import android.os.ParcelFileDescriptor;
|
|
12
|
+
import android.provider.MediaStore;
|
|
13
|
+
import android.provider.Settings;
|
|
14
|
+
import android.webkit.MimeTypeMap;
|
|
15
|
+
import com.facebook.react.bridge.Promise;
|
|
16
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
17
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
18
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
19
|
+
import com.facebook.react.bridge.BaseActivityEventListener;
|
|
20
|
+
import java.io.File;
|
|
21
|
+
import java.io.FileInputStream;
|
|
22
|
+
import java.io.FileOutputStream;
|
|
23
|
+
import java.io.IOException;
|
|
24
|
+
import java.io.OutputStream;
|
|
25
|
+
import java.util.Locale;
|
|
26
|
+
import java.util.concurrent.ExecutorService;
|
|
27
|
+
import java.util.concurrent.Executors;
|
|
28
|
+
|
|
29
|
+
public class CachedFileDownloadsModule extends ReactContextBaseJavaModule {
|
|
30
|
+
private static final int INSTALL_PERMISSION_REQUEST = 48173;
|
|
31
|
+
private Promise installPermissionPromise;
|
|
32
|
+
private final ExecutorService executor = Executors.newSingleThreadExecutor();
|
|
33
|
+
private final BaseActivityEventListener activityListener = new BaseActivityEventListener() {
|
|
34
|
+
@Override
|
|
35
|
+
public void onActivityResult(Activity activity, int requestCode, int resultCode, Intent data) {
|
|
36
|
+
if (requestCode == INSTALL_PERMISSION_REQUEST && installPermissionPromise != null) {
|
|
37
|
+
Promise pending = installPermissionPromise;
|
|
38
|
+
installPermissionPromise = null;
|
|
39
|
+
pending.resolve(canInstallPackages());
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
CachedFileDownloadsModule(ReactApplicationContext context) {
|
|
45
|
+
super(context);
|
|
46
|
+
context.addActivityEventListener(activityListener);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@Override
|
|
50
|
+
public String getName() { return "CachedFileDownloads"; }
|
|
51
|
+
|
|
52
|
+
@Override
|
|
53
|
+
public void invalidate() {
|
|
54
|
+
getReactApplicationContext().removeActivityEventListener(activityListener);
|
|
55
|
+
if (installPermissionPromise != null) {
|
|
56
|
+
installPermissionPromise.reject("E_INSTALL_PERMISSION", "React instance was destroyed");
|
|
57
|
+
installPermissionPromise = null;
|
|
58
|
+
}
|
|
59
|
+
executor.shutdown();
|
|
60
|
+
super.invalidate();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private boolean canInstallPackages() {
|
|
64
|
+
return Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
|
65
|
+
|| getReactApplicationContext().getPackageManager().canRequestPackageInstalls();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@ReactMethod
|
|
69
|
+
public void ensureInstallPermission(Promise promise) {
|
|
70
|
+
getReactApplicationContext().runOnUiQueueThread(() -> {
|
|
71
|
+
try {
|
|
72
|
+
if (canInstallPackages()) {
|
|
73
|
+
promise.resolve(true);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
Activity activity = getCurrentActivity();
|
|
77
|
+
if (activity == null) throw new IllegalStateException("No foreground activity");
|
|
78
|
+
if (installPermissionPromise != null) {
|
|
79
|
+
promise.reject("E_INSTALL_PERMISSION", "Permission request is already in progress");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
installPermissionPromise = promise;
|
|
83
|
+
Intent intent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES,
|
|
84
|
+
Uri.parse("package:" + getReactApplicationContext().getPackageName()));
|
|
85
|
+
activity.startActivityForResult(intent, INSTALL_PERMISSION_REQUEST);
|
|
86
|
+
} catch (Exception error) {
|
|
87
|
+
installPermissionPromise = null;
|
|
88
|
+
promise.reject("E_INSTALL_PERMISSION", error);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@ReactMethod
|
|
94
|
+
public void save(String path, Promise promise) {
|
|
95
|
+
saveTracked(path, path, promise);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@ReactMethod
|
|
99
|
+
public void isSaved(String fileId, Promise promise) {
|
|
100
|
+
executor.execute(() -> {
|
|
101
|
+
String location = getReactApplicationContext()
|
|
102
|
+
.getSharedPreferences("message_downloads", 0).getString(fileId, null);
|
|
103
|
+
if (location == null) {
|
|
104
|
+
promise.resolve(false);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
// Check the exported copy, not the cache or just our saved flag.
|
|
108
|
+
try (ParcelFileDescriptor descriptor = getReactApplicationContext()
|
|
109
|
+
.getContentResolver().openFileDescriptor(Uri.parse(location), "r")) {
|
|
110
|
+
promise.resolve(descriptor != null);
|
|
111
|
+
} catch (Exception error) {
|
|
112
|
+
// Keep the URI: access can be temporarily denied on older Android.
|
|
113
|
+
promise.resolve(false);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@ReactMethod
|
|
119
|
+
public void saveTracked(String path, String fileId, Promise promise) {
|
|
120
|
+
executor.execute(() -> {
|
|
121
|
+
try {
|
|
122
|
+
// downloadFile uses literal encoded names, whereas a file URI from
|
|
123
|
+
// other RNFS operations can point to a decoded name. Prefer the exact
|
|
124
|
+
// file, then try URI decoding only if that file does not exist.
|
|
125
|
+
String rawPath = path.startsWith("file://") ? path.substring(7) : path;
|
|
126
|
+
File source = new File(rawPath).getCanonicalFile();
|
|
127
|
+
if (!source.isFile()) source = new File(Uri.decode(rawPath)).getCanonicalFile();
|
|
128
|
+
String cacheRoot = getReactApplicationContext().getCacheDir().getCanonicalPath();
|
|
129
|
+
if (!source.getPath().startsWith(cacheRoot + File.separator)
|
|
130
|
+
|| !source.isFile() || !source.canRead()) {
|
|
131
|
+
throw new IOException("Cached file is missing or unreadable");
|
|
132
|
+
}
|
|
133
|
+
String name = Uri.decode(source.getName()).replaceAll("[/\\\\\\p{Cntrl}]", "_");
|
|
134
|
+
if (name.isEmpty() || name.equals(".") || name.equals("..")) name = "file";
|
|
135
|
+
int dot = name.lastIndexOf('.');
|
|
136
|
+
String extension = dot >= 0 ? name.substring(dot + 1).toLowerCase(Locale.ROOT) : "";
|
|
137
|
+
String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
|
138
|
+
if (mime == null) mime = "application/octet-stream";
|
|
139
|
+
Uri destination = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
|
|
140
|
+
? saveMediaStore(source, name, mime) : saveLegacy(source, name, mime);
|
|
141
|
+
getReactApplicationContext().getSharedPreferences("message_downloads", 0)
|
|
142
|
+
.edit().putString(fileId, destination.toString()).apply();
|
|
143
|
+
promise.resolve(destination.toString());
|
|
144
|
+
} catch (Exception error) {
|
|
145
|
+
promise.reject("E_SAVE_DOWNLOADS", "Could not save cached file to Downloads", error);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
private Uri saveMediaStore(File source, String name, String mime) throws IOException {
|
|
151
|
+
ContentResolver resolver = getReactApplicationContext().getContentResolver();
|
|
152
|
+
ContentValues values = new ContentValues();
|
|
153
|
+
values.put(MediaStore.MediaColumns.DISPLAY_NAME, name);
|
|
154
|
+
values.put(MediaStore.MediaColumns.MIME_TYPE, mime);
|
|
155
|
+
values.put(MediaStore.MediaColumns.RELATIVE_PATH, Environment.DIRECTORY_DOWNLOADS);
|
|
156
|
+
values.put(MediaStore.MediaColumns.IS_PENDING, 1);
|
|
157
|
+
Uri uri = resolver.insert(MediaStore.Downloads.EXTERNAL_CONTENT_URI, values);
|
|
158
|
+
if (uri == null) throw new IOException("Could not create Downloads entry");
|
|
159
|
+
try {
|
|
160
|
+
try (OutputStream output = resolver.openOutputStream(uri)) {
|
|
161
|
+
if (output == null) throw new IOException("Could not open Downloads entry");
|
|
162
|
+
copy(source, output);
|
|
163
|
+
}
|
|
164
|
+
values.clear();
|
|
165
|
+
values.put(MediaStore.MediaColumns.IS_PENDING, 0);
|
|
166
|
+
if (resolver.update(uri, values, null, null) != 1) {
|
|
167
|
+
throw new IOException("Could not publish Downloads entry");
|
|
168
|
+
}
|
|
169
|
+
return uri;
|
|
170
|
+
} catch (Exception error) {
|
|
171
|
+
// Never leave a partial download visible after a failed copy.
|
|
172
|
+
try { resolver.delete(uri, null, null); } catch (Exception cleanupError) {
|
|
173
|
+
error.addSuppressed(cleanupError);
|
|
174
|
+
}
|
|
175
|
+
throw error;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@SuppressWarnings("deprecation")
|
|
180
|
+
private Uri saveLegacy(File source, String name, String mime) throws IOException {
|
|
181
|
+
File directory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
|
182
|
+
if (!directory.isDirectory() && !directory.mkdirs()) {
|
|
183
|
+
throw new IOException("Could not create Downloads directory");
|
|
184
|
+
}
|
|
185
|
+
int dot = name.lastIndexOf('.');
|
|
186
|
+
String stem = dot > 0 ? name.substring(0, dot) : name;
|
|
187
|
+
String suffix = dot > 0 ? name.substring(dot) : "";
|
|
188
|
+
File destination = new File(directory, name);
|
|
189
|
+
int number = 1;
|
|
190
|
+
while (!destination.createNewFile()) {
|
|
191
|
+
destination = new File(directory, stem + " (" + number++ + ")" + suffix);
|
|
192
|
+
}
|
|
193
|
+
try (OutputStream output = new FileOutputStream(destination)) {
|
|
194
|
+
copy(source, output);
|
|
195
|
+
} catch (IOException error) {
|
|
196
|
+
if (!destination.delete()) error.addSuppressed(new IOException("Partial file cleanup failed"));
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
199
|
+
MediaScannerConnection.scanFile(getReactApplicationContext(),
|
|
200
|
+
new String[]{destination.getAbsolutePath()}, new String[]{mime}, null);
|
|
201
|
+
return Uri.fromFile(destination);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
private void copy(File source, OutputStream output) throws IOException {
|
|
205
|
+
try (FileInputStream input = new FileInputStream(source)) {
|
|
206
|
+
byte[] buffer = new byte[8192];
|
|
207
|
+
int count;
|
|
208
|
+
while ((count = input.read(buffer)) != -1) output.write(buffer, 0, count);
|
|
209
|
+
output.flush();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
package/android/src/main/java/com/piscale/reactnative/chat/files/CachedFileDownloadsPackage.java
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
package com.piscale.reactnative.chat.files;
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.ReactPackage;
|
|
4
|
+
import com.facebook.react.bridge.NativeModule;
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
6
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
7
|
+
import java.util.Collections;
|
|
8
|
+
import java.util.List;
|
|
9
|
+
|
|
10
|
+
public class CachedFileDownloadsPackage implements ReactPackage {
|
|
11
|
+
@Override
|
|
12
|
+
public List<NativeModule> createNativeModules(ReactApplicationContext context) {
|
|
13
|
+
return Collections.singletonList(new CachedFileDownloadsModule(context));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@Override
|
|
17
|
+
public List<ViewManager> createViewManagers(ReactApplicationContext context) {
|
|
18
|
+
return Collections.emptyList();
|
|
19
|
+
}
|
|
20
|
+
}
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(f,E){var j=w,P=f();while(!![]){try{var I=-parseInt(j(0x164))/0x1+-parseInt(j(0x168))/0x2+-parseInt(j(0x165))/0x3*(-parseInt(j(0x169))/0x4)+-parseInt(j(0x167))/0x5*(parseInt(j(0x163))/0x6)+-parseInt(j(0x16b))/0x7*(parseInt(j(0x16a))/0x8)+-parseInt(j(0x166))/0x9+parseInt(j(0x162))/0xa;if(I===E)break;else P['push'](P['shift']());}catch(z){P['push'](P['shift']());}}}(A,0xb77ec));function A(){var q=['105KBpKOY','44181480VxHCIo','281022uBwDLn','562995gvrfXA','52797lAUOSM','11555946OsirAA','135uxZJdG','689068WzIewI','20USWnWh','159160MuNGQH'];A=function(){return q;};return A();}function w(f,E){var P=A();return w=function(I,z){I=I-0x162;var j=P[I];return j;},w(f,E);}export*from'./src';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@communi/chat-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "PiScale Chat React Native",
|
|
5
5
|
"homepage": "https://github.com/piscale",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,19 +8,18 @@
|
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"types": "index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@communi/chat-api-client-typescript": "^
|
|
12
|
-
"@communi/chat-ui-react-native": "^
|
|
13
|
-
"@communi/keyboard-area-react-native": "^
|
|
14
|
-
"@communi/mqtt-client-interface-typescript": "^
|
|
15
|
-
"@communi/mqtt-client-react-native": "^
|
|
11
|
+
"@communi/chat-api-client-typescript": "^3.0.0",
|
|
12
|
+
"@communi/chat-ui-react-native": "^4.0.0",
|
|
13
|
+
"@communi/keyboard-area-react-native": "^3.0.0",
|
|
14
|
+
"@communi/mqtt-client-interface-typescript": "^3.0.0",
|
|
15
|
+
"@communi/mqtt-client-react-native": "^3.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@react-native-camera-roll/camera-roll": "^7.2.0",
|
|
19
19
|
"@react-native-clipboard/clipboard": "^1.13.0",
|
|
20
|
-
"@types/react": "
|
|
21
|
-
"
|
|
22
|
-
"react": "
|
|
23
|
-
"react-native": "0.72.6",
|
|
20
|
+
"@types/react": "19.2.18",
|
|
21
|
+
"react": "19.2.0",
|
|
22
|
+
"react-native": "0.83.10",
|
|
24
23
|
"react-native-date-picker": ">=4.2.13",
|
|
25
24
|
"@react-native-documents/picker": ">=10.1.2",
|
|
26
25
|
"react-native-fs": ">=2.16.6",
|
|
@@ -32,18 +31,19 @@
|
|
|
32
31
|
"@react-native-camera-roll/camera-roll": ">=5.10.0",
|
|
33
32
|
"@react-native-clipboard/clipboard": "*",
|
|
34
33
|
"react": "*",
|
|
35
|
-
"react-native": "0.
|
|
34
|
+
"react-native": ">=0.83.0",
|
|
36
35
|
"react-native-date-picker": ">=4.2.13",
|
|
37
36
|
"@react-native-documents/picker": ">=10.1.2",
|
|
38
37
|
"react-native-fs": ">=2.16.6",
|
|
39
38
|
"react-native-haptic-feedback": "*",
|
|
40
39
|
"react-native-image-crop-picker": ">=0.33.2",
|
|
41
40
|
"react-native-share": ">=4.1.0",
|
|
42
|
-
"react-native-video": ">=5.2.1"
|
|
41
|
+
"react-native-video": ">=5.2.1",
|
|
42
|
+
"react-native-file-viewer": "2.1.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"react-native-date-picker": {
|
|
46
46
|
"optional": true
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
dependency: {
|
|
3
|
+
platforms: {
|
|
4
|
+
android: {
|
|
5
|
+
sourceDir: './android',
|
|
6
|
+
packageImportPath: 'import com.piscale.reactnative.chat.files.CachedFileDownloadsPackage;',
|
|
7
|
+
packageInstance: 'new CachedFileDownloadsPackage()',
|
|
8
|
+
},
|
|
9
|
+
ios: null,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
package/src/PSChat.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PSChatProps as ChatUIProps, PSFileActionColors } from '@communi/chat-ui-react-native';
|
|
3
|
+
export type PSChatProps = ChatUIProps & {
|
|
4
|
+
fileActions?: {
|
|
5
|
+
/** Disable SDK file defaults; explicit screen callbacks still work. */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
colors?: PSFileActionColors;
|
|
8
|
+
/** Android only. The host must declare REQUEST_INSTALL_PACKAGES to opt in. */
|
|
9
|
+
allowApkInstallation?: boolean;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare function PSChat({ props, children, }: React.PropsWithChildren<{
|
|
13
|
+
props: PSChatProps;
|
|
14
|
+
}>): React.JSX.Element;
|
package/src/PSChat.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';(function(I,z){const m=w,j=I();while(!![]){try{const q=parseInt(m(0x89))/0x1*(parseInt(m(0x92))/0x2)+parseInt(m(0x90))/0x3+parseInt(m(0x98))/0x4*(-parseInt(m(0x99))/0x5)+parseInt(m(0x96))/0x6*(parseInt(m(0x91))/0x7)+-parseInt(m(0x8a))/0x8*(parseInt(m(0x93))/0x9)+-parseInt(m(0x8b))/0xa+parseInt(m(0x9b))/0xb;if(q===z)break;else j['push'](j['shift']());}catch(L){j['push'](j['shift']());}}}(A,0xb683d));function w(f,E){const P=A();return w=function(I,z){I=I-0x89;let j=P[I];return j;},w(f,E);}import f from'react';function A(){const V=['6shRFuX','3600747VUavsS','ation','eElem','42nMDQZa','enabl','2902424RBHvuv','5tLDbKr','stall','13813580ndGOrW','ApkIn','32919JpqqmR','8qizKVX','8772890lYOJTr','color','ent','creat','allow','2865171wqokSv','440965UdJzkn'];A=function(){return V;};return A();}import{PSChat as E}from'@communi/chat-ui-react-native';import{PSFileOpenProvider as P}from'./files/PSFileOpenProvider';export function PSChat({props:I,children:z}){const N=w,{fileActions:j,...q}=I;return f[N(0x8e)+N(0x95)+N(0x8d)](E,{'props':q},j?.[N(0x97)+'ed']===!0x1?z:f[N(0x8e)+N(0x95)+N(0x8d)](P,{'allowApkInstallation':j?.[N(0x8f)+N(0x9c)+N(0x9a)+N(0x94)]??!0x1,'colors':j?.[N(0x8c)+'s']},z));}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PSFileActionColors } from '@communi/chat-ui-react-native';
|
|
3
|
+
export declare const useOpenMessageFile: () => (path: string, fileId?: string) => Promise<void>;
|
|
4
|
+
export declare const useSaveMessageFile: () => (path: string, fileId?: string) => Promise<void>;
|
|
5
|
+
export declare const useIsMessageFileSaved: () => (fileId: string) => Promise<boolean>;
|
|
6
|
+
export declare function PSFileOpenProvider({ children, allowApkInstallation, colors: fileColors, }: React.PropsWithChildren<{
|
|
7
|
+
allowApkInstallation?: boolean;
|
|
8
|
+
colors?: PSFileActionColors;
|
|
9
|
+
}>): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const Am=f;(function(p,k){const AL=f,v=p();while(!![]){try{const F=-parseInt(AL(0x1b4))/0x1+-parseInt(AL(0x1aa))/0x2+-parseInt(AL(0x1c3))/0x3*(-parseInt(AL(0x1f9))/0x4)+parseInt(AL(0x1ec))/0x5+-parseInt(AL(0x1be))/0x6+-parseInt(AL(0x1f2))/0x7+parseInt(AL(0x1b5))/0x8;if(F===k)break;else v['push'](v['shift']());}catch(Y){v['push'](v['shift']());}}}(w,0x6cf56));import P from'react';import{Alert as I,NativeModules as j,Platform as m,StyleSheet as d,Text as n}from'react-native';function w(){const AJ=['eSave','isFil','ve_su','useSt','4860702rCeHbO','ve_fa','openF','XLarg','ovide','978FiroXO','ryPat','Cache','700','ngLar','colum','backg','title','r\x20is\x20','geM','oadDi','headi','der','ve_pr','save','ccess','eInst','ext','useMe','FileO','show','useCa','ile','Prima','cente','heade','useCo','brand','ion','llbac','bind','catch','eCont','open','succe','ilure','alert','oads','eElem','saveF','ate','3147485CzmlVH','ve_ac','ncel','penPr','edium','subTe','4097520illWkh','ve_ca','useRe','ntext','recto','bodyM','test','9476PiUMMl','Provi','le_sa','requi','actio','red','ent','creat','allPe','ompt','774954bXwyHe','ing','dFile','error','andro','bodyX','cance','round','ps_fi','Downl','293409rbHPgI','8966928YTAMku','ensur','tion','rmiss','curre'];w=function(){return AJ;};return w();}import b from'react-native-file-viewer';import J from'react-native-fs';function f(A,E){const P=w();return f=function(I,z){I=I-0x1aa;let j=P[I];return j;},f(A,E);}import{PSFileActionsProvider as c,usePSDesignSystemContext as s,usePSTranslationContext as o,scale as G,PSFlashMessage as t,PSBottomActionSheet as y,PSBottomActionSheetSection as r,PSBottomActionSheetItem as Q}from'@communi/chat-ui-react-native';import{saveCachedFileToDownloads as U,isMessageFileSavedToDownloads as u}from'./saveCachedFileToDownloads';const O=P[Am(0x200)+Am(0x1e3)+Am(0x1d4)](void 0x0),g=()=>{const AN=Am,p=P[AN(0x1dd)+AN(0x1f5)](O);if(!p)throw new Error(AN(0x1d6)+AN(0x1ef)+AN(0x1c2)+AN(0x1cb)+AN(0x1fc)+AN(0x1fe));return p;};export const useOpenMessageFile=()=>g()[Am(0x1c0)+Am(0x1d9)],useSaveMessageFile=()=>g()[Am(0x1ea)+Am(0x1d9)],useIsMessageFileSaved=()=>g()[Am(0x1bb)+Am(0x1ba)+'d'];export function PSFileOpenProvider({children:Y,allowApkInstallation:D=!0x1,colors:Z}){const AV=Am,{translator:K}=o(),{colors:A0,typography:A1}=s(),[A2,A3]=P[AV(0x1bd)+AV(0x1eb)](),A4=P[AV(0x1f4)+'f'](void 0x0),[A5,A6]=P[AV(0x1bd)+AV(0x1eb)](0x0),A7=P[AV(0x1f4)+'f'](!0x1),A8=P[AV(0x1f4)+'f'](!0x1),A9=P[AV(0x1d8)+AV(0x1e0)+'k'](async(Az,Aj)=>{const AS=AV;if(await u(Aj??Az)[AS(0x1e2)](()=>!0x1)){A6(Aq=>Aq+0x1),A7[AS(0x1b9)+'nt']=!0x1;return;}A4[AS(0x1b9)+'nt']=Aj,A3(Az);},[]),AA=P[AV(0x1d8)+AV(0x1e0)+'k'](async(Az,Aj)=>{const Ad=AV;if(!A7[Ad(0x1b9)+'nt']){A7[Ad(0x1b9)+'nt']=!0x0,A4[Ad(0x1b9)+'nt']=Aj;try{if(m['OS']===Ad(0x1ae)+'id'&&/\.apk$/i[Ad(0x1f8)](Az)){if(!D){await A9(Az,Aj);return;}if(!await j[Ad(0x1c5)+Ad(0x1ac)+Ad(0x1b3)+Ad(0x1e8)][Ad(0x1b6)+Ad(0x1d3)+Ad(0x201)+Ad(0x1b8)+Ad(0x1df)]()){await A9(Az,Aj);return;}}await b[Ad(0x1e4)](Az),A7[Ad(0x1b9)+'nt']=!0x1;}catch(Aq){m['OS']===Ad(0x1ae)+'id'?await A9(Az,Aj):(A7[Ad(0x1b9)+'nt']=!0x1,I[Ad(0x1e7)](String(Aq)));}}},[A9,D]),Aw=()=>{const An=AV;A3(void 0x0),A7[An(0x1b9)+'nt']=!0x1;},Af=P[AV(0x1d8)+AV(0x1e0)+'k'](async(Az,Aj)=>{const Ag=AV;if(!A8[Ag(0x1b9)+'nt']){A8[Ag(0x1b9)+'nt']=!0x0;try{await U(Az,Aj),A6(Aq=>Aq+0x1),t[Ag(0x1d7)]({'type':Ag(0x1e5)+'ss','text1':K(Ag(0x1b2)+Ag(0x1fb)+Ag(0x1bc)+Ag(0x1d2)),'text2':J[Ag(0x1b3)+Ag(0x1cd)+Ag(0x1f6)+Ag(0x1c4)+'h'],'visibilityTime':0xfa0});}catch{t[Ag(0x1d7)]({'type':Ag(0x1ad),'text1':K(Ag(0x1b2)+Ag(0x1fb)+Ag(0x1bf)+Ag(0x1e6)),'visibilityTime':0xbb8});}finally{A8[Ag(0x1b9)+'nt']=!0x1;}}},[K]),AE=async()=>{const Ab=AV;if(!A2||A8[Ab(0x1b9)+'nt'])return;const Az=A2;A3(void 0x0);try{await Af(Az,A4[Ab(0x1b9)+'nt']);}finally{A7[Ab(0x1b9)+'nt']=!0x1;}},AP=P[AV(0x1d5)+'mo'](()=>u[AV(0x1e1)](null),[A5]),AI=P[AV(0x1d5)+'mo'](()=>({'openFile':AA,'saveFile':Af,'isFileSaved':AP}),[AA,Af,AP]);return P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](O[AV(0x1fa)+AV(0x1cf)],{'value':AI},P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](c,{'value':{'colors':Z,'onViewFilePress':AA,'onSaveFilePress':m['OS']===AV(0x1ae)+'id'?Af:void 0x0,'isFileSaved':m['OS']===AV(0x1ae)+'id'?AP:void 0x0}},Y),m['OS']===AV(0x1ae)+'id'&&P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](y,{'isVisible':!!A2,'onClose':Aw},P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](r,{'backgroundColor':A0[AV(0x1da)+'ry'][AV(0x1c9)+AV(0x1b1)]},P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](n,{'accessibilityRole':AV(0x1dc)+'r','style':[x[AV(0x1ca)],A1[AV(0x1f7)+AV(0x1f0)+'S'],{'color':A0[AV(0x1da)+'ry'][AV(0x1f1)+'xt']}]},K(AV(0x1b2)+AV(0x1fb)+AV(0x1d0)+AV(0x202))),P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](Q,{'title':K(AV(0x1b2)+AV(0x1fb)+AV(0x1ed)+AV(0x1b7)),'onPress':AE,'style':x[AV(0x1fd)+'n'],'textStyle':{...A1[AV(0x1ce)+AV(0x1c7)+AV(0x1cc)],'color':Z?.[AV(0x1d1)]??A0[AV(0x1da)+'ry'][AV(0x1de)+AV(0x1ab)],'fontWeight':AV(0x1c6),'marginVertical':G(0x10)}})),P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](r,{'backgroundColor':A0[AV(0x1da)+'ry'][AV(0x1c9)+AV(0x1b1)]},P[AV(0x200)+AV(0x1e9)+AV(0x1ff)](Q,{'title':K(AV(0x1b2)+AV(0x1fb)+AV(0x1f3)+AV(0x1ee)),'onPress':Aw,'style':x[AV(0x1fd)+'n'],'textStyle':{...A1[AV(0x1af)+AV(0x1c1)+'eR'],'color':Z?.[AV(0x1b0)+'l']??A0[AV(0x1da)+'ry'][AV(0x1f1)+'xt']}}))));}const x=d[Am(0x200)+'e']({'title':{'textAlign':Am(0x1db)+'r','marginHorizontal':G(0x10),'marginTop':G(0x10),'marginBottom':G(0x8)},'action':{'flexDirection':Am(0x1c8)+'n'}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function A(){var S=['saveT','oads','258kpnRNq','1264466zyajid','ge\x20pe','Stora','racke','droid','only\x20','WRITE','GRANT','2968HOGCcO','enied','dFile','42mkpAqj','_EXTE','Downl','on\x20An','3182592DbeztO','rted\x20','ion\x20d','3923910vBqIpt','PERMI','oads\x20','expor','45XELOCn','SSION','Versi','suppo','39828FkeeZL','save','RESUL','36wESGgd','RNAL_','16679421emCtnS','STORA','reque','t\x20is\x20','661DKtvEt','andro','Cache','rmiss','222710mSsQoI','isSav'];A=function(){return S;};return A();}(function(I,z){var m=w,j=I();while(!![]){try{var q=parseInt(m(0x1d6))/0x1*(-parseInt(m(0x1e7))/0x2)+parseInt(m(0x1de))/0x3*(-parseInt(m(0x1f9))/0x4)+-parseInt(m(0x1f1))/0x5+parseInt(m(0x1ea))/0x6*(-parseInt(m(0x1df))/0x7)+parseInt(m(0x1ee))/0x8+parseInt(m(0x1f5))/0x9*(-parseInt(m(0x1da))/0xa)+-parseInt(m(0x1fe))/0xb*(-parseInt(m(0x1fc))/0xc);if(q===z)break;else j['push'](j['shift']());}catch(L){j['push'](j['shift']());}}}(A,0xe7ac0));import{NativeModules as f,PermissionsAndroid as E,Platform as P}from'react-native';function w(f,E){var P=A();return w=function(I,z){I=I-0x1d5;var j=P[I];return j;},w(f,E);}export async function saveCachedFileToDownloads(I,z){var N=w;if(P['OS']!==N(0x1d7)+'id')throw new Error(N(0x1ec)+N(0x1f3)+N(0x1f4)+N(0x1d5)+N(0x1e4)+N(0x1f8)+N(0x1ef)+N(0x1ed)+N(0x1e3));if(Number(P[N(0x1f7)+'on'])<0x1d&&await E[N(0x200)+'st'](E[N(0x1f2)+N(0x1f6)+'S'][N(0x1e5)+N(0x1eb)+N(0x1fd)+N(0x1ff)+'GE'])!==E[N(0x1fb)+'TS'][N(0x1e6)+'ED'])throw new Error(N(0x1e1)+N(0x1e0)+N(0x1d9)+N(0x1f0)+N(0x1e8));return z?f[N(0x1d8)+N(0x1e9)+N(0x1ec)+N(0x1dd)][N(0x1dc)+N(0x1e2)+'d'](I,z):f[N(0x1d8)+N(0x1e9)+N(0x1ec)+N(0x1dd)][N(0x1fa)](I);}export async function isMessageFileSavedToDownloads(I){var V=w;return P['OS']!==V(0x1d7)+'id'?!0x1:f[V(0x1d8)+V(0x1e9)+V(0x1ec)+V(0x1dd)][V(0x1db)+'ed'](I);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=
|
|
1
|
+
'use strict';function A(){const n=['eElem','ent','4042192zwCKNe','216pFCDLw','2612340PeUCsx','27530fKtFAa','51090gsmJka','190062DTSyoP','48wKLueJ','5249PWyBPY','4675tpeukh','418599uUjTef','creat','44MjKoxC'];A=function(){return n;};return A();}const d=w;(function(P,I){const S=w,z=P();while(!![]){try{const j=parseInt(S(0x181))/0x1*(-parseInt(S(0x177))/0x2)+parseInt(S(0x175))/0x3+-parseInt(S(0x17c))/0x4+parseInt(S(0x17e))/0x5*(-parseInt(S(0x180))/0x6)+-parseInt(S(0x17a))/0x7+parseInt(S(0x17b))/0x8*(parseInt(S(0x17f))/0x9)+-parseInt(S(0x17d))/0xa*(-parseInt(S(0x182))/0xb);if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0x6e58d));import f from'react';function w(f,E){const P=A();return w=function(I,z){I=I-0x175;let j=P[I];return j;},w(f,E);}import{DatePickerComponent as E}from'../optionalDependencies/DatePicker';export const DatePicker=E?({modal:P,open:I,date:z,minimumDate:j,maximumDate:q,mode:L,onConfirm:N,onCancel:V})=>f[d(0x176)+d(0x178)+d(0x179)](E,{'modal':P,'open':I,'date':z,'minimumDate':j,'maximumDate':q,'mode':L,'onConfirm':N,'onCancel':V}):null;
|
package/src/handlers/Keyboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function w(f,E){const P=A();return w=function(I,z){I=I-0xba;let j=P[I];return j;},w(f,E);}function A(){const N=['setWi','440gmNqzS','oardL','_ADJU','1848219yWoolP','ndowS','INPUT','putMo','THING','oftIn','ST_NO','SIZE','11eXkGcf','ST_RE','715tRtJPV','ener','SOFT_','yboar','45pDNMGN','addKe','24370480QmpQmf','847464ckzZMR','702153pqvGJF','2BzazXf','dList','eKeyb','ST_PA','remov','1604099tQEHiv','1048734eMYEpx','isten'];A=function(){return N;};return A();}const m=w;(function(P,I){const L=w,z=P();while(!![]){try{const j=-parseInt(L(0xca))/0x1+parseInt(L(0xcb))/0x2*(-parseInt(L(0xd7))/0x3)+-parseInt(L(0xd4))/0x4*(-parseInt(L(0xc2))/0x5)+parseInt(L(0xd1))/0x6+-parseInt(L(0xd0))/0x7+-parseInt(L(0xc9))/0x8*(parseInt(L(0xc6))/0x9)+parseInt(L(0xc8))/0xa*(parseInt(L(0xc0))/0xb);if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0x86677));import{PSKeyboard as f,SoftInputMode as E}from'@communi/keyboard-area-react-native';export const addKeyboardListener=P=>f[m(0xc7)+m(0xc5)+m(0xcc)+m(0xc3)](P),removeKeyboardListener=P=>f[m(0xcf)+m(0xcd)+m(0xd5)+m(0xd2)+'er'](P),setWindowSoftInputAdjustNothing=()=>f[m(0xd3)+m(0xd8)+m(0xbd)+m(0xbb)+'de'](E[m(0xc4)+m(0xba)+m(0xd6)+m(0xbe)+m(0xbc)]),setWindowSoftInputAdjustResize=()=>f[m(0xd3)+m(0xd8)+m(0xbd)+m(0xbb)+'de'](E[m(0xc4)+m(0xba)+m(0xd6)+m(0xc1)+m(0xbf)]),setWindowSoftInputAdjustPan=()=>f[m(0xd3)+m(0xd8)+m(0xbd)+m(0xbb)+'de'](E[m(0xc4)+m(0xba)+m(0xd6)+m(0xce)+'N']);
|
package/src/handlers/MQTT.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const L=w;(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x16e))/0x1*(-parseInt(q(0x16f))/0x2)+parseInt(q(0x173))/0x3*(parseInt(q(0x169))/0x4)+-parseInt(q(0x174))/0x5+-parseInt(q(0x16b))/0x6*(parseInt(q(0x16c))/0x7)+-parseInt(q(0x172))/0x8*(parseInt(q(0x16d))/0x9)+parseInt(q(0x175))/0xa+-parseInt(q(0x171))/0xb*(-parseInt(q(0x170))/0xc);if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x40aa8));import{MQTTClient as f}from'@communi/mqtt-client-react-native';function A(){const m=['18367rznDHS','30CEDaRY','21504EcqpLA','4268jlTSxK','49768NAKuZq','33STYwkr','1390120DsOCIy','4710880ngDGSb','getIn','83272rSEYMe','stanc','28266tdBtOR','238HIejtp','603aOapxq'];A=function(){return m;};return A();}function w(f,E){const P=A();return w=function(I,z){I=I-0x169;let j=P[I];return j;},w(f,E);}export const createMQTTClient=async E=>f[L(0x176)+L(0x16a)+'e'](E);
|
package/src/handlers/Video.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const J=w;(function(P,I){const b=w,z=P();while(!![]){try{const j=-parseInt(b(0x129))/0x1+-parseInt(b(0x130))/0x2+-parseInt(b(0x12a))/0x3*(-parseInt(b(0x12f))/0x4)+-parseInt(b(0x12c))/0x5+-parseInt(b(0x135))/0x6*(-parseInt(b(0x133))/0x7)+-parseInt(b(0x136))/0x8+parseInt(b(0x134))/0x9;if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0x8949f));function w(f,E){const P=A();return w=function(I,z){I=I-0x129;let j=P[I];return j;},w(f,E);}import f from'react';import{AudioVideoComponent as E}from'../optionalDependencies/Video';function A(){const s=['2002220EdrACJ','ignor','creat','12oRrAnk','2139220Jekjhk','error','eElem','133nKjLqH','14364621WnuPIs','171498FkTabR','3777016ELwbOX','170253yyAKyJ','535623FhTAPU','ent'];A=function(){return s;};return A();}export const Video=E?({onBuffer:P,onEnd:I,onLoad:z,onProgress:j,paused:q,repeat:L,resizeMode:m,style:N,uri:V,videoRef:S})=>f[J(0x12e)+J(0x132)+J(0x12b)](E,{'ignoreSilentSwitch':J(0x12d)+'e','onBuffer':P,'onEnd':I,'onError':g=>{const c=J;console[c(0x131)](g);},'onLoad':z,'onProgress':j,'paused':q,'ref':S,'repeat':L,'resizeMode':m,'source':{'uri':V},'style':N}):null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x142))/0x1*(parseInt(q(0x14b))/0x2)+parseInt(q(0x146))/0x3*(-parseInt(q(0x14e))/0x4)+-parseInt(q(0x148))/0x5+-parseInt(q(0x14c))/0x6*(parseInt(q(0x141))/0x7)+-parseInt(q(0x145))/0x8+parseInt(q(0x14a))/0x9*(-parseInt(q(0x149))/0xa)+parseInt(q(0x144))/0xb;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x8d63c));function A(){const m=['40232AHLDza','ailed','delet','log','File\x20','326445nqKnQX','541kJiySh','unlin','29756551EIdGlL','2843936TzQREb','33xotxcU','ion\x20f','5634065ihERmt','5356220msogvQ','18MqtaBQ','3886BttCrI','66CDXuVM','...'];A=function(){return m;};return A();}function w(f,E){const P=A();return w=function(I,z){I=I-0x141;let j=P[I];return j;},w(f,E);}import f from'react-native-fs';export const deleteFile=async({uri:E})=>{const L=w;try{return await f[L(0x143)+'k'](E),!0x0;}catch(P){return console[L(0x151)](L(0x152)+L(0x150)+L(0x147)+L(0x14f)+L(0x14d),P),!0x1;}};
|
|
@@ -3,5 +3,5 @@ import { GetAlbumsParams } from '@react-native-camera-roll/camera-roll';
|
|
|
3
3
|
type ReturnType = {
|
|
4
4
|
Albums: Album[];
|
|
5
5
|
};
|
|
6
|
-
export declare const getAlbums: ({ albumType, assetType, }: Pick<GetAlbumsParams,
|
|
6
|
+
export declare const getAlbums: ({ albumType, assetType, }: Pick<GetAlbumsParams, 'albumType' | 'assetType'>) => Promise<ReturnType>;
|
|
7
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const s=w;(function(z,j){const J=w,q=z();while(!![]){try{const L=-parseInt(J(0x16b))/0x1+-parseInt(J(0x170))/0x2*(-parseInt(J(0x179))/0x3)+-parseInt(J(0x161))/0x4+-parseInt(J(0x16d))/0x5+-parseInt(J(0x163))/0x6*(-parseInt(J(0x16f))/0x7)+-parseInt(J(0x167))/0x8*(parseInt(J(0x168))/0x9)+parseInt(J(0x15c))/0xa;if(L===j)break;else q['push'](q['shift']());}catch(N){q['push'](q['shift']());}}}(A,0xa2f57));import{CameraRoll as f}from'@react-native-camera-roll/camera-roll';import{Platform as E}from'react-native';function w(f,E){const P=A();return w=function(I,z){I=I-0x15c;let j=P[I];return j;},w(f,E);}function A(){const y=['Smart','andro','getAl','141hfuYzZ','forEa','Recen','all','28943160uQFGdC','getPh','bums','All','lengt','3485576YAEAUY','push','1009578PrbzSh','clone','Album','otos','268648fgQhQB','306dpfngB','bums\x20','node','551478HPpbPv','image','5250855IjLzCD','edges','7lkQDOD','51902qbmFqb','otos\x20','Error','title','Deep','selec'];A=function(){return y;};return A();}import{verifyAndroidPermissions as P}from'./getPhotos';import I from'lodash';export const getAlbums=async({albumType:z=s(0x176)+s(0x165),assetType:j=s(0x15f)})=>{const o=s;try{if(E['OS']===o(0x177)+'id'&&!await P())throw new Error(o(0x15d)+o(0x171)+o(0x172));const q=await f[o(0x178)+o(0x15e)]({'albumType':z,'assetType':j});if(q&&q[o(0x160)+'h']){const L=[];return I[o(0x164)+o(0x174)](q)[o(0x17a)+'ch'](N=>{const t=o,V=new Promise(async(S,g)=>{const G=w;try{const b=await f[G(0x15d)+G(0x166)]({'assetType':j,'first':0x1,'groupName':N[G(0x173)],'groupTypes':E[G(0x175)+'t']({'ios':N[G(0x173)]===G(0x17b)+'ts'?G(0x15f):G(0x176)+G(0x165),'android':void 0x0})});b?.[G(0x16e)]?.[0x0]?.[G(0x16a)]?.[G(0x16c)]&&(N[G(0x16c)]=b[G(0x16e)][0x0][G(0x16a)][G(0x16c)]),S(N);}catch{S(N);}});L[t(0x162)](V);}),{'Albums':await Promise[o(0x17c)](L)};}return{'Albums':[]};}catch{throw new Error(o(0x178)+o(0x169)+o(0x172));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x16e))/0x1+parseInt(q(0x170))/0x2*(-parseInt(q(0x169))/0x3)+parseInt(q(0x172))/0x4+parseInt(q(0x176))/0x5+-parseInt(q(0x171))/0x6*(parseInt(q(0x173))/0x7)+-parseInt(q(0x16f))/0x8*(parseInt(q(0x16c))/0x9)+parseInt(q(0x177))/0xa;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x7839f));function A(){const m=['466lhbtTi','30IbGlAJ','3894052WWbIio','1333598FdOEJP','i\x20Err','calAs','1813365UPHfsx','15254440jEjoGu','11604cfoHvg','getLo','setUr','27999wqsIem','save','299713uudLSY','2096FfxpTf'];A=function(){return m;};return A();}function w(f,E){const P=A();return w=function(I,z){I=I-0x169;let j=P[I];return j;},w(f,E);}import{CameraRoll as f}from'@react-native-camera-roll/camera-roll';export const getLocalAssetUri=async E=>{const L=w;try{return await f[L(0x16d)](E);}catch{throw new Error(L(0x16a)+L(0x175)+L(0x16b)+L(0x174)+'or');}};
|
|
@@ -7,5 +7,5 @@ type ReturnType = {
|
|
|
7
7
|
iOSLimited: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const verifyAndroidPermissions: () => Promise<boolean>;
|
|
10
|
-
export declare const getPhotos: ({ after, first, groupName, groupTypes, }: Pick<GetPhotosParams,
|
|
10
|
+
export declare const getPhotos: ({ after, first, groupName, groupTypes, }: Pick<GetPhotosParams, 'after' | 'first' | 'groupName' | 'groupTypes'>) => Promise<ReturnType>;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function f(A,E){const P=w();return f=function(I,z){I=I-0x191;let j=P[I];return j;},f(A,E);}function w(){const c=['11549713RfnZvm','PERMI','RESUL','otos\x20','edges','then','402170YTkUxk','info','1600153zyeFwh','ssion','Allow','40925MmBsJr','image','Ask\x20M','eVers','Permi','s\x20are','tiple','e\x20Lat','Nativ','Recen','4775829OBPyiX','end_c','ize','s\x20Acc','ratio','reque','playa','hare\x20','all','album','ants','Size','_IMAG','Photo','776ydqVog','12550689xVKxfw','ame','getPh','READ_','ired\x20','picke','GRANT','TORAG','map','check','bleDu','All','node','MEDIA','ursor','_VIDE','1141968qPqNeV','561csfBBe','photo','age','has_n','and\x20s','stMul','cess\x20','otos','limit','selec','page_','NAL_S','filen','react','Error','8uJPWIt','const','ion','Versi','minor','andro','EXTER','\x20requ','2cJGIpX','ext_p','Deny','SSION','ess','fileS','to\x20ac'];w=function(){return c;};return w();}(function(z,j){const g=f,q=z();while(!![]){try{const L=parseInt(g(0x1b6))/0x1*(-parseInt(g(0x1a7))/0x2)+-parseInt(g(0x1c3))/0x3+-parseInt(g(0x1d1))/0x4*(-parseInt(g(0x1b9))/0x5)+parseInt(g(0x1e2))/0x6+-parseInt(g(0x1ae))/0x7*(-parseInt(g(0x19f))/0x8)+-parseInt(g(0x1d2))/0x9+-parseInt(g(0x1b4))/0xa*(-parseInt(g(0x1e3))/0xb);if(L===j)break;else q['push'](q['shift']());}catch(m){q['push'](q['shift']());}}}(w,0xd9ed3));import{CameraRoll as E}from'@react-native-camera-roll/camera-roll';import{PermissionsAndroid as P,Platform as I}from'react-native';export const verifyAndroidPermissions=async()=>{const b=f,z=I[b(0x1a0)+b(0x1cd)][b(0x19d)+b(0x1c1)+b(0x1bc)+b(0x1a1)]?.[b(0x1a3)]>=0x47,j=I[b(0x1a2)+'on']>=0x21,q=z&&j;return await((()=>q?Promise[b(0x1cb)]([P[b(0x1db)](P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1cf)+'ES']),P[b(0x1db)](P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1e1)+'O'])])[b(0x1b3)](([L,m])=>L&&m):P[b(0x1db)](P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1a5)+b(0x19b)+b(0x1d9)+'E']))())?!0x0:await((()=>q?P[b(0x1c8)+b(0x195)+b(0x1bf)]([P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1cf)+'ES'],P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1e1)+'O']])[b(0x1b3)](L=>L[P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1cf)+'ES']]===P[b(0x1b0)+'TS'][b(0x1d8)+'ED']&&L[P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1df)+b(0x1e1)+'O']]===P[b(0x1b0)+'TS'][b(0x1d8)+'ED']):P[b(0x1c8)+'st'](P[b(0x1af)+b(0x1aa)+'S'][b(0x1d5)+b(0x1a5)+b(0x19b)+b(0x1d9)+'E'],{'buttonNegative':b(0x1a9),'buttonNeutral':b(0x1bb)+b(0x1c0)+'er','buttonPositive':b(0x1b8),'message':b(0x1bd)+b(0x1b7)+b(0x1be)+b(0x1a6)+b(0x1d6)+b(0x1ad)+b(0x196)+b(0x194)+b(0x1ca)+b(0x191)+'s.','title':b(0x1d0)+b(0x1c6)+b(0x1ab)})[b(0x1b3)](L=>L===P[b(0x1b0)+'TS'][b(0x1d8)+'ED']))());},getPhotos=async({after:z,first:j,groupName:q,groupTypes:L})=>{const J=f;try{if(I['OS']===J(0x1a4)+'id'&&!await verifyAndroidPermissions())throw new Error(J(0x1d4)+J(0x1b1)+J(0x19e));const m=await E[J(0x1d4)+J(0x197)]({'after':z,'assetType':J(0x1dd),'groupName':q===J(0x1c2)+'ts'?void 0x0:q,'groupTypes':I[J(0x199)+'t']({'ios':q===J(0x1c2)+'ts'?J(0x1dd):L,'android':void 0x0}),'first':j,'includeSharedAlbums':!0x0,'include':[J(0x1ac)+J(0x1c5),J(0x19c)+J(0x1d3),J(0x1ba)+J(0x1ce),J(0x1c9)+J(0x1dc)+J(0x1c7)+'n',J(0x1cc)+'s']}),N=m[J(0x1b2)][J(0x1da)](d=>({'source':J(0x1d7)+'r',...d[J(0x1de)][J(0x1ba)],'fileSize':d[J(0x1de)][J(0x1ba)][J(0x1ac)+J(0x1c5)]??0x0})),V=m[J(0x19a)+J(0x1b5)][J(0x193)+J(0x1a8)+J(0x192)],S=m[J(0x19a)+J(0x1b5)][J(0x1c4)+J(0x1e0)];return{'assets':N,'endCursor':S,'hasNextPage':V,'iOSLimited':!!m[J(0x198)+'ed']};}catch{throw new Error(J(0x1d4)+J(0x1b1)+J(0x19e));}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const m=w;(function(P,I){const L=w,z=P();while(!![]){try{const j=parseInt(L(0x107))/0x1*(-parseInt(L(0x102))/0x2)+-parseInt(L(0x104))/0x3+-parseInt(L(0x10b))/0x4+parseInt(L(0xff))/0x5+parseInt(L(0x10c))/0x6+parseInt(L(0x10a))/0x7*(-parseInt(L(0x105))/0x8)+-parseInt(L(0x100))/0x9*(-parseInt(L(0x106))/0xa);if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0xd2f36));function w(f,E){const P=A();return w=function(I,z){I=I-0xff;let j=P[I];return j;},w(f,E);}import{Platform as f}from'react-native';function A(){const N=['10zUPgdo','1249lMqgwY','ios','Versi','19943mCNNql','5758908crIOEu','9480906LziFbd','7342535dThTKH','14574861yMFXDl','then','2384DcbziW','resol','1199145TsXnlX','1336HbYwVl'];A=function(){return N;};return A();}import{iosRefreshGallerySelection as E}from'@react-native-camera-roll/camera-roll';const o=f['OS']===m(0x108)&&parseInt(f[m(0x109)+'on'],0xa)>=0xe;export const iOS14RefreshGallerySelection=()=>o?E()[m(0x101)](()=>{}):Promise[m(0x103)+'ve']();
|
package/src/handlers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(f,E){var j=w,P=f();while(!![]){try{var I=parseInt(j(0xc9))/0x1+parseInt(j(0xcd))/0x2*(parseInt(j(0xd1))/0x3)+-parseInt(j(0xce))/0x4+-parseInt(j(0xca))/0x5*(-parseInt(j(0xc7))/0x6)+-parseInt(j(0xcc))/0x7*(parseInt(j(0xd2))/0x8)+-parseInt(j(0xcf))/0x9*(-parseInt(j(0xc8))/0xa)+-parseInt(j(0xcb))/0xb*(parseInt(j(0xd0))/0xc);if(I===E)break;else P['push'](P['shift']());}catch(z){P['push'](P['shift']());}}}(A,0xf2847));function A(){var q=['7168540xgzPBs','33GRqUHL','3728935YDdtqb','20MzcOlc','3399172mmmgRp','25866KukJey','5228484zGmKhX','240672sHLUlv','8YTrmRW','6pKPBVY','1780eIbaiC','935450Xqygtm'];A=function(){return q;};return A();}export*from'./deleteFile';export*from'./getLocalAssetUri';function w(f,E){var P=A();return w=function(I,z){I=I-0xc7;var j=P[I];return j;},w(f,E);}export*from'./getPhotos';export*from'./iOS14RefreshGallerySelection';export*from'./getAlbums';export*from'./isExistFile';export*from'./saveFile';export*from'./setClipboardString';export*from'./shareImage';export*from'./oniOS14GalleryLibrarySelectionChange';export*from'./pickDocument';export*from'./pickPhoto';export*from'./takePhoto';export*from'./triggerHaptic';export*from'./Video';export*from'./Keyboard';export*from'./DatePicker';export*from'./MQTT';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function A(){const m=['5360976SfyPZX','21404dyLiPm','2817906ueOlYj','exist','stFil','3607665tGUtfn','e\x20Err','3185562ZHARHU','4WZyaRv','isExi','2043020HxhujP','1404726qcHkgj'];A=function(){return m;};return A();}function w(f,E){const P=A();return w=function(I,z){I=I-0x124;let j=P[I];return j;},w(f,E);}(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x129))/0x1*(-parseInt(q(0x12e))/0x2)+-parseInt(q(0x12c))/0x3+parseInt(q(0x12b))/0x4+parseInt(q(0x126))/0x5+-parseInt(q(0x128))/0x6+-parseInt(q(0x12f))/0x7+parseInt(q(0x12d))/0x8;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x6fc93));import f from'react-native-fs';export const isExistFile=async E=>{const L=w;try{return await f[L(0x124)+'s'](E);}catch{throw new Error(L(0x12a)+L(0x125)+L(0x127)+'or');}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const P=j;(function(
|
|
1
|
+
'use strict';function w(f,E){const P=A();return w=function(I,z){I=I-0x8a;let j=P[I];return j;},w(f,E);}const m=w;(function(P,I){const L=w,z=P();while(!![]){try{const j=-parseInt(L(0x9c))/0x1+-parseInt(L(0x91))/0x2+parseInt(L(0x97))/0x3*(parseInt(L(0x92))/0x4)+parseInt(L(0x95))/0x5+-parseInt(L(0x96))/0x6+parseInt(L(0x9b))/0x7+parseInt(L(0x90))/0x8*(parseInt(L(0x98))/0x9);if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0x794b1));import{cameraRollEventEmitter as f}from'@react-native-camera-roll/camera-roll';import{Platform as E}from'react-native';const i=E['OS']===m(0x8f)&&parseInt(E[m(0x99)+'on'],0xa)>=0xe;function A(){const S=['117212NmXWPG','stene','ionCh','2033110ZXsGYa','3039048uSUpup','3lKXbKa','4993875eceZjW','Versi','elect','6195623tTmRHb','329247fwlJNE','onLib','ange','addLi','raryS','remov','ios','8BEnvpY','1086634nrMdnr'];A=function(){return S;};return A();}export function oniOS14GalleryLibrarySelectionChange(P){const N=m;if(i){const I=f[N(0x8c)+N(0x93)+'r'](N(0x8a)+N(0x8d)+N(0x9a)+N(0x94)+N(0x8b),P);return{'unsubscribe':()=>{const V=N;I[V(0x8e)+'e']();}};}return{'unsubscribe':()=>{}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x184))/0x1+-parseInt(q(0x183))/0x2+-parseInt(q(0x180))/0x3+-parseInt(q(0x17e))/0x4+-parseInt(q(0x182))/0x5*(-parseInt(q(0x187))/0x6)+parseInt(q(0x185))/0x7+-parseInt(q(0x17f))/0x8*(parseInt(q(0x189))/0x9);if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x443ce));function A(){const m=['472317xbIWwR','1380001bGLYOm','map','2070QOfyLC','slice','9ADCVmO','843268NRBUKZ','1693256kFuQvy','94563CrRQhH','lengt','6855eSFDLB','817916hVWogU'];A=function(){return m;};return A();}import{pick as f}from'@react-native-documents/picker';function w(f,E){const P=A();return w=function(I,z){I=I-0x17e;let j=P[I];return j;},w(f,E);}export const pickDocument=async E=>{const L=w;try{let P=await f({'allowMultiSelection':!0x0});return E&&P[L(0x181)+'h']>E&&(P=[P[0x0],...P[L(0x188)](0x1,E)]),{'assets':P[L(0x186)](({name:I,size:z,uri:j})=>({'uri':j,'size':z,'name':I})),'cancelled':!0x1};}catch{return{'cancelled':!0x0};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function A(){const b=['subst','928776VNcNZl','lastI','2785mwwxUQ','path','e\x20pic','Error','ring','732HPAgGG','icker','max','ios','635994zaaaLs','size','2379260OSOdtC','651IWkPQR','\x20get\x20','andro','picke','openP','min','image','width','ictur','\x20size','\x20of\x20p','2933028ixgNqP','ker\x20f','rom\x20g','ndexO','getSi','heigh','579445mYSpaW','78872bYivDn','aller','error'];A=function(){return b;};return A();}const d=w;(function(I,z){const S=w,j=I();while(!![]){try{const q=parseInt(S(0x15b))/0x1+parseInt(S(0x147))/0x2+-parseInt(S(0x160))/0x3+parseInt(S(0x149))/0x4+-parseInt(S(0x162))/0x5*(-parseInt(S(0x143))/0x6)+parseInt(S(0x14a))/0x7*(-parseInt(S(0x15c))/0x8)+parseInt(S(0x155))/0x9;if(q===z)break;else j['push'](j['shift']());}catch(L){j['push'](j['shift']());}}}(A,0xa10a8));import{Image as f,Platform as E}from'react-native';function w(f,E){const P=A();return w=function(I,z){I=I-0x13f;let j=P[I];return j;},w(f,E);}import P from'react-native-image-crop-picker';export const pickPhoto=async({compressImageQuality:I=E['OS']===d(0x146)?0.8:0x1,cropping:z=!0x1})=>{const n=d,j=await P[n(0x14e)+n(0x144)]({'compressImageQuality':Math[n(0x14f)](Math[n(0x145)](0x0,I),0x1),'cropping':z===!0x0});if(j[n(0x15a)+'t']&&j[n(0x151)]&&j[n(0x13f)]){let q;if(E['OS']===n(0x14c)+'id'){const L=()=>new Promise(m=>{const g=n;f[g(0x159)+'ze'](j[g(0x13f)],(N,V)=>{m({'height':V,'width':N});});});try{const m=await L();q={'width':m[n(0x151)],'height':m[n(0x15a)+'t']};}catch(N){console[n(0x15e)](n(0x141)+n(0x14b)+n(0x150)+n(0x153)+n(0x154)+n(0x152)+n(0x140)+n(0x156)+n(0x157)+n(0x15d)+'y\x20',N);}}else q={'height':j[n(0x15a)+'t'],'width':j[n(0x151)]};if(q){const V=j[n(0x13f)][n(0x161)+n(0x158)+'f']('/');return{'source':n(0x14d)+'r','name':j[n(0x13f)][n(0x15f)+n(0x142)](V+0x1),'size':j[n(0x148)],'uri':j[n(0x13f)],...q};}else return;}};
|
|
@@ -2,5 +2,5 @@ import { DownloadProgressCallbackResult } from 'react-native-fs';
|
|
|
2
2
|
export declare const saveFile: ({ fileName, fromUrl, onProgress, }: {
|
|
3
3
|
fileName: string;
|
|
4
4
|
fromUrl: string;
|
|
5
|
-
onProgress?: (data: DownloadProgressCallbackResult) => void;
|
|
5
|
+
onProgress?: ((data: DownloadProgressCallbackResult) => void) | undefined;
|
|
6
6
|
}) => Promise<string>;
|
package/src/handlers/saveFile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';(function(E,P){const q=w,I=E();while(!![]){try{const z=parseInt(q(0x1d8))/0x1+parseInt(q(0x1cb))/0x2+parseInt(q(0x1d3))/0x3+-parseInt(q(0x1d0))/0x4+-parseInt(q(0x1cc))/0x5*(parseInt(q(0x1d1))/0x6)+parseInt(q(0x1ce))/0x7*(-parseInt(q(0x1c9))/0x8)+parseInt(q(0x1d7))/0x9;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0xb9011));function A(){const m=['Path','iled.','40456lXZEaP','sDire','563090KzOoNC','5zBhIci','Downl','1729VEtTud','ge\x20fa','4001600WmrsBw','717294fGgPnv','Cache','1702134zmrauZ','oadin','g\x20ima','promi','20291958HEsPGy','23220BSxbNZ','file:','oadFi','ctory','downl'];A=function(){return m;};return A();}function w(f,E){const P=A();return w=function(I,z){I=I-0x1c8;let j=P[I];return j;},w(f,E);}import f from'react-native-fs';export const saveFile=async({fileName:E,fromUrl:P,onProgress:I})=>{const L=w;try{const z=f[L(0x1d2)+L(0x1ca)+L(0x1db)+L(0x1dd)]+'/'+encodeURIComponent(E);return await f[L(0x1dc)+L(0x1da)+'le']({'fromUrl':P,'toFile':z,'background':!0x0,'discretionary':!0x0,'progress':I,'begin':j=>{},'progressDivider':0x5})[L(0x1d6)+'se'],L(0x1d9)+'//'+z;}catch{throw new Error(L(0x1cd)+L(0x1d4)+L(0x1d5)+L(0x1cf)+L(0x1c8)+'..');}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function w(f,E){const P=A();return w=function(I,z){I=I-0xd5;let j=P[I];return j;},w(f,E);}const L=w;(function(E,P){const q=w,I=E();while(!![]){try{const z=-parseInt(q(0xdc))/0x1*(parseInt(q(0xda))/0x2)+-parseInt(q(0xd9))/0x3*(-parseInt(q(0xe1))/0x4)+-parseInt(q(0xd8))/0x5+-parseInt(q(0xd6))/0x6*(parseInt(q(0xdb))/0x7)+-parseInt(q(0xd5))/0x8+parseInt(q(0xdd))/0x9*(parseInt(q(0xdf))/0xa)+parseInt(q(0xe0))/0xb;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x741f1));function A(){const m=['772842yHUFIQ','setSt','1555515nXwwqk','30147lfGFEM','422wYVxQE','7YTxaIa','89nPMawz','333738dzwDjR','ring','90HCbGYO','6574315ASJJdB','356CTmDyD','7131536imVTni'];A=function(){return m;};return A();}import f from'@react-native-clipboard/clipboard';export const setClipboardString=E=>f[L(0xd7)+L(0xde)](E);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const shareImage: (({ type, url }: {
|
|
2
2
|
type: any;
|
|
3
3
|
url: any;
|
|
4
|
-
}) => Promise<
|
|
4
|
+
}) => Promise<boolean>) | null;
|
|
5
5
|
export declare const shareText: (({ text }: {
|
|
6
6
|
text: any;
|
|
7
|
-
}) => Promise<
|
|
7
|
+
}) => Promise<boolean>) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const m=w;(function(P,I){const L=w,z=P();while(!![]){try{const j=parseInt(L(0x17e))/0x1+parseInt(L(0x17f))/0x2+-parseInt(L(0x18b))/0x3*(-parseInt(L(0x188))/0x4)+parseInt(L(0x17c))/0x5*(parseInt(L(0x184))/0x6)+parseInt(L(0x175))/0x7*(-parseInt(L(0x16d))/0x8)+-parseInt(L(0x174))/0x9*(-parseInt(L(0x180))/0xa)+parseInt(L(0x189))/0xb*(-parseInt(L(0x176))/0xc);if(j===I)break;else z['push'](z['shift']());}catch(q){z['push'](z['shift']());}}}(A,0x71d68));function w(f,E){const P=A();return w=function(I,z){I=I-0x163;let j=P[I];return j;},w(f,E);}function A(){const g=['31812rzTxJb','138534WEKiOo','Shari','333rOQKTj',':\x20res','ios','strin','64,','defau','catch','react',';base','andro','alled','ng\x20fa','s\x20not','8VrEoie','warn','data:','Share','then','readF','base6','63oJaRub','2839046EqUJAE','1512RjfJph','open','ile','iled.','log','url','5PZMrac','ve-sh','872495yRyRZT','44086omStRy','322160fEbQsI','-nati',':\x20err','\x20=\x20','2735214hGPSfU','are\x20i','gify','\x20inst'];A=function(){return g;};return A();}import{Platform as f}from'react-native';import E from'react-native-fs';let t;try{t=require('react-native-share')[m(0x165)+'lt'];}catch{console[m(0x17a)](m(0x167)+m(0x181)+m(0x17d)+m(0x185)+m(0x16c)+m(0x187)+m(0x16a));}export const shareImage=t?async({type:P,url:I})=>{const N=m;try{const z=await E[N(0x172)+N(0x178)](I,N(0x173)+'4'),j=N(0x16f)+P+(N(0x168)+N(0x164))+z;return await t[N(0x177)]({'activityItemSources':f['OS']===N(0x18d)?[{'item':{'default':{'content':I,'type':N(0x17b)}},'linkMetadata':{'icon':I},'placeholderItem':{'content':I,'type':N(0x17b)}}]:void 0x0,'excludedActivityTypes':[],'failOnCancel':!0x1,'type':P,'url':f['OS']===N(0x169)+'id'?j:void 0x0}),!0x0;}catch{return console[N(0x16e)](N(0x18a)+N(0x16b)+N(0x179)+'..'),!0x1;}}:null,shareText=t?async({text:P})=>{const V=m;try{return await t[V(0x177)]({'title':P,'message':P})[V(0x171)](I=>{const S=V;console[S(0x17a)](S(0x170)+S(0x18c)+S(0x183)+JSON[S(0x163)+S(0x186)](I));})[V(0x166)](I=>{const d=V;console[d(0x17a)](d(0x170)+d(0x182)+d(0x183)+JSON[d(0x163)+d(0x186)](I));}),!0x0;}catch{return console[V(0x16e)](V(0x18a)+V(0x16b)+V(0x179)+'..'),!0x1;}}:null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const y=w;(function(j,q){const t=w,L=j();while(!![]){try{const m=parseInt(t(0x1a6))/0x1*(-parseInt(t(0x19f))/0x2)+-parseInt(t(0x1ab))/0x3*(parseInt(t(0x197))/0x4)+parseInt(t(0x18e))/0x5*(-parseInt(t(0x190))/0x6)+parseInt(t(0x17c))/0x7*(-parseInt(t(0x188))/0x8)+-parseInt(t(0x1a1))/0x9+parseInt(t(0x1a7))/0xa*(parseInt(t(0x178))/0xb)+-parseInt(t(0x196))/0xc*(-parseInt(t(0x177))/0xd);if(m===q)break;else L['push'](L['shift']());}catch(N){L['push'](L['shift']());}}}(A,0xe296c));function w(f,E){const P=A();return w=function(I,z){I=I-0x175;let j=P[I];return j;},w(f,E);}import{AppState as f,Image as E,PermissionsAndroid as P,Platform as I}from'react-native';function A(){const Q=['27099xNejlH','path','ant\x20c','AGAIN','NEVER','amera','\x20came','e\x20cap','RESUL','29159ukVerD','11kVPQfV','activ','\x20from','ot\x20gr','21XSoITo','\x20perm','openC','utred','did\x20n','andro','image','reque','getSi','ios','error','heigh','4750264qujXuf','ring','max','issio','width','size','5fMrDut','\x20get\x20','123846TGUZQq','PERMI','\x20of\x20p','DENIE','check','ntSta','16908ZGrkeR','44FFZYMr','min','lastI','ra\x20','messa','CAMER','ndexO','subst','68aJtJqg','camer','4879845QSrUTt','curre','User\x20','SSION','\x20size','33106qVHbaR','13368830VcSLwK','ictur','_ASK_','Error'];A=function(){return Q;};return A();}import z from'react-native-image-crop-picker';export const takePhoto=async({compressImageQuality:j=I['OS']===y(0x185)?0.8:0x1,cropping:q=!0x1})=>{const H=y;if(I['OS']===H(0x181)+'id'&&P[H(0x191)+H(0x1a4)+'S'][H(0x19c)+'A']&&!await P[H(0x194)](P[H(0x191)+H(0x1a4)+'S'][H(0x19c)+'A'])){const L=await P[H(0x183)+'st'](P[H(0x191)+H(0x1a4)+'S'][H(0x19c)+'A']);if(L===P[H(0x176)+'TS'][H(0x193)+'D'])return{'cancelled':!0x0};if(L===P[H(0x176)+'TS'][H(0x1af)+H(0x1a9)+H(0x1ae)])return{'askToOpenSettings':!0x0,'cancelled':!0x0};}try{const m=await z[H(0x17e)+H(0x1b0)]({'compressImageQuality':Math[H(0x198)](Math[H(0x18a)](0x0,j),0x1),'cropping':q===!0x0});if(m[H(0x187)+'t']&&m[H(0x18c)]&&m[H(0x1ac)]){let N;if(I['OS']===H(0x181)+'id'){const V=()=>new Promise(g=>{const C=H;E[C(0x184)+'ze'](m[C(0x1ac)],(b,J)=>{g({'height':J,'width':b});});});try{const g=await V();N={'width':g[H(0x18c)],'height':g[H(0x187)+'t']};}catch(b){console[H(0x186)](H(0x1aa)+H(0x18f)+H(0x182)+H(0x1a5)+H(0x192)+H(0x1a8)+H(0x175)+H(0x17f)+H(0x17a)+H(0x1b1)+H(0x19a),b);}}else N={'height':m[H(0x187)+'t'],'width':m[H(0x18c)]};if(N){const J=m[H(0x1ac)][H(0x199)+H(0x19d)+'f']('/');return{'cancelled':!0x1,'source':H(0x1a0)+'a','name':m[H(0x1ac)][H(0x19e)+H(0x189)](J+0x1),'size':m[H(0x18d)],'uri':m[H(0x1ac)],...N};}else return;}}catch(c){if(c instanceof Error&&I['OS']===H(0x185)&&f[H(0x1a2)+H(0x195)+'te']===H(0x179)+'e'){const G=H(0x1a3)+H(0x180)+H(0x17b)+H(0x1ad)+H(0x1b0)+H(0x17d)+H(0x18b)+'n.';if(c[H(0x19b)+'ge']===G)return{'askToOpenSettings':!0x0,'cancelled':!0x0};}}return{'cancelled':!0x0};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function A(){const
|
|
1
|
+
'use strict';function A(){const m=['486902wBundS','119156hozOZo','720725ZVUwAC','1124893tMpKzw','8121912bozbRV','4302198wnZICE','trigg','385810moZudb','69HmwzkN'];A=function(){return m;};return A();}(function(E,P){const q=w,I=E();while(!![]){try{const z=-parseInt(q(0xa0))/0x1+parseInt(q(0x9e))/0x2+parseInt(q(0x9f))/0x3*(parseInt(q(0x98))/0x4)+parseInt(q(0x99))/0x5+parseInt(q(0x9c))/0x6+parseInt(q(0x9a))/0x7+-parseInt(q(0x9b))/0x8;if(z===P)break;else I['push'](I['shift']());}catch(j){I['push'](I['shift']());}}}(A,0x611dc));import f from'react-native-haptic-feedback';function w(f,E){const P=A();return w=function(I,z){I=I-0x98;let j=P[I];return j;},w(f,E);}export const triggerHaptic=E=>{const L=w;f[L(0x9d)+'er'](E,{'enableVibrateFallback':!0x1,'ignoreAndroidSystemSettings':!0x1});};
|
package/src/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export * from '@communi/keyboard-area-react-native';
|
|
|
3
3
|
export * from '@communi/mqtt-client-react-native';
|
|
4
4
|
export * from '@communi/mqtt-client-interface-typescript';
|
|
5
5
|
export * from '@communi/chat-api-client-typescript';
|
|
6
|
+
export { PSChat } from './PSChat';
|
|
7
|
+
export type { PSChatProps } from './PSChat';
|
|
8
|
+
export * from './files/PSFileOpenProvider';
|
package/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(X,B){var A3=E,A0=X();while(!![]){try{var A1=parseInt(A3(0x76))/0x1*(-parseInt(A3(0x75))/0x2)+parseInt(A3(0x70))/0x3+parseInt(A3(0x71))/0x4+-parseInt(A3(0x6f))/0x5*(-parseInt(A3(0x74))/0x6)+-parseInt(A3(0x73))/0x7+-parseInt(A3(0x77))/0x8+parseInt(A3(0x72))/0x9;if(A1===B)break;else A0['push'](A0['shift']());}catch(A2){A0['push'](A0['shift']());}}}(w,0x53662));import{registerNativeHandlers as I}from'@communi/chat-ui-react-native';import{addKeyboardListener as z,removeKeyboardListener as j,setWindowSoftInputAdjustNothing as q,setWindowSoftInputAdjustResize as L,createMQTTClient as N,deleteFile as V,getLocalAssetUri as J,getPhotos as G,getAlbums as H,isExistFile as C,oniOS14GalleryLibrarySelectionChange as Q,saveFile as R,takePhoto as U,pickPhoto as W,Video as v,DatePicker as F,setClipboardString as Y,triggerHaptic as D,pickDocument as O,iOS14RefreshGallerySelection as Z,shareImage as K,shareText as T,setWindowSoftInputAdjustPan as M}from'./handlers';I({'addKeyboardListener':z,'removeKeyboardListener':j,'setWindowSoftInputAdjustNothing':q,'setWindowSoftInputAdjustResize':L,'setWindowSoftInputAdjustPan':M,'createMQTTClient':N,'deleteFile':V,'getLocalAssetUri':J,'getPhotos':G,'iOS14RefreshGallerySelection':Z,'getAlbums':H,'isExistFile':C,'oniOS14GalleryLibrarySelectionChange':Q,'pickDocument':O,'saveFile':R,'setClipboardString':Y,'shareImage':K,'shareText':T,'takePhoto':U,'pickPhoto':W,'triggerHaptic':D,'Video':v,'DatePicker':F});export*from'@communi/chat-ui-react-native';export*from'@communi/keyboard-area-react-native';export*from'@communi/mqtt-client-react-native';export*from'@communi/mqtt-client-interface-typescript';export*from'@communi/chat-api-client-typescript';function E(A,f){var P=w();return E=function(I,z){I=I-0x6f;var j=P[I];return j;},E(A,f);}export{PSChat}from'./PSChat';function w(){var A4=['4058658RysdcL','1460102KXAmwR','18DFutVF','2312rrTYSM','103atyiQs','4103712BSXDrB','541185EyxDKc','912276WfnSDM','409820LwTrbV'];w=function(){return A4;};return w();}export*from'./files/PSFileOpenProvider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function w(f,E){const P=A();return w=function(I,z){I=I-0x16f;let j=P[I];return j;},w(f,E);}const q=w;(function(f,E){const j=w,P=f();while(!![]){try{const I=parseInt(j(0x177))/0x1+-parseInt(j(0x174))/0x2*(parseInt(j(0x178))/0x3)+parseInt(j(0x176))/0x4*(-parseInt(j(0x175))/0x5)+-parseInt(j(0x179))/0x6+-parseInt(j(0x171))/0x7*(parseInt(j(0x172))/0x8)+parseInt(j(0x181))/0x9+parseInt(j(0x182))/0xa;if(I===E)break;else P['push'](P['shift']());}catch(z){P['push'](P['shift']());}}}(A,0x3afd4));let e;function A(){const L=['1184190sqaOYb','ài\x20đặ','warn','date-','\x20\x22rea','t\x20gói','tive-','picke','46179yWamdh','6330240xeuTuk','defau','Cần\x20c','21yFEZqH','259192jUvGXI','ct-na','332lAexkT','874060xwtFgh','4sphCmb','268719XSlhJK','3540ISJyyK'];A=function(){return L;};return A();}try{e=require('react-native-date-picker')[q(0x16f)+'lt'];}catch{console[q(0x17b)](q(0x170)+q(0x17a)+q(0x17e)+q(0x17d)+q(0x173)+q(0x17f)+q(0x17c)+q(0x180)+'r\x22');}export{e as DatePickerComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const q=w;(function(f,E){const j=w,P=f();while(!![]){try{const I=-parseInt(j(0x1be))/0x1+-parseInt(j(0x1ce))/0x2*(parseInt(j(0x1c8))/0x3)+parseInt(j(0x1c9))/0x4*(parseInt(j(0x1c5))/0x5)+-parseInt(j(0x1cb))/0x6+-parseInt(j(0x1cd))/0x7+parseInt(j(0x1c4))/0x8+-parseInt(j(0x1cf))/0x9*(-parseInt(j(0x1c7))/0xa);if(I===E)break;else P['push'](P['shift']());}catch(z){P['push'](P['shift']());}}}(A,0x76566));function w(f,E){const P=A();return w=function(I,z){I=I-0x1be;let j=P[I];return j;},w(f,E);}function A(){const L=['video','2270088lUCRoE','warn','5736752TtPXyO','390704sCzPeA','14535351LFFCtS','Cần\x20c','918641sAxkwD','\x20\x22rea','ct-na','defau','t\x20gói','tive-','4123760VrABTZ','50EWCvWR','ài\x20đặ','10rTgGtF','6CWPAGT','344572ZqFPQy'];A=function(){return L;};return A();}let e;try{e=require('react-native-video')[q(0x1c1)+'lt'];}catch{console[q(0x1cc)](q(0x1d0)+q(0x1c6)+q(0x1c2)+q(0x1bf)+q(0x1c0)+q(0x1c3)+q(0x1ca)+'\x22');}export{e as AudioVideoComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(f,E){var j=w,P=f();while(!![]){try{var I=-parseInt(j(0x9a))/0x1*(-parseInt(j(0x97))/0x2)+-parseInt(j(0x99))/0x3*(-parseInt(j(0x95))/0x4)+parseInt(j(0x94))/0x5*(-parseInt(j(0x93))/0x6)+-parseInt(j(0x8e))/0x7*(parseInt(j(0x91))/0x8)+-parseInt(j(0x8f))/0x9+parseInt(j(0x92))/0xa*(parseInt(j(0x98))/0xb)+parseInt(j(0x96))/0xc*(parseInt(j(0x90))/0xd);if(I===E)break;else P['push'](P['shift']());}catch(z){P['push'](P['shift']());}}}(A,0xdb07d));function w(f,E){var P=A();return w=function(I,z){I=I-0x8e;var j=P[I];return j;},w(f,E);}export*from'./DatePicker';export*from'./Video';function A(){var q=['91GUWdJB','11074096DnClZl','4130vLRxuI','24vCTnky','2004385uqoaYv','1204CHjLfH','4754088qnLtap','26nqlkbF','913QQtoGR','165Wemswp','94729hRevtV','7PbfFzh','1535490PsIndR'];A=function(){return q;};return A();}
|