@developer_tribe/react-native-comnyx 0.13.13 → 0.15.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 +347 -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 +29 -0
- package/ios/ComnyxMediaPicker.swift +436 -0
- package/lib/commonjs/NativeComnyxMediaPicker.js +83 -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/gallery.png +0 -0
- package/lib/commonjs/assets/video-play.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 +244 -0
- package/lib/commonjs/components/MediaPickerButton.js.map +1 -0
- package/lib/commonjs/components/MediaViewerModal.js +164 -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 -8
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/constants/translations.js +174 -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 +73 -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/gallery.png +0 -0
- package/lib/module/assets/video-play.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 +240 -0
- package/lib/module/components/MediaPickerButton.js.map +1 -0
- package/lib/module/components/MediaViewerModal.js +160 -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 -8
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/constants/translations.js +174 -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 +9 -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 +5 -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 +83 -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/gallery.png +0 -0
- package/src/assets/video-play.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 +269 -0
- package/src/components/MediaViewerModal.tsx +168 -0
- package/src/components/MessageInput.tsx +396 -84
- package/src/components/MessageItem.tsx +19 -5
- package/src/constants/translations.ts +145 -0
- package/src/data/fake/media.ts +110 -0
- package/src/types/Conversation.ts +20 -0
- package/src/types/LocalizationKeys.ts +5 -0
- package/src/types/MediaTypes.ts +27 -0
- package/src/version.ts +1 -1
|
@@ -56,6 +56,11 @@ 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': 'Select media source',
|
|
62
|
+
'chat.media.pick.photo': 'Choose Photo',
|
|
63
|
+
'chat.media.pick.video': 'Choose Video',
|
|
59
64
|
},
|
|
60
65
|
tr: {
|
|
61
66
|
'customer.form.title': 'Merhaba👋',
|
|
@@ -111,6 +116,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
111
116
|
'notifications.optIn.cancel': 'Şimdi Değil',
|
|
112
117
|
'notifications.optIn.openSettings': 'Ayarları Aç',
|
|
113
118
|
'notifications.optIn.copyToClipboard': 'Panoya Kopyala',
|
|
119
|
+
'chat.media.uploading': 'Uploading...',
|
|
120
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
121
|
+
'chat.media.pick.title': 'Medya kaynağı seçin',
|
|
122
|
+
'chat.media.pick.photo': 'Fotoğraf Seç',
|
|
123
|
+
'chat.media.pick.video': 'Video Seç',
|
|
114
124
|
},
|
|
115
125
|
es: {
|
|
116
126
|
'customer.form.title': 'Hola👋',
|
|
@@ -168,6 +178,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
168
178
|
'notifications.optIn.cancel': 'Ahora No',
|
|
169
179
|
'notifications.optIn.openSettings': 'Abrir Configuración',
|
|
170
180
|
'notifications.optIn.copyToClipboard': 'Copiar al Portapapeles',
|
|
181
|
+
'chat.media.uploading': 'Uploading...',
|
|
182
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
183
|
+
'chat.media.pick.title': 'Seleccionar fuente de medios',
|
|
184
|
+
'chat.media.pick.photo': 'Elegir Foto',
|
|
185
|
+
'chat.media.pick.video': 'Elegir Video',
|
|
171
186
|
},
|
|
172
187
|
fr: {
|
|
173
188
|
'customer.form.title': 'Bonjour👋',
|
|
@@ -226,6 +241,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
226
241
|
'notifications.optIn.cancel': 'Pas Maintenant',
|
|
227
242
|
'notifications.optIn.openSettings': 'Ouvrir les Paramètres',
|
|
228
243
|
'notifications.optIn.copyToClipboard': 'Copier dans le Presse-papiers',
|
|
244
|
+
'chat.media.uploading': 'Uploading...',
|
|
245
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
246
|
+
'chat.media.pick.title': 'Sélectionner la source média',
|
|
247
|
+
'chat.media.pick.photo': 'Choisir une Photo',
|
|
248
|
+
'chat.media.pick.video': 'Choisir une Vidéo',
|
|
229
249
|
},
|
|
230
250
|
de: {
|
|
231
251
|
'customer.form.title': 'Hallo👋',
|
|
@@ -285,6 +305,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
285
305
|
'notifications.optIn.cancel': 'Nicht Jetzt',
|
|
286
306
|
'notifications.optIn.openSettings': 'Einstellungen Öffnen',
|
|
287
307
|
'notifications.optIn.copyToClipboard': 'In die Zwischenablage kopieren',
|
|
308
|
+
'chat.media.uploading': 'Uploading...',
|
|
309
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
310
|
+
'chat.media.pick.title': 'Medienquelle auswählen',
|
|
311
|
+
'chat.media.pick.photo': 'Foto auswählen',
|
|
312
|
+
'chat.media.pick.video': 'Video auswählen',
|
|
288
313
|
},
|
|
289
314
|
it: {
|
|
290
315
|
'customer.form.title': 'Ciao👋',
|
|
@@ -341,6 +366,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
341
366
|
'notifications.optIn.cancel': 'Non Ora',
|
|
342
367
|
'notifications.optIn.openSettings': 'Apri Impostazioni',
|
|
343
368
|
'notifications.optIn.copyToClipboard': 'Copia negli Appunti',
|
|
369
|
+
'chat.media.uploading': 'Uploading...',
|
|
370
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
371
|
+
'chat.media.pick.title': 'Seleziona sorgente media',
|
|
372
|
+
'chat.media.pick.photo': 'Scegli Foto',
|
|
373
|
+
'chat.media.pick.video': 'Scegli Video',
|
|
344
374
|
},
|
|
345
375
|
pt: {
|
|
346
376
|
'customer.form.title': 'Olá👋',
|
|
@@ -400,6 +430,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
400
430
|
'notifications.optIn.openSettings': 'Abrir Configurações',
|
|
401
431
|
'notifications.optIn.copyToClipboard':
|
|
402
432
|
'Copiar para a Área de Transferência',
|
|
433
|
+
'chat.media.uploading': 'Uploading...',
|
|
434
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
435
|
+
'chat.media.pick.title': 'Selecionar fonte de mídia',
|
|
436
|
+
'chat.media.pick.photo': 'Escolher Foto',
|
|
437
|
+
'chat.media.pick.video': 'Escolher Vídeo',
|
|
403
438
|
},
|
|
404
439
|
ru: {
|
|
405
440
|
'customer.form.title': 'Привет👋',
|
|
@@ -458,6 +493,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
458
493
|
'notifications.optIn.cancel': 'Не Сейчас',
|
|
459
494
|
'notifications.optIn.openSettings': 'Открыть Настройки',
|
|
460
495
|
'notifications.optIn.copyToClipboard': 'Скопировать в буфер обмена',
|
|
496
|
+
'chat.media.uploading': 'Uploading...',
|
|
497
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
498
|
+
'chat.media.pick.title': 'Выберите источник медиа',
|
|
499
|
+
'chat.media.pick.photo': 'Выбрать Фото',
|
|
500
|
+
'chat.media.pick.video': 'Выбрать Видео',
|
|
461
501
|
},
|
|
462
502
|
ja: {
|
|
463
503
|
'customer.form.title': 'こんにちは👋',
|
|
@@ -513,6 +553,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
513
553
|
'notifications.optIn.cancel': '今はしない',
|
|
514
554
|
'notifications.optIn.openSettings': '設定を開く',
|
|
515
555
|
'notifications.optIn.copyToClipboard': 'クリップボードにコピー',
|
|
556
|
+
'chat.media.uploading': 'Uploading...',
|
|
557
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
558
|
+
'chat.media.pick.title': 'メディアソースを選択',
|
|
559
|
+
'chat.media.pick.photo': '写真を選択',
|
|
560
|
+
'chat.media.pick.video': '動画を選択',
|
|
516
561
|
},
|
|
517
562
|
zh: {
|
|
518
563
|
'customer.form.title': '你好👋',
|
|
@@ -563,6 +608,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
563
608
|
'notifications.optIn.cancel': '暂不',
|
|
564
609
|
'notifications.optIn.openSettings': '打开设置',
|
|
565
610
|
'notifications.optIn.copyToClipboard': '复制到剪贴板',
|
|
611
|
+
'chat.media.uploading': 'Uploading...',
|
|
612
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
613
|
+
'chat.media.pick.title': '选择媒体来源',
|
|
614
|
+
'chat.media.pick.photo': '选择照片',
|
|
615
|
+
'chat.media.pick.video': '选择视频',
|
|
566
616
|
},
|
|
567
617
|
ar: {
|
|
568
618
|
'customer.form.title': 'مرحباً👋',
|
|
@@ -616,6 +666,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
616
666
|
'notifications.optIn.cancel': 'ليس الآن',
|
|
617
667
|
'notifications.optIn.openSettings': 'فتح الإعدادات',
|
|
618
668
|
'notifications.optIn.copyToClipboard': 'نسخ إلى الحافظة',
|
|
669
|
+
'chat.media.uploading': 'Uploading...',
|
|
670
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
671
|
+
'chat.media.pick.title': 'اختر مصدر الوسائط',
|
|
672
|
+
'chat.media.pick.photo': 'اختر صورة',
|
|
673
|
+
'chat.media.pick.video': 'اختر فيديو',
|
|
619
674
|
},
|
|
620
675
|
id: {
|
|
621
676
|
'customer.form.title': 'Halo👋',
|
|
@@ -670,6 +725,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
670
725
|
'notifications.optIn.cancel': 'Tidak Sekarang',
|
|
671
726
|
'notifications.optIn.openSettings': 'Buka Pengaturan',
|
|
672
727
|
'notifications.optIn.copyToClipboard': 'Salin ke Clipboard',
|
|
728
|
+
'chat.media.uploading': 'Uploading...',
|
|
729
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
730
|
+
'chat.media.pick.title': 'Pilih sumber media',
|
|
731
|
+
'chat.media.pick.photo': 'Pilih Foto',
|
|
732
|
+
'chat.media.pick.video': 'Pilih Video',
|
|
673
733
|
},
|
|
674
734
|
vi: {
|
|
675
735
|
'customer.form.title': 'Xin chào👋',
|
|
@@ -723,6 +783,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
723
783
|
'notifications.optIn.cancel': 'Không Phải Bây Giờ',
|
|
724
784
|
'notifications.optIn.openSettings': 'Mở Cài Đặt',
|
|
725
785
|
'notifications.optIn.copyToClipboard': 'Sao chép vào Clipboard',
|
|
786
|
+
'chat.media.uploading': 'Uploading...',
|
|
787
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
788
|
+
'chat.media.pick.title': 'Chọn nguồn phương tiện',
|
|
789
|
+
'chat.media.pick.photo': 'Chọn Ảnh',
|
|
790
|
+
'chat.media.pick.video': 'Chọn Video',
|
|
726
791
|
},
|
|
727
792
|
sv: {
|
|
728
793
|
'customer.form.title': 'Hej👋',
|
|
@@ -778,6 +843,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
778
843
|
'notifications.optIn.cancel': 'Inte Nu',
|
|
779
844
|
'notifications.optIn.openSettings': 'Öppna Inställningar',
|
|
780
845
|
'notifications.optIn.copyToClipboard': 'Kopiera till Urklipp',
|
|
846
|
+
'chat.media.uploading': 'Uploading...',
|
|
847
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
848
|
+
'chat.media.pick.title': 'Välj mediakälla',
|
|
849
|
+
'chat.media.pick.photo': 'Välj Foto',
|
|
850
|
+
'chat.media.pick.video': 'Välj Video',
|
|
781
851
|
},
|
|
782
852
|
ko: {
|
|
783
853
|
'customer.form.title': '안녕하세요👋',
|
|
@@ -829,6 +899,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
829
899
|
'notifications.optIn.cancel': '나중에',
|
|
830
900
|
'notifications.optIn.openSettings': '설정 열기',
|
|
831
901
|
'notifications.optIn.copyToClipboard': '클립보드에 복사',
|
|
902
|
+
'chat.media.uploading': 'Uploading...',
|
|
903
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
904
|
+
'chat.media.pick.title': '미디어 소스 선택',
|
|
905
|
+
'chat.media.pick.photo': '사진 선택',
|
|
906
|
+
'chat.media.pick.video': '동영상 선택',
|
|
832
907
|
},
|
|
833
908
|
hi: {
|
|
834
909
|
'customer.form.title': 'नमस्ते👋',
|
|
@@ -885,6 +960,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
885
960
|
'notifications.optIn.cancel': 'अभी नहीं',
|
|
886
961
|
'notifications.optIn.openSettings': 'सेटिंग्स खोलें',
|
|
887
962
|
'notifications.optIn.copyToClipboard': 'क्लिपबोर्ड में कॉपी करें',
|
|
963
|
+
'chat.media.uploading': 'Uploading...',
|
|
964
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
965
|
+
'chat.media.pick.title': 'मीडिया स्रोत चुनें',
|
|
966
|
+
'chat.media.pick.photo': 'फोटो चुनें',
|
|
967
|
+
'chat.media.pick.video': 'वीडियो चुनें',
|
|
888
968
|
},
|
|
889
969
|
nl: {
|
|
890
970
|
'customer.form.title': 'Hallo👋',
|
|
@@ -940,6 +1020,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
940
1020
|
'notifications.optIn.cancel': 'Niet Nu',
|
|
941
1021
|
'notifications.optIn.openSettings': 'Instellingen Openen',
|
|
942
1022
|
'notifications.optIn.copyToClipboard': 'Kopieer naar Klembord',
|
|
1023
|
+
'chat.media.uploading': 'Uploading...',
|
|
1024
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1025
|
+
'chat.media.pick.title': 'Selecteer mediabron',
|
|
1026
|
+
'chat.media.pick.photo': 'Kies Foto',
|
|
1027
|
+
'chat.media.pick.video': 'Kies Video',
|
|
943
1028
|
},
|
|
944
1029
|
he: {
|
|
945
1030
|
'customer.form.title': 'שלום👋',
|
|
@@ -991,6 +1076,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
991
1076
|
'notifications.optIn.cancel': 'לא עכשיו',
|
|
992
1077
|
'notifications.optIn.openSettings': 'פתח הגדרות',
|
|
993
1078
|
'notifications.optIn.copyToClipboard': 'העתק ללוח',
|
|
1079
|
+
'chat.media.uploading': 'Uploading...',
|
|
1080
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1081
|
+
'chat.media.pick.title': 'בחר מקור מדיה',
|
|
1082
|
+
'chat.media.pick.photo': 'בחר תמונה',
|
|
1083
|
+
'chat.media.pick.video': 'בחר סרטון',
|
|
994
1084
|
},
|
|
995
1085
|
uk: {
|
|
996
1086
|
'customer.form.title': 'Привіт👋',
|
|
@@ -1047,6 +1137,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1047
1137
|
'notifications.optIn.cancel': 'Не Зараз',
|
|
1048
1138
|
'notifications.optIn.openSettings': 'Відкрити Налаштування',
|
|
1049
1139
|
'notifications.optIn.copyToClipboard': 'Скопіювати в буфер обміну',
|
|
1140
|
+
'chat.media.uploading': 'Uploading...',
|
|
1141
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1142
|
+
'chat.media.pick.title': 'Оберіть джерело медіа',
|
|
1143
|
+
'chat.media.pick.photo': 'Обрати Фото',
|
|
1144
|
+
'chat.media.pick.video': 'Обрати Відео',
|
|
1050
1145
|
},
|
|
1051
1146
|
hu: {
|
|
1052
1147
|
'customer.form.title': 'Helló👋',
|
|
@@ -1104,6 +1199,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1104
1199
|
'notifications.optIn.cancel': 'Most Nem',
|
|
1105
1200
|
'notifications.optIn.openSettings': 'Beállítások Megnyitása',
|
|
1106
1201
|
'notifications.optIn.copyToClipboard': 'Vágólapra másolás',
|
|
1202
|
+
'chat.media.uploading': 'Uploading...',
|
|
1203
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1204
|
+
'chat.media.pick.title': 'Válasszon médiaforrást',
|
|
1205
|
+
'chat.media.pick.photo': 'Fotó kiválasztása',
|
|
1206
|
+
'chat.media.pick.video': 'Videó kiválasztása',
|
|
1107
1207
|
},
|
|
1108
1208
|
ro: {
|
|
1109
1209
|
'customer.form.title': 'Salut👋',
|
|
@@ -1162,6 +1262,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1162
1262
|
'notifications.optIn.cancel': 'Nu Acum',
|
|
1163
1263
|
'notifications.optIn.openSettings': 'Deschide Setările',
|
|
1164
1264
|
'notifications.optIn.copyToClipboard': 'Copiază în Clipboard',
|
|
1265
|
+
'chat.media.uploading': 'Uploading...',
|
|
1266
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1267
|
+
'chat.media.pick.title': 'Selectați sursa media',
|
|
1268
|
+
'chat.media.pick.photo': 'Alegeți Foto',
|
|
1269
|
+
'chat.media.pick.video': 'Alegeți Video',
|
|
1165
1270
|
},
|
|
1166
1271
|
ms: {
|
|
1167
1272
|
'customer.form.title': 'Hai👋',
|
|
@@ -1216,6 +1321,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1216
1321
|
'notifications.optIn.cancel': 'Bukan Sekarang',
|
|
1217
1322
|
'notifications.optIn.openSettings': 'Buka Tetapan',
|
|
1218
1323
|
'notifications.optIn.copyToClipboard': 'Salin ke Clipboard',
|
|
1324
|
+
'chat.media.uploading': 'Uploading...',
|
|
1325
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1326
|
+
'chat.media.pick.title': 'Pilih sumber media',
|
|
1327
|
+
'chat.media.pick.photo': 'Pilih Foto',
|
|
1328
|
+
'chat.media.pick.video': 'Pilih Video',
|
|
1219
1329
|
},
|
|
1220
1330
|
az: {
|
|
1221
1331
|
'customer.form.title': 'Salam👋',
|
|
@@ -1271,6 +1381,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1271
1381
|
'notifications.optIn.cancel': 'İndi Yox',
|
|
1272
1382
|
'notifications.optIn.openSettings': 'Ayarları Aç',
|
|
1273
1383
|
'notifications.optIn.copyToClipboard': 'Klipdorda kopyala',
|
|
1384
|
+
'chat.media.uploading': 'Uploading...',
|
|
1385
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1386
|
+
'chat.media.pick.title': 'Media mənbəyini seçin',
|
|
1387
|
+
'chat.media.pick.photo': 'Şəkil Seç',
|
|
1388
|
+
'chat.media.pick.video': 'Video Seç',
|
|
1274
1389
|
},
|
|
1275
1390
|
hr: {
|
|
1276
1391
|
'customer.form.title': 'Bok👋',
|
|
@@ -1324,6 +1439,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1324
1439
|
'notifications.optIn.cancel': 'Ne Sada',
|
|
1325
1440
|
'notifications.optIn.openSettings': 'Otvori Postavke',
|
|
1326
1441
|
'notifications.optIn.copyToClipboard': 'Kopiraj u međuspremnik',
|
|
1442
|
+
'chat.media.uploading': 'Uploading...',
|
|
1443
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1444
|
+
'chat.media.pick.title': 'Odaberite izvor medija',
|
|
1445
|
+
'chat.media.pick.photo': 'Odaberi Fotografiju',
|
|
1446
|
+
'chat.media.pick.video': 'Odaberi Video',
|
|
1327
1447
|
},
|
|
1328
1448
|
kk: {
|
|
1329
1449
|
'customer.form.title': 'Сәлем👋',
|
|
@@ -1379,6 +1499,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1379
1499
|
'notifications.optIn.cancel': 'Қазір Емес',
|
|
1380
1500
|
'notifications.optIn.openSettings': 'Параметрлерді Ашу',
|
|
1381
1501
|
'notifications.optIn.copyToClipboard': 'Буферге көшіру',
|
|
1502
|
+
'chat.media.uploading': 'Uploading...',
|
|
1503
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1504
|
+
'chat.media.pick.title': 'Медиа көзін таңдаңыз',
|
|
1505
|
+
'chat.media.pick.photo': 'Фото таңдау',
|
|
1506
|
+
'chat.media.pick.video': 'Бейне таңдау',
|
|
1382
1507
|
},
|
|
1383
1508
|
af: {
|
|
1384
1509
|
'customer.form.title': 'Hallo👋',
|
|
@@ -1435,6 +1560,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1435
1560
|
'notifications.optIn.cancel': 'Nie Nou Nie',
|
|
1436
1561
|
'notifications.optIn.openSettings': 'Maak Instellings Oop',
|
|
1437
1562
|
'notifications.optIn.copyToClipboard': 'Kopieer naar Klembord',
|
|
1563
|
+
'chat.media.uploading': 'Uploading...',
|
|
1564
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1565
|
+
'chat.media.pick.title': 'Kies mediabron',
|
|
1566
|
+
'chat.media.pick.photo': 'Kies Foto',
|
|
1567
|
+
'chat.media.pick.video': 'Kies Video',
|
|
1438
1568
|
},
|
|
1439
1569
|
yo: {
|
|
1440
1570
|
'customer.form.title': 'Báwo👋',
|
|
@@ -1487,6 +1617,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1487
1617
|
'notifications.optIn.cancel': 'Kì í ṣe Báyìí',
|
|
1488
1618
|
'notifications.optIn.openSettings': 'Ṣí Àwọn Ètò',
|
|
1489
1619
|
'notifications.optIn.copyToClipboard': 'Kopier til Udklipsholderen',
|
|
1620
|
+
'chat.media.uploading': 'Uploading...',
|
|
1621
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1622
|
+
'chat.media.pick.title': 'Yan oríṣun iṣẹ́ amóhùn',
|
|
1623
|
+
'chat.media.pick.photo': 'Yan Àwòrán',
|
|
1624
|
+
'chat.media.pick.video': 'Yan Fídíò',
|
|
1490
1625
|
},
|
|
1491
1626
|
da: {
|
|
1492
1627
|
'customer.form.title': 'Hej👋',
|
|
@@ -1541,6 +1676,11 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1541
1676
|
'notifications.optIn.cancel': 'Ikke Nu',
|
|
1542
1677
|
'notifications.optIn.openSettings': 'Åbn Indstillinger',
|
|
1543
1678
|
'notifications.optIn.copyToClipboard': 'Kopier til Udklipsholderen',
|
|
1679
|
+
'chat.media.uploading': 'Uploading...',
|
|
1680
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1681
|
+
'chat.media.pick.title': 'Vælg mediekilde',
|
|
1682
|
+
'chat.media.pick.photo': 'Vælg Foto',
|
|
1683
|
+
'chat.media.pick.video': 'Vælg Video',
|
|
1544
1684
|
},
|
|
1545
1685
|
pl: {
|
|
1546
1686
|
'customer.form.title': 'Cześć👋',
|
|
@@ -1595,5 +1735,10 @@ export const LocalizationList: Record<LanguageCode, LocalizationKeys> = {
|
|
|
1595
1735
|
'notifications.optIn.cancel': 'Nie Teraz',
|
|
1596
1736
|
'notifications.optIn.openSettings': 'Otwórz Ustawienia',
|
|
1597
1737
|
'notifications.optIn.copyToClipboard': 'Kopiuj do schowka',
|
|
1738
|
+
'chat.media.uploading': 'Uploading...',
|
|
1739
|
+
'chat.media.upload.failed': 'Upload failed',
|
|
1740
|
+
'chat.media.pick.title': 'Wybierz źródło mediów',
|
|
1741
|
+
'chat.media.pick.photo': 'Wybierz Zdjęcie',
|
|
1742
|
+
'chat.media.pick.video': 'Wybierz Wideo',
|
|
1598
1743
|
},
|
|
1599
1744
|
} 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,9 @@ 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;
|
|
49
54
|
};
|
|
@@ -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.15.0';
|