@chat21/chat21-ionic 3.0.90-rc.2 → 3.0.90-rc.3
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 +4 -0
- package/package.json +1 -1
- package/src/app/app-routing.module.ts +5 -1
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +15 -7
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +59 -40
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +27 -19
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +15 -9
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +36 -33
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +33 -8
- package/src/app/chatlib/conversation-detail/message/options/options.component.html +5 -0
- package/src/app/chatlib/conversation-detail/message/options/options.component.scss +34 -0
- package/src/app/chatlib/conversation-detail/message/options/options.component.spec.ts +24 -0
- package/src/app/chatlib/conversation-detail/message/options/options.component.ts +54 -0
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.html +15 -3
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.scss +26 -0
- package/src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component.ts +23 -2
- package/src/app/modals/json-message/json-message-routing.module.ts +17 -0
- package/src/app/modals/json-message/json-message.module.ts +30 -0
- package/src/app/modals/json-message/json-message.page.html +15 -0
- package/src/app/modals/json-message/json-message.page.scss +17 -0
- package/src/app/modals/json-message/json-message.page.spec.ts +24 -0
- package/src/app/modals/json-message/json-message.page.ts +50 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +1 -1
- package/src/app/shared/shared.module.ts +3 -0
- package/src/assets/i18n/ar.json +2 -1
- package/src/assets/i18n/az.json +2 -1
- package/src/assets/i18n/de.json +2 -1
- package/src/assets/i18n/en.json +2 -1
- package/src/assets/i18n/es.json +2 -1
- package/src/assets/i18n/fr.json +2 -1
- package/src/assets/i18n/it.json +2 -1
- package/src/assets/i18n/kk.json +2 -1
- package/src/assets/i18n/pt.json +2 -1
- package/src/assets/i18n/ru.json +2 -1
- package/src/assets/i18n/sr.json +2 -1
- package/src/assets/i18n/sv.json +2 -1
- package/src/assets/i18n/tr.json +2 -1
- package/src/assets/i18n/uk.json +2 -1
- package/src/assets/i18n/uz.json +2 -1
- package/src/assets/images/json-file.svg +1 -0
- package/src/global.scss +18 -0
- package/src/variables.scss +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.90-rc.3
|
|
4
|
+
- added: options menu and popover on click to show copy, canned and Json response options
|
|
5
|
+
- changed: icon-button moved outside bubble-message only for the first message of each sender
|
|
6
|
+
|
|
3
7
|
### 3.0.90-rc.2
|
|
4
8
|
- added: info and copy icon on received messages
|
|
5
9
|
- added: flash icon to distinguish chat offline message sent also by email
|
package/package.json
CHANGED
|
@@ -64,7 +64,11 @@ const routes: Routes = [
|
|
|
64
64
|
{
|
|
65
65
|
path: 'send-email',
|
|
66
66
|
loadChildren: () => import('./modals/send-email/send-email.module').then( m => m.SendEmailModalModule)
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
68
|
{
|
|
69
|
+
path: 'json-message',
|
|
70
|
+
loadChildren: () => import('./modals/json-message/json-message.module').then( m => m.JsonMessagePageModule)
|
|
71
|
+
}
|
|
72
|
+
|
|
69
73
|
|
|
70
74
|
|
|
71
75
|
|
package/src/app/app.module.ts
CHANGED
|
@@ -88,6 +88,7 @@ import { LoaderPreviewPageModule } from './modals/loader-preview/loader-preview.
|
|
|
88
88
|
import { CreateTicketPageModule } from './modals/create-ticket/create-ticket.module';
|
|
89
89
|
import { CreateCannedResponsePageModule } from './modals/create-canned-response/create-canned-response.module';
|
|
90
90
|
import { SendEmailModalModule } from './modals/send-email/send-email.module';
|
|
91
|
+
import { JsonMessagePageModule } from './modals/json-message/json-message.module';
|
|
91
92
|
// UTILS
|
|
92
93
|
import { ScrollbarThemeModule } from './utils/scrollbar-theme.directive';
|
|
93
94
|
import { SharedModule } from 'src/app/shared/shared.module';
|
|
@@ -294,7 +295,8 @@ const appInitializerFn = (appConfig: AppConfigProvider, logger: NGXLogger) => {
|
|
|
294
295
|
SendEmailModalModule,
|
|
295
296
|
CreateTicketPageModule,
|
|
296
297
|
CreateRequesterPageModule,
|
|
297
|
-
CreateCannedResponsePageModule
|
|
298
|
+
CreateCannedResponsePageModule,
|
|
299
|
+
JsonMessagePageModule
|
|
298
300
|
],
|
|
299
301
|
bootstrap: [AppComponent],
|
|
300
302
|
|
|
@@ -98,14 +98,14 @@
|
|
|
98
98
|
|
|
99
99
|
<div class="message-date-hover"> {{message.timestamp | date:'HH:mm' }} </div>
|
|
100
100
|
|
|
101
|
-
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
101
|
+
<!-- <ng-container *ngIf="areVisibleCAR && supportMode">
|
|
102
102
|
<ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
|
|
103
103
|
(click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
|
|
104
104
|
[options]="tooltipOptions" placement="bottom">
|
|
105
105
|
<ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
|
|
106
106
|
<span class="add-canned-response-add-icon">+</span>
|
|
107
107
|
</ion-button>
|
|
108
|
-
</ng-container>
|
|
108
|
+
</ng-container> -->
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
<div class="bubble-container">
|
|
@@ -131,7 +131,8 @@
|
|
|
131
131
|
[fontFamily]="stylesMap.get('fontFamily')"
|
|
132
132
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
133
133
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
134
|
-
(onElementRendered)="onElementRenderedFN($event)"
|
|
134
|
+
(onElementRendered)="onElementRenderedFN($event)"
|
|
135
|
+
(onOptionsMessage)="onClickOptionsMessage($event)">
|
|
135
136
|
</chat-bubble-message>
|
|
136
137
|
</div>
|
|
137
138
|
|
|
@@ -178,20 +179,27 @@
|
|
|
178
179
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
179
180
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
180
181
|
(onElementRendered)="onElementRenderedFN($event)"
|
|
181
|
-
(
|
|
182
|
-
(onInfo)="onClickInfoMesage($event, i)">
|
|
182
|
+
(onOptionsMessage)="onClickOptionsMessage($event)">
|
|
183
183
|
</chat-bubble-message>
|
|
184
184
|
|
|
185
185
|
</div>
|
|
186
186
|
|
|
187
|
-
<ng-container *ngIf="
|
|
187
|
+
<ng-container *ngIf="message?.attributes && message?.attributes?.sourcePage && !isSameSender(message?.sender, i)">
|
|
188
|
+
<ion-button shape="round" size="small" class="btn-info-msg " ion-button fill="clear"
|
|
189
|
+
(click)="onClickInfoMessage(message, i)" [tooltip]="addAsCannedResponseTooltipText"
|
|
190
|
+
[options]="tooltipOptions" placement="bottom">
|
|
191
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
192
|
+
</ion-button>
|
|
193
|
+
</ng-container>
|
|
194
|
+
|
|
195
|
+
<!-- <ng-container *ngIf="areVisibleCAR && supportMode">
|
|
188
196
|
<ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
|
|
189
197
|
(click)="presentCreateCannedResponseModal(message)" [tooltip]="addAsCannedResponseTooltipText"
|
|
190
198
|
[options]="tooltipOptions" placement="bottom">
|
|
191
199
|
<ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
|
|
192
200
|
<span class="add-canned-response-add-icon">+</span>
|
|
193
201
|
</ion-button>
|
|
194
|
-
</ng-container>
|
|
202
|
+
</ng-container> -->
|
|
195
203
|
<!-- <ng-container *ngIf="supportMode">
|
|
196
204
|
<ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
|
|
197
205
|
(click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
|
|
@@ -33,6 +33,46 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
|
|
37
|
+
//------- MANAGE CHAT-OPTIONS component :: INIT ------- //
|
|
38
|
+
:host .base_sent .msg_sent.no-background ::ng-deep > div{
|
|
39
|
+
.options-container{
|
|
40
|
+
background: transparent;
|
|
41
|
+
|
|
42
|
+
.options-logo{
|
|
43
|
+
color:var(--bck-msg-sent);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host .base_receive .msg_receive.no-background ::ng-deep > div{
|
|
50
|
+
.options-container{
|
|
51
|
+
background: transparent;
|
|
52
|
+
|
|
53
|
+
.options-logo{
|
|
54
|
+
color: var(--bck-msg-received);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host .base_sent .msg_sent ::ng-deep > div {
|
|
61
|
+
.options-container{
|
|
62
|
+
right: unset;
|
|
63
|
+
left: 1;
|
|
64
|
+
border-top-right-radius: unset;
|
|
65
|
+
border-top-left-radius: 16px;
|
|
66
|
+
background: radial-gradient(at top left,rgba(#2a6ac1,1) 60%,rgba(#2a6ac1,0) 80%);
|
|
67
|
+
flex-direction: row;
|
|
68
|
+
|
|
69
|
+
.options-logo{
|
|
70
|
+
color: #ffffff;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//------- MANAGE CHAT-OPTIONS component :: END ------- //
|
|
75
|
+
|
|
36
76
|
.manage_conversation_info_container{
|
|
37
77
|
height: 34px;
|
|
38
78
|
display: flex;
|
|
@@ -235,7 +275,8 @@ ion-item {
|
|
|
235
275
|
|
|
236
276
|
|
|
237
277
|
&:hover .message-date-hover,
|
|
238
|
-
&:hover .btn-add-msg,
|
|
278
|
+
&:hover .btn-add-msg,
|
|
279
|
+
&:hover .btn-options-msg,
|
|
239
280
|
&:hover .options-container{
|
|
240
281
|
display: block;
|
|
241
282
|
}
|
|
@@ -295,39 +336,6 @@ ion-item {
|
|
|
295
336
|
max-width: 100% !important;
|
|
296
337
|
}
|
|
297
338
|
|
|
298
|
-
.options-container{
|
|
299
|
-
position: relative;
|
|
300
|
-
display: none;
|
|
301
|
-
-webkit-box-align: center;
|
|
302
|
-
align-items: center;
|
|
303
|
-
-webkit-box-pack: center;
|
|
304
|
-
justify-content: center;
|
|
305
|
-
top: 0px;
|
|
306
|
-
right: 30px;
|
|
307
|
-
height: 16px;
|
|
308
|
-
margin: 5px;
|
|
309
|
-
z-index: 2;
|
|
310
|
-
}
|
|
311
|
-
.menu-logo{
|
|
312
|
-
// background-color: var(--list-bkg-color);
|
|
313
|
-
// box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.4);
|
|
314
|
-
// position: relative;
|
|
315
|
-
// display: flex;
|
|
316
|
-
// -webkit-box-align: center;
|
|
317
|
-
// align-items: center;
|
|
318
|
-
// -webkit-box-pack: center;
|
|
319
|
-
// justify-content: center;
|
|
320
|
-
// top: 0px;
|
|
321
|
-
// right: 30px;
|
|
322
|
-
// z-index: 2;
|
|
323
|
-
width: 20px;
|
|
324
|
-
border-radius: 3px;
|
|
325
|
-
color: rgb(135, 150, 175);
|
|
326
|
-
|
|
327
|
-
&:hover{
|
|
328
|
-
cursor: pointer;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
339
|
|
|
332
340
|
}
|
|
333
341
|
|
|
@@ -336,10 +344,10 @@ ion-item {
|
|
|
336
344
|
display: none;
|
|
337
345
|
width: 75%;
|
|
338
346
|
align-items: center;
|
|
339
|
-
color:
|
|
347
|
+
color: var(--icon-color);
|
|
340
348
|
font-size: 12px;
|
|
341
349
|
svg{
|
|
342
|
-
fill:
|
|
350
|
+
fill: var(--icon-color);
|
|
343
351
|
margin-right: 5px;
|
|
344
352
|
}
|
|
345
353
|
&.show{
|
|
@@ -351,23 +359,28 @@ ion-item {
|
|
|
351
359
|
color: #647491;
|
|
352
360
|
font-size: 12px;
|
|
353
361
|
align-self: center;
|
|
354
|
-
|
|
362
|
+
margin: 0px 5px;
|
|
355
363
|
display: none;
|
|
356
364
|
|
|
357
365
|
}
|
|
358
366
|
|
|
359
|
-
|
|
367
|
+
|
|
368
|
+
.btn-add-msg, .btn-info-msg, .btn-options-msg {
|
|
360
369
|
border-radius: 50%;
|
|
361
370
|
--padding-end: 5px;
|
|
362
371
|
--padding-start: 5px;
|
|
363
|
-
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.13);
|
|
372
|
+
// box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.13);
|
|
364
373
|
display: none;
|
|
365
374
|
align-self: center;
|
|
366
375
|
margin: 0px 5px;
|
|
367
376
|
|
|
377
|
+
:hover{
|
|
378
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.13);
|
|
379
|
+
}
|
|
380
|
+
|
|
368
381
|
ion-icon{
|
|
369
382
|
font-size: 1.2em;
|
|
370
|
-
color: var(--
|
|
383
|
+
color: var(--icon-color)
|
|
371
384
|
}
|
|
372
385
|
|
|
373
386
|
.add-canned-response-add-icon{
|
|
@@ -380,6 +393,12 @@ ion-item {
|
|
|
380
393
|
}
|
|
381
394
|
}
|
|
382
395
|
|
|
396
|
+
.btn-info-msg{
|
|
397
|
+
display: block;
|
|
398
|
+
height: 25px;
|
|
399
|
+
width: 25px;
|
|
400
|
+
}
|
|
401
|
+
|
|
383
402
|
/* LOADING */
|
|
384
403
|
/*http://tobiasahlin.com/spinkit/*/
|
|
385
404
|
#chat21-spinner {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JsonMessagePage } from './../../../modals/json-message/json-message.page';
|
|
1
2
|
import { BubbleInfoPopoverComponent } from '../../../components/bubbleMessageInfo-popover/bubbleinfo-popover.component';
|
|
2
3
|
import { MessageModel } from 'src/chat21-core/models/message';
|
|
3
4
|
import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
|
|
@@ -151,18 +152,26 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
151
152
|
this.onAddUploadingBubble.emit(value);
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
|
|
155
|
-
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickBubbleMenu');
|
|
156
|
-
|
|
155
|
+
onClickOptionsMessage(event:{option: string, message: MessageModel}){
|
|
156
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickBubbleMenu', event);
|
|
157
|
+
if(event.option==='copy'){
|
|
158
|
+
this.onClickCopyMessage(event.message)
|
|
159
|
+
}else if(event.option === 'addCanned'){
|
|
160
|
+
if(this.areVisibleCAR && this.supportMode){
|
|
161
|
+
this.presentCreateCannedResponseModal(event.message)
|
|
162
|
+
}
|
|
163
|
+
}else if(event.option === 'jsonInfo'){
|
|
164
|
+
this.presentJsonMessageModal(event.message)
|
|
165
|
+
}
|
|
157
166
|
}
|
|
158
167
|
|
|
159
|
-
|
|
160
|
-
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] -
|
|
168
|
+
onClickCopyMessage(message: MessageModel){
|
|
169
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onClickCopyMessage');
|
|
161
170
|
navigator.clipboard.writeText(message.text)
|
|
162
171
|
this.presentToast()
|
|
163
172
|
}
|
|
164
173
|
|
|
165
|
-
|
|
174
|
+
onClickInfoMessage(message: MessageModel, index: number){
|
|
166
175
|
if(message && message.attributes && message.attributes.sourcePage){
|
|
167
176
|
this.showSourceInfo = !this.showSourceInfo
|
|
168
177
|
this.showSourceInfoIndex = index
|
|
@@ -212,26 +221,25 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
212
221
|
return await modal.present()
|
|
213
222
|
}
|
|
214
223
|
|
|
215
|
-
async
|
|
224
|
+
async presentJsonMessageModal(message: MessageModel): Promise<any> {
|
|
225
|
+
this.logger.log('[BUBBLE-MESSAGE] PRESENT JSON MESSAGE MODAL ')
|
|
216
226
|
const attributes = {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
cssClass: 'my-custom-class',
|
|
227
|
+
message: message
|
|
228
|
+
}
|
|
229
|
+
const modal: HTMLIonModalElement = await this.modalController.create({
|
|
230
|
+
component: JsonMessagePage,
|
|
231
|
+
cssClass: 'json-modal-class',
|
|
223
232
|
componentProps: attributes,
|
|
224
|
-
|
|
225
|
-
|
|
233
|
+
swipeToClose: false,
|
|
234
|
+
backdropDismiss: false,
|
|
226
235
|
keyboardClose: true,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
popover.onDidDismiss().then((dataReturned: any) => {
|
|
236
|
+
})
|
|
237
|
+
modal.onDidDismiss().then((dataReturned: any) => {
|
|
230
238
|
//
|
|
231
239
|
this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
|
|
232
240
|
})
|
|
233
241
|
|
|
234
|
-
return await
|
|
242
|
+
return await modal.present()
|
|
235
243
|
}
|
|
236
244
|
|
|
237
245
|
async presentToast(){
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html
CHANGED
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
<!-- 'width': (isImage(message) || isFrame(message))? sizeImage?.width : null -->
|
|
5
5
|
<div id="bubble-message" [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px' }" class="messages primary-color">
|
|
6
6
|
|
|
7
|
-
<div class="options-container"
|
|
8
|
-
<div class="
|
|
9
|
-
<ion-icon name="
|
|
7
|
+
<!-- <div class="options-container" >
|
|
8
|
+
<div class="options-logo" (click)="onClickOptionsMessage($event, message)" >
|
|
9
|
+
<ion-icon name="chevron-down"></ion-icon>
|
|
10
10
|
</div>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
</div> -->
|
|
12
|
+
<chat-options
|
|
13
|
+
[message]="message"
|
|
14
|
+
(onOptionsMessage)="onOptionsMessageFN($event)">
|
|
15
|
+
</chat-options>
|
|
15
16
|
|
|
16
|
-
<div
|
|
17
|
+
<div>
|
|
17
18
|
|
|
18
19
|
<div *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && !isSameSender"
|
|
19
20
|
[style.color]="convertColorToRGBA(fontColor, 65)"
|
|
20
|
-
[ngStyle]="{'
|
|
21
|
+
[ngStyle]="{'padding': (isImage(message) || isFrame(message))? '10px 16px 8px 16px': '10px 8px 0px 8px'}" class="message_sender_fullname">
|
|
21
22
|
{{message?.sender_fullname}}
|
|
22
23
|
</div>
|
|
23
24
|
<!-- message type:: image -->
|
|
@@ -57,6 +58,10 @@
|
|
|
57
58
|
<!-- [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left" content-type="template" (click)="handleTooltipEvents($event)" -->
|
|
58
59
|
<div *ngIf="message?.text" style="display: flex; margin: 0px 0px 0px 0px;">
|
|
59
60
|
|
|
61
|
+
<!-- <ng-template #timeTooltipLeft>
|
|
62
|
+
<span>{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})</span>
|
|
63
|
+
</ng-template> -->
|
|
64
|
+
|
|
60
65
|
<chat-text *ngIf="message?.type !=='html'"
|
|
61
66
|
[text]="message?.text"
|
|
62
67
|
[color]="fontColor"
|
|
@@ -70,6 +75,7 @@
|
|
|
70
75
|
</chat-html>
|
|
71
76
|
|
|
72
77
|
</div>
|
|
78
|
+
|
|
73
79
|
</div>
|
|
74
80
|
|
|
75
81
|
</div>
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss
CHANGED
|
@@ -13,47 +13,50 @@
|
|
|
13
13
|
// animation: heartbeat 1.5s ease-in-out both;
|
|
14
14
|
|
|
15
15
|
&:hover{
|
|
16
|
-
|
|
16
|
+
chat-options{
|
|
17
17
|
// display: flex;
|
|
18
18
|
visibility: visible;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
top: 0px;
|
|
26
|
-
right: -40px;
|
|
27
|
-
height: 16px;
|
|
28
|
-
// margin: 5px;
|
|
29
|
-
z-index: 2;
|
|
22
|
+
chat-options{
|
|
23
|
+
visibility: hidden;
|
|
24
|
+
}
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
// .options-container{
|
|
27
|
+
// display: flex;
|
|
28
|
+
// visibility: hidden;
|
|
29
|
+
// flex-direction: row-reverse;
|
|
30
|
+
// position: absolute;
|
|
31
|
+
// top: 0px;
|
|
32
|
+
// right: 0px;
|
|
33
|
+
// height: 25px;
|
|
34
|
+
// width: 40px;
|
|
35
|
+
// padding: 5px;
|
|
36
|
+
// z-index: 2;
|
|
37
|
+
// background: radial-gradient(at top right,rgba(240, 242, 247,1) 60%,rgba(240, 242, 247,0) 80%);
|
|
38
|
+
// border-top-right-radius: 16px;
|
|
39
|
+
|
|
40
|
+
// .options-logo{
|
|
41
|
+
// // display: none;
|
|
42
|
+
// display: flex;
|
|
43
|
+
// -webkit-box-align: center;
|
|
44
|
+
// align-items: center;
|
|
45
|
+
// -webkit-box-pack: center;
|
|
46
|
+
// /* width: 20px; */
|
|
47
|
+
// height: 16px;
|
|
48
|
+
// border-radius: 3px;
|
|
49
|
+
// color: rgb(135, 150, 175);
|
|
50
|
+
// text-align: left;
|
|
51
|
+
// justify-content: center;
|
|
52
|
+
// font-size: initial;
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
// &:hover{
|
|
55
|
+
// cursor: pointer;
|
|
56
|
+
// }
|
|
57
|
+
// }
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
display: flex;
|
|
54
|
-
visibility: visible;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
59
|
+
// }
|
|
57
60
|
|
|
58
61
|
.message_sender_fullname{
|
|
59
62
|
font-size: 12px;
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -8,8 +8,9 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
8
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
9
9
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
10
10
|
import * as moment from 'moment';
|
|
11
|
-
import { ModalController } from '@ionic/angular';
|
|
11
|
+
import { ModalController, PopoverController } from '@ionic/angular';
|
|
12
12
|
import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
|
|
13
|
+
import { BubbleInfoPopoverComponent } from 'src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component';
|
|
13
14
|
@Component({
|
|
14
15
|
selector: 'chat-bubble-message',
|
|
15
16
|
templateUrl: './bubble-message.component.html',
|
|
@@ -25,8 +26,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
25
26
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
26
27
|
@Output() onAfterMessageRender = new EventEmitter();
|
|
27
28
|
@Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
|
|
28
|
-
@Output()
|
|
29
|
-
@Output() onInfo = new EventEmitter<MessageModel>();
|
|
29
|
+
@Output() onOptionsMessage = new EventEmitter<{option: string, message: MessageModel}>();
|
|
30
30
|
|
|
31
31
|
isImage = isImage;
|
|
32
32
|
isFile = isFile;
|
|
@@ -60,6 +60,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
60
60
|
private translate: TranslateService,
|
|
61
61
|
public tiledeskAuthService: TiledeskAuthService,
|
|
62
62
|
public modalController: ModalController,
|
|
63
|
+
private popoverController: PopoverController
|
|
63
64
|
) {
|
|
64
65
|
// console.log('BUBBLE-MSG Hello !!!!')
|
|
65
66
|
}
|
|
@@ -182,14 +183,38 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
// onClickOptionsMessage(event, message){
|
|
187
|
+
// this.logger.log('[BUBBLE-MESSAGE] - onClickOptionsMessage', message);
|
|
188
|
+
// this.presentPopover(event, message)
|
|
189
|
+
// }
|
|
190
|
+
onOptionsMessageFN(event){
|
|
191
|
+
this.onOptionsMessage.emit(event)
|
|
187
192
|
}
|
|
188
193
|
|
|
189
|
-
onClickInfoMessage(event, message){
|
|
190
|
-
this.onInfo.emit(message)
|
|
191
|
-
}
|
|
192
194
|
|
|
195
|
+
// async presentPopover(ev: any, message: MessageModel) {
|
|
196
|
+
// const attributes = {
|
|
197
|
+
// message: message,
|
|
198
|
+
// conversationWith: message.recipient
|
|
199
|
+
// }
|
|
200
|
+
// const popover = await this.popoverController.create({
|
|
201
|
+
// component: BubbleInfoPopoverComponent,
|
|
202
|
+
// cssClass: 'info-popover',
|
|
203
|
+
// componentProps: attributes,
|
|
204
|
+
// event: ev,
|
|
205
|
+
// translucent: true,
|
|
206
|
+
// keyboardClose: true,
|
|
207
|
+
// showBackdrop: false
|
|
208
|
+
// });
|
|
209
|
+
// popover.onDidDismiss().then((dataReturned: any) => {
|
|
210
|
+
// this.logger.log('[BUBBLE-MESSAGE] presentPopover dismissed. Returned value::', dataReturned.data)
|
|
211
|
+
// if(dataReturned.data){
|
|
212
|
+
// this.onOptionsMessage.emit({option: dataReturned.data.option, message: message})
|
|
213
|
+
// }
|
|
214
|
+
// })
|
|
215
|
+
|
|
216
|
+
// return await popover.present();
|
|
217
|
+
// }
|
|
193
218
|
// ========= begin:: event emitter function ============//
|
|
194
219
|
|
|
195
220
|
// returnOpenAttachment(event: String) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.options-container{
|
|
2
|
+
display: flex;
|
|
3
|
+
// visibility: hidden;
|
|
4
|
+
flex-direction: row-reverse;
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0px;
|
|
7
|
+
right: 0px;
|
|
8
|
+
height: 25px;
|
|
9
|
+
width: 40px;
|
|
10
|
+
padding: 5px;
|
|
11
|
+
z-index: 2;
|
|
12
|
+
background: radial-gradient(at top right,rgba(240, 242, 247,1) 60%,rgba(240, 242, 247,0) 80%);
|
|
13
|
+
border-top-right-radius: 16px;
|
|
14
|
+
|
|
15
|
+
.options-logo{
|
|
16
|
+
// display: none;
|
|
17
|
+
display: flex;
|
|
18
|
+
-webkit-box-align: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
-webkit-box-pack: center;
|
|
21
|
+
/* width: 20px; */
|
|
22
|
+
height: 16px;
|
|
23
|
+
border-radius: 3px;
|
|
24
|
+
color: rgb(135, 150, 175);
|
|
25
|
+
text-align: left;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
font-size: initial;
|
|
28
|
+
|
|
29
|
+
&:hover{
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { OptionsComponent } from './options.component';
|
|
5
|
+
|
|
6
|
+
describe('OptionsComponent', () => {
|
|
7
|
+
let component: OptionsComponent;
|
|
8
|
+
let fixture: ComponentFixture<OptionsComponent>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ OptionsComponent ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(OptionsComponent);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PopoverController } from '@ionic/angular';
|
|
2
|
+
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
|
3
|
+
import { BubbleInfoPopoverComponent } from 'src/app/components/bubbleMessageInfo-popover/bubbleinfo-popover.component';
|
|
4
|
+
import { MessageModel } from 'src/chat21-core/models/message';
|
|
5
|
+
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
6
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'chat-options',
|
|
10
|
+
templateUrl: './options.component.html',
|
|
11
|
+
styleUrls: ['./options.component.scss'],
|
|
12
|
+
})
|
|
13
|
+
export class OptionsComponent implements OnInit {
|
|
14
|
+
|
|
15
|
+
@Input() message: MessageModel
|
|
16
|
+
@Output() onOptionsMessage = new EventEmitter<{option: string, message: MessageModel}>();
|
|
17
|
+
|
|
18
|
+
private logger: LoggerService = LoggerInstance.getInstance()
|
|
19
|
+
|
|
20
|
+
constructor(private popoverController: PopoverController) { }
|
|
21
|
+
|
|
22
|
+
ngOnInit() {}
|
|
23
|
+
|
|
24
|
+
onClickOptionsMessage(event, message){
|
|
25
|
+
this.logger.log('[BUBBLE-MESSAGE] - onClickOptionsMessage', message);
|
|
26
|
+
this.presentPopover(event, message)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
async presentPopover(ev: any, message: MessageModel) {
|
|
31
|
+
const attributes = {
|
|
32
|
+
message: message,
|
|
33
|
+
conversationWith: message.recipient
|
|
34
|
+
}
|
|
35
|
+
const popover = await this.popoverController.create({
|
|
36
|
+
component: BubbleInfoPopoverComponent,
|
|
37
|
+
cssClass: 'info-popover',
|
|
38
|
+
componentProps: attributes,
|
|
39
|
+
event: ev,
|
|
40
|
+
translucent: true,
|
|
41
|
+
keyboardClose: true,
|
|
42
|
+
showBackdrop: false
|
|
43
|
+
});
|
|
44
|
+
popover.onDidDismiss().then((dataReturned: any) => {
|
|
45
|
+
this.logger.log('[BUBBLE-MESSAGE] presentPopover dismissed. Returned value::', dataReturned.data)
|
|
46
|
+
if(dataReturned.data){
|
|
47
|
+
this.onOptionsMessage.emit({option: dataReturned.data.option, message: message})
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
return await popover.present();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<ion-list lines="none" class="ion-no-padding">
|
|
2
|
+
<ion-item button="true" (click)="onClickOption('copy')">
|
|
3
|
+
<ion-icon name="copy-outline" slot="start"></ion-icon>
|
|
4
|
+
<ion-label>{{translationsMap?.get('COPY')}}</ion-label>
|
|
5
|
+
</ion-item>
|
|
6
|
+
<ion-item button="true" (click)="onClickOption('addCanned')">
|
|
7
|
+
<ion-icon name="flash-outline" slot="start"></ion-icon>
|
|
8
|
+
<!-- <span class="add-canned-response-add-icon">+</span> -->
|
|
9
|
+
<ion-label>{{translationsMap?.get('AddAsCannedResponse')}}</ion-label>
|
|
10
|
+
</ion-item>
|
|
11
|
+
<ion-item button="true" (click)="onClickOption('jsonInfo')">
|
|
12
|
+
<ion-icon src="assets/images/json-file.svg" slot="start"></ion-icon>
|
|
13
|
+
<ion-label>{{translationsMap?.get('JSON_RESPONSE')}}</ion-label>
|
|
14
|
+
</ion-item>
|
|
15
|
+
</ion-list>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
ion-list{
|
|
2
|
+
background-color: var(--bck-msg-received);
|
|
3
|
+
padding: 0px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
ion-item{
|
|
7
|
+
--background: transparent;
|
|
8
|
+
--padding-start: 0px;
|
|
9
|
+
--padding-end: 0px;
|
|
10
|
+
--background-hover: #000000 !important;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
|
|
13
|
+
ion-icon{
|
|
14
|
+
margin-right: 5px;
|
|
15
|
+
margin-left: 10px;
|
|
16
|
+
font-size: 20px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:hover{
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
ion-icon {
|
|
22
|
+
color: black;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -3,6 +3,7 @@ import { LoggerInstance } from './../../../chat21-core/providers/logger/loggerIn
|
|
|
3
3
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
4
4
|
import { MessageModel } from './../../../chat21-core/models/message';
|
|
5
5
|
import { Component, Input, OnInit } from '@angular/core';
|
|
6
|
+
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
6
7
|
|
|
7
8
|
@Component({
|
|
8
9
|
selector: 'ion-bubbleinfo-popover',
|
|
@@ -12,17 +13,37 @@ import { Component, Input, OnInit } from '@angular/core';
|
|
|
12
13
|
export class BubbleInfoPopoverComponent implements OnInit {
|
|
13
14
|
|
|
14
15
|
@Input() message: MessageModel
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
public translationsMap: Map<string, string>;
|
|
16
18
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
17
19
|
|
|
18
|
-
constructor(
|
|
20
|
+
constructor(
|
|
21
|
+
private ctr: PopoverController,
|
|
22
|
+
private customTranslateService: CustomTranslateService,
|
|
23
|
+
) { }
|
|
19
24
|
|
|
20
25
|
ngOnInit() {
|
|
21
26
|
this.logger.debug('[BUBBLE-INFO-POPOVER] ngOnInit message data:', this.message)
|
|
27
|
+
this.initTranslations()
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
onClose(){
|
|
25
31
|
this.ctr.dismiss()
|
|
26
32
|
}
|
|
27
33
|
|
|
34
|
+
initTranslations(){
|
|
35
|
+
let keys= [
|
|
36
|
+
"AddAsCannedResponse",
|
|
37
|
+
"COPY",
|
|
38
|
+
"JSON_RESPONSE"
|
|
39
|
+
]
|
|
40
|
+
this.translationsMap = this.customTranslateService.translateLanguage(keys)
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
onClickOption(option: 'copy' | 'addCanned' | 'jsonInfo'){
|
|
45
|
+
this.logger.debug('[BUBBLE-INFO-POPOVER] clicked option:', option)
|
|
46
|
+
this.ctr.dismiss({option: option})
|
|
47
|
+
}
|
|
48
|
+
|
|
28
49
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { Routes, RouterModule } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { JsonMessagePage } from './json-message.page';
|
|
5
|
+
|
|
6
|
+
const routes: Routes = [
|
|
7
|
+
{
|
|
8
|
+
path: '',
|
|
9
|
+
component: JsonMessagePage
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
@NgModule({
|
|
14
|
+
imports: [RouterModule.forChild(routes)],
|
|
15
|
+
exports: [RouterModule],
|
|
16
|
+
})
|
|
17
|
+
export class JsonMessagePageRoutingModule {}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
import { IonicModule } from '@ionic/angular';
|
|
6
|
+
|
|
7
|
+
import { JsonMessagePageRoutingModule } from './json-message-routing.module';
|
|
8
|
+
|
|
9
|
+
import { JsonMessagePage } from './json-message.page';
|
|
10
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
11
|
+
import { HttpClient } from '@angular/common/http';
|
|
12
|
+
import { createTranslateLoader } from 'src/chat21-core/utils/utils';
|
|
13
|
+
|
|
14
|
+
@NgModule({
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
FormsModule,
|
|
18
|
+
IonicModule,
|
|
19
|
+
JsonMessagePageRoutingModule,
|
|
20
|
+
TranslateModule.forChild({
|
|
21
|
+
loader: {
|
|
22
|
+
provide: TranslateModule,
|
|
23
|
+
useFactory: (createTranslateLoader),
|
|
24
|
+
deps: [HttpClient]
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
],
|
|
28
|
+
declarations: [JsonMessagePage]
|
|
29
|
+
})
|
|
30
|
+
export class JsonMessagePageModule {}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-title>{{'JSON_RESPONSE' | translate}}</ion-title>
|
|
4
|
+
|
|
5
|
+
<ion-buttons slot="end">
|
|
6
|
+
<ion-button ion-button fill="clear" (click)="closeModal()">
|
|
7
|
+
<ion-icon slot="icon-only" name="close"></ion-icon>
|
|
8
|
+
</ion-button>
|
|
9
|
+
</ion-buttons>
|
|
10
|
+
</ion-toolbar>
|
|
11
|
+
</ion-header>
|
|
12
|
+
|
|
13
|
+
<ion-content>
|
|
14
|
+
<pre class="json" id=json></pre>
|
|
15
|
+
</ion-content>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { IonicModule } from '@ionic/angular';
|
|
3
|
+
|
|
4
|
+
import { JsonMessagePage } from './json-message.page';
|
|
5
|
+
|
|
6
|
+
describe('JsonMessagePage', () => {
|
|
7
|
+
let component: JsonMessagePage;
|
|
8
|
+
let fixture: ComponentFixture<JsonMessagePage>;
|
|
9
|
+
|
|
10
|
+
beforeEach(async(() => {
|
|
11
|
+
TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ JsonMessagePage ],
|
|
13
|
+
imports: [IonicModule.forRoot()]
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(JsonMessagePage);
|
|
17
|
+
component = fixture.componentInstance;
|
|
18
|
+
fixture.detectChanges();
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
it('should create', () => {
|
|
22
|
+
expect(component).toBeTruthy();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { MessageModel } from './../../../chat21-core/models/message';
|
|
2
|
+
import { Component, Input, OnInit, ElementRef } from '@angular/core';
|
|
3
|
+
import { ModalController } from '@ionic/angular';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-json-message',
|
|
7
|
+
templateUrl: './json-message.page.html',
|
|
8
|
+
styleUrls: ['./json-message.page.scss'],
|
|
9
|
+
})
|
|
10
|
+
export class JsonMessagePage implements OnInit {
|
|
11
|
+
|
|
12
|
+
@Input() message: MessageModel
|
|
13
|
+
@Input() translationsMap: Map<string, string>;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
public viewCtrl: ModalController,
|
|
18
|
+
public el: ElementRef
|
|
19
|
+
) { }
|
|
20
|
+
|
|
21
|
+
ngOnInit() {
|
|
22
|
+
var str = JSON.stringify(this.message, undefined, 4);
|
|
23
|
+
this.el.nativeElement.querySelector('#json').innerHTML = this.syntaxHighlight(str)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
closeModal(){
|
|
27
|
+
this.viewCtrl.dismiss()
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
syntaxHighlight(json) {
|
|
32
|
+
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
33
|
+
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
|
|
34
|
+
var cls = 'number';
|
|
35
|
+
if (/^"/.test(match)) {
|
|
36
|
+
if (/:$/.test(match)) {
|
|
37
|
+
cls = 'key';
|
|
38
|
+
} else {
|
|
39
|
+
cls = 'string';
|
|
40
|
+
}
|
|
41
|
+
} else if (/true|false/.test(match)) {
|
|
42
|
+
cls = 'boolean';
|
|
43
|
+
} else if (/null/.test(match)) {
|
|
44
|
+
cls = 'null';
|
|
45
|
+
}
|
|
46
|
+
return '<span class="' + cls + '">' + match + '</span>';
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
@@ -57,7 +57,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
|
57
57
|
NgxLinkifyjsModule,
|
|
58
58
|
],
|
|
59
59
|
// entryComponents: [MessageTextAreaComponent],
|
|
60
|
-
entryComponents: [],
|
|
60
|
+
entryComponents: [ BubbleInfoPopoverComponent],
|
|
61
61
|
declarations: [
|
|
62
62
|
ConversationDetailPage,
|
|
63
63
|
HeaderConversationDetailComponent,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OptionsComponent } from './../chatlib/conversation-detail/message/options/options.component';
|
|
1
2
|
import { HeaderConversationsListUnassigned } from './../components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component';
|
|
2
3
|
import { NavbarComponent } from './../components/navbar/navbar.component';
|
|
3
4
|
import { FormsModule } from '@angular/forms';
|
|
@@ -80,6 +81,7 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
80
81
|
InfoMessageComponent,
|
|
81
82
|
ReturnReceiptComponent,
|
|
82
83
|
TextComponent,
|
|
84
|
+
OptionsComponent,
|
|
83
85
|
HtmlComponent,
|
|
84
86
|
InfoContentComponent,
|
|
85
87
|
InfoSupportGroupComponent,
|
|
@@ -120,6 +122,7 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
120
122
|
InfoMessageComponent,
|
|
121
123
|
ReturnReceiptComponent,
|
|
122
124
|
TextComponent,
|
|
125
|
+
OptionsComponent,
|
|
123
126
|
InfoContentComponent,
|
|
124
127
|
InfoSupportGroupComponent,
|
|
125
128
|
InfoDirectComponent,
|
package/src/assets/i18n/ar.json
CHANGED
package/src/assets/i18n/az.json
CHANGED
package/src/assets/i18n/de.json
CHANGED
package/src/assets/i18n/en.json
CHANGED
package/src/assets/i18n/es.json
CHANGED
package/src/assets/i18n/fr.json
CHANGED
package/src/assets/i18n/it.json
CHANGED
package/src/assets/i18n/kk.json
CHANGED
package/src/assets/i18n/pt.json
CHANGED
package/src/assets/i18n/ru.json
CHANGED
package/src/assets/i18n/sr.json
CHANGED
package/src/assets/i18n/sv.json
CHANGED
package/src/assets/i18n/tr.json
CHANGED
package/src/assets/i18n/uk.json
CHANGED
package/src/assets/i18n/uz.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Capa_1" data-name="Capa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44.93 34.1"><path d="M15.34,25.33V18.51A1.74,1.74,0,0,1,17.1,16.8a1.71,1.71,0,1,0,0-3.41,5.21,5.21,0,0,0-5.28,5.12v6.82A3.47,3.47,0,0,1,8.3,28.74a1.71,1.71,0,1,0,0,3.41,3.47,3.47,0,0,1,3.52,3.41v6.82a5.2,5.2,0,0,0,5.28,5.11,1.71,1.71,0,1,0,0-3.41,1.73,1.73,0,0,1-1.76-1.7V35.56a6.69,6.69,0,0,0-2.43-5.12A6.68,6.68,0,0,0,15.34,25.33Z" transform="translate(-6.54 -13.39)"/><ellipse cx="22.89" cy="11.08" rx="2.64" ry="2.56"/><path d="M29.43,33.85a1.74,1.74,0,0,0-1.76,1.71v5.11a1.76,1.76,0,0,0,3.52,0V35.56A1.74,1.74,0,0,0,29.43,33.85Z" transform="translate(-6.54 -13.39)"/><path d="M45.09,30.44a6.69,6.69,0,0,0-2.43,5.12v6.82a1.73,1.73,0,0,1-1.76,1.7,1.71,1.71,0,1,0,0,3.41,5.2,5.2,0,0,0,5.28-5.11V35.56a3.47,3.47,0,0,1,3.52-3.41,1.71,1.71,0,1,0,0-3.41,3.47,3.47,0,0,1-3.52-3.41V18.51a5.21,5.21,0,0,0-5.28-5.12,1.71,1.71,0,1,0,0,3.41,1.74,1.74,0,0,1,1.76,1.71v6.82A6.68,6.68,0,0,0,45.09,30.44Z" transform="translate(-6.54 -13.39)"/></svg>
|
package/src/global.scss
CHANGED
|
@@ -748,6 +748,17 @@ ul.dropdown-menu > li > a {
|
|
|
748
748
|
//MODALS
|
|
749
749
|
.modal-wrapper{
|
|
750
750
|
border-radius: 16px !important;
|
|
751
|
+
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.json-modal-class .modal-wrapper{
|
|
755
|
+
--height: 90%;
|
|
756
|
+
--width: 70%;
|
|
757
|
+
span.key{ color: red; }
|
|
758
|
+
span.number { color:#6eb4bc; }
|
|
759
|
+
span.boolean { color:#a693e0; }
|
|
760
|
+
span.null { color:#e09393; }
|
|
761
|
+
span.key { color: #a9d18f; }
|
|
751
762
|
}
|
|
752
763
|
|
|
753
764
|
|
|
@@ -760,3 +771,10 @@ ul.dropdown-menu > li > a {
|
|
|
760
771
|
}
|
|
761
772
|
}
|
|
762
773
|
|
|
774
|
+
|
|
775
|
+
//POPOVER
|
|
776
|
+
.info-popover{
|
|
777
|
+
.popover-content{
|
|
778
|
+
width: 250px;
|
|
779
|
+
}
|
|
780
|
+
}
|