@chat21/chat21-ionic 3.0.85 → 3.0.86-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 (171) hide show
  1. package/CHANGELOG.md +121 -4
  2. package/README.md +2 -2
  3. package/package.json +4 -3
  4. package/src/app/app-routing.module.ts +7 -2
  5. package/src/app/app.component.html +7 -1
  6. package/src/app/app.component.scss +20 -2
  7. package/src/app/app.component.ts +131 -20
  8. package/src/app/app.module.ts +8 -3
  9. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +11 -4
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +86 -23
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +188 -88
  12. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +42 -3
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +11 -24
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  16. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +16 -26
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
  19. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
  22. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
  25. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
  26. package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +8 -2
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +36 -0
  28. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  29. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
  30. package/src/app/chatlib/conversation-detail/message/image/image.component.html +3 -2
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +17 -5
  32. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  33. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +3 -2
  34. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
  36. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
  37. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +63 -20
  39. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
  40. package/src/app/components/canned-response/canned-response.component.html +9 -9
  41. package/src/app/components/canned-response/canned-response.component.scss +14 -7
  42. package/src/app/components/canned-response/canned-response.component.ts +5 -4
  43. package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
  44. package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
  45. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +64 -47
  46. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
  47. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +24 -44
  48. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  49. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +39 -42
  50. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +67 -4
  51. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +82 -154
  52. package/src/app/components/conversation-info/info-content/info-content.component.html +23 -2
  53. package/src/app/components/conversation-info/info-content/info-content.component.ts +5 -6
  54. package/src/app/components/conversation-info/info-direct/info-direct.component.html +7 -14
  55. package/src/app/components/conversation-info/info-direct/info-direct.component.scss +23 -0
  56. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +1 -6
  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/conversation-info/info-support-group/info-support-group.component.html +2 -1
  61. package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +0 -1
  62. package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
  63. package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
  64. 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
  65. package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
  66. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
  67. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
  68. 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
  69. 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
  70. package/src/app/components/navbar/navbar.component.html +103 -0
  71. package/src/app/components/navbar/navbar.component.scss +249 -0
  72. package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
  73. package/src/app/components/navbar/navbar.component.ts +195 -0
  74. package/src/app/components/project-item/project-item.component.html +98 -149
  75. package/src/app/components/project-item/project-item.component.scss +43 -35
  76. package/src/app/components/project-item/project-item.component.ts +16 -4
  77. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
  78. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +24 -13
  79. package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
  80. package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
  81. package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
  82. package/src/app/{pages → modals}/create-canned-response/create-canned-response-routing.module.ts +0 -0
  83. package/src/app/{pages → modals}/create-canned-response/create-canned-response.module.ts +0 -0
  84. package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.html +0 -0
  85. package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.scss +0 -0
  86. package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.spec.ts +0 -0
  87. package/src/app/{pages → modals}/create-canned-response/create-canned-response.page.ts +13 -13
  88. package/src/app/{pages → modals}/loader-preview/loader-preview-routing.module.ts +0 -0
  89. package/src/app/{pages → modals}/loader-preview/loader-preview.module.ts +0 -0
  90. package/src/app/{pages → modals}/loader-preview/loader-preview.page.html +1 -1
  91. package/src/app/{pages → modals}/loader-preview/loader-preview.page.scss +4 -0
  92. package/src/app/{pages → modals}/loader-preview/loader-preview.page.spec.ts +0 -0
  93. package/src/app/{pages → modals}/loader-preview/loader-preview.page.ts +1 -2
  94. package/src/app/modals/send-email/send-email-routing.module.ts +17 -0
  95. package/src/app/modals/send-email/send-email.module.ts +31 -0
  96. package/src/app/modals/send-email/send-email.page.html +46 -0
  97. package/src/app/modals/send-email/send-email.page.scss +161 -0
  98. package/src/app/modals/send-email/send-email.page.spec.ts +24 -0
  99. package/src/app/modals/send-email/send-email.page.ts +89 -0
  100. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  101. package/src/app/pages/contacts-directory/contacts-directory.page.scss +47 -0
  102. package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
  103. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  104. package/src/app/pages/conversation-detail/conversation-detail.page.html +48 -27
  105. package/src/app/pages/conversation-detail/conversation-detail.page.scss +45 -254
  106. package/src/app/pages/conversation-detail/conversation-detail.page.ts +330 -138
  107. package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
  108. package/src/app/pages/conversations-list/conversations-list.page.scss +18 -2
  109. package/src/app/pages/conversations-list/conversations-list.page.ts +26 -24
  110. package/src/app/pages/profile-info/profile-info.page.html +2 -4
  111. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  112. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  113. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  114. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  115. package/src/app/services/projects/projects.service.spec.ts +12 -0
  116. package/src/app/services/projects/projects.service.ts +43 -0
  117. package/src/app/services/tiledesk/tiledesk.service.ts +33 -17
  118. package/src/app/shared/shared.module.ts +24 -33
  119. package/src/app/utils/toast.spec.ts +7 -0
  120. package/src/app/utils/toast.ts +48 -0
  121. package/src/assets/i18n/ar.json +288 -265
  122. package/src/assets/i18n/az.json +24 -1
  123. package/src/assets/i18n/de.json +25 -2
  124. package/src/assets/i18n/en.json +25 -2
  125. package/src/assets/i18n/es.json +26 -3
  126. package/src/assets/i18n/fr.json +24 -1
  127. package/src/assets/i18n/it.json +24 -1
  128. package/src/assets/i18n/kk.json +25 -2
  129. package/src/assets/i18n/pt.json +25 -2
  130. package/src/assets/i18n/ru.json +24 -1
  131. package/src/assets/i18n/sr.json +287 -264
  132. package/src/assets/i18n/sv.json +25 -2
  133. package/src/assets/i18n/tr.json +25 -2
  134. package/src/assets/i18n/uk.json +25 -2
  135. package/src/assets/i18n/uz.json +24 -1
  136. package/src/assets/js/chat21client.js +1 -1
  137. package/src/assets/sounds/interface-start.mp3 +0 -0
  138. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  139. package/src/chat-config-mqtt-localhost.json +2 -2
  140. package/src/chat-config-native-mqtt.json +3 -0
  141. package/src/chat21-core/models/conversation.ts +0 -1
  142. package/src/chat21-core/models/projects.ts +27 -0
  143. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
  144. package/src/chat21-core/providers/logger/customLogger.ts +1 -1
  145. package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +7 -8
  146. package/src/chat21-core/utils/constants.ts +7 -1
  147. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  148. package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
  149. package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
  150. package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
  151. package/src/chat21-core/utils/utils.ts +41 -11
  152. package/src/global.scss +59 -255
  153. package/src/index.html +0 -9
  154. package/src/variables.scss +30 -10
  155. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  156. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  157. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  158. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  159. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  160. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  161. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  162. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  163. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  164. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  165. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  166. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  167. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  168. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  169. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
  170. package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
  171. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
@@ -1,35 +1,38 @@
1
- <ion-header no-border class="ion-no-border">
2
- <app-ddp-header *ngIf="conversationType ==='active'"
1
+ <ion-header no-border class="ion-no-border" [class.mobile]="isMobile">
2
+ <header-conversations-list *ngIf="conversationType ==='active'"
3
3
  [numberOpenConv]="numberOpenConv"
4
4
  [supportMode]="supportMode"
5
5
  [archived_btn]="archived_btn"
6
6
  [writeto_btn]="writeto_btn"
7
7
  [sound_btn]="sound_btn"
8
+ [isMobile]="isMobile"
8
9
  (onSoundChange)="onSoundChange($event)"
9
10
  (openContactsDirectory)=openContactsDirectory($event)
10
11
  (openProfileInfo)=openProfileInfo($event)>
11
- </app-ddp-header>
12
+ </header-conversations-list>
12
13
 
13
- <app-option-header *ngIf="conversationType !=='active'"
14
+ <header-conversations-list-archived *ngIf="conversationType !=='active'"
14
15
  [headerTitle]=headerTitle
16
+ [isMobile]="isMobile"
15
17
  (onBackButton)=onBackButtonFN($event)>
16
- </app-option-header>
18
+ </header-conversations-list-archived>
17
19
  </ion-header>
20
+
18
21
  <!-- appScrollbarTheme -->
19
- <ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" >
22
+ <ion-content id="convs-list" #ioncontentconvlist class="list-avatar-page" [class.mobile]="isMobile">
20
23
  <!-- class="ps" style="position: relative; max-width: 600px; max-height: 100%;" [perfectScrollbar]="config" -->
21
24
  <div id="scrollbar2">
22
25
  <ion-list>
23
26
 
24
27
  <!-- supportMode && -->
25
- <ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item">
28
+ <ion-item *ngIf="displayNewConvsItem && conversationType !=='archived' && supportMode" class="ion-no-padding open-iframe-item" lines="none">
26
29
  <div tabindex="0"></div>
27
30
  <!-- <ion-note class="pinned-project">
28
31
  {{ 'PINNED_PROJECT' | translate }}
29
32
  </ion-note> -->
30
33
 
31
34
  <app-project-item
32
- style="width: 100%;"
35
+ style="width: 100%; margin: 0px 8px; border-bottom: 1px dashed #d3dbe5;"
33
36
  (openUnsevedConvsEvent)="openUnsevedConversationIframe($event)"
34
37
  (projectIdEvent)="getLastProjectId($event)">
35
38
  </app-project-item>
@@ -4,6 +4,10 @@ ion-header {
4
4
  border-bottom-style: solid;
5
5
  border-color: var(--light-gray);
6
6
  border-bottom-width: thin;
7
+ &:not(.mobile){
8
+ border: none;
9
+ background: var(--list-bkg-color);
10
+ }
7
11
  }
8
12
 
9
13
  ion-content {
@@ -12,6 +16,16 @@ ion-content {
12
16
  --overflow: hidden;
13
17
  overflow: scroll;
14
18
 
19
+ /* For Firefox */
20
+ @-moz-document url-prefix() {
21
+ scrollbar-width: none;
22
+ }
23
+
24
+
25
+ &:not(.mobile){
26
+ background: var(--list-bkg-color);
27
+ }
28
+
15
29
  &::-webkit-scrollbar {
16
30
  width: 6px;
17
31
  height: 8px;
@@ -40,10 +54,11 @@ ion-list {
40
54
  list-style-type: none;
41
55
  margin: 0;
42
56
  padding: 0;
57
+ background: transparent;
43
58
 
44
59
  ion-item {
45
60
  cursor: pointer;
46
- height: 64px;
61
+ // height: 64px;
47
62
  position: relative;
48
63
  display: flex;
49
64
  text-decoration: none;
@@ -51,6 +66,7 @@ ion-list {
51
66
  padding-right: 8px;
52
67
  --padding-start: 0;
53
68
  --inner-padding-end: 0;
69
+ --background: transparent;
54
70
  .selected {
55
71
  border-radius: 10px;
56
72
  padding-left: 8px;
@@ -324,7 +340,7 @@ ion-list {
324
340
  padding-left: 0px !important ;
325
341
  padding-right: 0px !important;
326
342
  // height: 55px !important;
327
- border-bottom: 1px solid rgba(0, 0, 0, 0.05);
343
+ // border-bottom: 1px solid rgba(0, 0, 0, 0.05);
328
344
  --background-hover: #ffffff;
329
345
  cursor:default !important;
330
346
  }
@@ -92,6 +92,7 @@ export class ConversationListPage implements OnInit {
92
92
  public displayNewConvsItem: boolean = true
93
93
  public archiveActionNotAllowed: boolean = false
94
94
 
95
+ public isMobile: boolean = false;
95
96
  public isInitialized: boolean = false;
96
97
 
97
98
  tooltipOptions = {
@@ -122,8 +123,8 @@ export class ConversationListPage implements OnInit {
122
123
  public appConfigProvider: AppConfigProvider,
123
124
  public platform: Platform,
124
125
  private networkService: NetworkService,
125
- private appStorageService: AppStorageService
126
126
  ) {
127
+ this.checkPlatform();
127
128
  this.listenToAppCompConvsLengthOnInitConvs()
128
129
  this.listenToAppIsInitialized()
129
130
  this.listenToLogoutEvent()
@@ -136,6 +137,16 @@ export class ConversationListPage implements OnInit {
136
137
  this.listenToCloseConvFromHeaderConversation()
137
138
  }
138
139
 
140
+ private checkPlatform(){
141
+ if (checkPlatformIsMobile()) {
142
+ this.isMobile = true
143
+ this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
144
+ } else {
145
+ this.isMobile = false
146
+ this.logger.log('[CONVS-LIST-PAGE] - initialize -> checkPlatformIsMobile isMobile? ', this.isMobile)
147
+ }
148
+ }
149
+
139
150
  listenSupportConvIdHasChanged() {
140
151
  this.events.subscribe('supportconvid:haschanged', (IDConv) => {
141
152
  // console.log('[CONVS-LIST-PAGE] - listen To convid:haschanged - convId', IDConv);
@@ -401,7 +412,6 @@ export class ConversationListPage implements OnInit {
401
412
  })
402
413
  }
403
414
 
404
-
405
415
  listenGoOnline() {
406
416
  this.events.subscribe('go:online', (goonline) => {
407
417
  this.logger.info('[CONVS-LIST-PAGE] - listen To go:online - goonline',goonline)
@@ -492,11 +502,11 @@ export class ConversationListPage implements OnInit {
492
502
  })
493
503
 
494
504
  this.conversationsHandlerService.conversationRemoved.subscribe((conversation: ConversationModel) => {
495
- // this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
505
+ this.logger.log('[CONVS-LIST-PAGE] ***** conversationsRemoved *****',conversation)
496
506
  })
497
507
 
498
508
  this.archivedConversationsHandlerService.archivedConversationAdded.subscribe((conversation: ConversationModel) => {
499
- // this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
509
+ this.logger.log('[CONVS-LIST-PAGE] ***** archivedConversationAdded *****',conversation)
500
510
  // that.conversationsChanged(conversations);
501
511
  if (conversation) {
502
512
  this.onImageLoaded(conversation)
@@ -515,22 +525,6 @@ export class ConversationListPage implements OnInit {
515
525
  this.logger.log('[CONVS-LIST-PAGE] - subscribeLoggedUserLogout uidConvSelected ',this.uidConvSelected)
516
526
  }
517
527
 
518
- // ------------------------------------------------------------------------------------
519
- // @ SUBSCRIBE TO CONVERSATION CHANGED ??????????? SEEMS NOT USED ?????????????????
520
- // ------------------------------------------------------------------------------------
521
- conversationsChanged = (conversations: ConversationModel[]) => {
522
- this.numberOpenConv = this.conversationsHandlerService.countIsNew()
523
- this.logger.log('[CONVS-LIST-PAGE] - conversationsChanged - NUMB OF CONVERSATIONS: ',this.numberOpenConv)
524
- // console.log('conversationsChanged »»»»»»»»» uidConvSelected', that.conversations[0], that.uidConvSelected);
525
- if (this.uidConvSelected && !this.conversationSelected) {
526
- const conversationSelected = this.conversations.find((item) => item.uid === this.uidConvSelected)
527
- if (conversationSelected) {
528
- this.conversationSelected = conversationSelected
529
- this.setUidConvSelected(this.uidConvSelected)
530
- }
531
- }
532
- }
533
-
534
528
  /**
535
529
  * ::: subscribeProfileInfoButtonClicked :::
536
530
  * evento richiamato quando si seleziona bottone profile-info-modal
@@ -646,7 +640,7 @@ export class ConversationListPage implements OnInit {
646
640
  * ::: setUidConvSelected :::
647
641
  */
648
642
  setUidConvSelected(uidConvSelected: string, conversationType?: string) {
649
- this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected)
643
+ this.logger.log('[CONVS-LIST-PAGE] setuidCOnvSelected', uidConvSelected, conversationType)
650
644
  this.uidConvSelected = uidConvSelected
651
645
  // this.conversationsHandlerService.uidConvSelected = uidConvSelected;
652
646
  if (uidConvSelected) {
@@ -677,6 +671,7 @@ export class ConversationListPage implements OnInit {
677
671
  this.navigateByUrl('active', conversation.uid)
678
672
  this.conversationsHandlerService.uidConvSelected = conversation.uid
679
673
  this.logger.log('[CONVS-LIST-PAGE] onConversationSelected active conversation.uid ', conversation.uid)
674
+ this.events.publish('convList:onConversationSelected', conversation)
680
675
  }
681
676
  }
682
677
 
@@ -744,7 +739,14 @@ export class ConversationListPage implements OnInit {
744
739
  }
745
740
  }
746
741
  }
747
-
742
+
743
+ if(conversation.attributes && conversation.attributes['projectId']){
744
+ let project = localStorage.getItem(conversation.attributes['projectId'])
745
+ if(project){
746
+ project = JSON.parse(project)
747
+ conversation.attributes.project_name = project['name']
748
+ }
749
+ }
748
750
  // if(conversation.conversation_with_fullname === 'Guest '){
749
751
  // conversation.conversation_with_fullname = 'guest' + '#' + this.getUUidConversation(conversation.uid)
750
752
  // }
@@ -811,7 +813,7 @@ export class ConversationListPage implements OnInit {
811
813
  this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ), {replaceUrl: true})
812
814
  }
813
815
  }
814
-
816
+
815
817
  // ---------------------------------------------------------
816
818
  // Opens the list of contacts for direct convs
817
819
  // ---------------------------------------------------------
@@ -821,6 +823,7 @@ export class ConversationListPage implements OnInit {
821
823
  if (checkPlatformIsMobile()) {
822
824
  presentModal(this.modalController, ContactsDirectoryPage, {
823
825
  token: TOKEN,
826
+ isMobile: this.isMobile
824
827
  })
825
828
  } else {
826
829
  this.navService.push(ContactsDirectoryPage, { token: TOKEN })
@@ -1024,7 +1027,6 @@ export class ConversationListPage implements OnInit {
1024
1027
  } catch (err) {
1025
1028
  this.logger.error('Event:Agent added to conversation [group] error', err);
1026
1029
  }
1027
-
1028
1030
  }
1029
1031
  }
1030
1032
  }
@@ -30,10 +30,8 @@
30
30
 
31
31
  <div class="user-presence">
32
32
  <app-user-presence
33
- [idUser]=loggedUser.uid
34
- [translationMap]=translationMap
35
- [borderColor]=borderColor
36
- [fontColor]=fontColor>
33
+ [idUser]=loggedUser.uid
34
+ [translationMap]=translationMap>
37
35
  </app-user-presence>
38
36
  </div>
39
37
 
@@ -1,5 +1,5 @@
1
1
  <ion-header>
2
- <ion-toolbar>
2
+ <ion-toolbar [class.mobile]="isMobile">
3
3
  <ion-title *ngIf="callerBtn !== 'pinbtn'" style="font-size: 16px;">
4
4
  {{translationMap?.get('UnassignedConversations') }}
5
5
  </ion-title>
@@ -1,3 +1,45 @@
1
+ ion-toolbar {
2
+ height: var(--header-height);
3
+ &:not(.mobile){
4
+ --background: var(--list-bkg-color);
5
+ border: none;
6
+ }
7
+ &.mobile{
8
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
9
+ }
10
+
11
+ ion-button{
12
+ --color: var(--basic-blue);
13
+ }
14
+ }
15
+
16
+ ion-content {
17
+ // overwrite inline styles
18
+ --overflow: hidden;
19
+ overflow: scroll;
20
+ &:not(.mobile){
21
+ background: var(--list-bkg-color);
22
+ }
23
+
24
+ &::-webkit-scrollbar {
25
+ width: 6px;
26
+ height: 8px;
27
+ display: none;
28
+ }
29
+
30
+ &::-webkit-scrollbar-track {
31
+ background: #f9f9f9;
32
+ }
33
+ &::-webkit-scrollbar-thumb {
34
+ background-color: #b9b9b9;
35
+ border-radius: 0px;
36
+ }
37
+ &::-webkit-scrollbar-thumb:hover {
38
+ background-color: #727272;
39
+ }
40
+ }
41
+
42
+
1
43
  .ion-content-black-background {
2
44
  --background: #2d323e;
3
45
  }
@@ -16,6 +16,7 @@ export class UnassignedConversationsPage implements OnInit {
16
16
 
17
17
  @Input() iframe_URL: any;
18
18
  @Input() callerBtn: string;
19
+ @Input() isMobile: boolean;
19
20
  // @Input() prjctsxpanel_url: any;
20
21
  // @Input() unassigned_convs_url: any;
21
22
 
@@ -43,6 +43,32 @@ export class CannedResponsesService {
43
43
  }))
44
44
  }
45
45
 
46
+ // -------------------------------------------------------------------------------------
47
+ // @ Create - Save (POST) new canned response
48
+ // -------------------------------------------------------------------------------------
49
+ public add(token: string, projectid: string, title: string, message: string) {
50
+ const url = this.apiUrl + projectid + '/canned/'
51
+ this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - URL', url);
52
+
53
+ const httpOptions = {
54
+ headers: new HttpHeaders({
55
+ 'Content-Type': 'application/json',
56
+ Authorization: token
57
+ })
58
+ };
59
+
60
+ const body = {
61
+ title: title,
62
+ text: message
63
+ }
64
+
65
+ return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
66
+ this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
67
+ return res
68
+ }))
69
+
70
+ }
71
+
46
72
  public edit(token: string, projectid: string, canned: any){
47
73
  const cannedResponsesURL = this.apiUrl + projectid + "/canned/"+ canned._id;
48
74
  this.logger.log('[CANNED-RESPONSES-SERVICE] editCannedResponses - URL ', cannedResponsesURL);
@@ -0,0 +1,12 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+
3
+ import { ProjectsService } from './projects.service';
4
+
5
+ describe('ProjectsService', () => {
6
+ beforeEach(() => TestBed.configureTestingModule({}));
7
+
8
+ it('should be created', () => {
9
+ const service: ProjectsService = TestBed.get(ProjectsService);
10
+ expect(service).toBeTruthy();
11
+ });
12
+ });
@@ -0,0 +1,43 @@
1
+ import { HttpClient, HttpHeaders } from '@angular/common/http';
2
+ import { Injectable } from '@angular/core';
3
+ import { map } from 'rxjs/operators';
4
+ import { Project } from 'src/chat21-core/models/projects';
5
+ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
6
+ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
7
+ import { AppConfigProvider } from '../app-config';
8
+
9
+ @Injectable({
10
+ providedIn: 'root'
11
+ })
12
+ export class ProjectsService {
13
+
14
+ private apiUrl: string;
15
+ private logger: LoggerService = LoggerInstance.getInstance();
16
+
17
+ constructor(
18
+ public http: HttpClient,
19
+ public appConfigProvider: AppConfigProvider
20
+ ) {
21
+
22
+ this.logger.log('[PROJECTS-SERVICE] HELLO !');
23
+ this.apiUrl = appConfigProvider.getConfig().apiUrl;
24
+ this.logger.log('[PROJECTS-SERVICE] apiUrl ', this.apiUrl);
25
+ }
26
+
27
+ public getProjects(token: string) {
28
+ const url = this.apiUrl + "projects/";
29
+ this.logger.log('[PROJECTS-SERVICE] getProjects - URL ', url);
30
+
31
+ const httpOptions = {
32
+ headers: new HttpHeaders({
33
+ 'Content-Type': 'application/json',
34
+ Authorization: token
35
+ })
36
+ };
37
+
38
+ return this.http.get(url, httpOptions).pipe(map((res: Project[]) => {
39
+ this.logger.log('[PROJECTS-SERVICE] getProjects - RES ', res);
40
+ return res
41
+ }))
42
+ }
43
+ }
@@ -51,7 +51,26 @@ export class TiledeskService {
51
51
  }))
52
52
  }
53
53
 
54
- // http://tiledesk-server-pre.herokuapp.com/requests_util/lookup/id_project/support-group-60ffe291f725db00347661ef-b4cb6875785c4a23b27244fe498eecf44
54
+ // ---------------------------------------------
55
+ // @ GET request by id
56
+ // ---------------------------------------------
57
+ public getRequest(request_id: string, project_id: string, token: string) {
58
+ const url = this.apiUrl + project_id + '/requests/'+request_id
59
+ this.logger.log('[TILEDESK-SERVICE] - CREATE NEW LEAD url ', url);
60
+
61
+ const httpOptions = {
62
+ headers: new HttpHeaders({
63
+ 'Content-Type': 'application/json',
64
+ Authorization: token
65
+ })
66
+ };
67
+
68
+ return this.http.get(url, httpOptions).pipe(map((res: any) => {
69
+ this.logger.log('[TILEDESK-SERVICE] - CREATE NEW LEAD RES ', res);
70
+ return res
71
+ }))
72
+ }
73
+
55
74
  public getProjectIdByConvRecipient(token: string ,conversationWith: string ) {
56
75
  const lookupUrl = this.apiUrl + 'requests_util/lookup/id_project/' + conversationWith;
57
76
 
@@ -225,7 +244,7 @@ export class TiledeskService {
225
244
  // -----------------------------------------------------------------------------------------
226
245
  // @ Create ticket
227
246
  // -----------------------------------------------------------------------------------------
228
- createInternalRequest(requester_id: string, request_id: string, subject: string, message: string, departmentid: string, participantid: string, ticketpriority: string, project_id: string, token: string) {
247
+ public createInternalRequest(requester_id: string, request_id: string, subject: string, message: string, departmentid: string, participantid: string, ticketpriority: string, project_id: string, token: string) {
229
248
 
230
249
  const url = this.apiUrl + project_id + '/requests/' + request_id + '/messages'
231
250
  this.logger.log('[WS-REQUESTS-SERV] - CREATE INTERNAL REQUEST URL ', url)
@@ -252,33 +271,30 @@ export class TiledeskService {
252
271
  return res
253
272
  }))
254
273
  }
255
-
256
274
 
257
- // -------------------------------------------------------------------------------------
258
- // @ Create - Save (POST) new canned response
259
- // -------------------------------------------------------------------------------------
260
- public createCannedResponse(message: string, title: string, project_id: string, token: string) {
261
- this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - token', token);
262
- const url = this.apiUrl + project_id + '/canned/'
263
- this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - URL', url);
275
+ public sendEmail(token: string, projectid: string, form: { to: string, subject: string, text: string, request_id: string}) {
264
276
 
265
277
  const httpOptions = {
266
278
  headers: new HttpHeaders({
279
+ 'Accept': 'application/json',
267
280
  'Content-Type': 'application/json',
268
281
  Authorization: token
269
282
  })
270
283
  };
271
284
 
272
- const body = { 'text': message, 'title': title };
273
-
274
- this.logger.log('[TILEDESK-SERVICE] CREATE CANNED-RES - BODY ', body);
285
+ const body = form;
275
286
 
276
- return this.http.post(url, JSON.stringify(body), httpOptions).pipe(map((res: any) => {
277
- this.logger.log('[TILEDESK-SERVICE] - CREATE CANNED-RES - RES ', res);
278
- return res
287
+ const url = this.apiUrl + projectid + '/emails/send';
288
+ this.logger.log('[TILEDESK-SERVICE] - sendEmail URL ', url);
289
+ return this.http.post(url, body, httpOptions).pipe(map((res: any) => {
290
+ this.logger.log('[TILEDESK-SERVICE] - sendEmail - RES ', res);
291
+ return res
279
292
  }))
280
-
281
293
  }
294
+
295
+
296
+
297
+
282
298
 
283
299
  // .post(url, JSON.stringify(body), options)
284
300
  // .map((res) => res.json());
@@ -1,9 +1,9 @@
1
+ import { NavbarComponent } from './../components/navbar/navbar.component';
1
2
  import { FormsModule } from '@angular/forms';
2
3
  import { NgSelectModule } from '@ng-select/ng-select';
3
4
  import { NetworkOfflineComponent } from './../components/network-offline/network-offline.component';
4
5
  import { ContactsDirectoryComponent } from './../components/contacts-directory/contacts-directory.component';
5
6
  import { HtmlComponent } from './../chatlib/conversation-detail/message/html/html.component';
6
- import { BubbleOthersMessageComponent } from './../components/conversation-detail/bubble-others-message/bubble-others-message.component';
7
7
 
8
8
  import { TextComponent } from '../chatlib/conversation-detail/message/text/text.component';
9
9
  import { ReturnReceiptComponent } from '../chatlib/conversation-detail/message/return-receipt/return-receipt.component';
@@ -21,32 +21,29 @@ import { CommonModule } from '@angular/common';
21
21
  import { IonicModule } from '@ionic/angular';
22
22
 
23
23
  import { AvatarProfileComponent } from 'src/app/components/utils/avatar-profile/avatar-profile.component';
24
- import { DdpHeaderComponent } from 'src/app/components/ddp-header/ddp-header.component';
24
+ import { HeaderConversationsList } from 'src/app/components/conversations-list/header-conversations-list/header-conversations-list.component';
25
+ import { HeaderConversationsListArchived } from 'src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component';
25
26
 
26
27
  import { UserPresenceComponent } from 'src/app/components/utils/user-presence/user-presence.component';
27
28
  import { UserTypingComponent } from 'src/chat21-core/utils/user-typing/user-typing.component';
28
29
  import { ListConversationsComponent } from '../chatlib/list-conversations-component/list-conversations/list-conversations.component';
29
30
  import { MomentModule } from 'angular2-moment';
30
- import { AvatarComponent } from '../chatlib/conversation-detail/message/avatar/avatar.component';
31
- import { MarkedPipe } from '../directives/marked.pipe';
32
- import { AutofocusDirective } from '../directives/autofocus.directive';
33
- import { HtmlEntitiesEncodePipe } from '../directives/html-entities-encode.pipe';
34
- import { IonConversationDetailComponent } from '../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
35
- import { BubbleMyMessageComponent } from '../components/conversation-detail/bubble-my-message/bubble-my-message.component';
36
- import { BubbleDayMessageComponent } from '../components/conversation-detail/bubble-day-message/bubble-day-message.component';
37
- import { BubbleSystemMessageComponent } from '../components/conversation-detail/bubble-system-message/bubble-system-message.component';
38
- import { InfoContentComponent } from '../components/conversation-info/info-content/info-content.component';
39
- import { InfoSupportGroupComponent } from '../components/conversation-info/info-support-group/info-support-group.component';
40
- import { InfoDirectComponent } from '../components/conversation-info/info-direct/info-direct.component';
41
- import { AdvancedInfoAccordionComponent } from '../components/conversation-info/advanced-info-accordion/advanced-info-accordion.component';
42
- import { InfoGroupComponent } from '../components/conversation-info/info-group/info-group.component';
31
+ import { AvatarComponent } from 'src/app/chatlib/conversation-detail/message/avatar/avatar.component';
32
+ import { MarkedPipe } from 'src/app/directives/marked.pipe';
33
+ import { AutofocusDirective } from 'src/app/directives/autofocus.directive';
34
+ import { HtmlEntitiesEncodePipe } from 'src/app/directives/html-entities-encode.pipe';
35
+ import { IonConversationDetailComponent } from 'src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
36
+ import { InfoContentComponent } from 'src/app/components/conversation-info/info-content/info-content.component';
37
+ import { InfoSupportGroupComponent } from 'src/app/components/conversation-info/info-support-group/info-support-group.component';
38
+ import { InfoDirectComponent } from 'src/app/components/conversation-info/info-direct/info-direct.component';
39
+ import { AdvancedInfoAccordionComponent } from 'src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component';
40
+ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-group/info-group.component';
43
41
  import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive';
44
- import { OptionHeaderComponent } from '../components/conversation-detail/option-header/option-header.component';
45
- import { MessageAttachmentComponent } from '../chatlib/conversation-detail/message/message-attachment/message-attachment.component';
46
- import { ImageViewerComponent } from '../components/image-viewer/image-viewer.component';
47
- import { SidebarComponent } from '../components/sidebar/sidebar.component';
48
- import { SidebarUserDetailsComponent } from '../components/sidebar-user-details/sidebar-user-details.component';
49
- import { ProjectItemComponent } from '../components/project-item/project-item.component';
42
+ import { MessageAttachmentComponent } from 'src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component';
43
+ import { ImageViewerComponent } from 'src/app/components/image-viewer/image-viewer.component';
44
+ import { SidebarComponent } from 'src/app/components/sidebar/sidebar.component';
45
+ import { SidebarUserDetailsComponent } from 'src/app/components/sidebar-user-details/sidebar-user-details.component';
46
+ import { ProjectItemComponent } from 'src/app/components/project-item/project-item.component';
50
47
  import { DefaultTooltipOptions } from 'src/chat21-core/utils/utils';
51
48
  import { MatTooltipModule } from '@angular/material/tooltip';
52
49
  import { MatSnackBarModule } from '@angular/material/snack-bar';
@@ -59,12 +56,13 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
59
56
  declarations: [
60
57
  // MessageTextAreaComponent,
61
58
  AvatarProfileComponent,
62
- DdpHeaderComponent,
59
+ HeaderConversationsList,
63
60
  UserPresenceComponent,
64
61
  UserTypingComponent,
65
62
  ListConversationsComponent,
66
63
  IonListConversationsComponent,
67
64
  ImageViewerComponent,
65
+ NavbarComponent,
68
66
  SidebarComponent,
69
67
  SidebarUserDetailsComponent,
70
68
  ProjectItemComponent,
@@ -82,10 +80,6 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
82
80
  ReturnReceiptComponent,
83
81
  TextComponent,
84
82
  HtmlComponent,
85
- BubbleDayMessageComponent,
86
- BubbleSystemMessageComponent,
87
- BubbleMyMessageComponent,
88
- BubbleOthersMessageComponent,
89
83
  InfoContentComponent,
90
84
  InfoSupportGroupComponent,
91
85
  InfoDirectComponent,
@@ -95,15 +89,16 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
95
89
  AutofocusDirective,
96
90
  HtmlEntitiesEncodePipe,
97
91
  SafeHtmlPipe,
98
- OptionHeaderComponent,
92
+ HeaderConversationsListArchived,
99
93
  NetworkOfflineComponent
100
94
  ],
101
95
  exports: [
102
96
  // MessageTextAreaComponent,
103
97
  AutofocusDirective,
104
98
  AvatarProfileComponent,
105
- DdpHeaderComponent,
99
+ HeaderConversationsList,
106
100
  ImageViewerComponent,
101
+ NavbarComponent,
107
102
  SidebarComponent,
108
103
  SidebarUserDetailsComponent,
109
104
  ProjectItemComponent,
@@ -123,15 +118,11 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
123
118
  InfoMessageComponent,
124
119
  ReturnReceiptComponent,
125
120
  TextComponent,
126
- BubbleDayMessageComponent,
127
- BubbleSystemMessageComponent,
128
- BubbleMyMessageComponent,
129
- BubbleOthersMessageComponent,
130
121
  InfoContentComponent,
131
122
  InfoSupportGroupComponent,
132
123
  InfoDirectComponent,
133
124
  InfoGroupComponent,
134
- OptionHeaderComponent,
125
+ HeaderConversationsListArchived,
135
126
  NetworkOfflineComponent
136
127
 
137
128
  ],
@@ -0,0 +1,7 @@
1
+ import { Toast } from './toast';
2
+
3
+ describe('Toast', () => {
4
+ it('should create an instance', () => {
5
+ expect(new Toast()).toBeTruthy();
6
+ });
7
+ });