@chat21/chat21-ionic 3.0.86-rc.3 → 3.0.86-rc.5

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 (54) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +1 -1
  3. package/src/app/app.component.scss +4 -0
  4. package/src/app/app.module.ts +0 -1
  5. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +61 -33
  6. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +83 -3
  7. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +63 -2
  8. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +13 -0
  9. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +9 -0
  10. package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.html +3 -0
  11. package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.scss +0 -0
  12. package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.spec.ts +24 -0
  13. package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.ts +28 -0
  14. package/src/app/components/canned-response/canned-response.component.ts +0 -1
  15. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -0
  16. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +15 -6
  17. package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.scss +2 -2
  18. package/src/app/components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component.html +11 -0
  19. package/src/app/components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component.scss +14 -0
  20. package/src/app/components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component.spec.ts +24 -0
  21. package/src/app/components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component.ts +25 -0
  22. package/src/app/components/project-item/project-item.component.scss +11 -241
  23. package/src/app/components/project-item/project-item.component.ts +2 -2
  24. package/src/app/modals/create-canned-response/create-canned-response.page.html +64 -86
  25. package/src/app/modals/create-canned-response/create-canned-response.page.scss +169 -1
  26. package/src/app/modals/create-canned-response/create-canned-response.page.ts +61 -94
  27. package/src/app/modals/loader-preview/loader-preview.page.html +1 -1
  28. package/src/app/modals/loader-preview/loader-preview.page.scss +1 -1
  29. package/src/app/modals/send-email/send-email.page.html +2 -2
  30. package/src/app/modals/send-email/send-email.page.scss +5 -22
  31. package/src/app/modals/send-email/send-email.page.ts +4 -0
  32. package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -0
  33. package/src/app/pages/conversation-detail/conversation-detail.page.ts +12 -14
  34. package/src/app/pages/conversations-list/conversations-list.page.html +24 -3
  35. package/src/app/pages/conversations-list/conversations-list.page.ts +20 -2
  36. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +4 -0
  37. package/src/app/shared/shared.module.ts +3 -0
  38. package/src/assets/i18n/ar.json +3 -0
  39. package/src/assets/i18n/az.json +3 -0
  40. package/src/assets/i18n/de.json +3 -0
  41. package/src/assets/i18n/en.json +3 -0
  42. package/src/assets/i18n/es.json +3 -0
  43. package/src/assets/i18n/fr.json +3 -0
  44. package/src/assets/i18n/it.json +3 -0
  45. package/src/assets/i18n/kk.json +3 -0
  46. package/src/assets/i18n/pt.json +3 -0
  47. package/src/assets/i18n/ru.json +3 -0
  48. package/src/assets/i18n/sr.json +3 -0
  49. package/src/assets/i18n/sv.json +3 -0
  50. package/src/assets/i18n/tr.json +3 -0
  51. package/src/assets/i18n/uk.json +3 -0
  52. package/src/assets/i18n/uz.json +3 -0
  53. package/src/chat21-core/utils/convertRequestToConversation.ts +2 -2
  54. package/src/global.scss +10 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  ### 3.0.86 in PROD
4
4
 
5
+ ### 3.0.86-rc.6
6
+ - bug-fixed: do not change showSourceInfo status if sourcePage info not exist
7
+ - bug-fixed: last_project is undefined
8
+
9
+ ### 3.0.86-rc.5
10
+ - added: header-conversations-list-unassigned component
11
+ - added: toast after text is copied
12
+ - added: unassigned header to conversations-list page and joinConversation options icon
13
+ - removed: "Open" - "Close info detail" string from close/open info conversation detail
14
+
15
+ ### 3.0.86-rc.4
16
+ - bug-fixed: close emoji-picker if focus is on message-text-area
17
+ - bug-fixed: removed hover background bell icon
18
+ - bug-fixed: input field not focused on click
19
+ - bug-fixed: set list-bkg-color as default background color for ion-split--pane component
20
+ - changed: create-canned-response UI
21
+ - added: sourcePage info to incoming messages
22
+ - added: copy icon to copy text to clipboard
23
+ - added: popover option to incoming messages
24
+
5
25
  ### 3.0.86-rc.3
6
26
  - bug-fixed: cannot send message after email is queued successfully
7
27
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.86-rc.3",
4
+ "version": "3.0.86-rc.5",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -5,6 +5,7 @@
5
5
  display: block; // Safari bug fix
6
6
  margin-left: var(--sidebar-width);
7
7
  --border: 0px;
8
+ background-color: var(--list-bkg-color);
8
9
  }
9
10
 
10
11
  .split-pane-md:not(.mobile){
@@ -12,6 +13,7 @@
12
13
  margin-top: var(--nav-bar-heigth);
13
14
  }
14
15
 
16
+
15
17
  .navbar{
16
18
  display: flex;
17
19
  position: fixed;
@@ -44,3 +46,5 @@
44
46
  // display: block; // Safari bug fix
45
47
  // }
46
48
  // }
49
+
50
+
@@ -1,4 +1,3 @@
1
- import { SendEmailModal } from './modals/send-email/send-email.page';
2
1
  import { ConvertRequestToConversation } from './../chat21-core/utils/convertRequestToConversation';
3
2
  import { LogLevel, PUSH_ENGINE_FIREBASE, PUSH_ENGINE_MQTT } from './../chat21-core/utils/constants';
4
3
  import { CustomLogger } from 'src/chat21-core/providers/logger/customLogger';
@@ -53,13 +53,21 @@
53
53
  <!-- nk - no tag ionic -->
54
54
  <!-- ----------------------------------------------------------- -->
55
55
  <div class="manage_conversation_info_container" [ngClass]="{'close': !openInfoConversation, 'mobile': isMobile}">
56
- <ion-button fill="clear" *ngIf="openInfoConversation" (click)="onOpenCloseInfoConversationFN()">
56
+ <ion-button fill="clear" *ngIf="openInfoConversation" (click)="onOpenCloseInfoConversationFN()"
57
+ [tooltip]="closeGroupTooltip" [options]="tooltipOptions" placement="bottom" content-type="template">
57
58
  <ion-icon name="arrow-forward-outline"></ion-icon>
58
- {{translationMap.get('LABEL_CLOSE_GROUP')}}
59
+ <!-- {{translationMap.get('LABEL_CLOSE_GROUP')}} -->
60
+ <ng-template #closeGroupTooltip>
61
+ <span> {{ translationMap?.get('LABEL_CLOSE_GROUP')}} </span>
62
+ </ng-template>
59
63
  </ion-button>
60
- <ion-button fill="clear" *ngIf="!openInfoConversation" (click)="onOpenCloseInfoConversationFN()">
64
+ <ion-button fill="clear" *ngIf="!openInfoConversation" (click)="onOpenCloseInfoConversationFN()"
65
+ [tooltip]="openGroupTooltip" [options]="tooltipOptions" placement="bottom" content-type="template">
61
66
  <ion-icon name="arrow-back-outline"></ion-icon>
62
- {{translationMap.get('LABEL_OPEN_INFO_CONVERSATION')}}
67
+ <ng-template #openGroupTooltip>
68
+ <span> {{ translationMap?.get('LABEL_OPEN_INFO_CONVERSATION')}} </span>
69
+ </ng-template>
70
+ <!-- {{translationMap.get('LABEL_OPEN_INFO_CONVERSATION')}} -->
63
71
  </ion-button>
64
72
  </div>
65
73
 
@@ -99,26 +107,27 @@
99
107
  </ion-button>
100
108
  </ng-container>
101
109
 
102
- <!--backgroundColor non viene ancora usato -->
103
- <div style="display: contents;">
110
+
111
+ <div class="bubble-container">
104
112
 
105
113
  <div class="email-logo" *ngIf="message?.attributes?.channel && message?.attributes?.channel === TYPE_MSG_EMAIL">
106
114
  <ion-icon name="mail"></ion-icon>
107
115
  </div>
108
116
 
117
+ <!--backgroundColor non viene ancora usato -->
109
118
  <chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
110
- [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
111
- [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
112
- [class.emoticon]="isEmojii(message?.text)"
113
- [ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
114
- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
115
- [message]="message"
116
- [fontColor]="stylesMap.get('bubbleSentTextColor')"
117
- [fontSize]="stylesMap.get('fontSize')"
118
- [fontFamily]="stylesMap.get('fontFamily')"
119
- (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
120
- (onAfterMessageRender)="onAfterMessageRenderFN($event)"
121
- (onElementRendered)="onElementRenderedFN($event)">
119
+ [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
120
+ [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
121
+ [class.emoticon]="isEmojii(message?.text)"
122
+ [ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
123
+ [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
124
+ [message]="message"
125
+ [fontColor]="stylesMap.get('bubbleSentTextColor')"
126
+ [fontSize]="stylesMap.get('fontSize')"
127
+ [fontFamily]="stylesMap.get('fontFamily')"
128
+ (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
129
+ (onAfterMessageRender)="onAfterMessageRenderFN($event)"
130
+ (onElementRendered)="onElementRenderedFN($event)">
122
131
  </chat-bubble-message>
123
132
  </div>
124
133
 
@@ -149,21 +158,35 @@
149
158
  [baseLocation]="baseLocation">
150
159
  </chat-avatar-image> -->
151
160
 
152
- <!--backgroundColor non viene ancora usato -->
153
- <chat-bubble-message class="messages msg_receive" id="message_msg_receive"
154
- [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
155
- [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
156
- [class.emoticon]="isEmojii(message?.text)"
157
- [ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
158
- [isSameSender]="isSameSender(message?.sender, i)"
159
- [message]="message"
160
- [fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
161
- [fontSize]="stylesMap?.get('fontSize')"
162
- [fontFamily]="stylesMap?.get('fontFamily')"
163
- (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
164
- (onAfterMessageRender)="onAfterMessageRenderFN($event)"
165
- (onElementRendered)="onElementRenderedFN($event)">
166
- </chat-bubble-message>
161
+ <div class="bubble-container">
162
+
163
+ <!--backgroundColor non viene ancora usato -->
164
+ <chat-bubble-message class="messages msg_receive" id="message_msg_receive"
165
+ [ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
166
+ [class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
167
+ [class.emoticon]="isEmojii(message?.text)"
168
+ [ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
169
+ [isSameSender]="isSameSender(message?.sender, i)"
170
+ [message]="message"
171
+ [fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
172
+ [fontSize]="stylesMap?.get('fontSize')"
173
+ [fontFamily]="stylesMap?.get('fontFamily')"
174
+ (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
175
+ (onAfterMessageRender)="onAfterMessageRenderFN($event)"
176
+ (onElementRendered)="onElementRenderedFN($event)"
177
+ (click)="onBubbleMessageClick($event, message, i)">
178
+ </chat-bubble-message>
179
+
180
+ <div class="options-container">
181
+ <div class="copy-logo" (click)="onClickCopyMesage($event, message)" *ngIf="message.text.trim() !== ''">
182
+ <ion-icon name="copy-outline"></ion-icon>
183
+ </div>
184
+ <!-- <div class="menu-logo" (click)="onClickBubbleMenu($event, message)">
185
+ <ion-icon name="caret-down"></ion-icon>
186
+ </div> -->
187
+ </div>
188
+
189
+ </div>
167
190
 
168
191
  <ng-container *ngIf="areVisibleCAR && supportMode">
169
192
  <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
@@ -183,6 +206,11 @@
183
206
 
184
207
  <div class="message-date-hover" *ngIf="isChannelTypeGroup(channelType)"> {{message.timestamp | date:'HH:mm' }} </div>
185
208
  </div>
209
+
210
+ <div class="base_receive sourcePage-container" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && message?.attributes?.sourcePage" [class.show]="showSourceInfo && showSourceInfoIndex===i">
211
+ <svg xmlns="http://www.w3.org/2000/svg" height="15px" width="15px" viewBox="0 0 24 24" fill="none"><path _ngcontent-wrg-c96="" d="M0 0h24v24H0V0z" fill="none"></path><path _ngcontent-wrg-c96="" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-.61.08-1.21.21-1.78L8.99 15v1c0 1.1.9 2 2 2v1.93C7.06 19.43 4 16.07 4 12zm13.89 5.4c-.26-.81-1-1.4-1.9-1.4h-1v-3c0-.55-.45-1-1-1h-6v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41C17.92 5.77 20 8.65 20 12c0 2.08-.81 3.98-2.11 5.4z"></path></svg>
212
+ <span title="{{message?.attributes?.sourcePage}}" class="truncate"><a target="_blank" href="{{message?.attributes?.sourcePage}}">{{message?.attributes?.sourcePage}}</a></span>
213
+ </div>
186
214
 
187
215
  <!-- message type:: button && -->
188
216
  <div *ngIf="message?.attributes && message?.attributes?.attachment " class="slide-in-left">
@@ -152,6 +152,11 @@ ion-item {
152
152
  // animation: heartbeat 1.5s ease-in-out both;
153
153
  }
154
154
 
155
+ .bubble-container{
156
+ display: flex;
157
+ max-width: calc(100% - 85px);
158
+ }
159
+
155
160
  /* send message */
156
161
  .base_sent {
157
162
  align-items: flex-end;
@@ -167,7 +172,7 @@ ion-item {
167
172
  background-color: var(--bubble-blue);
168
173
  color: var(--col-msg-sent);
169
174
  margin: 0px 0px 0px 0px;
170
- max-width: calc(100% - 85px);
175
+ // max-width: calc(100% - 85px); //--> moved to bubble-container
171
176
  min-width: 14px;
172
177
  border-top-right-radius: 8px;
173
178
  border-bottom-right-radius: 0px;
@@ -207,11 +212,13 @@ ion-item {
207
212
  border-radius: 3px;
208
213
  color: rgb(135, 150, 175);
209
214
  }
215
+
210
216
  }
211
217
 
212
218
  /** recive message **/
213
219
  .base_receive {
214
220
  padding: 0px 20px 6px 0px;
221
+
215
222
  .message-date{
216
223
  color: #647491;
217
224
  font-size: 12px;
@@ -219,7 +226,9 @@ ion-item {
219
226
  }
220
227
 
221
228
 
222
- &:hover .message-date-hover, &:hover .btn-add-msg{
229
+ &:hover .message-date-hover,
230
+ &:hover .btn-add-msg,
231
+ &:hover .options-container{
223
232
  display: block;
224
233
  }
225
234
  /* avatar */
@@ -253,7 +262,7 @@ ion-item {
253
262
  background-color: var(--bck-msg-received);
254
263
  color: var(--col-msg-received);
255
264
  // max-width: 260px;
256
- max-width: calc(100% - 85px);
265
+ // max-width: calc(100% - 85px); //--> moved to bubble-container
257
266
  min-width: 14px;
258
267
  margin: 0 0px 0px 10px;
259
268
  height: fit-content;
@@ -278,6 +287,77 @@ ion-item {
278
287
  max-width: 100% !important;
279
288
  }
280
289
 
290
+ .options-container{
291
+ position: relative;
292
+ display: none;
293
+ -webkit-box-align: center;
294
+ align-items: center;
295
+ -webkit-box-pack: center;
296
+ justify-content: center;
297
+ top: 0px;
298
+ right: 30px;
299
+ height: 16px;
300
+ margin: 5px;
301
+ z-index: 2;
302
+ }
303
+ .menu-logo{
304
+ // background-color: var(--list-bkg-color);
305
+ // box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.4);
306
+ // position: relative;
307
+ // display: flex;
308
+ // -webkit-box-align: center;
309
+ // align-items: center;
310
+ // -webkit-box-pack: center;
311
+ // justify-content: center;
312
+ // top: 0px;
313
+ // right: 30px;
314
+ // z-index: 2;
315
+ width: 20px;
316
+ border-radius: 3px;
317
+ color: rgb(135, 150, 175);
318
+
319
+ &:hover{
320
+ cursor: pointer;
321
+ }
322
+ }
323
+
324
+ .copy-logo{
325
+ // background-color: var(--list-bkg-color);
326
+ // box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.4);
327
+ // position: relative;
328
+ // display: flex;
329
+ // -webkit-box-align: center;
330
+ // align-items: center;
331
+ // -webkit-box-pack: center;
332
+ // justify-content: center;
333
+ // top: 0px;
334
+ // right: 50px;
335
+ // z-index: 2;
336
+ width: 20px;
337
+ border-radius: 3px;
338
+ color: rgb(135, 150, 175);
339
+
340
+ &:hover{
341
+ cursor: pointer;
342
+ }
343
+ }
344
+
345
+ }
346
+
347
+ .sourcePage-container{
348
+ margin: 0 0px 0px 10px;
349
+ display: none;
350
+ width: 75%;
351
+ align-items: center;
352
+ color: rgb(135, 150, 175);
353
+ font-size: 12px;
354
+ svg{
355
+ fill: rgb(135, 150, 175);
356
+ margin-right: 5px;
357
+ }
358
+ &.show{
359
+ display: flex;
360
+ }
281
361
  }
282
362
 
283
363
  .message-date-hover{
@@ -1,3 +1,4 @@
1
+ import { BubbleInfoPopoverComponent } from '../../../components/bubbleMessageInfo-popover/bubbleinfo-popover.component';
1
2
  import { MessageModel } from 'src/chat21-core/models/message';
2
3
  import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
3
4
  import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter, SimpleChange, SimpleChanges } from '@angular/core';
@@ -14,8 +15,9 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
14
15
  import { TranslateService } from '@ngx-translate/core';
15
16
  import * as moment from 'moment';
16
17
  import { AppConfigProvider } from 'src/app/services/app-config';
17
- import { ModalController } from '@ionic/angular';
18
+ import { ModalController, PopoverController, ToastController } from '@ionic/angular';
18
19
  import { CreateCannedResponsePage } from 'src/app/modals/create-canned-response/create-canned-response.page';
20
+
19
21
  @Component({
20
22
  selector: 'ion-conversation-detail',
21
23
  templateUrl: './ion-conversation-detail.component.html',
@@ -38,6 +40,8 @@ export class IonConversationDetailComponent extends ConversationContentComponent
38
40
  public fileType: any
39
41
  public browserLang: string;
40
42
  public addAsCannedResponseTooltipText: string;
43
+ public showSourceInfo: boolean = false;
44
+ public showSourceInfoIndex: number = 0;
41
45
  // public openInfoConversation: boolean = true;
42
46
  isImage = isImage;
43
47
  isFile = isFile;
@@ -67,6 +71,8 @@ export class IonConversationDetailComponent extends ConversationContentComponent
67
71
  private translate: TranslateService,
68
72
  public appConfigProvider: AppConfigProvider,
69
73
  public modalController: ModalController,
74
+ public popoverController: PopoverController,
75
+ public toastController: ToastController
70
76
  ) {
71
77
  super(cdref, uploadService)
72
78
 
@@ -145,6 +151,24 @@ export class IonConversationDetailComponent extends ConversationContentComponent
145
151
  this.onAddUploadingBubble.emit(value);
146
152
  }
147
153
 
154
+ onClickBubbleMenu(event, message: MessageModel){
155
+ this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickBubbleMenu');
156
+ this.presentPopover(event, message)
157
+ }
158
+
159
+ onClickCopyMesage(event, message: MessageModel){
160
+ this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickCopyMesage');
161
+ navigator.clipboard.writeText(message.text)
162
+ this.presentToast()
163
+ }
164
+
165
+ onBubbleMessageClick(event: any, message: MessageModel, index: number){
166
+ if(message && message.attributes && message.attributes.sourcePage){
167
+ this.showSourceInfo = !this.showSourceInfo
168
+ this.showSourceInfoIndex = index
169
+ }
170
+ }
171
+
148
172
  onElementRenderedFN(event) {
149
173
  this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onElementRenderedFN:::ionic', event)
150
174
  this.onElementRendered.emit(event)
@@ -171,7 +195,8 @@ export class IonConversationDetailComponent extends ConversationContentComponent
171
195
  async presentCreateCannedResponseModal(message: MessageModel): Promise<any> {
172
196
  this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
173
197
  const attributes = {
174
- message: message,
198
+ message: message.text,
199
+ conversationWith: message.recipient
175
200
  }
176
201
  const modal: HTMLIonModalElement = await this.modalController.create({
177
202
  component: CreateCannedResponsePage,
@@ -186,4 +211,40 @@ export class IonConversationDetailComponent extends ConversationContentComponent
186
211
 
187
212
  return await modal.present()
188
213
  }
214
+
215
+ async presentPopover(ev: any, message: MessageModel) {
216
+ const attributes = {
217
+ message: message,
218
+ conversationWith: message.recipient
219
+ }
220
+ const popover = await this.popoverController.create({
221
+ component: BubbleInfoPopoverComponent,
222
+ cssClass: 'my-custom-class',
223
+ componentProps: attributes,
224
+ event: ev,
225
+ translucent: true,
226
+ keyboardClose: true,
227
+ showBackdrop: true
228
+ });
229
+ popover.onDidDismiss().then((dataReturned: any) => {
230
+ //
231
+ this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
232
+ })
233
+
234
+ return await popover.present();
235
+ }
236
+
237
+ async presentToast(){
238
+ const toast = await this.toastController.create({
239
+ message: '<div style="display: flex">'+
240
+ '<ion-icon name="copy"></ion-icon> '+
241
+ `<span>${this.translationMap.get("COPY_MESSAGE_TOAST")}</span>`+
242
+ '</div>',
243
+ duration: 3000,
244
+ color: 'light',
245
+ position: 'bottom',
246
+ cssClass: 'toast-copy'
247
+ });
248
+ toast.present();
249
+ }
189
250
  }
@@ -167,6 +167,19 @@
167
167
  <span *ngIf="!conversation?.recipient.startsWith('support-group')"> {{ translationsMap?.get('Archive') }} </span>
168
168
  </ng-template>
169
169
  </ion-button>
170
+
171
+ <!-- <ion-button *ngIf="conversation?.recipient.startsWith('support-group') && !conversation.archived" [tooltip]="joinTooltip" [options]="tooltip_options" placement="bottom" content-type="template"
172
+ [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
173
+ id="{{ 'join_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
174
+ item-end (click)="joinConversation(conversation);$event.stopPropagation();" padding>
175
+ <ion-icon slot="icon-only" style="display:block;" id="{{ 'join_button_icon' + conversation.uid }}" name="link-outline" item-end></ion-icon>
176
+
177
+ <ng-template #joinTooltip>
178
+ <span>{{ translationsMap?.get('JOIN_CONVERSATION')}} </span>
179
+ </ng-template>
180
+ </ion-button> -->
181
+
182
+
170
183
  <!-- <ion-button *ngIf="conversation.archived" class="close-conversation-button" ion-button clear item-end disabled padding>
171
184
  <!- - <ion-icon style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}" color="close-conversation" name="archive-outline" item-end></ion-icon> - ->
172
185
  <i class="material-icons" id="{{ 'close_button_icon' + conversation.uid }}" item-end> history </i>
@@ -30,6 +30,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
30
30
  @Input() archiveActionNotAllowed: boolean;
31
31
  @Input() uidConvSelected: string;
32
32
  @Output() onCloseConversation = new EventEmitter<ConversationModel>();
33
+ @Output() onJoinConversation = new EventEmitter<ConversationModel>();
33
34
  @Output() onCloseAlert = new EventEmitter();
34
35
 
35
36
  convertMessage = convertMessage;
@@ -129,6 +130,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
129
130
  const translationKeys = [
130
131
  'Resolve',
131
132
  'Archive',
133
+ 'JOIN_CONVERSATION',
132
134
  'ALERT_TITLE',
133
135
  'ActionNotAllowed',
134
136
  'CLOSE_ALERT_CONFIRM_LABEL',
@@ -219,5 +221,12 @@ export class IonListConversationsComponent extends ListConversationsComponent im
219
221
  let currentIndex = this.listConversations.findIndex(conv => conv.uid === conversation.uid)
220
222
  }
221
223
 
224
+ joinConversation(conversation: ConversationModel) {
225
+ var conversationId = conversation.uid;
226
+ this.logger.log('[ION-LIST-CONVS-COMP] - joinConversation - conversationId ', conversationId)
227
+ this.onJoinConversation.emit(conversation)
228
+ let currentIndex = this.listConversations.findIndex(conv => conv.uid === conversation.uid)
229
+ }
230
+
222
231
 
223
232
  }
@@ -0,0 +1,24 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { IonicModule } from '@ionic/angular';
3
+
4
+ import { BubbleInfoPopoverComponent } from './bubbleinfo-popover.component';
5
+
6
+ describe('PopoverComponent', () => {
7
+ let component: BubbleInfoPopoverComponent;
8
+ let fixture: ComponentFixture<BubbleInfoPopoverComponent>;
9
+
10
+ beforeEach(async(() => {
11
+ TestBed.configureTestingModule({
12
+ declarations: [ BubbleInfoPopoverComponent ],
13
+ imports: [IonicModule.forRoot()]
14
+ }).compileComponents();
15
+
16
+ fixture = TestBed.createComponent(BubbleInfoPopoverComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ }));
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });
@@ -0,0 +1,28 @@
1
+ import { PopoverController } from '@ionic/angular';
2
+ import { LoggerInstance } from './../../../chat21-core/providers/logger/loggerInstance';
3
+ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
4
+ import { MessageModel } from './../../../chat21-core/models/message';
5
+ import { Component, Input, OnInit } from '@angular/core';
6
+
7
+ @Component({
8
+ selector: 'ion-bubbleinfo-popover',
9
+ templateUrl: './bubbleinfo-popover.component.html',
10
+ styleUrls: ['./bubbleinfo-popover.component.scss'],
11
+ })
12
+ export class BubbleInfoPopoverComponent implements OnInit {
13
+
14
+ @Input() message: MessageModel
15
+
16
+ private logger: LoggerService = LoggerInstance.getInstance()
17
+
18
+ constructor(private ctr: PopoverController) { }
19
+
20
+ ngOnInit() {
21
+ this.logger.debug('[BUBBLE-INFO-POPOVER] ngOnInit message data:', this.message)
22
+ }
23
+
24
+ onClose(){
25
+ this.ctr.dismiss()
26
+ }
27
+
28
+ }
@@ -1,6 +1,5 @@
1
1
  import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
2
2
  import { Component, Input, OnInit, SimpleChange, ElementRef, Output, EventEmitter, HostListener } from '@angular/core';
3
- import { CreateCannedResponsePage } from 'src/app/modals/create-canned-response/create-canned-response.page';
4
3
  import { CannedResponsesService } from 'src/app/services/canned-responses/canned-responses.service';
5
4
  import { TiledeskService } from 'src/app/services/tiledesk/tiledesk.service';
6
5
  import { UserModel } from 'src/chat21-core/models/user';
@@ -87,6 +87,7 @@
87
87
  [include]="emojiiCategories"
88
88
  [color]="emojiColor"
89
89
  [custom]="customEmojis"
90
+ class="emoji-picker"
90
91
  [ngClass]="{'emoji-mart-desktop': !IS_ON_MOBILE_DEVICE, 'emoji-mart-mobile': IS_ON_MOBILE_DEVICE }"
91
92
  (emojiSelect)="addEmoji($event)">
92
93
  </emoji-mart>
@@ -109,6 +110,7 @@
109
110
  [disabled]="disableTextarea"
110
111
  [(ngModel)]="messageString"
111
112
  (ionChange)="ionChange($event);"
113
+ (ionFocus)="ionFocus()"
112
114
  (keydown.enter)="onKeydown($event, messageString)"
113
115
  (paste)="onPaste($event)">
114
116
  </ion-textarea>
@@ -417,13 +417,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
417
417
  });
418
418
  modal.onDidDismiss().then((detail: any) => {
419
419
  this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] send Email detail returned-->', detail);
420
- const form = detail.data.form
421
- if (form&& form.text && form.text.trim() !== '') {
422
- const text = '**' + form.subject + '**\r\n' + form.text
423
- const attributes = {
424
- channel: TYPE_MSG_EMAIL
420
+ if(detail && detail.data){
421
+ const form = detail.data.form
422
+ if (form && form.text && form.text.trim() !== '') {
423
+ const text = '**' + form.subject + '**\r\n' + form.text
424
+ const attributes = {
425
+ channel: TYPE_MSG_EMAIL
426
+ }
427
+ this.eventSendMessage.emit({ msg: text, type: TYPE_MSG_TEXT, metadata: null, attributes: attributes });
425
428
  }
426
- this.eventSendMessage.emit({ msg: text, type: TYPE_MSG_TEXT, metadata: null, attributes: attributes });
427
429
  }
428
430
  });
429
431
 
@@ -457,6 +459,13 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
457
459
  this.eventChangeTextArea.emit({ msg: message, offsetHeight: height });
458
460
  }
459
461
 
462
+ ionFocus(){
463
+ this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ionFocus event ");
464
+ if(this.showEmojiPicker){
465
+ this.showEmojiPicker = false;
466
+ }
467
+ }
468
+
460
469
  // ------------------------------------------------------------------------
461
470
  // invoked by pressing the enter key on the message input field
462
471
  // if the message is not empty it is passed to the control method
@@ -1,8 +1,8 @@
1
-
2
1
  ion-toolbar {
3
2
  height: var(--header-height);
3
+ --background: transparent;
4
4
  &:not(.mobile){
5
- --background: var(--list-bkg-color);
5
+ // --background: var(--list-bkg-color);
6
6
  border: none;
7
7
  }
8
8
  &.mobile{
@@ -0,0 +1,11 @@
1
+ <ion-toolbar [class.mobile]="isMobile">
2
+
3
+ <ion-buttons slot="start">
4
+ <ion-button ion-button (click)="onBackButtonHandler()">
5
+ <ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
6
+ </ion-button>
7
+ </ion-buttons>
8
+
9
+ <ion-title> {{headerTitle}}</ion-title>
10
+
11
+ </ion-toolbar>
@@ -0,0 +1,14 @@
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
+ }