@chat21/chat21-ionic 3.0.79 → 3.0.80-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/CHANGELOG.md +62 -2
  2. package/README.md +2 -2
  3. package/package.json +1 -1
  4. package/src/app/app.component.html +7 -1
  5. package/src/app/app.component.scss +18 -2
  6. package/src/app/app.component.ts +73 -15
  7. package/src/app/app.module.ts +3 -1
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +75 -23
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +162 -85
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -19
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -25
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
  25. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
  26. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
  27. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
  28. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
  29. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +62 -20
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
  33. package/src/app/components/canned-response/canned-response.component.html +4 -4
  34. package/src/app/components/canned-response/canned-response.component.scss +1 -1
  35. package/src/app/components/canned-response/canned-response.component.ts +1 -0
  36. package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
  37. package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
  38. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
  39. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
  40. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
  41. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -5
  42. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  43. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +4 -83
  44. package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
  45. package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
  46. package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
  47. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
  48. package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
  49. package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
  50. package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
  51. package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
  52. package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
  53. package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
  54. package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
  55. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
  56. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
  57. package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
  58. package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
  59. package/src/app/components/navbar/navbar.component.html +103 -0
  60. package/src/app/components/navbar/navbar.component.scss +249 -0
  61. package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
  62. package/src/app/components/navbar/navbar.component.ts +189 -0
  63. package/src/app/components/project-item/project-item.component.html +98 -149
  64. package/src/app/components/project-item/project-item.component.scss +42 -35
  65. package/src/app/components/project-item/project-item.component.ts +16 -4
  66. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  67. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
  68. package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
  69. package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
  70. package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
  71. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  72. package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -0
  73. package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
  74. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  75. package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -23
  76. package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
  77. package/src/app/pages/conversation-detail/conversation-detail.page.ts +183 -72
  78. package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
  79. package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
  80. package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
  81. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  82. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  83. package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
  84. package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
  85. package/src/app/pages/profile-info/profile-info.page.html +2 -4
  86. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  87. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  88. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  89. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  90. package/src/app/services/projects/projects.service.spec.ts +12 -0
  91. package/src/app/services/projects/projects.service.ts +43 -0
  92. package/src/app/services/tiledesk/tiledesk.service.ts +1 -25
  93. package/src/app/shared/shared.module.ts +24 -33
  94. package/src/assets/i18n/ar.json +278 -265
  95. package/src/assets/i18n/az.json +14 -1
  96. package/src/assets/i18n/de.json +15 -2
  97. package/src/assets/i18n/en.json +15 -2
  98. package/src/assets/i18n/es.json +15 -2
  99. package/src/assets/i18n/fr.json +14 -1
  100. package/src/assets/i18n/it.json +14 -1
  101. package/src/assets/i18n/kk.json +15 -2
  102. package/src/assets/i18n/pt.json +15 -2
  103. package/src/assets/i18n/ru.json +14 -1
  104. package/src/assets/i18n/sr.json +277 -264
  105. package/src/assets/i18n/sv.json +15 -2
  106. package/src/assets/i18n/tr.json +15 -2
  107. package/src/assets/i18n/uk.json +15 -2
  108. package/src/assets/i18n/uz.json +14 -1
  109. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  110. package/src/chat21-core/models/conversation.ts +0 -1
  111. package/src/chat21-core/models/projects.ts +27 -0
  112. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
  113. package/src/chat21-core/utils/constants.ts +5 -1
  114. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  115. package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
  116. package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
  117. package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
  118. package/src/chat21-core/utils/utils.ts +38 -10
  119. package/src/global.scss +48 -56
  120. package/src/index.html +2 -2
  121. package/src/variables.scss +30 -10
  122. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  123. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  124. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  125. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  126. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  127. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  128. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  129. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  130. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  131. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  132. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  133. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  134. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  135. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  136. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
  137. package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
  138. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
@@ -5,6 +5,8 @@
5
5
  "LABEL_AVAILABLE": "tillgängligt",
6
6
  "LABEL_NOT_AVAILABLE": "inte tillgänglig",
7
7
  "LABEL_INACTIVE":"inaktiv",
8
+ "LABEL_ONLINE":"uppkopplad",
9
+ "LABEL_OFFLINE":"off-line",
8
10
  "LABEL_NO_MSG_HERE": "Fortfarande inget meddelande här...",
9
11
  "LABEL_TODAY": "i dag",
10
12
  "LABEL_TOMORROW": "i går",
@@ -44,6 +46,7 @@
44
46
  "LABEL_VIDEO_CHAT": "Videosamtal",
45
47
  "LABEL_LEAVE_GROUP": "Lämna gruppen",
46
48
  "LABEL_CLOSE_GROUP": "Stänga",
49
+ "LABEL_OPEN_INFO_CONVERSATION":"Öppna konversationsinformation",
47
50
  "ALERT_TITLE": "Uppmärksamhet!",
48
51
  "CLOSE_ALERT_CONFIRM_LABEL": "OK",
49
52
  "CLOSE_ALERT_CANCEL_LABEL": "ANNULLERA",
@@ -67,7 +70,7 @@
67
70
  "INFO_SUPPORT_CHAT_CLOSED": "Chatten stängd",
68
71
  "INFO_SUPPORT_LEAD_UPDATED":"Lead uppdaterad",
69
72
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"borttagen från gruppen",
70
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"lämnade samtalet",
73
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"har lämnat konversationen",
71
74
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "En ny supportförfrågan har tilldelats dig",
72
75
  "LABEL_PROFILE": "Profil",
73
76
  "LABEL_CLOSE": "Stängd",
@@ -163,6 +166,8 @@
163
166
  "WAITING_TIME_FOUND": "Teamet svarar vanligtvis med $reply_time",
164
167
  "WAITING_TIME_NOT_FOUND": "Teamet kommer att svara så snart som möjligt",
165
168
  "CLOSED": "STÄNGD",
169
+ "DIRECT_CHAT":"Direkt chatt",
170
+ "GROUP_CHAT":"Gruppchatt",
166
171
  "PleaseSelectChatToStartMessaging": "Välj en chatt för att börja skicka meddelanden",
167
172
  "FromThisAreNew": "------------------",
168
173
  "Preview": "Förhandsvisning",
@@ -263,5 +268,13 @@
263
268
  "First_name_of_agent": "Agentens förnamn",
264
269
  "EnterCannedResponseTitle": "Ange standardsvarstitel",
265
270
  "WriteMsgToSendToYourVisitors": "Skriv ett standardsvarsmeddelande att skicka till dina besökare",
266
- "EditProfile": "Redigera profil"
271
+ "EditProfile": "Redigera profil",
272
+ "NAVBAR":{
273
+ "SIMULATE_VISITOR":"Simulera besökare",
274
+ "PROJECT_SETTINGS":"Projektinställningar",
275
+ "VIEW_ALL_PROJECTS":"Se alla projekt",
276
+ "ADD_PROJECT":"Lägg till projekt",
277
+ "RECENT_PROJECTS":"Nyliga projekt",
278
+ "OTHER_PROJECTS":"Andra projekt"
279
+ }
267
280
  }
@@ -5,6 +5,8 @@
5
5
  "LABEL_AVAILABLE": "mevcut",
6
6
  "LABEL_NOT_AVAILABLE": "müsait değil",
7
7
  "LABEL_INACTIVE":"etkin değil",
8
+ "LABEL_ONLINE":"internet üzerinden",
9
+ "LABEL_OFFLINE":"çevrimdışı",
8
10
  "LABEL_NO_MSG_HERE": "Hala mesaj yok...",
9
11
  "LABEL_TODAY": "bugün",
10
12
  "LABEL_TOMORROW": "dün",
@@ -44,6 +46,7 @@
44
46
  "LABEL_VIDEO_CHAT": "Görüntülü arama",
45
47
  "LABEL_LEAVE_GROUP": "Gruptan ayrıl",
46
48
  "LABEL_CLOSE_GROUP": "Kapat",
49
+ "LABEL_OPEN_INFO_CONVERSATION":"Görüşme ayrıntılarını aç",
47
50
  "ALERT_TITLE": "Dikkat!",
48
51
  "CLOSE_ALERT_CONFIRM_LABEL": "Tamam",
49
52
  "CLOSE_ALERT_CANCEL_LABEL": "İPTAL ET",
@@ -67,7 +70,7 @@
67
70
  "INFO_SUPPORT_CHAT_CLOSED": "sohbet kapatıldı",
68
71
  "INFO_SUPPORT_LEAD_UPDATED":"Potansiyel müşteri güncellendi",
69
72
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"gruptan kaldırıldı",
70
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"konuşmayı bıraktı",
73
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"görüşmeden ayrıldı",
71
74
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Size yeni bir destek talebi atandı",
72
75
  "LABEL_PROFILE": "Profil",
73
76
  "LABEL_CLOSE": "Kapalı",
@@ -163,6 +166,8 @@
163
166
  "WAITING_TIME_FOUND": "Ekip genellikle $reply_time",
164
167
  "WAITING_TIME_NOT_FOUND": "Ekip en kısa sürede cevap verecektir",
165
168
  "CLOSED": "KAPALI",
169
+ "DIRECT_CHAT":"Doğrudan sohbet",
170
+ "GROUP_CHAT":"Grup Sohbeti",
166
171
  "PleaseSelectChatToStartMessaging": "Mesajlaşmaya başlamak için lütfen bir sohbet seçin",
167
172
  "FromThisAreNew": "------------------",
168
173
  "Preview": "Ön izleme",
@@ -263,5 +268,13 @@
263
268
  "First_name_of_agent": "Ajanın adı",
264
269
  "EnterCannedResponseTitle": "Hazır yanıt başlığını girin",
265
270
  "WriteMsgToSendToYourVisitors": "Ziyaretçilerinize göndermek için hazır bir yanıt mesajı yazın",
266
- "EditProfile": "Profili Düzenle"
271
+ "EditProfile": "Profili Düzenle",
272
+ "NAVBAR":{
273
+ "SIMULATE_VISITOR":"Ziyaretçiyi simüle et",
274
+ "PROJECT_SETTINGS":"Proje ayarları",
275
+ "VIEW_ALL_PROJECTS":"Tüm projeleri görüntüle",
276
+ "ADD_PROJECT":"Proje ekle",
277
+ "RECENT_PROJECTS":"Son Projeler",
278
+ "OTHER_PROJECTS":"Diğer projeler"
279
+ }
267
280
  }
@@ -5,6 +5,8 @@
5
5
  "LABEL_AVAILABLE": "доступний",
6
6
  "LABEL_NOT_AVAILABLE": "недоступний",
7
7
  "LABEL_INACTIVE":"неактивний",
8
+ "LABEL_ONLINE":"онлайн",
9
+ "LABEL_OFFLINE":"офлайн",
8
10
  "LABEL_NO_MSG_HERE": "Тут досі немає повідомлення...",
9
11
  "LABEL_TODAY": "сьогодні",
10
12
  "LABEL_TOMORROW": "вчора",
@@ -44,6 +46,7 @@
44
46
  "LABEL_VIDEO_CHAT": "Відеодзвінок",
45
47
  "LABEL_LEAVE_GROUP": "Вийти з групи",
46
48
  "LABEL_CLOSE_GROUP": "Закрити",
49
+ "LABEL_OPEN_INFO_CONVERSATION":"Відкрити деталі розмови",
47
50
  "ALERT_TITLE": "Увага!",
48
51
  "CLOSE_ALERT_CONFIRM_LABEL": "добре",
49
52
  "CLOSE_ALERT_CANCEL_LABEL": "СКАСУВАТИ",
@@ -67,7 +70,7 @@
67
70
  "INFO_SUPPORT_CHAT_CLOSED": "Чат закритий",
68
71
  "INFO_SUPPORT_LEAD_UPDATED":"Лід оновлено",
69
72
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"видалено з групи",
70
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив розмову",
73
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив бесіду",
71
74
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Вам призначено новий запит на підтримку",
72
75
  "LABEL_PROFILE": "Профіль",
73
76
  "LABEL_CLOSE": "зачинено",
@@ -163,6 +166,8 @@
163
166
  "WAITING_TIME_FOUND": "Команда зазвичай відповідає $ час відповіді",
164
167
  "WAITING_TIME_NOT_FOUND": "Команда відповість якомога швидше",
165
168
  "CLOSED": "ЗАЧИНЕНО",
169
+ "DIRECT_CHAT":"Прямий чат",
170
+ "GROUP_CHAT":"Груповий чат",
166
171
  "PleaseSelectChatToStartMessaging": "Виберіть чат, щоб почати обмін повідомленнями",
167
172
  "FromThisAreNew": "------------------",
168
173
  "Preview": "Попередній перегляд",
@@ -263,5 +268,13 @@
263
268
  "First_name_of_agent": "Ім'я агента",
264
269
  "EnterCannedResponseTitle": "Введіть назву готової відповіді",
265
270
  "WriteMsgToSendToYourVisitors": "Напишіть готове повідомлення-відповідь, щоб надіслати його відвідувачам",
266
- "EditProfile": "Редагувати профіль"
271
+ "EditProfile": "Редагувати профіль",
272
+ "NAVBAR":{
273
+ "SIMULATE_VISITOR":"Імітація відвідувача",
274
+ "PROJECT_SETTINGS":"Налаштування проекту",
275
+ "VIEW_ALL_PROJECTS":"Переглянути всі проекти",
276
+ "ADD_PROJECT":"Додати проект",
277
+ "RECENT_PROJECTS":"Останні проекти",
278
+ "OTHER_PROJECTS":"Інші проекти"
279
+ }
267
280
  }
@@ -6,6 +6,8 @@
6
6
  "LABEL_AVAILABLE": "mavjud",
7
7
  "LABEL_NOT_AVAILABLE": "mavjud emas",
8
8
  "LABEL_INACTIVE":"harakatsiz",
9
+ "LABEL_ONLINE":"onlayn",
10
+ "LABEL_OFFLINE":"oflayn",
9
11
  "LABEL_NO_MSG_HERE": "Bu yerda hali xabar yo'q...",
10
12
  "LABEL_TODAY": "Bugun",
11
13
  "LABEL_TOMORROW": "kecha",
@@ -45,6 +47,7 @@
45
47
  "LABEL_VIDEO_CHAT": "Video qo'ng'iroq",
46
48
  "LABEL_LEAVE_GROUP": "Guruhni tark eting",
47
49
  "LABEL_CLOSE_GROUP": "Yopish",
50
+ "LABEL_OPEN_INFO_CONVERSATION":"Suhbat tafsilotlarini oching",
48
51
  "ALERT_TITLE": "Diqqat!",
49
52
  "CLOSE_ALERT_CONFIRM_LABEL": "OK",
50
53
  "CLOSE_ALERT_CANCEL_LABEL": "BEKOR",
@@ -164,6 +167,8 @@
164
167
  "WAITING_TIME_FOUND": "Jamoa odatda $reply_timebilan javob beradi",
165
168
  "WAITING_TIME_NOT_FOUND": "Jamoa imkon qadar tezroq javob beradi",
166
169
  "CLOSED": "YOPIQ",
170
+ "DIRECT_CHAT":"To'g'ridan-to'g'ri suhbat",
171
+ "GROUP_CHAT":"Guruh suhbati",
167
172
  "PleaseSelectChatToStartMessaging": "Xabar yozishni boshlash uchun chatni tanlang",
168
173
  "FromThisAreNew": "------------------",
169
174
  "Preview": "Ko‘rib chiqish",
@@ -264,5 +269,13 @@
264
269
  "First_name_of_agent": "Agentning ismi",
265
270
  "EnterCannedResponseTitle": "Tayyor javob sarlavhasini kiriting",
266
271
  "WriteMsgToSendToYourVisitors": "Mehmonlaringizga yuborish uchun konservalangan javob xabarini yozing",
267
- "EditProfile": "Profilni tahrirlash"
272
+ "EditProfile": "Profilni tahrirlash",
273
+ "NAVBAR":{
274
+ "SIMULATE_VISITOR":"Mehmonni simulyatsiya qilish",
275
+ "PROJECT_SETTINGS":"Loyiha sozlamalari",
276
+ "VIEW_ALL_PROJECTS":"Barcha loyihalarni ko'rish",
277
+ "ADD_PROJECT":"Loyiha qo'shish",
278
+ "RECENT_PROJECTS":"So'nggi loyihalar",
279
+ "OTHER_PROJECTS":"Boshqa loyihalar"
280
+ }
268
281
  }
@@ -16,7 +16,6 @@ export class ConversationModel {
16
16
  public sender_fullname: string,
17
17
  public status: string,
18
18
  public timestamp: number,
19
- public time_last_message: string,
20
19
  // public selected: boolean,
21
20
  public color: string,
22
21
  public avatar: string,
@@ -0,0 +1,27 @@
1
+ export interface Project {
2
+ _id: string;
3
+ updatedAt?: any;
4
+ createdAt?: any;
5
+ name?: string;
6
+ activeOperatingHours?: boolean;
7
+ operatingHours?: any
8
+ createdBy?: string;
9
+ id_project?: any;
10
+ widget?: any;
11
+ settings?: any;
12
+ role?: string;
13
+ user_available?: boolean;
14
+ profile_name?: any;
15
+ profile_agents?: any;
16
+ trial_expired?: any;
17
+ trial_days_left?: number;
18
+ trial_days?: number;
19
+ profile_type?: string;
20
+ subscription_is_active?: any;
21
+ profile?: any;
22
+ subscription_end_date?: any;
23
+ subscription_id?: any;
24
+ subscription_creation_date?: any;
25
+ subscription_start_date?: any;
26
+ __v?: any;
27
+ }
@@ -12,11 +12,11 @@ import 'firebase/database';
12
12
  import { TypingService } from '../abstract/typing.service';
13
13
  import { CustomLogger } from '../logger/customLogger';
14
14
  import { LoggerInstance } from '../logger/loggerInstance';
15
+ import { TIME_TYPING_MESSAGE } from 'src/chat21-core/utils/constants';
15
16
 
16
17
 
17
18
  export class TypingModel {
18
19
 
19
-
20
20
  constructor(
21
21
  public uid: string,
22
22
  public timestamp: any,
@@ -35,14 +35,11 @@ export class FirebaseTypingService extends TypingService {
35
35
  BSIsTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
36
36
  BSSetTyping: BehaviorSubject<any> = new BehaviorSubject<any>(null);
37
37
 
38
- // public params
39
- // public tenant: string;
40
- private tenant: string;
41
-
42
- // private params
43
38
  private urlNodeTypings: string;
44
39
  private setTimeoutWritingMessages: any;
40
+ private tenant: string;
45
41
  private logger: LoggerService = LoggerInstance.getInstance();
42
+ private ref: firebase.database.Query;
46
43
 
47
44
  constructor() {
48
45
  super();
@@ -64,10 +61,11 @@ export class FirebaseTypingService extends TypingService {
64
61
  urlTyping = this.urlNodeTypings + idCurrentUser + '/' + idConversation;
65
62
  }
66
63
  this.logger.debug('[FIREBASETypingSERVICE] urlTyping: ', urlTyping);
67
- const ref = firebase.database().ref(urlTyping);
68
- ref.on('child_changed', (childSnapshot) => {
64
+ this.ref = firebase.database().ref(urlTyping);
65
+ this.ref.on('child_changed', (childSnapshot) => {
69
66
  const precence: TypingModel = childSnapshot.val();
70
- this.BSIsTyping.next({uid: idConversation, uidUserTypingNow: precence.uid, nameUserTypingNow: precence.name});
67
+ this.logger.debug('[FIREBASETypingSERVICE] child_changed: ', precence);
68
+ this.BSIsTyping.next({uid: idConversation, uidUserTypingNow: precence.uid, nameUserTypingNow: precence.name, waitTime: TIME_TYPING_MESSAGE});
71
69
  });
72
70
  }
73
71
 
@@ -43,8 +43,12 @@ export const CHANNEL_TYPE_GROUP = 'group';
43
43
  // TYPES MESSAGES
44
44
  export const TYPE_MSG_TEXT = 'text';
45
45
  export const TYPE_MSG_IMAGE = 'image';
46
+ export const TYPE_MSG_FILE = 'file';
47
+ export const TYPE_MSG_BUTTON = 'button';
48
+
46
49
  export const MAX_WIDTH_IMAGES = 300;
47
50
  export const MIN_WIDTH_IMAGES = 130;
51
+ export const TIME_TYPING_MESSAGE = 2000;
48
52
  export const TYPE_DIRECT = 'direct';
49
53
  export const TYPE_GROUP = 'group';
50
54
  export const SYSTEM = 'system';
@@ -69,7 +73,7 @@ export const TOUCHING_OPERATOR = "TOUCHING_OPERATOR";
69
73
  // URLS
70
74
  // export const URL_SOUND = 'assets/sounds/pling.mp3';
71
75
  export const URL_SOUND_LIST_CONVERSATION = '/assets/sounds/pling.mp3';
72
- export const URL_SOUND_CONVERSATION_DETAIL = '/assets/sounds/justsaying.mp3';
76
+ export const URL_SOUND_CONVERSATION_ADDED = '/assets/sounds/wheep-wheep.mp3';
73
77
  // export const CHAT_SEND_BY_EMAIL_LINK =
74
78
  // 'mailto:?subject=Transcript Chat Conversation&body=Salve,%0D%0A%0D%0Adi
75
79
  // seguito potrà scaricare il transcript della conversazione intercorsa con il nostro servizio di
@@ -0,0 +1,41 @@
1
+ import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
2
+ import { ConversationModel } from 'src/chat21-core/models/conversation';
3
+ import { Inject, Injectable, OnInit } from '@angular/core';
4
+ import { avatarPlaceholder, getColorBck } from './utils-user';
5
+ import moment from 'moment';
6
+
7
+ @Injectable()
8
+ export class ConvertRequestToConversation {
9
+
10
+
11
+
12
+ initialize(){
13
+
14
+ }
15
+
16
+ getConvFromRequest(request: any): ConversationModel{
17
+ return new ConversationModel(
18
+ request.request_id,
19
+ request.attributes,
20
+ request.request_id && (request.request_id.startsWith('group-') || request.request_id.startsWith('support-group'))? TYPE_SUPPORT_GROUP: TYPE_DIRECT,
21
+ request.lead && request.lead.fullname ? request.lead.fullname: null,
22
+ request.requester_id,
23
+ request.lead && request.lead.fullname ? request.lead.fullname: null,
24
+ request.requester_id,
25
+ '',
26
+ true,
27
+ request.first_text,
28
+ request.first_text,
29
+ request.requester_id,
30
+ '',
31
+ request.lead && request.lead.fullname ? request.lead.fullname: null,
32
+ '0',
33
+ moment(request.createdAt).unix(),
34
+ getColorBck(request.lead.fullname),
35
+ avatarPlaceholder(request.lead.fullname),
36
+ false,
37
+ 'text'
38
+ );
39
+ }
40
+
41
+ }
@@ -1,6 +1,9 @@
1
- <div class="tile-typing-now" [class.active]="isTyping">
2
- <span *ngIf="nameUserTypingNow">
3
- {{nameUserTypingNow}}
4
- </span>
5
- {{ translationMap?.get('LABEL_IS_WRITING') }}
1
+ <div class="tile-typing-now" *ngIf="typingLocation === 'header'">
2
+ <span *ngIf="nameUserTypingNow">{{nameUserTypingNow}} </span>
3
+ {{ translationMap?.get('LABEL_WRITING') }}
4
+ </div>
5
+ <div class="spinner" *ngIf="typingLocation === 'content'">
6
+ <div class="bounce1"></div>
7
+ <div class="bounce2"></div>
8
+ <div class="bounce3"></div>
6
9
  </div>
@@ -1,10 +1,24 @@
1
+ :root {
2
+ --themeColor: rgb(240, 242, 247);
3
+ --foregroundColor: black;
4
+ }
5
+
6
+
1
7
  .tile-typing-now {
2
- font-size: 12px;
3
- background-color: #fff;
4
- display: none;
5
- &.active {
6
- display: block;
7
- }
8
+ position: absolute;
9
+ left: 40px;
10
+ right: 40px;
11
+ bottom: 3px;
12
+ width: auto;
13
+ text-align: center;
14
+ margin: 0px;
15
+ padding: 0px;
16
+ font-size: 1.1em;
17
+ color: var(--foregroundColor);
18
+ //display: none;
19
+ // &.active {
20
+ // display: block;
21
+ // }
8
22
  }
9
23
 
10
24
  /* BEGIN LOADING */
@@ -14,49 +28,105 @@
14
28
  left: 0;
15
29
  top: 0;
16
30
  margin: 0;
17
- &.active {
18
- display: inline-block;
19
- width: 30px;
20
- }
31
+ // &.active {
32
+ // display: inline-block;
33
+ // width: 30px;
34
+ // }
21
35
  }
22
36
  #tile-spinner > div {
23
37
  width: 6px;
24
38
  height: 6px;
25
39
  background-color: var(--basic-blue);
26
40
  }
41
+ // .spinner {
42
+ // margin: 100px auto 0;
43
+ // width: 70px;
44
+ // text-align: center;
45
+ // }
46
+ // .spinner > div {
47
+ // width: 18px;
48
+ // height: 18px;
49
+ // background-color: #333;
50
+ // border-radius: 100%;
51
+ // display: inline-block;
52
+ // -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
53
+ // animation: sk-bouncedelay 1.4s infinite ease-in-out both;
54
+ // }
55
+ // .spinner .bounce1 {
56
+ // -webkit-animation-delay: -0.32s;
57
+ // animation-delay: -0.32s;
58
+ // }
59
+ // .spinner .bounce2 {
60
+ // -webkit-animation-delay: -0.16s;
61
+ // animation-delay: -0.16s;
62
+ // }
63
+ // @-webkit-keyframes sk-bouncedelay {
64
+ // 0%, 80%, 100% { -webkit-transform: scale(0) }
65
+ // 40% { -webkit-transform: scale(1.0) }
66
+ // }
67
+ // @keyframes sk-bouncedelay {
68
+ // 0%, 80%, 100% {
69
+ // -webkit-transform: scale(0);
70
+ // transform: scale(0);
71
+ // } 40% {
72
+ // -webkit-transform: scale(1.0);
73
+ // transform: scale(1.0);
74
+ // }
75
+ // }
76
+ /* END LOADING */
77
+
78
+
79
+ /* ******BOUNCE SPINNER START****** */
27
80
  .spinner {
28
- margin: 100px auto 0;
81
+ margin: 15px 10px; //remove it if activate avatar image
29
82
  width: 70px;
30
- text-align: center;
83
+ // text-align: center;
84
+ min-height: 20px;
85
+ display: block;
31
86
  }
87
+
32
88
  .spinner > div {
33
- width: 18px;
34
- height: 18px;
89
+ width: 9px;
90
+ height: 9px;
35
91
  background-color: #333;
92
+
36
93
  border-radius: 100%;
37
94
  display: inline-block;
38
95
  -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
39
96
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
40
97
  }
98
+
41
99
  .spinner .bounce1 {
42
100
  -webkit-animation-delay: -0.32s;
43
101
  animation-delay: -0.32s;
102
+ background-color: var(--themeColor)
44
103
  }
104
+
45
105
  .spinner .bounce2 {
46
106
  -webkit-animation-delay: -0.16s;
47
107
  animation-delay: -0.16s;
108
+ background-color: var(--themeColor);
109
+ opacity: 0.4
48
110
  }
111
+
112
+ .spinner .bounce3 {
113
+ background-color: var(--themeColor);
114
+ opacity: 0.6
115
+ }
116
+
117
+
49
118
  @-webkit-keyframes sk-bouncedelay {
50
119
  0%, 80%, 100% { -webkit-transform: scale(0) }
51
120
  40% { -webkit-transform: scale(1.0) }
52
121
  }
122
+
53
123
  @keyframes sk-bouncedelay {
54
124
  0%, 80%, 100% {
55
- -webkit-transform: scale(0);
56
- transform: scale(0);
125
+ -webkit-transform: scale(0);
126
+ transform: scale(0);
57
127
  } 40% {
58
128
  -webkit-transform: scale(1.0);
59
129
  transform: scale(1.0);
60
130
  }
61
131
  }
62
- /* END LOADING */
132
+ /* ******BOUNCE SPINNER END****** */
@@ -1,113 +1,31 @@
1
- import { Component, OnInit, OnDestroy, Input } from '@angular/core';
2
-
3
- // services
4
- import { TypingService } from '../../providers/abstract/typing.service';
5
-
6
- // Logger
7
- import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
8
- import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
1
+ import { Component, OnInit, OnDestroy, Input, ElementRef } from '@angular/core';
9
2
 
10
3
  @Component({
11
- selector: 'app-user-typing',
4
+ selector: 'user-typing',
12
5
  templateUrl: './user-typing.component.html',
13
6
  styleUrls: ['./user-typing.component.scss'],
14
7
  })
15
8
  export class UserTypingComponent implements OnInit, OnDestroy {
16
9
 
17
- @Input() idConversation: string;
18
- @Input() idCurrentUser: string;
19
- @Input() isDirect: boolean;
10
+ // @Input() idConversation: string;
11
+ // @Input() idCurrentUser: string;
12
+ // @Input() isDirect: boolean;
13
+ @Input() typingLocation: string = 'content'
20
14
  @Input() translationMap: Map<string, string>;
21
- @Input() color: string;
22
- @Input() membersConversation: [string];
23
-
24
- public status = '';
25
- public isTyping = false;
26
- public nameUserTypingNow: string;
27
-
28
- private setTimeoutWritingMessages: any;
29
- private subscriptions = [];
30
-
31
- private logger: LoggerService = LoggerInstance.getInstance();
15
+ @Input() themeColor: string;
16
+ @Input() idUserTypingNow: string;
17
+ @Input() nameUserTypingNow: string;
18
+ // @Input() membersConversation: [string];
32
19
 
33
- constructor(
34
- public typingService: TypingService
35
- ) { }
20
+ constructor(private elementRef: ElementRef) { }
36
21
 
37
22
  /** */
38
23
  ngOnInit() {
39
- this.logger.log('[USER-TYPING-COMPONENT] - ngOnInit');
40
- this.initialize();
24
+ this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
41
25
  }
42
26
 
43
27
  /** */
44
28
  ngOnDestroy() {
45
- this.logger.log('UserTypingComponent - ngOnDestroy');
46
- // this.unsubescribeAll();
47
- }
48
-
49
- /** */
50
- initialize() {
51
- this.status = ''; // this.translationMap.get('LABEL_AVAILABLE');
52
- this.logger.log('this.translationMap', this.translationMap);
53
- this.logger.log('this.status', this.status);
54
- this.setSubscriptions();
55
- this.typingService.isTyping(this.idConversation, this.idCurrentUser, this.isDirect);
56
- }
57
-
58
- /** */
59
- private setSubscriptions() {
60
- const that = this;
61
- const conversationSelected = this.subscriptions.find(item => item.key === this.idConversation);
62
- if (!conversationSelected) {
63
- const subscribeBSIsTyping = this.typingService.BSIsTyping.subscribe((data: any) => {
64
- this.logger.log('***** BSIsTyping *****', data);
65
- if (data) {
66
- const isTypingUid = data.uid;
67
- if (this.idConversation === isTypingUid) {
68
- that.subscribeTypings(data);
69
- }
70
- }
71
- });
72
- const subscribe = {key: this.idConversation, value: subscribeBSIsTyping };
73
- this.subscriptions.push(subscribe);
74
- }
75
- }
76
-
77
- /** */
78
- subscribeTypings(data: any) {
79
- const that = this;
80
- try {
81
- const key = data.uidUserTypingNow;
82
- this.nameUserTypingNow = null;
83
- if (data.nameUserTypingNow) {
84
- this.nameUserTypingNow = data.nameUserTypingNow;
85
- }
86
- this.logger.log('subscribeTypings data:', data);
87
- const userTyping = this.membersConversation.includes(key);
88
- if ( !userTyping ) {
89
- this.isTyping = true;
90
- this.logger.log('child_changed key', key);
91
- this.logger.log('child_changed name', this.nameUserTypingNow);
92
- clearTimeout(this.setTimeoutWritingMessages);
93
- this.setTimeoutWritingMessages = setTimeout(() => {
94
- that.isTyping = false;
95
- }, 2000);
96
- }
97
- } catch (error) {
98
- this.logger.log('error: ', error);
99
- }
100
- }
101
-
102
-
103
- /** */
104
- private unsubescribeAll() {
105
- this.logger.log('UserTypingComponent unsubescribeAll: ', this.subscriptions);
106
- this.subscriptions.forEach((subscription: any) => {
107
- this.logger.log('unsubescribe: ', subscription);
108
- subscription.unsubescribe();
109
- });
110
- this.subscriptions = [];
111
29
  }
112
30
 
113
31