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

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 (150) hide show
  1. package/CHANGELOG.md +4 -73
  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 +17 -113
  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 -77
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +86 -168
  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 +24 -11
  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/frame/frame.component.html +2 -8
  26. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  28. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  29. package/src/app/chatlib/conversation-detail/message/image/image.component.html +1 -1
  30. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  32. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
  33. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  34. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  36. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  37. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -62
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  39. package/src/app/components/canned-response/canned-response.component.html +7 -7
  40. package/src/app/components/canned-response/canned-response.component.scss +4 -10
  41. package/src/app/components/canned-response/canned-response.component.ts +1 -1
  42. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  43. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  44. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  45. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  46. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  47. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  48. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  49. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  50. 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
  51. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  52. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  53. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  54. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  55. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  56. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  57. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  58. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  59. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  60. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  61. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  62. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  63. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -8
  64. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  65. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +84 -24
  66. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  67. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  68. 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
  69. 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
  70. package/src/app/components/conversation-info/info-content/info-content.component.html +1 -2
  71. package/src/app/components/conversation-info/info-content/info-content.component.ts +2 -3
  72. package/src/app/components/conversation-info/info-direct/info-direct.component.html +9 -1
  73. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +2 -0
  74. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  75. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  76. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  77. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  78. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  79. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  80. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  81. package/src/app/components/project-item/project-item.component.html +149 -98
  82. package/src/app/components/project-item/project-item.component.scss +35 -42
  83. package/src/app/components/project-item/project-item.component.ts +4 -16
  84. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
  85. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +7 -2
  86. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  87. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  88. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  89. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  90. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -41
  91. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  92. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  93. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -40
  94. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  95. package/src/app/pages/conversation-detail/conversation-detail.page.ts +110 -182
  96. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  97. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -11
  98. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  99. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  100. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  101. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  102. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  103. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  104. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  105. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  106. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  107. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  108. package/src/app/services/tiledesk/tiledesk.service.ts +26 -2
  109. package/src/app/shared/shared.module.ts +33 -24
  110. package/src/assets/i18n/ar.json +265 -278
  111. package/src/assets/i18n/az.json +1 -14
  112. package/src/assets/i18n/de.json +2 -15
  113. package/src/assets/i18n/en.json +2 -15
  114. package/src/assets/i18n/es.json +2 -15
  115. package/src/assets/i18n/fr.json +1 -14
  116. package/src/assets/i18n/it.json +1 -14
  117. package/src/assets/i18n/kk.json +2 -15
  118. package/src/assets/i18n/pt.json +2 -15
  119. package/src/assets/i18n/ru.json +1 -14
  120. package/src/assets/i18n/sr.json +264 -277
  121. package/src/assets/i18n/sv.json +2 -15
  122. package/src/assets/i18n/tr.json +2 -15
  123. package/src/assets/i18n/uk.json +2 -15
  124. package/src/assets/i18n/uz.json +1 -14
  125. package/src/assets/js/chat21client.js +149 -177
  126. package/src/chat-config-native-mqtt.json +0 -3
  127. package/src/chat21-core/models/conversation.ts +1 -0
  128. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  129. package/src/chat21-core/utils/constants.ts +1 -6
  130. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  131. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  132. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  133. package/src/chat21-core/utils/utils.ts +10 -38
  134. package/src/global.scss +56 -52
  135. package/src/index.html +2 -2
  136. package/src/variables.scss +10 -30
  137. package/deploy_amazon_beta.sh +0 -29
  138. package/deploy_amazon_prod.sh +0 -30
  139. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  140. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  141. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  142. package/src/app/components/navbar/navbar.component.html +0 -103
  143. package/src/app/components/navbar/navbar.component.scss +0 -249
  144. package/src/app/components/navbar/navbar.component.ts +0 -189
  145. package/src/app/services/projects/projects.service.spec.ts +0 -12
  146. package/src/app/services/projects/projects.service.ts +0 -43
  147. package/src/assets/sounds/interface-start.mp3 +0 -0
  148. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  149. package/src/chat21-core/models/projects.ts +0 -27
  150. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
@@ -9,7 +9,7 @@ import { LoaderPreviewPage } from 'src/app/pages/loader-preview/loader-preview.p
9
9
  // Services
10
10
  import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
11
11
  // utils
12
- import { TYPE_MSG_TEXT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
12
+ import { TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
13
13
  // Models
14
14
  import { UploadModel } from 'src/chat21-core/models/upload';
15
15
  import { Observable } from 'rxjs';
@@ -62,11 +62,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
62
62
  public messageString: string;
63
63
  public HAS_PASTED: boolean = false;
64
64
  public toastMsg: string;
65
+ public TEXAREA_PLACEHOLDER: string;
66
+ public LONG_TEXAREA_PLACEHOLDER: string;
67
+ public SHORT_TEXAREA_PLACEHOLDER: string;
68
+ public SHORTER_TEXAREA_PLACEHOLDER: string;
69
+ public currentWindowWidth: any;
65
70
  private logger: LoggerService = LoggerInstance.getInstance();
66
71
  public countClicks: number = 0;
72
+ public IS_SUPPORT_GROUP_CONVERSATION: boolean;
67
73
  public IS_ON_MOBILE_DEVICE: boolean;
68
-
69
- TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
70
74
  TYPE_MSG_TEXT = TYPE_MSG_TEXT;
71
75
  msg: string
72
76
 
@@ -84,26 +88,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
84
88
  addWhiteSpaceBefore: boolean;
85
89
  emojiPerLine: number = 9
86
90
  emojiColor: string ="#3880ff"
87
- emojiiCategories = [ 'recent', 'people', 'nature', 'activity'] //, 'custom']
88
-
89
- customEmojis = [
90
- {
91
- name: 'Customer-Service',
92
- shortNames: ['customer'],
93
- text: 'ee',
94
- emoticons: [],
95
- keywords: ['github'],
96
- imageUrl: 'https://tiledesk.com/wp-content/uploads/2022/11/Customer-Service.png',
97
- },
98
- {
99
- name: 'Octocat',
100
- shortNames: ['octocat'],
101
- text: 'rr',
102
- emoticons: [],
103
- keywords: ['github'],
104
- imageUrl: 'https://tiledesk.com/wp-content/uploads/2022/11/FAQ-Chatbot.png',
105
- }
106
- ];
91
+ emojiiCategories = [ 'recent', 'people', 'nature', 'activity']
107
92
  /**
108
93
  * Constructor
109
94
  * @param chooser
@@ -132,8 +117,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
132
117
  if (this.areVisibleCAR === false) {
133
118
  this.emojiPerLine = 7
134
119
  }
120
+ // this.events.subscribe((cannedmessage) => {
121
+ // this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
122
+ // })
135
123
 
124
+ // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] LONG_TEXAREA_PLACEHOLDER ", this.LONG_TEXAREA_PLACEHOLDER);
125
+ // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORT_TEXAREA_PLACEHOLDER ", this.SHORT_TEXAREA_PLACEHOLDER);
126
+ // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORTER_TEXAREA_PLACEHOLDER ", this.SHORTER_TEXAREA_PLACEHOLDER);
136
127
  this.listenToNewCannedResponseCreated()
128
+ this.getWindowWidth();
137
129
  this.isOnMobileDevice()
138
130
  }
139
131
 
@@ -154,8 +146,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
154
146
  // this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
155
147
  // this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
156
148
 
149
+ this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
150
+
157
151
  }
158
152
 
153
+ if (this.conversationWith.startsWith("support-group")) {
154
+ this.IS_SUPPORT_GROUP_CONVERSATION = true
155
+ } else {
156
+ this.IS_SUPPORT_GROUP_CONVERSATION = false
157
+ }
159
158
  // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
160
159
  // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
161
160
  // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
@@ -206,6 +205,36 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
206
205
  }
207
206
  }
208
207
 
208
+
209
+ getWindowWidth(): any {
210
+ this.currentWindowWidth = window.innerWidth;
211
+
212
+
213
+ // if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
214
+ // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
215
+ // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
216
+ // } else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
217
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
218
+ // } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
219
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
220
+ // } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
221
+ // this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
222
+ // } else if (!this.conversationWith.startsWith("support-group")) {
223
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
224
+ // }
225
+
226
+ // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ", checkPlatformIsMobile());
227
+ if (checkPlatformIsMobile() === true) {
228
+
229
+ if (this.currentWindowWidth <= 430 && this.currentWindowWidth >= 274) {
230
+ this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
231
+
232
+ } else if (this.currentWindowWidth <= 273) {
233
+ this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
234
+ }
235
+ }
236
+ }
237
+
209
238
  // -------------------------------------------------------------------------------------------
210
239
  // Change the placeholder of the 'send message' textarea according to the width of the window
211
240
  // -------------------------------------------------------------------------------------------
@@ -213,6 +242,37 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
213
242
  onResize(event) {
214
243
  // this.getIfTexareaIsEmpty('onResize')
215
244
  // console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
245
+
246
+
247
+
248
+ // if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
249
+ // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
250
+ // } else if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
251
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
252
+ // } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
253
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
254
+ // } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
255
+ // this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
256
+ // } else if (!this.conversationWith.startsWith("support-group")) {
257
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
258
+ // }
259
+
260
+ // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ', checkPlatformIsMobile());
261
+ if (checkPlatformIsMobile() === true) {
262
+
263
+ if (event.target.innerWidth <= 430 && event.target.innerWidth >= 274) {
264
+ this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
265
+ } else if (this.currentWindowWidth <= 273) {
266
+ this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
267
+ }
268
+
269
+ }
270
+
271
+ // if (checkPlatformIsMobile && event.target.innerWidth <= 430) {
272
+ // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
273
+ // } else if (checkPlatformIsMobile && event.target.innerWidth > 430) {
274
+ // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
275
+ // }
216
276
  }
217
277
 
218
278
 
@@ -636,7 +696,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
636
696
 
637
697
  @HostListener('document:keydown', ['$event'])
638
698
  handleKeyboardEvent(event: KeyboardEvent) {
639
- // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
699
+ this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] handleKeyboardEvent event.key ", event);
640
700
  // Note: on mac keyboard "metakey" matches "cmd"
641
701
 
642
702
  if (event.key === 'Enter' && event.altKey || event.key === 'Enter' && event.ctrlKey || event.key === 'Enter' && event.metaKey) {
@@ -0,0 +1,13 @@
1
+ <ion-header no-border class="ion-no-border">
2
+ <ion-toolbar>
3
+
4
+ <ion-buttons slot="start">
5
+ <ion-button ion-button (click)="onBackButtonHandler()">
6
+ <ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
7
+ </ion-button>
8
+ </ion-buttons>
9
+
10
+ <ion-title> {{headerTitle}}</ion-title>
11
+
12
+ </ion-toolbar>
13
+ </ion-header>
@@ -1,19 +1,19 @@
1
1
  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
2
  import { IonicModule } from '@ionic/angular';
3
3
 
4
- import { HeaderConversationsListArchived } from './header-conversations-list-archived.component';
4
+ import { OptionHeaderComponent } from './option-header.component';
5
5
 
6
6
  describe('OptionHeaderComponent', () => {
7
- let component: HeaderConversationsListArchived;
8
- let fixture: ComponentFixture<HeaderConversationsListArchived>;
7
+ let component: OptionHeaderComponent;
8
+ let fixture: ComponentFixture<OptionHeaderComponent>;
9
9
 
10
10
  beforeEach(async(() => {
11
11
  TestBed.configureTestingModule({
12
- declarations: [ HeaderConversationsListArchived ],
12
+ declarations: [ OptionHeaderComponent ],
13
13
  imports: [IonicModule.forRoot()]
14
14
  }).compileComponents();
15
15
 
16
- fixture = TestBed.createComponent(HeaderConversationsListArchived);
16
+ fixture = TestBed.createComponent(OptionHeaderComponent);
17
17
  component = fixture.componentInstance;
18
18
  fixture.detectChanges();
19
19
  }));
@@ -2,14 +2,13 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
2
 
3
3
 
4
4
  @Component({
5
- selector: 'header-conversations-list-archived',
6
- templateUrl: './header-conversations-list-archived.component.html',
7
- styleUrls: ['./header-conversations-list-archived.component.scss'],
5
+ selector: 'app-option-header',
6
+ templateUrl: './option-header.component.html',
7
+ styleUrls: ['./option-header.component.scss'],
8
8
  })
9
- export class HeaderConversationsListArchived implements OnInit {
9
+ export class OptionHeaderComponent implements OnInit {
10
10
 
11
11
  @Input() headerTitle: string
12
- @Input() isMobile: boolean;
13
12
  @Output() onBackButton = new EventEmitter<boolean>();
14
13
  static UserPresenceComponent: any[] | any;
15
14
 
@@ -7,8 +7,7 @@
7
7
  </app-info-direct>
8
8
 
9
9
  <app-info-group *ngIf="panelType === 'group-panel' && IS_GROUP_PANEL === true"
10
- [groupDetail]="groupDetail"
11
- [isMobile]="isMobile">
10
+ [groupDetail]="groupDetail">
12
11
  </app-info-group>
13
12
 
14
13
  <app-info-support-group *ngIf="panelType === 'support-group-panel'"
@@ -28,12 +28,11 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
28
28
 
29
29
  export class InfoContentComponent implements OnInit {
30
30
  @Input() openInfoConversation: boolean;
31
+ @Input() translationMap: Map<string, string>;
31
32
  // @Input() member: UserModel;
32
33
  @Input() loggedUser: UserModel
33
34
  @Input() tenant: string
34
- @Input() groupDetail: any;
35
- @Input() isMobile: boolean;
36
- @Input() translationMap: Map<string, string>;
35
+ @Input() groupDetail: any
37
36
 
38
37
 
39
38
  public member: UserModel;
@@ -8,7 +8,15 @@
8
8
  <div class="image-profile">
9
9
  <app-avatar-profile [itemAvatar]='member'></app-avatar-profile>
10
10
  </div>
11
-
11
+
12
+ <div class="user-presence">
13
+ <app-user-presence
14
+ [idUser]='member.uid'
15
+ [translationMap]='translationMap'
16
+ [borderColor]='borderColor'
17
+ [fontColor]='fontColor'>
18
+ </app-user-presence>
19
+ </div>
12
20
  <!-- -> {{member |json}} -->
13
21
  <div class="info-profile">
14
22
  <div class="name">
@@ -15,6 +15,8 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
15
15
  @Input() translationMap: Map<string, string>;
16
16
  @Input() conversationWith: string;
17
17
 
18
+ borderColor = '#ffffff';
19
+ fontColor = '#949494';
18
20
  advancedAttributes: Array<any> = [];
19
21
  private logger: LoggerService = LoggerInstance.getInstance();
20
22
 
@@ -1,51 +1,115 @@
1
1
  <!-- <pre style="font-size: 12px;"> {{ groupDetail | json }} </pre> -->
2
2
 
3
3
  <ion-content class="group-profile">
4
- <ion-card>
5
- <div class="chat21-box-profile chat21-box">
6
- <div class="chat21-content">
7
- <div class="image-profile">
8
- <app-avatar-profile [itemAvatar]="groupDetail"></app-avatar-profile>
9
- </div>
10
-
11
- <div class="info-profile">
12
- <div class="name">
13
- <span class="read">{{groupDetail?.name}}</span>
14
- </div>
4
+ <ion-card class="first-card">
5
+ <div class="chat21-box-profile chat21-box">
6
+ <div class="chat21-content">
7
+ <div class="image-profile">
8
+ <app-avatar-profile [itemAvatar]="groupDetail"></app-avatar-profile>
9
+ </div>
10
+
11
+ <div class="info-profile">
12
+ <div class="name">
13
+ <span class="read">{{groupDetail?.name}}</span>
15
14
  </div>
16
15
  </div>
17
-
16
+ <!-- <div class="member-email">
17
+ <a [href]="'mailto:' + member.email + '?Subject='">
18
+ {{member.email}}
19
+ </a>
20
+ </div> -->
18
21
  </div>
19
- </ion-card>
20
-
21
- <ion-list id="fake-members-list" *ngIf="displaySkeletonScreen">
22
- <ion-item lines="none" *ngFor="let fake of generateFake(membersObjectLength)" style="margin-left:-3px">
23
- <ion-avatar slot="start">
24
- <ion-skeleton-text animated style="width: 44px; height: 44px;"></ion-skeleton-text>
25
- </ion-avatar>
26
- <ion-label>
27
- <h3>
28
- <ion-skeleton-text animated style="width: 60%;position: relative;top: 2px;height: 16px;"></ion-skeleton-text>
29
- </h3>
30
- </ion-label>
31
- </ion-item>
32
- </ion-list>
33
-
34
- <!-- <pre style="font-size: 8px;"> {{member_array | json }} </pre> <pre style="font-size: 8px;"> {{displaySkeletonScreen}} </pre> -->
35
- <ion-list id="members-list" *ngIf="groupDetail?.member_array?.length > 0 && !displaySkeletonScreen">
36
- <ion-item lines="none" *ngFor='let member of groupDetail?.member_array'>
37
- <ion-avatar slot="start" style="margin-right: 12px;">
38
- <app-avatar-profile [itemAvatar]=member></app-avatar-profile>
39
- <div class="status-icon-container" [class.mobile]="isMobile" >
40
- <svg xmlns="http://www.w3.org/2000/svg" [class.online]="(member?.userOnline)" 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>
41
- </div>
42
- </ion-avatar>
43
- <ion-label>
44
- <h3>
45
- {{ member.fullname }}
46
- </h3>
47
- </ion-label>
48
- </ion-item>
49
- </ion-list>
22
+
23
+ </div>
24
+ </ion-card>
50
25
 
51
- </ion-content>
26
+ <ion-list id="fake-members-list" *ngIf="displaySkeletonScreen">
27
+ <ion-item lines="none" *ngFor="let fake of generateFake(membersObjectLength)" style="margin-left:-3px">
28
+ <ion-avatar slot="start">
29
+ <ion-skeleton-text animated style="width: 44px; height: 44px;"></ion-skeleton-text>
30
+ </ion-avatar>
31
+ <ion-label>
32
+ <h3>
33
+ <ion-skeleton-text animated style="width: 60%;position: relative;top: 2px;height: 16px;"></ion-skeleton-text>
34
+ </h3>
35
+ </ion-label>
36
+ </ion-item>
37
+ </ion-list>
38
+
39
+ <!-- <pre style="font-size: 8px;"> {{member_array | json }} </pre> <pre style="font-size: 8px;"> {{displaySkeletonScreen}} </pre> -->
40
+ <ion-list id="members-list" *ngIf="groupDetail?.member_array?.length > 0 && !displaySkeletonScreen">
41
+ <ion-item lines="none" *ngFor='let member of groupDetail?.member_array'>
42
+ <ion-avatar slot="start" style="margin-right: 12px;">
43
+ <app-avatar-profile [itemAvatar]=member></app-avatar-profile>
44
+ <div class="user-online" [ngStyle]="{ 'background-color':(member?.userOnline)?'#24d066':'#db4437' }"></div>
45
+ </ion-avatar>
46
+ <ion-label>
47
+ <h3>
48
+ {{ member.fullname }}
49
+ </h3>
50
+ </ion-label>
51
+ </ion-item>
52
+ </ion-list>
53
+
54
+
55
+
56
+
57
+ <div *ngIf="groupDetail" style="display:none">
58
+ <div *ngFor='let member of groupDetail?.member_array'>
59
+ <ion-grid>
60
+ <ion-row class="ion-align-items-center">
61
+ <ion-col size="3">
62
+ <div class="member-profile">
63
+ <!-- (click)="copyLoggedUserUID({member.userid)" -->
64
+ <!-- <div class="avatar-container" [tooltip]="useruidTooltip" [options]="tooltipOptions" placement="top"
65
+ content-type="template" > -->
66
+ <app-avatar-profile [itemAvatar]=member></app-avatar-profile>
67
+ <!-- </div> -->
68
+ <!-- <ng-template #useruidTooltip>
69
+ <span> {{member.userid}}</span>
70
+ </ng-template> -->
71
+
72
+ <div class="user-online" [ngStyle]="{ 'background-color':(member?.userOnline)?'#24d066':'#db4437' }">
73
+ </div>
74
+ </div>
75
+
76
+
77
+ </ion-col>
78
+ <ion-col>
79
+ <ion-label>
80
+ {{ member.fullname }}
81
+ </ion-label>
82
+
83
+ <!-- <div class="info-group-member-email">
84
+ <a [href]="'mailto:' + member.email + '?Subject='">
85
+ {{member.email}}
86
+ </a>
87
+ </div> -->
88
+
89
+
90
+ </ion-col>
91
+ </ion-row>
92
+ </ion-grid>
93
+ <!-- </ion-avatar>
94
+ </ion-item> -->
95
+ <!-- {{member | json}}
96
+
97
+ >>> {{member?.avatar}} -->
98
+ </div>
99
+ </div>
100
+
101
+ <!-- <ion-list>
102
+
103
+
104
+ </ion-list> -->
105
+
106
+ <!-- </div> -->
107
+
108
+
109
+ <!-- <app-advanced-info-accordion
110
+ [advancedAttributes]="advancedAttributes"
111
+ [translationMap]="translationMap">
112
+
113
+ </app-advanced-info-accordion> -->
114
+
115
+ </ion-content>
@@ -7,114 +7,74 @@
7
7
  -webkit-box-shadow: none;
8
8
  box-shadow: none;
9
9
  border-bottom: 1px solid rgba(169, 169, 169, 0.2);
10
+ }
10
11
 
11
- .image-profile {
12
- padding: 0 0 0 0;
13
- width: 100px;
14
- height: 100px;
15
- margin: auto;
16
- line-height: 100px;
17
- font-size: 40px;
18
- color: white;
19
- }
20
-
21
- .info-profile {
22
- padding: 10px 0 0 0;
23
- text-align: center;
24
- .name {
25
- -webkit-font-smoothing: antialiased;
26
- text-rendering: optimizeLegibility;
27
- text-size-adjust: none;
28
- user-select: text;
29
- font-family: "Roboto", "Helvetica Neue", sans-serif;
30
- -webkit-box-direction: normal;
31
- color: #333333;
32
- font-weight: 500;
33
- font-size: 17px;
34
- box-sizing: border-box;
35
- -webkit-tap-highlight-color: transparent;
36
- display: block;
37
- font-size: large;
38
- font-weight: bold;
39
- }
40
- }
12
+ .image-profile {
13
+ padding: 0 0 0 0;
14
+ width: 100px;
15
+ height: 100px;
16
+ margin: auto;
17
+ line-height: 100px;
18
+ font-size: 40px;
19
+ color: white;
41
20
  }
42
21
 
22
+ .member-profile {
23
+ padding: 0 0 0 0;
24
+ width: 55px;
25
+ height: 55px;
26
+ margin: auto;
27
+ line-height: 57px;
28
+ font-size: 25px;
29
+ color: white;
30
+ position: relative;
31
+ }
43
32
 
44
- #members-list{
45
- ion-item{
46
- display: flex;
47
- height: 60px;
33
+ .user-online {
34
+ height: 11px;
35
+ width: 11px;
36
+ border-radius: 50%;
37
+ position: absolute;
38
+ top: 44px;
39
+ left: 40px;
40
+ border: 0.5px solid #fff;
41
+ }
48
42
 
49
- .status-icon-container{
50
- position: absolute;
51
- top: 35px;
52
- left: 45px;
53
- background-color: white;
54
- height: 17px;
55
- width: 17px;
56
- border-radius: 50%;
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
-
61
- &.mobile{
62
- top: 30px;
63
- left: 50px;
64
- }
65
-
66
- svg{
67
- fill: #f44336;
68
-
69
- &.online{
70
- fill: #4caf50;
71
- }
72
- }
73
- }
43
+ .user-presence {
44
+ position: absolute;
45
+ top: 88px;
46
+ height: 12px;
47
+ left: calc(50% + 30px);
48
+ width: 100px;
49
+ }
74
50
 
51
+ .info-profile {
52
+ padding: 10px 0 0 0;
53
+ text-align: center;
54
+ .name {
55
+ -webkit-font-smoothing: antialiased;
56
+ text-rendering: optimizeLegibility;
57
+ text-size-adjust: none;
58
+ user-select: text;
59
+ font-family: "Roboto", "Helvetica Neue", sans-serif;
60
+ -webkit-box-direction: normal;
61
+ color: #333333;
62
+ font-weight: 500;
63
+ font-size: 17px;
64
+ box-sizing: border-box;
65
+ -webkit-tap-highlight-color: transparent;
66
+ display: block;
67
+ font-size: large;
68
+ font-weight: bold;
75
69
  }
76
70
  }
77
71
 
78
-
79
-
80
- // .member-profile {
81
- // padding: 0 0 0 0;
82
- // width: 55px;
83
- // height: 55px;
84
- // margin: auto;
85
- // line-height: 57px;
86
- // font-size: 25px;
87
- // color: white;
88
- // position: relative;
89
- // }
90
-
91
- // .user-online {
92
- // height: 11px;
93
- // width: 11px;
94
- // border-radius: 50%;
95
- // position: absolute;
96
- // top: 44px;
97
- // left: 40px;
98
- // border: 0.5px solid #fff;
99
- // }
100
-
101
-
102
- // .user-presence {
103
- // position: absolute;
104
- // top: 88px;
105
- // height: 12px;
106
- // left: calc(50% + 30px);
107
- // width: 100px;
108
- // }
109
-
110
-
111
-
112
- // .info-group-member-email {
113
- // font-size: 13px;
114
- // margin-top: 2px;
115
- // white-space: nowrap;
116
- // width: 205px;
117
- // overflow: hidden;
118
- // text-overflow: ellipsis;
119
- // }
72
+ .info-group-member-email {
73
+ font-size: 13px;
74
+ margin-top: 2px;
75
+ white-space: nowrap;
76
+ width: 205px;
77
+ overflow: hidden;
78
+ text-overflow: ellipsis;
79
+ }
120
80
  }
@@ -23,7 +23,6 @@ export class InfoGroupComponent implements OnInit, AfterViewInit, OnChanges {
23
23
  // objectKeys = Object.keys;
24
24
 
25
25
  @Input() groupDetail: any;
26
- @Input() isMobile: boolean;
27
26
  // @Input() member_array: any;
28
27
  public displaySkeletonScreen: boolean = true;
29
28
  public member_array: any
@@ -1,6 +1,6 @@
1
- <ion-toolbar [class.mobile]="isMobile">
1
+ <ion-toolbar style="height:60px" [ngClass]="{'bottom-border-on-mobile':IS_ON_MOBILE_DEVICE === true }">
2
2
 
3
- <ion-buttons *ngIf="isMobile || supportMode === false" slot="start" style="height:60px">
3
+ <ion-buttons *ngIf="IS_ON_MOBILE_DEVICE === true || supportMode === false" slot="start" style="height:60px">
4
4
  <ion-button ion-button icon-only fill="clear" (click)="onOpenProfileInfo($event)">
5
5
  <ion-icon slot="icon-only" name="reorder-three-outline"></ion-icon>
6
6
  </ion-button>
@@ -11,7 +11,7 @@
11
11
  <div *ngIf="numberOpenConv > 0" class="number-open-conv">({{numberOpenConv}})</div>
12
12
  </ion-title>
13
13
 
14
- <ion-buttons slot="start" *ngIf="isMobile">
14
+ <ion-buttons slot="start">
15
15
  <ion-button *ngIf="sound_btn==='enabled'" ion-button fill="clear" (click)="onSoundChangeFN('disabled')">
16
16
  <ion-icon slot="icon-only" name="volume-high-outline" ></ion-icon>
17
17
  </ion-button>