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

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 (141) hide show
  1. package/CHANGELOG.md +4 -61
  2. package/README.md +2 -2
  3. package/package.json +2 -2
  4. package/src/app/app.component.html +1 -7
  5. package/src/app/app.component.scss +2 -18
  6. package/src/app/app.component.ts +15 -73
  7. package/src/app/app.module.ts +1 -3
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -75
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +85 -162
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +19 -7
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
  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 +25 -16
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
  25. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  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 +6 -16
  28. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  29. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  30. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  33. package/src/app/components/canned-response/canned-response.component.html +5 -5
  34. package/src/app/components/canned-response/canned-response.component.scss +1 -1
  35. package/src/app/components/canned-response/canned-response.component.ts +0 -1
  36. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  37. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  38. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  39. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  40. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  41. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  42. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  43. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  44. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
  45. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  46. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  47. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  48. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  49. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  50. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  51. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  52. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  53. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  54. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  55. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  56. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  57. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +5 -6
  58. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  59. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +83 -4
  60. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  61. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  62. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
  63. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
  64. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  65. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  66. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  67. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  68. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  69. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  70. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  71. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  72. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  73. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  74. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  75. package/src/app/components/project-item/project-item.component.html +149 -98
  76. package/src/app/components/project-item/project-item.component.scss +35 -42
  77. package/src/app/components/project-item/project-item.component.ts +4 -16
  78. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  79. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
  80. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  81. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  82. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  83. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  84. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  85. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  86. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  87. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  88. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  89. package/src/app/pages/conversation-detail/conversation-detail.page.ts +84 -190
  90. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  91. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  92. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  93. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  94. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  95. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  96. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  97. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  99. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  100. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  101. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  102. package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
  103. package/src/app/shared/shared.module.ts +33 -24
  104. package/src/assets/i18n/ar.json +265 -278
  105. package/src/assets/i18n/az.json +1 -14
  106. package/src/assets/i18n/de.json +2 -15
  107. package/src/assets/i18n/en.json +2 -15
  108. package/src/assets/i18n/es.json +2 -15
  109. package/src/assets/i18n/fr.json +1 -14
  110. package/src/assets/i18n/it.json +1 -14
  111. package/src/assets/i18n/kk.json +2 -15
  112. package/src/assets/i18n/pt.json +2 -15
  113. package/src/assets/i18n/ru.json +1 -14
  114. package/src/assets/i18n/sr.json +264 -277
  115. package/src/assets/i18n/sv.json +2 -15
  116. package/src/assets/i18n/tr.json +2 -15
  117. package/src/assets/i18n/uk.json +2 -15
  118. package/src/assets/i18n/uz.json +1 -14
  119. package/src/chat21-core/models/conversation.ts +1 -0
  120. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  121. package/src/chat21-core/utils/constants.ts +1 -5
  122. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  123. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  124. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  125. package/src/chat21-core/utils/utils.ts +10 -38
  126. package/src/global.scss +57 -48
  127. package/src/index.html +2 -2
  128. package/src/variables.scss +10 -30
  129. package/deploy_amazon_beta.sh +0 -29
  130. package/deploy_amazon_prod.sh +0 -30
  131. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  132. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  133. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  134. package/src/app/components/navbar/navbar.component.html +0 -103
  135. package/src/app/components/navbar/navbar.component.scss +0 -249
  136. package/src/app/components/navbar/navbar.component.ts +0 -189
  137. package/src/app/services/projects/projects.service.spec.ts +0 -12
  138. package/src/app/services/projects/projects.service.ts +0 -43
  139. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  140. package/src/chat21-core/models/projects.ts +0 -27
  141. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
@@ -5,8 +5,6 @@
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",
10
8
  "LABEL_NO_MSG_HERE": "Fortfarande inget meddelande här...",
11
9
  "LABEL_TODAY": "i dag",
12
10
  "LABEL_TOMORROW": "i går",
@@ -46,7 +44,6 @@
46
44
  "LABEL_VIDEO_CHAT": "Videosamtal",
47
45
  "LABEL_LEAVE_GROUP": "Lämna gruppen",
48
46
  "LABEL_CLOSE_GROUP": "Stänga",
49
- "LABEL_OPEN_INFO_CONVERSATION":"Öppna konversationsinformation",
50
47
  "ALERT_TITLE": "Uppmärksamhet!",
51
48
  "CLOSE_ALERT_CONFIRM_LABEL": "OK",
52
49
  "CLOSE_ALERT_CANCEL_LABEL": "ANNULLERA",
@@ -70,7 +67,7 @@
70
67
  "INFO_SUPPORT_CHAT_CLOSED": "Chatten stängd",
71
68
  "INFO_SUPPORT_LEAD_UPDATED":"Lead uppdaterad",
72
69
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"borttagen från gruppen",
73
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"har lämnat konversationen",
70
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"lämnade samtalet",
74
71
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "En ny supportförfrågan har tilldelats dig",
75
72
  "LABEL_PROFILE": "Profil",
76
73
  "LABEL_CLOSE": "Stängd",
@@ -166,8 +163,6 @@
166
163
  "WAITING_TIME_FOUND": "Teamet svarar vanligtvis med $reply_time",
167
164
  "WAITING_TIME_NOT_FOUND": "Teamet kommer att svara så snart som möjligt",
168
165
  "CLOSED": "STÄNGD",
169
- "DIRECT_CHAT":"Direkt chatt",
170
- "GROUP_CHAT":"Gruppchatt",
171
166
  "PleaseSelectChatToStartMessaging": "Välj en chatt för att börja skicka meddelanden",
172
167
  "FromThisAreNew": "------------------",
173
168
  "Preview": "Förhandsvisning",
@@ -268,13 +263,5 @@
268
263
  "First_name_of_agent": "Agentens förnamn",
269
264
  "EnterCannedResponseTitle": "Ange standardsvarstitel",
270
265
  "WriteMsgToSendToYourVisitors": "Skriv ett standardsvarsmeddelande att skicka till dina besökare",
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
- }
266
+ "EditProfile": "Redigera profil"
280
267
  }
@@ -5,8 +5,6 @@
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ışı",
10
8
  "LABEL_NO_MSG_HERE": "Hala mesaj yok...",
11
9
  "LABEL_TODAY": "bugün",
12
10
  "LABEL_TOMORROW": "dün",
@@ -46,7 +44,6 @@
46
44
  "LABEL_VIDEO_CHAT": "Görüntülü arama",
47
45
  "LABEL_LEAVE_GROUP": "Gruptan ayrıl",
48
46
  "LABEL_CLOSE_GROUP": "Kapat",
49
- "LABEL_OPEN_INFO_CONVERSATION":"Görüşme ayrıntılarını aç",
50
47
  "ALERT_TITLE": "Dikkat!",
51
48
  "CLOSE_ALERT_CONFIRM_LABEL": "Tamam",
52
49
  "CLOSE_ALERT_CANCEL_LABEL": "İPTAL ET",
@@ -70,7 +67,7 @@
70
67
  "INFO_SUPPORT_CHAT_CLOSED": "sohbet kapatıldı",
71
68
  "INFO_SUPPORT_LEAD_UPDATED":"Potansiyel müşteri güncellendi",
72
69
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"gruptan kaldırıldı",
73
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"görüşmeden ayrıldı",
70
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"konuşmayı bıraktı",
74
71
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Size yeni bir destek talebi atandı",
75
72
  "LABEL_PROFILE": "Profil",
76
73
  "LABEL_CLOSE": "Kapalı",
@@ -166,8 +163,6 @@
166
163
  "WAITING_TIME_FOUND": "Ekip genellikle $reply_time",
167
164
  "WAITING_TIME_NOT_FOUND": "Ekip en kısa sürede cevap verecektir",
168
165
  "CLOSED": "KAPALI",
169
- "DIRECT_CHAT":"Doğrudan sohbet",
170
- "GROUP_CHAT":"Grup Sohbeti",
171
166
  "PleaseSelectChatToStartMessaging": "Mesajlaşmaya başlamak için lütfen bir sohbet seçin",
172
167
  "FromThisAreNew": "------------------",
173
168
  "Preview": "Ön izleme",
@@ -268,13 +263,5 @@
268
263
  "First_name_of_agent": "Ajanın adı",
269
264
  "EnterCannedResponseTitle": "Hazır yanıt başlığını girin",
270
265
  "WriteMsgToSendToYourVisitors": "Ziyaretçilerinize göndermek için hazır bir yanıt mesajı yazın",
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
- }
266
+ "EditProfile": "Profili Düzenle"
280
267
  }
@@ -5,8 +5,6 @@
5
5
  "LABEL_AVAILABLE": "доступний",
6
6
  "LABEL_NOT_AVAILABLE": "недоступний",
7
7
  "LABEL_INACTIVE":"неактивний",
8
- "LABEL_ONLINE":"онлайн",
9
- "LABEL_OFFLINE":"офлайн",
10
8
  "LABEL_NO_MSG_HERE": "Тут досі немає повідомлення...",
11
9
  "LABEL_TODAY": "сьогодні",
12
10
  "LABEL_TOMORROW": "вчора",
@@ -46,7 +44,6 @@
46
44
  "LABEL_VIDEO_CHAT": "Відеодзвінок",
47
45
  "LABEL_LEAVE_GROUP": "Вийти з групи",
48
46
  "LABEL_CLOSE_GROUP": "Закрити",
49
- "LABEL_OPEN_INFO_CONVERSATION":"Відкрити деталі розмови",
50
47
  "ALERT_TITLE": "Увага!",
51
48
  "CLOSE_ALERT_CONFIRM_LABEL": "добре",
52
49
  "CLOSE_ALERT_CANCEL_LABEL": "СКАСУВАТИ",
@@ -70,7 +67,7 @@
70
67
  "INFO_SUPPORT_CHAT_CLOSED": "Чат закритий",
71
68
  "INFO_SUPPORT_LEAD_UPDATED":"Лід оновлено",
72
69
  "INFO_SUPPORT_MEMBER_LEFT_GROUP":"видалено з групи",
73
- "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив бесіду",
70
+ "INFO_SUPPORT_MEMBER_ABANDONED_GROUP":"залишив розмову",
74
71
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Вам призначено новий запит на підтримку",
75
72
  "LABEL_PROFILE": "Профіль",
76
73
  "LABEL_CLOSE": "зачинено",
@@ -166,8 +163,6 @@
166
163
  "WAITING_TIME_FOUND": "Команда зазвичай відповідає $ час відповіді",
167
164
  "WAITING_TIME_NOT_FOUND": "Команда відповість якомога швидше",
168
165
  "CLOSED": "ЗАЧИНЕНО",
169
- "DIRECT_CHAT":"Прямий чат",
170
- "GROUP_CHAT":"Груповий чат",
171
166
  "PleaseSelectChatToStartMessaging": "Виберіть чат, щоб почати обмін повідомленнями",
172
167
  "FromThisAreNew": "------------------",
173
168
  "Preview": "Попередній перегляд",
@@ -268,13 +263,5 @@
268
263
  "First_name_of_agent": "Ім'я агента",
269
264
  "EnterCannedResponseTitle": "Введіть назву готової відповіді",
270
265
  "WriteMsgToSendToYourVisitors": "Напишіть готове повідомлення-відповідь, щоб надіслати його відвідувачам",
271
- "EditProfile": "Редагувати профіль",
272
- "NAVBAR":{
273
- "SIMULATE_VISITOR":"Імітація відвідувача",
274
- "PROJECT_SETTINGS":"Налаштування проекту",
275
- "VIEW_ALL_PROJECTS":"Переглянути всі проекти",
276
- "ADD_PROJECT":"Додати проект",
277
- "RECENT_PROJECTS":"Останні проекти",
278
- "OTHER_PROJECTS":"Інші проекти"
279
- }
266
+ "EditProfile": "Редагувати профіль"
280
267
  }
@@ -6,8 +6,6 @@
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",
11
9
  "LABEL_NO_MSG_HERE": "Bu yerda hali xabar yo'q...",
12
10
  "LABEL_TODAY": "Bugun",
13
11
  "LABEL_TOMORROW": "kecha",
@@ -47,7 +45,6 @@
47
45
  "LABEL_VIDEO_CHAT": "Video qo'ng'iroq",
48
46
  "LABEL_LEAVE_GROUP": "Guruhni tark eting",
49
47
  "LABEL_CLOSE_GROUP": "Yopish",
50
- "LABEL_OPEN_INFO_CONVERSATION":"Suhbat tafsilotlarini oching",
51
48
  "ALERT_TITLE": "Diqqat!",
52
49
  "CLOSE_ALERT_CONFIRM_LABEL": "OK",
53
50
  "CLOSE_ALERT_CANCEL_LABEL": "BEKOR",
@@ -167,8 +164,6 @@
167
164
  "WAITING_TIME_FOUND": "Jamoa odatda $reply_timebilan javob beradi",
168
165
  "WAITING_TIME_NOT_FOUND": "Jamoa imkon qadar tezroq javob beradi",
169
166
  "CLOSED": "YOPIQ",
170
- "DIRECT_CHAT":"To'g'ridan-to'g'ri suhbat",
171
- "GROUP_CHAT":"Guruh suhbati",
172
167
  "PleaseSelectChatToStartMessaging": "Xabar yozishni boshlash uchun chatni tanlang",
173
168
  "FromThisAreNew": "------------------",
174
169
  "Preview": "Ko‘rib chiqish",
@@ -269,13 +264,5 @@
269
264
  "First_name_of_agent": "Agentning ismi",
270
265
  "EnterCannedResponseTitle": "Tayyor javob sarlavhasini kiriting",
271
266
  "WriteMsgToSendToYourVisitors": "Mehmonlaringizga yuborish uchun konservalangan javob xabarini yozing",
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
- }
267
+ "EditProfile": "Profilni tahrirlash"
281
268
  }
@@ -16,6 +16,7 @@ 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,
19
20
  // public selected: boolean,
20
21
  public color: string,
21
22
  public avatar: string,
@@ -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';
16
15
 
17
16
 
18
17
  export class TypingModel {
19
18
 
19
+
20
20
  constructor(
21
21
  public uid: string,
22
22
  public timestamp: any,
@@ -35,11 +35,14 @@ 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
38
43
  private urlNodeTypings: string;
39
44
  private setTimeoutWritingMessages: any;
40
- private tenant: string;
41
45
  private logger: LoggerService = LoggerInstance.getInstance();
42
- private ref: firebase.database.Query;
43
46
 
44
47
  constructor() {
45
48
  super();
@@ -61,11 +64,10 @@ export class FirebaseTypingService extends TypingService {
61
64
  urlTyping = this.urlNodeTypings + idCurrentUser + '/' + idConversation;
62
65
  }
63
66
  this.logger.debug('[FIREBASETypingSERVICE] urlTyping: ', urlTyping);
64
- this.ref = firebase.database().ref(urlTyping);
65
- this.ref.on('child_changed', (childSnapshot) => {
67
+ const ref = firebase.database().ref(urlTyping);
68
+ ref.on('child_changed', (childSnapshot) => {
66
69
  const precence: TypingModel = childSnapshot.val();
67
- this.logger.debug('[FIREBASETypingSERVICE] child_changed: ', precence);
68
- this.BSIsTyping.next({uid: idConversation, uidUserTypingNow: precence.uid, nameUserTypingNow: precence.name, waitTime: TIME_TYPING_MESSAGE});
70
+ this.BSIsTyping.next({uid: idConversation, uidUserTypingNow: precence.uid, nameUserTypingNow: precence.name});
69
71
  });
70
72
  }
71
73
 
@@ -43,12 +43,8 @@ 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
-
49
46
  export const MAX_WIDTH_IMAGES = 300;
50
47
  export const MIN_WIDTH_IMAGES = 130;
51
- export const TIME_TYPING_MESSAGE = 2000;
52
48
  export const TYPE_DIRECT = 'direct';
53
49
  export const TYPE_GROUP = 'group';
54
50
  export const SYSTEM = 'system';
@@ -73,7 +69,7 @@ export const TOUCHING_OPERATOR = "TOUCHING_OPERATOR";
73
69
  // URLS
74
70
  // export const URL_SOUND = 'assets/sounds/pling.mp3';
75
71
  export const URL_SOUND_LIST_CONVERSATION = '/assets/sounds/pling.mp3';
76
- export const URL_SOUND_CONVERSATION_ADDED = '/assets/sounds/wheep-wheep.mp3';
72
+ export const URL_SOUND_CONVERSATION_DETAIL = '/assets/sounds/justsaying.mp3';
77
73
  // export const CHAT_SEND_BY_EMAIL_LINK =
78
74
  // 'mailto:?subject=Transcript Chat Conversation&body=Salve,%0D%0A%0D%0Adi
79
75
  // seguito potrà scaricare il transcript della conversazione intercorsa con il nostro servizio di
@@ -1,9 +1,6 @@
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>
1
+ <div class="tile-typing-now" [class.active]="isTyping">
2
+ <span *ngIf="nameUserTypingNow">
3
+ {{nameUserTypingNow}}
4
+ </span>
5
+ {{ translationMap?.get('LABEL_IS_WRITING') }}
9
6
  </div>
@@ -1,24 +1,10 @@
1
- :root {
2
- --themeColor: rgb(240, 242, 247);
3
- --foregroundColor: black;
4
- }
5
-
6
-
7
1
  .tile-typing-now {
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
- // }
2
+ font-size: 12px;
3
+ background-color: #fff;
4
+ display: none;
5
+ &.active {
6
+ display: block;
7
+ }
22
8
  }
23
9
 
24
10
  /* BEGIN LOADING */
@@ -28,105 +14,49 @@
28
14
  left: 0;
29
15
  top: 0;
30
16
  margin: 0;
31
- // &.active {
32
- // display: inline-block;
33
- // width: 30px;
34
- // }
17
+ &.active {
18
+ display: inline-block;
19
+ width: 30px;
20
+ }
35
21
  }
36
22
  #tile-spinner > div {
37
23
  width: 6px;
38
24
  height: 6px;
39
25
  background-color: var(--basic-blue);
40
26
  }
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****** */
80
27
  .spinner {
81
- margin: 15px 10px; //remove it if activate avatar image
28
+ margin: 100px auto 0;
82
29
  width: 70px;
83
- // text-align: center;
84
- min-height: 20px;
85
- display: block;
30
+ text-align: center;
86
31
  }
87
-
88
32
  .spinner > div {
89
- width: 9px;
90
- height: 9px;
33
+ width: 18px;
34
+ height: 18px;
91
35
  background-color: #333;
92
-
93
36
  border-radius: 100%;
94
37
  display: inline-block;
95
38
  -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
96
39
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
97
40
  }
98
-
99
41
  .spinner .bounce1 {
100
42
  -webkit-animation-delay: -0.32s;
101
43
  animation-delay: -0.32s;
102
- background-color: var(--themeColor)
103
44
  }
104
-
105
45
  .spinner .bounce2 {
106
46
  -webkit-animation-delay: -0.16s;
107
47
  animation-delay: -0.16s;
108
- background-color: var(--themeColor);
109
- opacity: 0.4
110
48
  }
111
-
112
- .spinner .bounce3 {
113
- background-color: var(--themeColor);
114
- opacity: 0.6
115
- }
116
-
117
-
118
49
  @-webkit-keyframes sk-bouncedelay {
119
50
  0%, 80%, 100% { -webkit-transform: scale(0) }
120
51
  40% { -webkit-transform: scale(1.0) }
121
52
  }
122
-
123
53
  @keyframes sk-bouncedelay {
124
54
  0%, 80%, 100% {
125
- -webkit-transform: scale(0);
126
- transform: scale(0);
55
+ -webkit-transform: scale(0);
56
+ transform: scale(0);
127
57
  } 40% {
128
58
  -webkit-transform: scale(1.0);
129
59
  transform: scale(1.0);
130
60
  }
131
61
  }
132
- /* ******BOUNCE SPINNER END****** */
62
+ /* END LOADING */
@@ -1,31 +1,113 @@
1
- import { Component, OnInit, OnDestroy, Input, ElementRef } from '@angular/core';
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';
2
9
 
3
10
  @Component({
4
- selector: 'user-typing',
11
+ selector: 'app-user-typing',
5
12
  templateUrl: './user-typing.component.html',
6
13
  styleUrls: ['./user-typing.component.scss'],
7
14
  })
8
15
  export class UserTypingComponent implements OnInit, OnDestroy {
9
16
 
10
- // @Input() idConversation: string;
11
- // @Input() idCurrentUser: string;
12
- // @Input() isDirect: boolean;
13
- @Input() typingLocation: string = 'content'
17
+ @Input() idConversation: string;
18
+ @Input() idCurrentUser: string;
19
+ @Input() isDirect: boolean;
14
20
  @Input() translationMap: Map<string, string>;
15
- @Input() themeColor: string;
16
- @Input() idUserTypingNow: string;
17
- @Input() nameUserTypingNow: string;
18
- // @Input() membersConversation: [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();
19
32
 
20
- constructor(private elementRef: ElementRef) { }
33
+ constructor(
34
+ public typingService: TypingService
35
+ ) { }
21
36
 
22
37
  /** */
23
38
  ngOnInit() {
24
- this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
39
+ this.logger.log('[USER-TYPING-COMPONENT] - ngOnInit');
40
+ this.initialize();
25
41
  }
26
42
 
27
43
  /** */
28
44
  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 = [];
29
111
  }
30
112
 
31
113
 
@@ -590,10 +590,8 @@ export function setConversationAvatar(
590
590
  conversationWith: string,
591
591
  conversationWithFullname: string,
592
592
  conversationChannelType: string,
593
- projectId?: string,
594
- project_name?: string,
595
593
  width?: string,
596
- height?: string,
594
+ height?: string
597
595
  ): any {
598
596
  const conversationWidth = (width) ? width : '40px';
599
597
  const conversationHeight = (height) ? height : '40px';
@@ -604,8 +602,6 @@ export function setConversationAvatar(
604
602
  channelType: conversationChannelType,
605
603
  avatar: avatarPlaceholder(conversationWithFullname),
606
604
  color: getColorBck(conversationWithFullname),
607
- projectId: projectId,
608
- project_name: project_name,
609
605
  width: conversationWidth,
610
606
  height: conversationHeight
611
607
  };
@@ -698,35 +694,15 @@ export function isURL(str: string) {
698
694
  }
699
695
  }
700
696
 
701
- export function convertColorToRGBA(color, opacity) {
702
- let result = color;
703
- // console.log('convertColorToRGBA' + color, opacity);
704
- if ( color.indexOf('#') > -1 ) {
705
- color = color.replace('#', '');
706
- const r = parseInt(color.substring(0, 2), 16);
707
- const g = parseInt(color.substring(2, 4), 16);
708
- const b = parseInt(color.substring(4, 6), 16);
709
- result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
710
- } else if ( color.indexOf('rgba') > -1 ) {
711
- const rgb = color.split(',');
712
- const r = rgb[0].substring(5);
713
- const g = rgb[1];
714
- const b = rgb[2];
715
- // const b = rgb[2].substring(1, rgb[2].length - 1);
716
- result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
717
- } else if ( color.indexOf('rgb(') > -1 ) {
718
- const rgb = color.split(',');
719
- // console.log(rgb);
720
- const r = rgb[0].substring(4);
721
- const g = rgb[1];
722
- const b = rgb[2].substring(0, rgb[2].length - 1);
723
- // console.log(b);
724
- // console.log(rgb[2].length);
725
- result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
726
- }
727
- // console.log('convertColorToRGBA' + color + result);
728
- return result;
729
- }
697
+ // export function isHostname() {
698
+
699
+
700
+ // if (environment.supportMode === true) {
701
+
702
+ // return true
703
+ // }
704
+ // return false
705
+ // }
730
706
 
731
707
  export function getParameterByName(name: string) {
732
708
  var url = window.location.href;
@@ -834,10 +810,6 @@ export function redirect2(router, IDConv, conversationSelected) {
834
810
  /** */
835
811
  export function checkPlatformIsMobile() {
836
812
  // console.log('UTILS - checkPlatformIsMobile:: ', window.innerWidth);
837
- // if (/Android|iPhone/i.test(window.navigator.userAgent)) {
838
- // return true
839
- // }
840
- // return false
841
813
  if (window.innerWidth < 768) {
842
814
  return true;
843
815
  }