@chat21/chat21-ionic 3.0.81 → 3.0.82-rc.2

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 (151) hide show
  1. package/CHANGELOG.md +88 -4
  2. package/README.md +2 -2
  3. package/deploy_amazon_beta.sh +29 -0
  4. package/deploy_amazon_prod.sh +30 -0
  5. package/package.json +2 -2
  6. package/src/app/app.component.html +7 -1
  7. package/src/app/app.component.scss +20 -2
  8. package/src/app/app.component.ts +128 -18
  9. package/src/app/app.module.ts +3 -1
  10. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +77 -23
  12. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +171 -88
  13. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +40 -2
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
  16. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  17. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -25
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
  19. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
  20. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
  22. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
  23. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
  25. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
  26. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
  28. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
  29. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  30. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
  32. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
  33. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  34. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
  36. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
  37. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
  39. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
  40. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
  41. package/src/app/components/canned-response/canned-response.component.html +7 -7
  42. package/src/app/components/canned-response/canned-response.component.scss +10 -4
  43. package/src/app/components/canned-response/canned-response.component.ts +1 -1
  44. package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
  45. package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
  46. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
  47. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
  48. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
  49. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  50. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -6
  51. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  52. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +24 -84
  53. package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
  54. package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
  55. package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
  56. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
  57. package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
  58. package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
  59. package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
  60. package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
  61. package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
  62. 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
  63. package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
  64. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
  65. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
  66. 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
  67. 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
  68. package/src/app/components/navbar/navbar.component.html +103 -0
  69. package/src/app/components/navbar/navbar.component.scss +249 -0
  70. package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
  71. package/src/app/components/navbar/navbar.component.ts +189 -0
  72. package/src/app/components/project-item/project-item.component.html +98 -149
  73. package/src/app/components/project-item/project-item.component.scss +43 -35
  74. package/src/app/components/project-item/project-item.component.ts +16 -4
  75. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  76. package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +1 -1
  77. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
  78. package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
  79. package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
  80. package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
  81. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  82. package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
  83. package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
  84. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  85. package/src/app/pages/conversation-detail/conversation-detail.page.html +41 -23
  86. package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
  87. package/src/app/pages/conversation-detail/conversation-detail.page.ts +182 -110
  88. package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
  89. package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
  90. package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
  91. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  92. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  93. package/src/app/pages/loader-preview/loader-preview.page.scss +4 -0
  94. package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
  95. package/src/app/pages/profile-info/profile-info.page.html +2 -4
  96. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  97. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  98. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  99. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  100. package/src/app/services/projects/projects.service.spec.ts +12 -0
  101. package/src/app/services/projects/projects.service.ts +43 -0
  102. package/src/app/services/tiledesk/tiledesk.service.ts +4 -26
  103. package/src/app/shared/shared.module.ts +24 -33
  104. package/src/assets/i18n/ar.json +278 -265
  105. package/src/assets/i18n/az.json +14 -1
  106. package/src/assets/i18n/de.json +15 -2
  107. package/src/assets/i18n/en.json +15 -2
  108. package/src/assets/i18n/es.json +15 -2
  109. package/src/assets/i18n/fr.json +14 -1
  110. package/src/assets/i18n/it.json +14 -1
  111. package/src/assets/i18n/kk.json +15 -2
  112. package/src/assets/i18n/pt.json +15 -2
  113. package/src/assets/i18n/ru.json +14 -1
  114. package/src/assets/i18n/sr.json +277 -264
  115. package/src/assets/i18n/sv.json +15 -2
  116. package/src/assets/i18n/tr.json +15 -2
  117. package/src/assets/i18n/uk.json +15 -2
  118. package/src/assets/i18n/uz.json +14 -1
  119. package/src/assets/js/chat21client.js +176 -149
  120. package/src/assets/sounds/interface-start.mp3 +0 -0
  121. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  122. package/src/chat-config-native-mqtt.json +3 -0
  123. package/src/chat21-core/models/conversation.ts +0 -1
  124. package/src/chat21-core/models/projects.ts +27 -0
  125. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
  126. package/src/chat21-core/utils/constants.ts +6 -1
  127. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  128. package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
  129. package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
  130. package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
  131. package/src/chat21-core/utils/utils.ts +38 -10
  132. package/src/global.scss +52 -255
  133. package/src/index.html +0 -9
  134. package/src/variables.scss +30 -10
  135. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  136. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  137. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  138. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  139. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  140. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  141. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  142. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  143. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  144. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  145. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  146. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  147. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  148. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  149. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
  150. package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
  151. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
@@ -2,16 +2,17 @@
2
2
  display: flex;
3
3
  align-content: center;
4
4
  justify-content: center;
5
+ padding: 4px 0px 2px 0px;
5
6
  }
6
7
 
7
8
  .base_info {
8
9
  border-radius: 14px;
9
- border: 1px solid #C9E4F6;
10
+ // border: 1px solid rgba(24, 119, 242, 0.1);
10
11
  padding-left: 4px;
11
12
  padding-right: 4px;
12
13
  padding: 6px 10px;
13
14
  display: inline-block;
14
- background: #C9E4F6;
15
+ background: rgba(24, 119, 242, 0.1);
15
16
  font-size: 0.70em;
16
17
  color: var(--basic-gray);
17
18
  margin-left: 5px; //32px;
@@ -4,22 +4,32 @@
4
4
 
5
5
  <chat-text-button-attachment *ngIf="button.type === 'text' && isLastMessage === true" class="div-button"
6
6
  [button]="button"
7
- [themeColor]="stylesMap.get('themeColor')"
8
- [foregroundColor]="stylesMap.get('foregroundColor')"
7
+ [isConversationArchived]="isConversationArchived"
8
+ [fontSize]="stylesMap.get('buttonFontSize')"
9
+ [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
10
+ [textColor]="stylesMap.get('buttonTextColor')"
11
+ [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
12
+ [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
9
13
  (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
10
14
  </chat-text-button-attachment>
11
15
 
12
16
  <chat-link-button-attachment *ngIf="button.type === 'url'" class="div-button"
13
17
  [button]="button"
14
- [themeColor]="stylesMap.get('themeColor')"
15
- [foregroundColor]="stylesMap.get('foregroundColor')"
18
+ [fontSize]="stylesMap.get('buttonFontSize')"
19
+ [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
20
+ [textColor]="stylesMap.get('buttonTextColor')"
21
+ [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
22
+ [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
16
23
  (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
17
24
  </chat-link-button-attachment>
18
25
 
19
26
  <chat-action-button-attachment *ngIf="button.type === 'action' && isLastMessage === true" class="div-button"
20
27
  [button]="button"
21
- [themeColor]="stylesMap.get('themeColor')"
22
- [foregroundColor]="stylesMap.get('foregroundColor')"
28
+ [fontSize]="stylesMap.get('buttonFontSize')"
29
+ [backgroundColor]="stylesMap.get('buttonBackgroundColor')"
30
+ [textColor]="stylesMap.get('buttonTextColor')"
31
+ [hoverBackgroundColor]="stylesMap.get('buttonHoverBackgroundColor')"
32
+ [hoverTextColor]="stylesMap.get('buttonHoverTextColor')"
23
33
  (onButtonClicked)="returnOnAttachmentButtonClicked($event)">
24
34
  </chat-action-button-attachment>
25
35
 
@@ -1,10 +1,8 @@
1
1
  #buttons-in-message {
2
2
  text-align: left;
3
3
  display: block;
4
- margin-top: -6px;
5
- margin-bottom: 5px;
6
4
  height: auto;
7
- padding-left: 8px;
5
+ margin: 0px 20px 5px 10px;
8
6
 
9
7
  .div-button {
10
8
  display: inline-block;
@@ -12,7 +12,9 @@ export class MessageAttachmentComponent implements OnInit {
12
12
 
13
13
  // ========= begin:: Input/Output values ============//
14
14
  @Input() message: MessageModel;
15
+ @Input() isConversationArchived: boolean;
15
16
  @Input() isLastMessage: boolean;
17
+ @Input() fullscreenMode: boolean;
16
18
  @Input() stylesMap: Map<string, string>;
17
19
  @Output() onAttachmentButtonClicked = new EventEmitter<any>();
18
20
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>()
@@ -80,55 +80,92 @@
80
80
  <div tabindex="0"></div>
81
81
 
82
82
  <!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
83
- <ion-avatar item-start>
84
- <!-- [style.background-color]="conversation.color" -->
85
- <div #avatarPlaceholder class="avatar-placeholder"
86
- [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + conversation.color + ')'}"
87
- [innerHTML]="conversation.avatar"></div>
88
- <div *ngIf="conversation.image" #avatarImage class="avatar-profile"
89
- [style.background-image]="'url(' + conversation.image + ')'"></div>
90
- <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
91
- </ion-avatar>
92
- <ion-label>
93
- <div class="conversation_with truncate">{{conversation.conversation_with_fullname}}</div>
94
- <div class="conversation_message truncate-conv-msg" [ngClass]="{'truncate-on-desktop': !isApp}">
95
-
96
- <!-- -------------------------------------------------------------------------- -->
97
- <!-- if conversation type is image display the image icon before the message -->
98
- <!-- -------------------------------------------------------------------------- -->
99
- <!-- <div *ngIf="conversation.type === 'image'" class="icon-image-before-msg-wpr">
100
- <ion-icon name="image-outline" class="icon-image-before-msg"></ion-icon>
83
+ <div>
84
+ <ion-avatar item-start>
85
+ <!-- [style.background-color]="conversation.color" -->
86
+ <div #avatarPlaceholder class="avatar-placeholder"
87
+ [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + conversation.color + ')'}"
88
+ [innerHTML]="conversation.avatar"></div>
89
+ <div *ngIf="conversation.image" #avatarImage class="avatar-profile"
90
+ [style.background-image]="'url(' + conversation.image + ')'"></div>
91
+ <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
92
+ </ion-avatar>
93
+ </div>
94
+ <div class="conv-container">
95
+ <ion-label>
96
+ <div class="conversation_project truncate">
97
+ <!-- DIRECT CONV -->
98
+ <div *ngIf="conversation.channel_type === TYPE_DIRECT">
99
+ <svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
100
+ <span class="truncate">{{translationsMap.get('DIRECT_CHAT')}}</span>
101
+ </div>
102
+ <!-- GROUP CONV -->
103
+ <div *ngIf="conversation.uid.startsWith(TYPE_GROUP)">
104
+ <svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>
105
+ <span class="truncate">{{translationsMap.get('GROUP_CHAT')}}</span>
106
+ </div>
107
+ <!-- SUPPORT-GROUP CONV -->
108
+ <div *ngIf="conversation.uid.startsWith(TYPE_SUPPORT_GROUP)">
109
+ <svg xmlns="http://www.w3.org/2000/svg" data-v-78d18411="" width="15" height="15" fill="none" viewBox="0 0 24 24" class="inbox-icon"><path d="M22.002 12C22.002 6.477 17.524 2 12 2 6.476 1.999 2 6.477 2 12.001c0 5.186 3.947 9.45 9.001 9.952V20.11c-.778-.612-1.478-1.905-1.939-3.61h1.94V15H8.737a18.969 18.969 0 0 1-.135-5h6.794c.068.64.105 1.31.105 2h1.5c0-.684-.033-1.353-.095-2h3.358c.154.64.237 1.31.237 2h1.5ZM4.786 16.5h2.722l.102.396c.317 1.17.748 2.195 1.27 3.015a8.532 8.532 0 0 1-4.094-3.41ZM3.736 10h3.358a20.847 20.847 0 0 0-.095 2c0 1.043.075 2.051.217 3H4.043a8.483 8.483 0 0 1-.544-3c0-.682.08-1.347.232-1.983L3.736 10Zm5.122-5.902.023-.008C8.16 5.222 7.611 6.748 7.298 8.5H4.25c.905-2 2.56-3.587 4.608-4.402Zm3.026-.594L12 3.5l.126.006c1.262.126 2.48 2.125 3.045 4.995H8.83c.568-2.878 1.79-4.88 3.055-4.996Zm3.343.76-.107-.174.291.121a8.533 8.533 0 0 1 4.339 4.29h-3.048c-.298-1.665-.806-3.125-1.475-4.237Z M12 19a1 1 0 0 0 1 1h3v2h-.5a.5.5 0 1 0 0 1h4a.5.5 0 0 0 0-1H19v-2h3a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v5Z" fill="currentColor"/></svg>
110
+ <span *ngIf="conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.project_name}}</span>
111
+ <span *ngIf="!conversation?.attributes?.project_name" class="truncate">{{conversation?.attributes?.projectId}}</span>
112
+ </div>
101
113
  </div>
102
- <p [class.not-read]="conversation.is_new" class="truncate" [ngClass]="{'truncate-on-desktop': !isApp}"
103
- [innerHTML]="conversation.last_message_text"></p> -->
104
-
105
- <!-- <div *ngIf="conversation.type === 'image'" class="icon-image-before-msg-wpr"> -->
106
- <ion-icon *ngIf="conversation.type === 'image' && conversation.type !== 'file' " name="image-outline"
107
- class="icon-image-before-msg"></ion-icon>
108
- <ion-icon *ngIf="conversation.type === 'file' && conversation.type !== 'image'" name="attach-outline"
109
- class="icon-attach-before-msg"></ion-icon>
110
- <!-- </div> -->
111
- <!-- [innerHTML]="conversation.last_message_text" -->
112
- <span [class.not-read]="conversation.is_new">
113
- {{ conversation.last_message_text }}
114
- </span>
115
- </div>
116
- </ion-label>
114
+ <div style="display: flex;">
115
+ <span class="conversation_with truncate" [class.not-read]="conversation.is_new">
116
+ {{conversation.conversation_with_fullname}}
117
+ </span>
118
+ </div>
119
+ <div class="conversation_message truncate-conv-msg" [ngClass]="{'truncate-on-desktop': !isApp}">
120
+
121
+ <!-- -------------------------------------------------------------------------- -->
122
+ <!-- if conversation type is image display the image icon before the message -->
123
+ <!-- -------------------------------------------------------------------------- -->
124
+ <!-- <div *ngIf="conversation.type === 'image'" class="icon-image-before-msg-wpr">
125
+ <ion-icon name="image-outline" class="icon-image-before-msg"></ion-icon>
126
+ </div>
127
+ <p [class.not-read]="conversation.is_new" class="truncate" [ngClass]="{'truncate-on-desktop': !isApp}"
128
+ [innerHTML]="conversation.last_message_text"></p> -->
129
+
130
+ <!-- <div *ngIf="conversation.type === 'image'" class="icon-image-before-msg-wpr"> -->
131
+ <ion-icon *ngIf="conversation.type === 'image' && conversation.type !== 'file' " name="image-outline"
132
+ class="icon-image-before-msg"></ion-icon>
133
+ <ion-icon *ngIf="conversation.type === 'file' && conversation.type !== 'image'" name="attach-outline"
134
+ class="icon-attach-before-msg"></ion-icon>
135
+ <!-- </div> -->
136
+ <!-- [innerHTML]="conversation.last_message_text" -->
137
+ <span [class.not-read]="conversation.is_new">
138
+ {{ conversation.last_message_text }}
139
+ </span>
140
+ </div>
141
+ </ion-label>
142
+ </div>
117
143
 
118
- <ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
144
+ <ion-note *ngIf="!conversation.archived" class="conversation_time" [ngClass]="{'is-on-mobile': isApp}">
145
+ {{conversation.timestamp | amTimeAgo}}
146
+ </ion-note>
147
+ <ion-note item-end *ngIf="conversation?.archived" class="conversation_time">
148
+ <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear">
149
+ {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD') : (conversation.timestamp| amDateFormat:'DD MMM')}}
150
+ <!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
151
+ </span>
152
+ <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear">
153
+ {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
154
+ <!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
155
+ </span>
156
+ </ion-note>
119
157
 
120
158
  <ion-buttons slot="end">
121
159
  <ion-button *ngIf="!conversation.archived" [tooltip]="archiveTooltip" [options]="tooltip_options" placement="bottom" content-type="template"
122
160
  [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
123
161
  id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
124
162
  item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
125
- <ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
126
- color="close-conversation" name="archive-outline" item-end></ion-icon>
163
+ <ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" name="archive-outline" item-end></ion-icon>
127
164
 
128
- <ng-template #archiveTooltip>
129
- <span *ngIf="conversation?.recipient.startsWith('support-group')"> {{ resolve_btn_tooltip}} </span>
130
- <span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ archive_btn_tooltip }} </span>
131
- </ng-template>
165
+ <ng-template #archiveTooltip>
166
+ <span *ngIf="conversation?.recipient.startsWith('support-group')"> {{ translationsMap?.get('Resolve')}} </span>
167
+ <span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ translationsMap?.get('Archive') }} </span>
168
+ </ng-template>
132
169
  </ion-button>
133
170
  <!-- <ion-button *ngIf="conversation.archived" class="close-conversation-button" ion-button clear item-end disabled padding>
134
171
  <!- - <ion-icon style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" color="close-conversation" name="archive-outline" item-end></ion-icon> - ->
@@ -137,18 +174,7 @@
137
174
  </ion-button> -->
138
175
  </ion-buttons>
139
176
 
140
- <div item-end *ngIf="conversation?.archived" class="achived-icon-wpr">
141
- <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear" class="time-in-archived">
142
- {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD') : (conversation.timestamp| amDateFormat:'DD MMM')}}
143
-
144
- <!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
145
- </span>
146
- <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear" class="time-in-archived">
147
- {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
148
- <!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
149
- </span>
150
- <!-- <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i> -->
151
- </div>
177
+
152
178
 
153
179
  <!-- && !conversation?.archived -->
154
180
  <div item-end class="notification_point"
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ion-item {
11
11
  cursor: pointer;
12
- height: 70px;
13
- --min-height: 70px;
12
+ height: 90px; //70px;
13
+ --min-height: 90px; //70px;
14
14
  position: relative;
15
15
  display: flex;
16
16
  text-decoration: none;
@@ -19,6 +19,15 @@ ion-item {
19
19
  --padding-start: 0;
20
20
  --inner-padding-end: 0;
21
21
  --background-hover: #000000 !important;
22
+ --background: transparent;
23
+ border-radius: var(--border-radius-item);
24
+ margin: 4px 5px;
25
+ transition: none;
26
+ .conv-container{
27
+ width: 84%;
28
+ height: 100%;
29
+ padding: 12px 0;
30
+ }
22
31
  .selected {
23
32
  // border-radius: 10px;
24
33
  // padding-left: 8px;
@@ -33,12 +42,13 @@ ion-item {
33
42
  ion-avatar {
34
43
  position: relative;
35
44
  padding: 0;
36
- margin: 0 12px 0 8px;
37
- height: 50px;
38
- width: 50px;
39
- min-width: 50px;
40
- min-height: 50px;
41
- line-height: 50px;
45
+ margin: 20px 8px 0px 8px;//0 12px 0 8px;
46
+ height: 40px; //50px;
47
+ width: 40px; //50px;
48
+ min-width: 40px; //50px;
49
+ min-height: 40px; //50px;
50
+ line-height: 40px; //50px;
51
+ align-self: end;
42
52
  .avatar-placeholder {
43
53
  position: absolute;
44
54
  top: 0;
@@ -47,7 +57,7 @@ ion-item {
47
57
  height: 100%;
48
58
  border-radius: 50%;
49
59
  text-align: center;
50
- font-size: 20px;
60
+ font-size: 15px; //20px;
51
61
  color: #ffffff;
52
62
  font-weight: 500;
53
63
  }
@@ -70,22 +80,47 @@ ion-item {
70
80
  justify-content: center;
71
81
  min-width: 0;
72
82
  padding: 0;
83
+ margin: 0;
73
84
  font-family: Helvetica, Helvetica, Arial, sans-serif;
74
85
  line-height: 1.28;
75
86
  text-rendering: optimizeLegibility;
87
+ .conversation_project{
88
+ display: inline-flex;
89
+ align-items: center;
90
+ line-height: 1.2rem;
91
+ font-weight: 500;
92
+ color: #779bbb;
93
+ font-size: 10px;
94
+ max-width: 90%;
95
+ svg {
96
+ fill:#779bbb;
97
+ vertical-align: sub;
98
+ }
99
+ span{
100
+ padding-left: 5px
101
+ }
102
+ }
76
103
  .conversation_with {
77
104
  color: rgba(0, 0, 0, 1);
78
105
  font-size: 15px;
79
106
  font-weight: 400;
80
107
  line-height: 1.4;
108
+ width: 70% !important;
109
+ &.not-read {
110
+ font-weight: 600;
111
+ color: #3c4858; //#1876f2;
112
+ }
81
113
  }
114
+
82
115
  .conversation_message {
116
+ margin: 5px 0px;
83
117
  p {
84
- color: rgba(153, 153, 153, 1);
85
- font-size: 13px;
118
+ color: #6e6f73; //#3c4858;
119
+ font-size: 15px;
86
120
  font-weight: 400;
87
121
  height: 18px;
88
122
  vertical-align: middle;
123
+ align-self: center;
89
124
  &.not-read {
90
125
  font-weight: 600;
91
126
  color: #1876f2;
@@ -93,13 +128,13 @@ ion-item {
93
128
  }
94
129
 
95
130
  span {
96
- color: rgba(153, 153, 153, 1);
97
- font-size: 13px;
131
+ color: rgb(60, 72, 88);
132
+ font-size: 12px;
98
133
  font-weight: 400;
99
134
  height: 18px;
100
135
  &.not-read {
101
136
  font-weight: 600;
102
- color: #1876f2;
137
+ color: #3c4858; //#1876f2;
103
138
  }
104
139
  }
105
140
  }
@@ -107,8 +142,15 @@ ion-item {
107
142
  ion-note {
108
143
  position: absolute;
109
144
  right: 8px;
110
- top: 4px;
145
+ top: 40px;
111
146
  font-size: 10px;
147
+ display: flex;
148
+ flex-direction: column;
149
+ color: #6e6f73;
150
+
151
+ &.is-on-mobile{
152
+ top: 10px;
153
+ }
112
154
  }
113
155
  ion-buttons {
114
156
  margin: 0;
@@ -120,7 +162,7 @@ ion-item {
120
162
  font-size: 10px;
121
163
  --padding-start: 0px;
122
164
  --padding-end: 0px;
123
- color: rgba(153, 153, 153, 1);
165
+ color: var(--basic-blue);//rgba(153, 153, 153, 1);
124
166
  background-color: transparent;
125
167
  border-radius: 50%; // nk
126
168
  &:hover {
@@ -133,17 +175,17 @@ ion-item {
133
175
  width: 10px;
134
176
  height: 10px;
135
177
  border-radius: 50%;
136
- background-color: rgb(22, 92, 238);
178
+ background-color: var(--basic-blue);
137
179
  position: absolute;
138
180
  right: 6px;
139
181
  bottom: 8px;
140
182
  }
141
183
 
142
184
  .notification_point-on-desktop {
143
- bottom: 29px !important;
185
+ bottom: 22px !important;
144
186
  }
145
187
  .notification_point-on-mobile {
146
- bottom: 29px !important;
188
+ bottom: 22px !important;
147
189
  right: 8px;
148
190
  }
149
191
  }
@@ -209,7 +251,8 @@ ion-item:hover {
209
251
  }
210
252
 
211
253
  .ion-selected {
212
- --background: rgb(231, 241, 255);
254
+ background: var(--list-bkg-color-selected);
255
+ border-right: 4px solid var(--basic-blue);
213
256
  }
214
257
 
215
258
  .time-in-archived {
@@ -1,3 +1,5 @@
1
+ import { TYPE_GROUP, TYPE_SUPPORT_GROUP } from './../../../../chat21-core/utils/constants';
2
+ import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
1
3
  import { Component, EventEmitter, Input, IterableDiffers, KeyValueDiffers, OnInit, Output, SimpleChange } from '@angular/core';
2
4
  import { ConversationModel } from 'src/chat21-core/models/conversation';
3
5
  import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
@@ -14,6 +16,7 @@ import { AppConfigProvider } from 'src/app/services/app-config';
14
16
  import { DomSanitizer } from '@angular/platform-browser'
15
17
  import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
16
18
  import { AlertController } from '@ionic/angular';
19
+ import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
17
20
  // import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
18
21
  // import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
19
22
 
@@ -35,6 +38,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
35
38
  public currentYear: any;
36
39
  public browserLang: string;
37
40
 
41
+ public translationsMap: Map<string, string> = new Map()
42
+
38
43
  public PROJECT_FOR_PANEL: any;
39
44
  public archive_btn_tooltip: string;
40
45
  public resolve_btn_tooltip: string;
@@ -52,6 +57,10 @@ export class IonListConversationsComponent extends ListConversationsComponent im
52
57
  'hideDelayAfterClick': 3000,
53
58
  'hide-delay': 100
54
59
  };
60
+
61
+ TYPE_DIRECT = TYPE_DIRECT;
62
+ TYPE_GROUP = TYPE_GROUP;
63
+ TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
55
64
  /**
56
65
  *
57
66
  * @param iterableDiffers
@@ -63,6 +72,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
63
72
  public kvDiffers: KeyValueDiffers,
64
73
  public platform: Platform,
65
74
  private translate: TranslateService,
75
+ private translateService: CustomTranslateService,
66
76
  private networkService: NetworkService,
67
77
  private appConfigProvider: AppConfigProvider,
68
78
  private sanitizer: DomSanitizer,
@@ -73,7 +83,6 @@ export class IonListConversationsComponent extends ListConversationsComponent im
73
83
  super(iterableDiffers, kvDiffers)
74
84
  this.setMomentLocale();
75
85
 
76
-
77
86
  // if (this.browserLang) {
78
87
 
79
88
  // moment.locale(this.browserLang)
@@ -123,16 +132,11 @@ export class IonListConversationsComponent extends ListConversationsComponent im
123
132
  'ALERT_TITLE',
124
133
  'ActionNotAllowed',
125
134
  'CLOSE_ALERT_CONFIRM_LABEL',
126
- 'YouAreNoLongerAmongTheTeammatesManagingThisConversation'
135
+ 'YouAreNoLongerAmongTheTeammatesManagingThisConversation',
136
+ 'GROUP_CHAT',
137
+ 'DIRECT_CHAT'
127
138
  ]
128
- this.translate.get(['Resolve', 'Archive', 'ALERT_TITLE']).subscribe((translations: string) => {
129
- this.resolve_btn_tooltip = translations['Resolve'];
130
- this.archive_btn_tooltip = translations['Archive'];
131
- this.alert_lbl = translations['ALERT_TITLE']
132
- this.actionNotAllowed_lbl = translations['ActionNotAllowed']
133
- this.ok_lbl = translations['CLOSE_ALERT_CONFIRM_LABEL']
134
- this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = translations['YouAreNoLongerAmongTheTeammatesManagingThisConversation']
135
- });
139
+ this.translationsMap = this.translateService.translateLanguage(translationKeys)
136
140
  }
137
141
 
138
142
  setMomentLocale() {
@@ -18,16 +18,16 @@
18
18
  <label class="add-canned-response-label" >{{translationMap?.get('AddNewCannedResponse')}}</label>
19
19
  </ion-item>
20
20
  </div>
21
- <!-- LOADER -->
22
- <div class="loader" *ngIf="tagsCannedFilter.length === 0">
21
+ <!-- LOADER -->
22
+ <div class="loader" *ngIf="tagsCannedFilter.length === 0">
23
23
  <div class="box">
24
24
  <!-- <div class="container">
25
- <span class="circle"></span>
26
- <span class="circle"></span>
27
- <span class="circle"></span>
28
- <span class="circle"></span>
25
+ <span class="circle" [ngStyle]="{'background-color': stylesMap?.get('themeColor')}"></span>
26
+ <span class="circle" [ngStyle]="{'background-color': stylesMap?.get('themeColor')}"></span>
27
+ <span class="circle" [ngStyle]="{'background-color': stylesMap?.get('themeColor')}"></span>
28
+ <span class="circle" [ngStyle]="{'background-color': stylesMap?.get('themeColor')}"></span>
29
29
  </div> -->
30
- <div class="spinner"></div>
30
+ <div class="spinner" [ngStyle]="{'border-top-color': stylesMap?.get('themeColor')}"></div>
31
31
  <div class="label">{{translationMap.get('LABEL_LOADING')}}</div>
32
32
  </div>
33
33
  </div>
@@ -94,11 +94,12 @@
94
94
  width: 100%;
95
95
  }
96
96
 
97
- ion-input {
97
+ ion-input, ion-textarea {
98
98
  --padding-bottom: 0px;
99
99
  --padding-top: 0px;
100
100
  &.text{
101
101
  font-style: italic;
102
+ margin-top: 2px;
102
103
  }
103
104
  &.title {
104
105
  font-weight: 500;
@@ -106,6 +107,11 @@
106
107
  }
107
108
  .native-input[disabled] {
108
109
  opacity: 10 !important;
110
+ cursor: pointer;
111
+ }
112
+ .native-textarea[disabled] {
113
+ opacity: 10 !important;
114
+ cursor: pointer;
109
115
  }
110
116
  ion-icon {
111
117
  zoom: 0.7;
@@ -179,7 +185,7 @@ ion-item {
179
185
  width: 15px;
180
186
  height: 15px;
181
187
  border-radius: 50%;
182
- background-color: #1877f2;
188
+ background-color: var(--basic-blue);
183
189
  animation: move 500ms linear 0ms infinite;
184
190
  margin-right: 30px;
185
191
 
@@ -198,13 +204,14 @@ ion-item {
198
204
  animation: grow 500ms linear 0s infinite reverse;
199
205
  }
200
206
  }
207
+
201
208
  }
202
209
 
203
210
  .spinner {
204
211
  margin: auto;
205
212
  border: 8px solid #EAF0F6;
206
213
  border-radius: 50%;
207
- border-top: 8px solid #1877f2;
214
+ border-top: 8px solid var(--basic-blue);
208
215
  width: 50px;
209
216
  height: 50px;
210
217
  animation: spinner 1s linear infinite;
@@ -215,7 +222,6 @@ ion-item {
215
222
  100% { transform: rotate(360deg); }
216
223
  }
217
224
 
218
-
219
225
  .label{
220
226
  text-align: center;
221
227
  margin-top: 10px;
@@ -20,6 +20,7 @@ export class CannedResponseComponent implements OnInit {
20
20
  @Input() conversationWith: string;
21
21
  @Input() conversationWithFullname: string;
22
22
  @Input() currentString: string;
23
+ @Input() stylesMap: Map<string, string>;
23
24
  @Input() translationMap: Map<string, string>;
24
25
  @Output() onLoadedCannedResponses = new EventEmitter<[any]>();
25
26
  @Output() onClickCanned = new EventEmitter<any>();
@@ -194,7 +195,6 @@ export class CannedResponseComponent implements OnInit {
194
195
  // this.logger.log('[CANNED] filterItems tagsCannedClone ', items, ' searchTerm: ', searchTerm)
195
196
  //this.logger.log("filterItems::: ",searchTerm);
196
197
  return items.filter((item) => {
197
- //this.logger.log("filterItems::: ", item.title.toString().toLowerCase());
198
198
  // this.logger.log('[CANNED] filtered tagsCannedClone item ', item)
199
199
  return item.title.toString().toLowerCase().indexOf(searchTerm.toString().toLowerCase()) > -1
200
200
  })
@@ -1,28 +1,24 @@
1
1
 
2
- <ion-content padding>
3
- <ion-searchbar id="contacts-searchbar" debounce="500" (ionInput)="onSearchInput($event)"></ion-searchbar>
4
- <ion-list>
5
-
6
- <ion-item button="true" lines="none" class="ion-no-padding" *ngFor="let user of contacts" (click)="goToChat(user)">
7
- <div tabindex="0"></div>
8
- <!-- <div [class.selected]="user.uid === uidUserSelected"></div> [style.background-color]="user.color"-->
9
- <ion-avatar slot="start">
10
- <div #avatarPlaceholder class="avatar-placeholder" [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user.color + ')'}" [innerHTML]="user.avatar"></div>
11
- <div *ngIf="user.imageurl" #avatarImage class="avatar-profile" [style.background-image]="'url(' + user.imageurl + ')'"></div>
12
- <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
13
- <div class="user-presence">
14
- <app-presence
15
- [isOnline]="user.online">
16
- </app-presence>
17
- </div>
18
- </ion-avatar>
19
-
20
- <ion-label>
21
- <h2>{{ user.fullname }}</h2>
22
- <!-- <p>{{ user.uid }}</p> -->
23
- </ion-label>
24
-
25
- </ion-item>
2
+ <ion-searchbar id="contacts-searchbar" debounce="500" (ionInput)="onSearchInput($event)"></ion-searchbar>
3
+
4
+ <ion-item button="true" lines="none" class="ion-no-padding" *ngFor="let user of contacts" (click)="goToChat(user)">
5
+ <div tabindex="0"></div>
6
+ <!-- <div [class.selected]="user.uid === uidUserSelected"></div> [style.background-color]="user.color"-->
7
+ <ion-avatar slot="start">
8
+ <div #avatarPlaceholder class="avatar-placeholder" [ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user.color + ')'}" [innerHTML]="user.avatar"></div>
9
+ <div *ngIf="user.imageurl" #avatarImage class="avatar-profile" [style.background-image]="'url(' + user.imageurl + ')'"></div>
10
+ <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
11
+ <div class="user-presence">
12
+ <app-presence
13
+ [isOnline]="user.online">
14
+ </app-presence>
15
+ </div>
16
+ </ion-avatar>
17
+
18
+ <ion-label>
19
+ <h2>{{ user.fullname }}</h2>
20
+ <!-- <p>{{ user.uid }}</p> -->
21
+ </ion-label>
22
+
23
+ </ion-item>
26
24
 
27
- </ion-list>
28
- </ion-content>