@chat21/chat21-ionic 3.0.86-rc.2 → 3.0.86-rc.4
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.
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/src/app/app.component.scss +2 -0
- package/src/app/app.module.ts +0 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +49 -29
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +82 -3
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +45 -2
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.html +3 -0
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.scss +0 -0
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.spec.ts +24 -0
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.ts +28 -0
- package/src/app/components/canned-response/canned-response.component.ts +0 -1
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +15 -6
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.scss +2 -2
- package/src/app/components/project-item/project-item.component.scss +11 -241
- package/src/app/modals/create-canned-response/create-canned-response.page.html +64 -86
- package/src/app/modals/create-canned-response/create-canned-response.page.scss +169 -1
- package/src/app/modals/create-canned-response/create-canned-response.page.ts +61 -94
- package/src/app/modals/loader-preview/loader-preview.page.html +1 -1
- package/src/app/modals/loader-preview/loader-preview.page.scss +1 -1
- package/src/app/modals/send-email/send-email.page.html +2 -2
- package/src/app/modals/send-email/send-email.page.scss +5 -22
- package/src/app/modals/send-email/send-email.page.ts +6 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
### 3.0.86 in PROD
|
|
4
4
|
|
|
5
|
+
### 3.0.86-rc.4
|
|
6
|
+
- bug-fixed: close emoji-picker if focus is on message-text-area
|
|
7
|
+
- bug-fixed: removed hover background bell icon
|
|
8
|
+
- bug-fixed: input field not focused on click
|
|
9
|
+
- bug-fixed: set list-bkg-color as default background color for ion-split--pane component
|
|
10
|
+
- changed: create-canned-response UI
|
|
11
|
+
- added: sourcePage info to incoming messages
|
|
12
|
+
- added: copy icon to copy text to clipboard
|
|
13
|
+
- added: popover option to incoming messages
|
|
14
|
+
|
|
15
|
+
### 3.0.86-rc.3
|
|
16
|
+
- bug-fixed: cannot send message after email is queued successfully
|
|
17
|
+
|
|
5
18
|
### 3.0.86-rc.2
|
|
6
19
|
- bug-fixed: undefined reading 'channel' while render email icon in ion-conversation-detail component
|
|
7
20
|
|
package/package.json
CHANGED
|
@@ -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;
|
package/src/app/app.module.ts
CHANGED
|
@@ -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';
|
|
@@ -99,26 +99,27 @@
|
|
|
99
99
|
</ion-button>
|
|
100
100
|
</ng-container>
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
<div
|
|
102
|
+
|
|
103
|
+
<div class="bubble-container">
|
|
104
104
|
|
|
105
105
|
<div class="email-logo" *ngIf="message?.attributes?.channel && message?.attributes?.channel === TYPE_MSG_EMAIL">
|
|
106
106
|
<ion-icon name="mail"></ion-icon>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
|
+
<!--backgroundColor non viene ancora usato -->
|
|
109
110
|
<chat-bubble-message class="messages msg_sent" id="message_msg_sent" style="position: relative;"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
111
|
+
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
112
|
+
[class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
|
|
113
|
+
[class.emoticon]="isEmojii(message?.text)"
|
|
114
|
+
[ngStyle]="{'background': stylesMap.get('bubbleSentBackground'), 'color': stylesMap.get('bubbleSentTextColor')}"
|
|
115
|
+
[ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
|
|
116
|
+
[message]="message"
|
|
117
|
+
[fontColor]="stylesMap.get('bubbleSentTextColor')"
|
|
118
|
+
[fontSize]="stylesMap.get('fontSize')"
|
|
119
|
+
[fontFamily]="stylesMap.get('fontFamily')"
|
|
120
|
+
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
121
|
+
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
122
|
+
(onElementRendered)="onElementRenderedFN($event)">
|
|
122
123
|
</chat-bubble-message>
|
|
123
124
|
</div>
|
|
124
125
|
|
|
@@ -149,21 +150,35 @@
|
|
|
149
150
|
[baseLocation]="baseLocation">
|
|
150
151
|
</chat-avatar-image> -->
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
153
|
+
<div class="bubble-container">
|
|
154
|
+
|
|
155
|
+
<!--backgroundColor non viene ancora usato -->
|
|
156
|
+
<chat-bubble-message class="messages msg_receive" id="message_msg_receive"
|
|
157
|
+
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message)), 'privateMsg': (message?.attributes && message?.attributes?.subtype === 'private')}"
|
|
158
|
+
[class.no-background]="(isImage(message) || isFrame(message)) && message?.text.trim() === '' "
|
|
159
|
+
[class.emoticon]="isEmojii(message?.text)"
|
|
160
|
+
[ngStyle]="{'background': stylesMap?.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
|
|
161
|
+
[isSameSender]="isSameSender(message?.sender, i)"
|
|
162
|
+
[message]="message"
|
|
163
|
+
[fontColor]="stylesMap?.get('bubbleReceivedTextColor')"
|
|
164
|
+
[fontSize]="stylesMap?.get('fontSize')"
|
|
165
|
+
[fontFamily]="stylesMap?.get('fontFamily')"
|
|
166
|
+
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
167
|
+
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
168
|
+
(onElementRendered)="onElementRenderedFN($event)"
|
|
169
|
+
(click)="onBubbleMessageClick($event, i)">
|
|
170
|
+
</chat-bubble-message>
|
|
171
|
+
|
|
172
|
+
<div class="options-container">
|
|
173
|
+
<div class="copy-logo" (click)="onClickCopyMesage($event, message)" *ngIf="message.text.trim() !== ''">
|
|
174
|
+
<ion-icon name="copy-outline"></ion-icon>
|
|
175
|
+
</div>
|
|
176
|
+
<!-- <div class="menu-logo" (click)="onClickBubbleMenu($event, message)">
|
|
177
|
+
<ion-icon name="caret-down"></ion-icon>
|
|
178
|
+
</div> -->
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
</div>
|
|
167
182
|
|
|
168
183
|
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
169
184
|
<ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
|
|
@@ -183,6 +198,11 @@
|
|
|
183
198
|
|
|
184
199
|
<div class="message-date-hover" *ngIf="isChannelTypeGroup(channelType)"> {{message.timestamp | date:'HH:mm' }} </div>
|
|
185
200
|
</div>
|
|
201
|
+
|
|
202
|
+
<div class="base_receive sourcePage-container" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && message?.attributes?.sourcePage" [class.show]="showSourceInfo && showSourceInfoIndex===i">
|
|
203
|
+
<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>
|
|
204
|
+
<span title="{{message?.attributes?.sourcePage}}" class="truncate">{{message?.attributes?.sourcePage}}</span>
|
|
205
|
+
</div>
|
|
186
206
|
|
|
187
207
|
<!-- message type:: button && -->
|
|
188
208
|
<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,
|
|
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,76 @@ 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
|
+
align-items: center;
|
|
351
|
+
color: rgb(135, 150, 175);
|
|
352
|
+
font-size: 12px;
|
|
353
|
+
svg{
|
|
354
|
+
fill: rgb(135, 150, 175);
|
|
355
|
+
margin-right: 5px;
|
|
356
|
+
}
|
|
357
|
+
&.show{
|
|
358
|
+
display: flex;
|
|
359
|
+
}
|
|
281
360
|
}
|
|
282
361
|
|
|
283
362
|
.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 } 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,7 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
67
71
|
private translate: TranslateService,
|
|
68
72
|
public appConfigProvider: AppConfigProvider,
|
|
69
73
|
public modalController: ModalController,
|
|
74
|
+
public popoverController: PopoverController
|
|
70
75
|
) {
|
|
71
76
|
super(cdref, uploadService)
|
|
72
77
|
|
|
@@ -145,6 +150,21 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
145
150
|
this.onAddUploadingBubble.emit(value);
|
|
146
151
|
}
|
|
147
152
|
|
|
153
|
+
onClickBubbleMenu(event, message: MessageModel){
|
|
154
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickBubbleMenu');
|
|
155
|
+
this.presentPopover(event, message)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
onClickCopyMesage(event, message: MessageModel){
|
|
159
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickCopyMesage');
|
|
160
|
+
navigator.clipboard.writeText(message.text)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
onBubbleMessageClick(event: any, index: number){
|
|
164
|
+
this.showSourceInfo = !this.showSourceInfo
|
|
165
|
+
this.showSourceInfoIndex = index
|
|
166
|
+
}
|
|
167
|
+
|
|
148
168
|
onElementRenderedFN(event) {
|
|
149
169
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onElementRenderedFN:::ionic', event)
|
|
150
170
|
this.onElementRendered.emit(event)
|
|
@@ -171,7 +191,8 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
171
191
|
async presentCreateCannedResponseModal(message: MessageModel): Promise<any> {
|
|
172
192
|
this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
|
|
173
193
|
const attributes = {
|
|
174
|
-
message: message,
|
|
194
|
+
message: message.text,
|
|
195
|
+
conversationWith: message.recipient
|
|
175
196
|
}
|
|
176
197
|
const modal: HTMLIonModalElement = await this.modalController.create({
|
|
177
198
|
component: CreateCannedResponsePage,
|
|
@@ -186,4 +207,26 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
186
207
|
|
|
187
208
|
return await modal.present()
|
|
188
209
|
}
|
|
210
|
+
|
|
211
|
+
async presentPopover(ev: any, message: MessageModel) {
|
|
212
|
+
const attributes = {
|
|
213
|
+
message: message,
|
|
214
|
+
conversationWith: message.recipient
|
|
215
|
+
}
|
|
216
|
+
const popover = await this.popoverController.create({
|
|
217
|
+
component: BubbleInfoPopoverComponent,
|
|
218
|
+
cssClass: 'my-custom-class',
|
|
219
|
+
componentProps: attributes,
|
|
220
|
+
event: ev,
|
|
221
|
+
translucent: true,
|
|
222
|
+
keyboardClose: true,
|
|
223
|
+
showBackdrop: true
|
|
224
|
+
});
|
|
225
|
+
popover.onDidDismiss().then((dataReturned: any) => {
|
|
226
|
+
//
|
|
227
|
+
this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
return await popover.present();
|
|
231
|
+
}
|
|
189
232
|
}
|
|
File without changes
|
|
@@ -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';
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -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>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -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
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
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
|