@developer_tribe/react-native-comnyx 0.13.13 → 0.14.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/generated/RCTAppDependencyProvider.h +25 -0
- package/android/generated/RCTAppDependencyProvider.mm +55 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/android/generated/ReactAppDependencyProvider.podspec +34 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNComnyxSpec-generated.cpp +22 -0
- package/android/generated/jni/RNComnyxSpec.h +24 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +17 -0
- package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +19 -0
- package/android/src/main/AndroidManifest.xml +15 -0
- package/android/src/main/AndroidManifestNew.xml +4 -0
- package/android/src/main/java/com/comnyx/ComnyxMediaPickerModule.kt +301 -0
- package/android/src/main/java/com/comnyx/ComnyxPackage.kt +1 -1
- package/android/src/main/java/com/comnyx/VideoPlayerActivity.kt +91 -0
- package/ios/ComnyxMediaPicker.m +23 -0
- package/ios/ComnyxMediaPicker.swift +377 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js +62 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js.map +1 -0
- package/lib/commonjs/api/index.js +19 -0
- package/lib/commonjs/api/index.js.map +1 -1
- package/lib/commonjs/api/media.js +76 -0
- package/lib/commonjs/api/media.js.map +1 -0
- package/lib/commonjs/assets/attachment-01.png +0 -0
- package/lib/commonjs/assets/x-circle.png +0 -0
- package/lib/commonjs/components/ChatList.js +48 -22
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/LinkifyText.js +5 -1
- package/lib/commonjs/components/LinkifyText.js.map +1 -1
- package/lib/commonjs/components/MediaMessageItem.js +333 -0
- package/lib/commonjs/components/MediaMessageItem.js.map +1 -0
- package/lib/commonjs/components/MediaPickerButton.js +47 -0
- package/lib/commonjs/components/MediaPickerButton.js.map +1 -0
- package/lib/commonjs/components/MediaViewerModal.js +157 -0
- package/lib/commonjs/components/MediaViewerModal.js.map +1 -0
- package/lib/commonjs/components/MessageInput.js +344 -73
- package/lib/commonjs/components/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +17 -7
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/constants/translations.js +203 -29
- package/lib/commonjs/constants/translations.js.map +1 -1
- package/lib/commonjs/data/fake/media.js +105 -0
- package/lib/commonjs/data/fake/media.js.map +1 -0
- package/lib/commonjs/types/MediaTypes.js +2 -0
- package/lib/commonjs/types/MediaTypes.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/NativeComnyxMediaPicker.js +54 -0
- package/lib/module/NativeComnyxMediaPicker.js.map +1 -0
- package/lib/module/api/index.js +1 -0
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/api/media.js +70 -0
- package/lib/module/api/media.js.map +1 -0
- package/lib/module/assets/attachment-01.png +0 -0
- package/lib/module/assets/x-circle.png +0 -0
- package/lib/module/components/ChatList.js +48 -22
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/LinkifyText.js +5 -1
- package/lib/module/components/LinkifyText.js.map +1 -1
- package/lib/module/components/MediaMessageItem.js +330 -0
- package/lib/module/components/MediaMessageItem.js.map +1 -0
- package/lib/module/components/MediaPickerButton.js +43 -0
- package/lib/module/components/MediaPickerButton.js.map +1 -0
- package/lib/module/components/MediaViewerModal.js +153 -0
- package/lib/module/components/MediaViewerModal.js.map +1 -0
- package/lib/module/components/MessageInput.js +347 -75
- package/lib/module/components/MessageInput.js.map +1 -1
- package/lib/module/components/MessageItem.js +17 -7
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/constants/translations.js +203 -29
- package/lib/module/constants/translations.js.map +1 -1
- package/lib/module/data/fake/media.js +99 -0
- package/lib/module/data/fake/media.js.map +1 -0
- package/lib/module/types/MediaTypes.js +2 -0
- package/lib/module/types/MediaTypes.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts +7 -0
- package/lib/typescript/src/NativeComnyxMediaPicker.d.ts.map +1 -0
- package/lib/typescript/src/api/index.d.ts +1 -0
- package/lib/typescript/src/api/index.d.ts.map +1 -1
- package/lib/typescript/src/api/media.d.ts +7 -0
- package/lib/typescript/src/api/media.d.ts.map +1 -0
- package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/src/components/LinkifyText.d.ts.map +1 -1
- package/lib/typescript/src/components/MediaMessageItem.d.ts +6 -0
- package/lib/typescript/src/components/MediaMessageItem.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaPickerButton.d.ts +5 -0
- package/lib/typescript/src/components/MediaPickerButton.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaViewerModal.d.ts +8 -0
- package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -0
- package/lib/typescript/src/components/MessageInput.d.ts.map +1 -1
- package/lib/typescript/src/components/MessageItem.d.ts.map +1 -1
- package/lib/typescript/src/constants/translations.d.ts.map +1 -1
- package/lib/typescript/src/data/fake/media.d.ts +6 -0
- package/lib/typescript/src/data/fake/media.d.ts.map +1 -0
- package/lib/typescript/src/types/Conversation.d.ts +19 -0
- package/lib/typescript/src/types/Conversation.d.ts.map +1 -1
- package/lib/typescript/src/types/LocalizationKeys.d.ts +6 -0
- package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -1
- package/lib/typescript/src/types/MediaTypes.d.ts +26 -0
- package/lib/typescript/src/types/MediaTypes.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +1 -1
- package/lib/typescript/src/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeComnyxMediaPicker.ts +62 -0
- package/src/api/index.ts +1 -0
- package/src/api/media.ts +116 -0
- package/src/assets/attachment-01.png +0 -0
- package/src/assets/x-circle.png +0 -0
- package/src/components/ChatList.tsx +81 -24
- package/src/components/CustomerForm.tsx +1 -1
- package/src/components/LinkifyText.tsx +3 -2
- package/src/components/MediaMessageItem.tsx +390 -0
- package/src/components/MediaPickerButton.tsx +48 -0
- package/src/components/MediaViewerModal.tsx +161 -0
- package/src/components/MessageInput.tsx +396 -84
- package/src/components/MessageItem.tsx +19 -4
- package/src/constants/translations.ts +174 -0
- package/src/data/fake/media.ts +110 -0
- package/src/types/Conversation.ts +20 -0
- package/src/types/LocalizationKeys.ts +6 -0
- package/src/types/MediaTypes.ts +27 -0
- package/src/version.ts +1 -1
|
@@ -56,6 +56,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
56
56
|
'notifications.optIn.cancel': 'Not Now',
|
|
57
57
|
'notifications.optIn.openSettings': 'Open Settings',
|
|
58
58
|
'notifications.optIn.copyToClipboard': 'Copy to Clipboard',
|
|
59
|
+
'chat.media.uploading': 'Uploading...',
|
|
60
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
61
|
+
'chat.media.pick.title': 'Add Media',
|
|
62
|
+
'chat.media.pick.photo': 'Photo',
|
|
63
|
+
'chat.media.pick.video': 'Video',
|
|
64
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
59
65
|
},
|
|
60
66
|
tr: {
|
|
61
67
|
'customer.form.title': 'Merhaba👋',
|
|
@@ -111,6 +117,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
111
117
|
'notifications.optIn.cancel': 'Şimdi Değil',
|
|
112
118
|
'notifications.optIn.openSettings': 'Ayarları Aç',
|
|
113
119
|
'notifications.optIn.copyToClipboard': 'Panoya Kopyala',
|
|
120
|
+
'chat.media.uploading': 'Uploading...',
|
|
121
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
122
|
+
'chat.media.pick.title': 'Add Media',
|
|
123
|
+
'chat.media.pick.photo': 'Photo',
|
|
124
|
+
'chat.media.pick.video': 'Video',
|
|
125
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
114
126
|
},
|
|
115
127
|
es: {
|
|
116
128
|
'customer.form.title': 'Hola👋',
|
|
@@ -168,6 +180,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
168
180
|
'notifications.optIn.cancel': 'Ahora No',
|
|
169
181
|
'notifications.optIn.openSettings': 'Abrir Configuración',
|
|
170
182
|
'notifications.optIn.copyToClipboard': 'Copiar al Portapapeles',
|
|
183
|
+
'chat.media.uploading': 'Uploading...',
|
|
184
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
185
|
+
'chat.media.pick.title': 'Add Media',
|
|
186
|
+
'chat.media.pick.photo': 'Photo',
|
|
187
|
+
'chat.media.pick.video': 'Video',
|
|
188
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
171
189
|
},
|
|
172
190
|
fr: {
|
|
173
191
|
'customer.form.title': 'Bonjour👋',
|
|
@@ -226,6 +244,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
226
244
|
'notifications.optIn.cancel': 'Pas Maintenant',
|
|
227
245
|
'notifications.optIn.openSettings': 'Ouvrir les Paramètres',
|
|
228
246
|
'notifications.optIn.copyToClipboard': 'Copier dans le Presse-papiers',
|
|
247
|
+
'chat.media.uploading': 'Uploading...',
|
|
248
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
249
|
+
'chat.media.pick.title': 'Add Media',
|
|
250
|
+
'chat.media.pick.photo': 'Photo',
|
|
251
|
+
'chat.media.pick.video': 'Video',
|
|
252
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
229
253
|
},
|
|
230
254
|
de: {
|
|
231
255
|
'customer.form.title': 'Hallo👋',
|
|
@@ -285,6 +309,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
285
309
|
'notifications.optIn.cancel': 'Nicht Jetzt',
|
|
286
310
|
'notifications.optIn.openSettings': 'Einstellungen Öffnen',
|
|
287
311
|
'notifications.optIn.copyToClipboard': 'In die Zwischenablage kopieren',
|
|
312
|
+
'chat.media.uploading': 'Uploading...',
|
|
313
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
314
|
+
'chat.media.pick.title': 'Add Media',
|
|
315
|
+
'chat.media.pick.photo': 'Photo',
|
|
316
|
+
'chat.media.pick.video': 'Video',
|
|
317
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
288
318
|
},
|
|
289
319
|
it: {
|
|
290
320
|
'customer.form.title': 'Ciao👋',
|
|
@@ -341,6 +371,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
341
371
|
'notifications.optIn.cancel': 'Non Ora',
|
|
342
372
|
'notifications.optIn.openSettings': 'Apri Impostazioni',
|
|
343
373
|
'notifications.optIn.copyToClipboard': 'Copia negli Appunti',
|
|
374
|
+
'chat.media.uploading': 'Uploading...',
|
|
375
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
376
|
+
'chat.media.pick.title': 'Add Media',
|
|
377
|
+
'chat.media.pick.photo': 'Photo',
|
|
378
|
+
'chat.media.pick.video': 'Video',
|
|
379
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
344
380
|
},
|
|
345
381
|
pt: {
|
|
346
382
|
'customer.form.title': 'Olá👋',
|
|
@@ -400,6 +436,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
400
436
|
'notifications.optIn.openSettings': 'Abrir Configurações',
|
|
401
437
|
'notifications.optIn.copyToClipboard':
|
|
402
438
|
'Copiar para a Área de Transferência',
|
|
439
|
+
'chat.media.uploading': 'Uploading...',
|
|
440
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
441
|
+
'chat.media.pick.title': 'Add Media',
|
|
442
|
+
'chat.media.pick.photo': 'Photo',
|
|
443
|
+
'chat.media.pick.video': 'Video',
|
|
444
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
403
445
|
},
|
|
404
446
|
ru: {
|
|
405
447
|
'customer.form.title': 'Привет👋',
|
|
@@ -458,6 +500,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
458
500
|
'notifications.optIn.cancel': 'Не Сейчас',
|
|
459
501
|
'notifications.optIn.openSettings': 'Открыть Настройки',
|
|
460
502
|
'notifications.optIn.copyToClipboard': 'Скопировать в буфер обмена',
|
|
503
|
+
'chat.media.uploading': 'Uploading...',
|
|
504
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
505
|
+
'chat.media.pick.title': 'Add Media',
|
|
506
|
+
'chat.media.pick.photo': 'Photo',
|
|
507
|
+
'chat.media.pick.video': 'Video',
|
|
508
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
461
509
|
},
|
|
462
510
|
ja: {
|
|
463
511
|
'customer.form.title': 'こんにちは👋',
|
|
@@ -513,6 +561,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
513
561
|
'notifications.optIn.cancel': '今はしない',
|
|
514
562
|
'notifications.optIn.openSettings': '設定を開く',
|
|
515
563
|
'notifications.optIn.copyToClipboard': 'クリップボードにコピー',
|
|
564
|
+
'chat.media.uploading': 'Uploading...',
|
|
565
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
566
|
+
'chat.media.pick.title': 'Add Media',
|
|
567
|
+
'chat.media.pick.photo': 'Photo',
|
|
568
|
+
'chat.media.pick.video': 'Video',
|
|
569
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
516
570
|
},
|
|
517
571
|
zh: {
|
|
518
572
|
'customer.form.title': '你好👋',
|
|
@@ -563,6 +617,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
563
617
|
'notifications.optIn.cancel': '暂不',
|
|
564
618
|
'notifications.optIn.openSettings': '打开设置',
|
|
565
619
|
'notifications.optIn.copyToClipboard': '复制到剪贴板',
|
|
620
|
+
'chat.media.uploading': 'Uploading...',
|
|
621
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
622
|
+
'chat.media.pick.title': 'Add Media',
|
|
623
|
+
'chat.media.pick.photo': 'Photo',
|
|
624
|
+
'chat.media.pick.video': 'Video',
|
|
625
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
566
626
|
},
|
|
567
627
|
ar: {
|
|
568
628
|
'customer.form.title': 'مرحباً👋',
|
|
@@ -616,6 +676,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
616
676
|
'notifications.optIn.cancel': 'ليس الآن',
|
|
617
677
|
'notifications.optIn.openSettings': 'فتح الإعدادات',
|
|
618
678
|
'notifications.optIn.copyToClipboard': 'نسخ إلى الحافظة',
|
|
679
|
+
'chat.media.uploading': 'Uploading...',
|
|
680
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
681
|
+
'chat.media.pick.title': 'Add Media',
|
|
682
|
+
'chat.media.pick.photo': 'Photo',
|
|
683
|
+
'chat.media.pick.video': 'Video',
|
|
684
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
619
685
|
},
|
|
620
686
|
id: {
|
|
621
687
|
'customer.form.title': 'Halo👋',
|
|
@@ -670,6 +736,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
670
736
|
'notifications.optIn.cancel': 'Tidak Sekarang',
|
|
671
737
|
'notifications.optIn.openSettings': 'Buka Pengaturan',
|
|
672
738
|
'notifications.optIn.copyToClipboard': 'Salin ke Clipboard',
|
|
739
|
+
'chat.media.uploading': 'Uploading...',
|
|
740
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
741
|
+
'chat.media.pick.title': 'Add Media',
|
|
742
|
+
'chat.media.pick.photo': 'Photo',
|
|
743
|
+
'chat.media.pick.video': 'Video',
|
|
744
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
673
745
|
},
|
|
674
746
|
vi: {
|
|
675
747
|
'customer.form.title': 'Xin chào👋',
|
|
@@ -723,6 +795,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
723
795
|
'notifications.optIn.cancel': 'Không Phải Bây Giờ',
|
|
724
796
|
'notifications.optIn.openSettings': 'Mở Cài Đặt',
|
|
725
797
|
'notifications.optIn.copyToClipboard': 'Sao chép vào Clipboard',
|
|
798
|
+
'chat.media.uploading': 'Uploading...',
|
|
799
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
800
|
+
'chat.media.pick.title': 'Add Media',
|
|
801
|
+
'chat.media.pick.photo': 'Photo',
|
|
802
|
+
'chat.media.pick.video': 'Video',
|
|
803
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
726
804
|
},
|
|
727
805
|
sv: {
|
|
728
806
|
'customer.form.title': 'Hej👋',
|
|
@@ -778,6 +856,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
778
856
|
'notifications.optIn.cancel': 'Inte Nu',
|
|
779
857
|
'notifications.optIn.openSettings': 'Öppna Inställningar',
|
|
780
858
|
'notifications.optIn.copyToClipboard': 'Kopiera till Urklipp',
|
|
859
|
+
'chat.media.uploading': 'Uploading...',
|
|
860
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
861
|
+
'chat.media.pick.title': 'Add Media',
|
|
862
|
+
'chat.media.pick.photo': 'Photo',
|
|
863
|
+
'chat.media.pick.video': 'Video',
|
|
864
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
781
865
|
},
|
|
782
866
|
ko: {
|
|
783
867
|
'customer.form.title': '안녕하세요👋',
|
|
@@ -829,6 +913,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
829
913
|
'notifications.optIn.cancel': '나중에',
|
|
830
914
|
'notifications.optIn.openSettings': '설정 열기',
|
|
831
915
|
'notifications.optIn.copyToClipboard': '클립보드에 복사',
|
|
916
|
+
'chat.media.uploading': 'Uploading...',
|
|
917
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
918
|
+
'chat.media.pick.title': 'Add Media',
|
|
919
|
+
'chat.media.pick.photo': 'Photo',
|
|
920
|
+
'chat.media.pick.video': 'Video',
|
|
921
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
832
922
|
},
|
|
833
923
|
hi: {
|
|
834
924
|
'customer.form.title': 'नमस्ते👋',
|
|
@@ -885,6 +975,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
885
975
|
'notifications.optIn.cancel': 'अभी नहीं',
|
|
886
976
|
'notifications.optIn.openSettings': 'सेटिंग्स खोलें',
|
|
887
977
|
'notifications.optIn.copyToClipboard': 'क्लिपबोर्ड में कॉपी करें',
|
|
978
|
+
'chat.media.uploading': 'Uploading...',
|
|
979
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
980
|
+
'chat.media.pick.title': 'Add Media',
|
|
981
|
+
'chat.media.pick.photo': 'Photo',
|
|
982
|
+
'chat.media.pick.video': 'Video',
|
|
983
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
888
984
|
},
|
|
889
985
|
nl: {
|
|
890
986
|
'customer.form.title': 'Hallo👋',
|
|
@@ -940,6 +1036,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
940
1036
|
'notifications.optIn.cancel': 'Niet Nu',
|
|
941
1037
|
'notifications.optIn.openSettings': 'Instellingen Openen',
|
|
942
1038
|
'notifications.optIn.copyToClipboard': 'Kopieer naar Klembord',
|
|
1039
|
+
'chat.media.uploading': 'Uploading...',
|
|
1040
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1041
|
+
'chat.media.pick.title': 'Add Media',
|
|
1042
|
+
'chat.media.pick.photo': 'Photo',
|
|
1043
|
+
'chat.media.pick.video': 'Video',
|
|
1044
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
943
1045
|
},
|
|
944
1046
|
he: {
|
|
945
1047
|
'customer.form.title': 'שלום👋',
|
|
@@ -991,6 +1093,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
991
1093
|
'notifications.optIn.cancel': 'לא עכשיו',
|
|
992
1094
|
'notifications.optIn.openSettings': 'פתח הגדרות',
|
|
993
1095
|
'notifications.optIn.copyToClipboard': 'העתק ללוח',
|
|
1096
|
+
'chat.media.uploading': 'Uploading...',
|
|
1097
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1098
|
+
'chat.media.pick.title': 'Add Media',
|
|
1099
|
+
'chat.media.pick.photo': 'Photo',
|
|
1100
|
+
'chat.media.pick.video': 'Video',
|
|
1101
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
994
1102
|
},
|
|
995
1103
|
uk: {
|
|
996
1104
|
'customer.form.title': 'Привіт👋',
|
|
@@ -1047,6 +1155,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1047
1155
|
'notifications.optIn.cancel': 'Не Зараз',
|
|
1048
1156
|
'notifications.optIn.openSettings': 'Відкрити Налаштування',
|
|
1049
1157
|
'notifications.optIn.copyToClipboard': 'Скопіювати в буфер обміну',
|
|
1158
|
+
'chat.media.uploading': 'Uploading...',
|
|
1159
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1160
|
+
'chat.media.pick.title': 'Add Media',
|
|
1161
|
+
'chat.media.pick.photo': 'Photo',
|
|
1162
|
+
'chat.media.pick.video': 'Video',
|
|
1163
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1050
1164
|
},
|
|
1051
1165
|
hu: {
|
|
1052
1166
|
'customer.form.title': 'Helló👋',
|
|
@@ -1104,6 +1218,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1104
1218
|
'notifications.optIn.cancel': 'Most Nem',
|
|
1105
1219
|
'notifications.optIn.openSettings': 'Beállítások Megnyitása',
|
|
1106
1220
|
'notifications.optIn.copyToClipboard': 'Vágólapra másolás',
|
|
1221
|
+
'chat.media.uploading': 'Uploading...',
|
|
1222
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1223
|
+
'chat.media.pick.title': 'Add Media',
|
|
1224
|
+
'chat.media.pick.photo': 'Photo',
|
|
1225
|
+
'chat.media.pick.video': 'Video',
|
|
1226
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1107
1227
|
},
|
|
1108
1228
|
ro: {
|
|
1109
1229
|
'customer.form.title': 'Salut👋',
|
|
@@ -1162,6 +1282,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1162
1282
|
'notifications.optIn.cancel': 'Nu Acum',
|
|
1163
1283
|
'notifications.optIn.openSettings': 'Deschide Setările',
|
|
1164
1284
|
'notifications.optIn.copyToClipboard': 'Copiază în Clipboard',
|
|
1285
|
+
'chat.media.uploading': 'Uploading...',
|
|
1286
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1287
|
+
'chat.media.pick.title': 'Add Media',
|
|
1288
|
+
'chat.media.pick.photo': 'Photo',
|
|
1289
|
+
'chat.media.pick.video': 'Video',
|
|
1290
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1165
1291
|
},
|
|
1166
1292
|
ms: {
|
|
1167
1293
|
'customer.form.title': 'Hai👋',
|
|
@@ -1216,6 +1342,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1216
1342
|
'notifications.optIn.cancel': 'Bukan Sekarang',
|
|
1217
1343
|
'notifications.optIn.openSettings': 'Buka Tetapan',
|
|
1218
1344
|
'notifications.optIn.copyToClipboard': 'Salin ke Clipboard',
|
|
1345
|
+
'chat.media.uploading': 'Uploading...',
|
|
1346
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1347
|
+
'chat.media.pick.title': 'Add Media',
|
|
1348
|
+
'chat.media.pick.photo': 'Photo',
|
|
1349
|
+
'chat.media.pick.video': 'Video',
|
|
1350
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1219
1351
|
},
|
|
1220
1352
|
az: {
|
|
1221
1353
|
'customer.form.title': 'Salam👋',
|
|
@@ -1271,6 +1403,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1271
1403
|
'notifications.optIn.cancel': 'İndi Yox',
|
|
1272
1404
|
'notifications.optIn.openSettings': 'Ayarları Aç',
|
|
1273
1405
|
'notifications.optIn.copyToClipboard': 'Klipdorda kopyala',
|
|
1406
|
+
'chat.media.uploading': 'Uploading...',
|
|
1407
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1408
|
+
'chat.media.pick.title': 'Add Media',
|
|
1409
|
+
'chat.media.pick.photo': 'Photo',
|
|
1410
|
+
'chat.media.pick.video': 'Video',
|
|
1411
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1274
1412
|
},
|
|
1275
1413
|
hr: {
|
|
1276
1414
|
'customer.form.title': 'Bok👋',
|
|
@@ -1324,6 +1462,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1324
1462
|
'notifications.optIn.cancel': 'Ne Sada',
|
|
1325
1463
|
'notifications.optIn.openSettings': 'Otvori Postavke',
|
|
1326
1464
|
'notifications.optIn.copyToClipboard': 'Kopiraj u međuspremnik',
|
|
1465
|
+
'chat.media.uploading': 'Uploading...',
|
|
1466
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1467
|
+
'chat.media.pick.title': 'Add Media',
|
|
1468
|
+
'chat.media.pick.photo': 'Photo',
|
|
1469
|
+
'chat.media.pick.video': 'Video',
|
|
1470
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1327
1471
|
},
|
|
1328
1472
|
kk: {
|
|
1329
1473
|
'customer.form.title': 'Сәлем👋',
|
|
@@ -1379,6 +1523,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1379
1523
|
'notifications.optIn.cancel': 'Қазір Емес',
|
|
1380
1524
|
'notifications.optIn.openSettings': 'Параметрлерді Ашу',
|
|
1381
1525
|
'notifications.optIn.copyToClipboard': 'Буферге көшіру',
|
|
1526
|
+
'chat.media.uploading': 'Uploading...',
|
|
1527
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1528
|
+
'chat.media.pick.title': 'Add Media',
|
|
1529
|
+
'chat.media.pick.photo': 'Photo',
|
|
1530
|
+
'chat.media.pick.video': 'Video',
|
|
1531
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1382
1532
|
},
|
|
1383
1533
|
af: {
|
|
1384
1534
|
'customer.form.title': 'Hallo👋',
|
|
@@ -1435,6 +1585,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1435
1585
|
'notifications.optIn.cancel': 'Nie Nou Nie',
|
|
1436
1586
|
'notifications.optIn.openSettings': 'Maak Instellings Oop',
|
|
1437
1587
|
'notifications.optIn.copyToClipboard': 'Kopieer naar Klembord',
|
|
1588
|
+
'chat.media.uploading': 'Uploading...',
|
|
1589
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1590
|
+
'chat.media.pick.title': 'Add Media',
|
|
1591
|
+
'chat.media.pick.photo': 'Photo',
|
|
1592
|
+
'chat.media.pick.video': 'Video',
|
|
1593
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1438
1594
|
},
|
|
1439
1595
|
yo: {
|
|
1440
1596
|
'customer.form.title': 'Báwo👋',
|
|
@@ -1487,6 +1643,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1487
1643
|
'notifications.optIn.cancel': 'Kì í ṣe Báyìí',
|
|
1488
1644
|
'notifications.optIn.openSettings': 'Ṣí Àwọn Ètò',
|
|
1489
1645
|
'notifications.optIn.copyToClipboard': 'Kopier til Udklipsholderen',
|
|
1646
|
+
'chat.media.uploading': 'Uploading...',
|
|
1647
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1648
|
+
'chat.media.pick.title': 'Add Media',
|
|
1649
|
+
'chat.media.pick.photo': 'Photo',
|
|
1650
|
+
'chat.media.pick.video': 'Video',
|
|
1651
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1490
1652
|
},
|
|
1491
1653
|
da: {
|
|
1492
1654
|
'customer.form.title': 'Hej👋',
|
|
@@ -1541,6 +1703,12 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1541
1703
|
'notifications.optIn.cancel': 'Ikke Nu',
|
|
1542
1704
|
'notifications.optIn.openSettings': 'Åbn Indstillinger',
|
|
1543
1705
|
'notifications.optIn.copyToClipboard': 'Kopier til Udklipsholderen',
|
|
1706
|
+
'chat.media.uploading': 'Uploading...',
|
|
1707
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1708
|
+
'chat.media.pick.title': 'Add Media',
|
|
1709
|
+
'chat.media.pick.photo': 'Photo',
|
|
1710
|
+
'chat.media.pick.video': 'Video',
|
|
1711
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1544
1712
|
},
|
|
1545
1713
|
pl: {
|
|
1546
1714
|
'customer.form.title': 'Cześć👋',
|
|
@@ -1595,5 +1763,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1595
1763
|
'notifications.optIn.cancel': 'Nie Teraz',
|
|
1596
1764
|
'notifications.optIn.openSettings': 'Otwórz Ustawienia',
|
|
1597
1765
|
'notifications.optIn.copyToClipboard': 'Kopiuj do schowka',
|
|
1766
|
+
'chat.media.uploading': 'Uploading...',
|
|
1767
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1768
|
+
'chat.media.pick.title': 'Add Media',
|
|
1769
|
+
'chat.media.pick.photo': 'Photo',
|
|
1770
|
+
'chat.media.pick.video': 'Video',
|
|
1771
|
+
'chat.media.pick.cancel': 'Cancel',
|
|
1598
1772
|
},
|
|
1599
1773
|
} as const;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { UploadUrlResponse } from '../../types/MediaTypes';
|
|
2
|
+
import type { MessageResponse } from '../../types/MessageResponse';
|
|
3
|
+
|
|
4
|
+
export function getFakeUploadUrlResponse(
|
|
5
|
+
fileName: string
|
|
6
|
+
): Promise<UploadUrlResponse> {
|
|
7
|
+
return new Promise((resolve) => {
|
|
8
|
+
setTimeout(() => {
|
|
9
|
+
resolve({
|
|
10
|
+
data: {
|
|
11
|
+
path: `temp/${fileName}`,
|
|
12
|
+
url: `https://fake-s3-bucket.s3.amazonaws.com/temp/${fileName}?signed=true`,
|
|
13
|
+
method: 'PUT',
|
|
14
|
+
expires_at: new Date(Date.now() + 1200000).toISOString(),
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}, 300);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function fakeUploadToS3(
|
|
22
|
+
onProgress?: (percentage: number) => void
|
|
23
|
+
): Promise<void> {
|
|
24
|
+
return new Promise((resolve) => {
|
|
25
|
+
let progress = 0;
|
|
26
|
+
const interval = setInterval(() => {
|
|
27
|
+
progress += Math.random() * 15 + 5;
|
|
28
|
+
if (progress >= 100) {
|
|
29
|
+
progress = 100;
|
|
30
|
+
onProgress?.(100);
|
|
31
|
+
clearInterval(interval);
|
|
32
|
+
setTimeout(resolve, 200);
|
|
33
|
+
} else {
|
|
34
|
+
onProgress?.(Math.round(progress));
|
|
35
|
+
}
|
|
36
|
+
}, 300);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function getFakeMediaMessageResponse(
|
|
41
|
+
fileUrls: string[],
|
|
42
|
+
_mediaType: 'image' | 'video'
|
|
43
|
+
): Promise<MessageResponse> {
|
|
44
|
+
return new Promise((resolve) => {
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
resolve({
|
|
47
|
+
message: {
|
|
48
|
+
conversation_id: 1,
|
|
49
|
+
content: fileUrls.join(','),
|
|
50
|
+
is_note: false,
|
|
51
|
+
updated_at: new Date().toISOString(),
|
|
52
|
+
created_at: new Date().toISOString(),
|
|
53
|
+
id: Math.floor(Math.random() * 10000),
|
|
54
|
+
user: null,
|
|
55
|
+
customer: null,
|
|
56
|
+
bot: null,
|
|
57
|
+
conversation: {
|
|
58
|
+
id: 1,
|
|
59
|
+
project_id: 1,
|
|
60
|
+
customer_id: 1,
|
|
61
|
+
created_at: new Date().toISOString(),
|
|
62
|
+
updated_at: new Date().toISOString(),
|
|
63
|
+
deleted_at: null,
|
|
64
|
+
language: 'en',
|
|
65
|
+
use_ai_answers: 0,
|
|
66
|
+
project: {
|
|
67
|
+
id: 1,
|
|
68
|
+
name: 'Demo Project',
|
|
69
|
+
organization_id: 1,
|
|
70
|
+
created_at: new Date().toISOString(),
|
|
71
|
+
updated_at: new Date().toISOString(),
|
|
72
|
+
deleted_at: null,
|
|
73
|
+
uuid: 'demo-uuid',
|
|
74
|
+
organization: {
|
|
75
|
+
id: 1,
|
|
76
|
+
name: 'Demo Organization',
|
|
77
|
+
created_at: new Date().toISOString(),
|
|
78
|
+
updated_at: new Date().toISOString(),
|
|
79
|
+
deleted_at: null,
|
|
80
|
+
owner: [
|
|
81
|
+
{
|
|
82
|
+
id: 1,
|
|
83
|
+
name: 'Demo User',
|
|
84
|
+
email: 'demo@example.com',
|
|
85
|
+
email_verified_at: null,
|
|
86
|
+
created_at: new Date().toISOString(),
|
|
87
|
+
updated_at: new Date().toISOString(),
|
|
88
|
+
avatar: null,
|
|
89
|
+
two_factor_secret: null,
|
|
90
|
+
two_factor_recovery_codes: null,
|
|
91
|
+
is_bot: false,
|
|
92
|
+
profile_photo_url: '',
|
|
93
|
+
pivot: {
|
|
94
|
+
organization_id: 1,
|
|
95
|
+
user_id: 1,
|
|
96
|
+
role: 'owner',
|
|
97
|
+
created_at: new Date().toISOString(),
|
|
98
|
+
updated_at: new Date().toISOString(),
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
events: [],
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}, 500);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
@@ -5,15 +5,35 @@ export interface ConversationMessage {
|
|
|
5
5
|
user?: any | null;
|
|
6
6
|
bot?: any | null;
|
|
7
7
|
customer?: { name: string; profile_photo_url: null } | null;
|
|
8
|
+
files?: Array<{
|
|
9
|
+
id: number;
|
|
10
|
+
mime_type: string;
|
|
11
|
+
url: string;
|
|
12
|
+
}> | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface MediaFile {
|
|
16
|
+
url: string;
|
|
17
|
+
type: 'image' | 'video';
|
|
18
|
+
local_uri?: string;
|
|
19
|
+
thumbnail_uri?: string;
|
|
8
20
|
}
|
|
9
21
|
|
|
10
22
|
export interface AppConversationMessage
|
|
11
23
|
extends Omit<ConversationMessage, 'id' | 'created_at'> {
|
|
12
24
|
id: number | null;
|
|
25
|
+
local_id?: string;
|
|
13
26
|
approved?: boolean;
|
|
14
27
|
created_at: Date;
|
|
15
28
|
error?: boolean;
|
|
16
29
|
resending?: boolean;
|
|
30
|
+
media_url?: string | null;
|
|
31
|
+
media_type?: 'image' | 'video' | null;
|
|
32
|
+
media_local_uri?: string | null;
|
|
33
|
+
media_thumbnail_uri?: string | null;
|
|
34
|
+
media_files?: MediaFile[];
|
|
35
|
+
upload_progress?: number; // 0-100
|
|
36
|
+
is_uploading?: boolean;
|
|
17
37
|
}
|
|
18
38
|
|
|
19
39
|
export interface ConversationPage {
|
|
@@ -46,4 +46,10 @@ export type LocalizationKeys = {
|
|
|
46
46
|
'notifications.optIn.cancel': string;
|
|
47
47
|
'notifications.optIn.openSettings': string;
|
|
48
48
|
'notifications.optIn.copyToClipboard': string;
|
|
49
|
+
'chat.media.uploading': string;
|
|
50
|
+
'chat.media.upload.failed': string;
|
|
51
|
+
'chat.media.pick.title': string;
|
|
52
|
+
'chat.media.pick.photo': string;
|
|
53
|
+
'chat.media.pick.video': string;
|
|
54
|
+
'chat.media.pick.cancel': string;
|
|
49
55
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface MediaAsset {
|
|
2
|
+
uri: string;
|
|
3
|
+
type: 'image' | 'video';
|
|
4
|
+
fileName: string;
|
|
5
|
+
fileSize: number;
|
|
6
|
+
mimeType: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
duration?: number; // video only, seconds
|
|
10
|
+
thumbnailUri?: string; // video thumbnail
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UploadUrlResponse {
|
|
14
|
+
data: {
|
|
15
|
+
path: string; // e.g. "temp/uuid"
|
|
16
|
+
url: string; // S3 signed PUT URL
|
|
17
|
+
method: string;
|
|
18
|
+
expires_at: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface MediaFileDisplay {
|
|
23
|
+
url: string;
|
|
24
|
+
type: 'image' | 'video';
|
|
25
|
+
local_uri?: string;
|
|
26
|
+
thumbnail_uri?: string;
|
|
27
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated. Do not edit manually.
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.14.0';
|