@chat21/chat21-web-widget 5.1.0-rc9 → 5.1.1-rc1
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 +110 -8
- package/angular.json +2 -2
- package/deploy_beta.sh +10 -0
- package/deploy_prod.sh +9 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +11 -102
- package/src/app/app.component.ts +60 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.html +4 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +70 -7
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +106 -65
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +3 -2
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +7 -15
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +1 -5
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +48 -33
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +13 -8
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +17 -18
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +11 -15
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +54 -17
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +1 -2
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts +7 -5
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.scss +0 -3
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +1 -3
- package/src/app/component/form/form-builder/form-builder.component.scss +0 -1
- package/src/app/component/form/inputs/form-text/form-text.component.scss +0 -1
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +0 -1
- package/src/app/component/form/prechat-form/prechat-form.component.scss +1 -3
- package/src/app/component/home/home.component.html +41 -0
- package/src/app/component/home/home.component.scss +34 -8
- package/src/app/component/home/home.component.ts +17 -0
- package/src/app/component/home-conversations/home-conversations.component.scss +0 -3
- package/src/app/component/last-message/last-message.component.html +0 -2
- package/src/app/component/last-message/last-message.component.scss +0 -2
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -5
- package/src/app/component/list-conversations/list-conversations.component.scss +0 -2
- package/src/app/component/menu-options/menu-options.component.scss +0 -2
- package/src/app/component/message/audio/audio.component.html +1 -1
- package/src/app/component/message/audio/audio.component.scss +1 -0
- package/src/app/component/message/audio/audio.component.ts +0 -1
- package/src/app/component/message/avatar/avatar.component.scss +4 -4
- package/src/app/component/message/bubble-message/bubble-message.component.html +1 -4
- package/src/app/component/message/bubble-message/bubble-message.component.scss +0 -1
- package/src/app/component/message/bubble-message/bubble-message.component.ts +0 -2
- package/src/app/component/message/buttons/action-button/action-button.component.scss +6 -6
- package/src/app/component/message/buttons/link-button/link-button.component.scss +5 -5
- package/src/app/component/message/buttons/text-button/text-button.component.scss +5 -6
- package/src/app/component/message/carousel/carousel.component.html +2 -1
- package/src/app/component/message/carousel/carousel.component.scss +5 -6
- package/src/app/component/message/frame/frame.component.scss +0 -2
- package/src/app/component/message/html/html.component.scss +1 -3
- package/src/app/component/message/image/image.component.scss +0 -2
- package/src/app/component/message/info-message/info-message.component.scss +0 -2
- package/src/app/component/message/like-unlike/like-unlike.component.scss +0 -2
- package/src/app/component/message/text/text.component.html +4 -4
- package/src/app/component/message/text/text.component.scss +2 -4
- package/src/app/component/message/text/text.component.ts +0 -2
- package/src/app/component/message-attachment/message-attachment.component.scss +2 -1
- package/src/app/component/selection-department/selection-department.component.scss +1 -5
- package/src/app/component/star-rating-widget/star-rating-widget.component.scss +0 -7
- package/src/app/pipe/marked.pipe.ts +18 -7
- package/src/app/providers/global-settings.service.ts +108 -9
- package/src/app/sass/_variables.scss +15 -2
- package/src/app/utils/constants.ts +2 -1
- package/src/app/utils/globals.ts +101 -101
- package/src/app/utils/utils.ts +0 -85
- package/src/assets/i18n/en.json +5 -4
- package/src/assets/i18n/es.json +3 -2
- package/src/assets/i18n/fr.json +3 -2
- package/src/assets/i18n/it.json +3 -2
- package/src/assets/twp/chatbot-panel.html +39 -0
- package/src/assets/twp/index-dev.html +177 -121
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +9 -1
- package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +14 -0
- package/src/chat21-core/utils/constants.ts +2 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +0 -1
- package/src/chat21-core/utils/utils-message.ts +12 -1
- package/src/chat21-core/utils/utils.ts +85 -0
- package/src/iframe-style.css +54 -35
|
@@ -221,6 +221,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
221
221
|
'CLOSE',
|
|
222
222
|
'MAXIMIZE',
|
|
223
223
|
'MINIMIZE',
|
|
224
|
+
'CENTER',
|
|
224
225
|
'CLOSE_CHAT',
|
|
225
226
|
'RESTART',
|
|
226
227
|
'LOGOUT',
|
|
@@ -363,14 +364,21 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
363
364
|
// this.logger.debug('[CONV-COMP] ------ 5: updateConversationbage ------ ');
|
|
364
365
|
// this.updateConversationBadge();
|
|
365
366
|
|
|
366
|
-
|
|
367
|
-
this.getConversationDetail((isConversationArchived) => {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}) //check if conv is archived or not
|
|
367
|
+
|
|
368
|
+
// this.getConversationDetail((isConversationArchived) => {
|
|
369
|
+
// this.logger.debug('[CONV-COMP] ------ 6: updateConversationbage ------ ');
|
|
370
|
+
// this.updateConversationBadge();
|
|
371
|
+
// return;
|
|
372
|
+
// }) //check if conv is archived or not
|
|
372
373
|
// this.checkListMessages();
|
|
373
374
|
|
|
375
|
+
this.logger.debug('[CONV-COMP] ------ 5: getConversationDetail ------ ', this.conversationId);
|
|
376
|
+
await this.getConversationDetail();
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
this.logger.debug('[CONV-COMP] ------ 6: updateConversationBadge ------ ');
|
|
380
|
+
this.updateConversationBadge();
|
|
381
|
+
|
|
374
382
|
if(this.g.customAttributes){
|
|
375
383
|
this.updateUserInfo(this.g.customAttributes)
|
|
376
384
|
}
|
|
@@ -384,7 +392,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
384
392
|
* @param callback
|
|
385
393
|
* @returns isConversationArchived (status conversation archived: boolean)
|
|
386
394
|
*/
|
|
387
|
-
|
|
395
|
+
getConversationDetail_old(callback:(isConversationArchived: boolean)=>void){
|
|
388
396
|
// if(!this.isConversationArchived){
|
|
389
397
|
//get conversation from 'conversations' firebase node
|
|
390
398
|
this.logger.debug('[CONV-COMP] getConversationDetail: isConversationArchived???', this.isConversationArchived, this.conversationWith)
|
|
@@ -414,39 +422,60 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
414
422
|
})
|
|
415
423
|
}
|
|
416
424
|
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* @description get detail of conversation by uid and then return callback with conversation status
|
|
429
|
+
* @param callback
|
|
430
|
+
* @returns isConversationArchived (status conversation archived: boolean)
|
|
431
|
+
*/
|
|
432
|
+
async getConversationDetail(): Promise<boolean | null> {
|
|
433
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: isConversationArchived???', this.isConversationArchived, this.conversationWith);
|
|
434
|
+
|
|
435
|
+
const conv = await new Promise<any>((resolve) => {
|
|
436
|
+
this.conversationsHandlerService.getConversationDetail(this.conversationWith, resolve);
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
if (conv) {
|
|
440
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: conversationsHandlerService ', this.conversationWith, conv, this.isConversationArchived);
|
|
441
|
+
this.conversation = conv;
|
|
442
|
+
this.isConversationArchived = false;
|
|
443
|
+
return this.isConversationArchived;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: conv not exist --> search in archived list', this.isConversationArchived, this.conversationWith);
|
|
447
|
+
|
|
448
|
+
const archivedConv = await new Promise<any>((resolve) => {
|
|
449
|
+
this.archivedConversationsHandlerService.getConversationDetail(this.conversationWith, resolve);
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
if (archivedConv) {
|
|
453
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: archivedConversationsHandlerService', this.conversationWith, archivedConv, this.isConversationArchived);
|
|
454
|
+
this.conversation = archivedConv;
|
|
455
|
+
this.isConversationArchived = true;
|
|
456
|
+
return this.isConversationArchived;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
//FALLBACK TO TILEDESK
|
|
460
|
+
const requests_list = await this.tiledeskRequestService.getMyRequests().catch(err => {
|
|
461
|
+
this.logger.error('[CONV-COMP] getConversationDetail: error getting request from Tiledesk', err);
|
|
462
|
+
this.isConversationArchived=true
|
|
463
|
+
return { requests: [] }
|
|
464
|
+
});
|
|
465
|
+
if (requests_list && requests_list.requests.length > 0) {
|
|
466
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: request exist on Tiledesk', requests_list);
|
|
467
|
+
let conversation = requests_list.requests.find((request)=> request.request_id === this.conversationId)
|
|
468
|
+
if(conversation){
|
|
469
|
+
this.isConversationArchived = false
|
|
470
|
+
return this.isConversationArchived
|
|
471
|
+
}
|
|
472
|
+
this.logger.debug('[CONV-COMP] getConversationDetail: request NOT EXIST on Tiledesk', requests_list);
|
|
473
|
+
this.isConversationArchived = true
|
|
474
|
+
return this.isConversationArchived
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
this.isConversationArchived = true;
|
|
478
|
+
return null;
|
|
450
479
|
}
|
|
451
480
|
|
|
452
481
|
/**
|
|
@@ -744,6 +773,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
744
773
|
subscribtion = this.conversationHandlerService.messageAdded.pipe(takeUntil(this.unsubscribe$)).subscribe((msg: MessageModel) => {
|
|
745
774
|
this.logger.debug('[CONV-COMP] ***** DETAIL messageAdded *****', msg);
|
|
746
775
|
if (msg) {
|
|
776
|
+
|
|
747
777
|
that.newMessageAdded(msg);
|
|
748
778
|
this.checkMessagesLegntForTranscriptDownloadMenuOption();
|
|
749
779
|
this.resetTimeout();
|
|
@@ -988,6 +1018,12 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
988
1018
|
/** CALLED BY: conv-header component */
|
|
989
1019
|
onCloseWidgetFN() {
|
|
990
1020
|
//this.g.setParameter('activeConversation', null, false);
|
|
1021
|
+
/** remove Min/Max/fullscreen css classes */
|
|
1022
|
+
var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
|
|
1023
|
+
tiledeskDiv.classList.remove('max-size')
|
|
1024
|
+
tiledeskDiv.classList.remove('min-size')
|
|
1025
|
+
tiledeskDiv.classList.remove('top-size')
|
|
1026
|
+
|
|
991
1027
|
this.onCloseWidget.emit();
|
|
992
1028
|
}
|
|
993
1029
|
/** CALLED BY: conv-header component */
|
|
@@ -1037,15 +1073,30 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1037
1073
|
// this.hideTextAreaContent = true
|
|
1038
1074
|
}
|
|
1039
1075
|
/** CALLED BY: conv-header component */
|
|
1040
|
-
|
|
1041
|
-
var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
|
|
1076
|
+
onWidgetSizeChange(mode: 'min' | 'max' | 'top'){
|
|
1077
|
+
var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv');
|
|
1078
|
+
this.g.size = mode
|
|
1079
|
+
const parent = tiledeskDiv.parentElement as HTMLElement | null;
|
|
1042
1080
|
if(mode==='max'){
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1081
|
+
tiledeskDiv.classList.add('max-size')
|
|
1082
|
+
tiledeskDiv.classList.remove('min-size')
|
|
1083
|
+
tiledeskDiv.classList.remove('top-size')
|
|
1084
|
+
if(parent) parent.classList.remove('overlay--popup');
|
|
1085
|
+
} else if(mode==='min'){
|
|
1086
|
+
tiledeskDiv.classList.add('min-size')
|
|
1087
|
+
tiledeskDiv.classList.remove('max-size')
|
|
1088
|
+
tiledeskDiv.classList.remove('top-size')
|
|
1089
|
+
if(parent) parent.classList.remove('overlay--popup');
|
|
1090
|
+
} else if(mode=== 'top'){
|
|
1091
|
+
tiledeskDiv.classList.add('top-size')
|
|
1092
|
+
tiledeskDiv.classList.remove('max-size')
|
|
1093
|
+
tiledeskDiv.classList.remove('min-size')
|
|
1094
|
+
if(parent) parent.classList.add('overlay--popup');
|
|
1046
1095
|
}
|
|
1047
1096
|
this.isMenuShow = false;
|
|
1048
1097
|
}
|
|
1098
|
+
|
|
1099
|
+
|
|
1049
1100
|
/** CALLED BY: conv-header component */
|
|
1050
1101
|
onSignOutFN(event){
|
|
1051
1102
|
this.onSignOut.emit(true)
|
|
@@ -1079,10 +1130,13 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1079
1130
|
this.onRestartChat()
|
|
1080
1131
|
break;
|
|
1081
1132
|
case HEADER_MENU_OPTION.MAXIMIZE:
|
|
1082
|
-
this.
|
|
1133
|
+
this.onWidgetSizeChange('max')
|
|
1083
1134
|
break;
|
|
1084
1135
|
case HEADER_MENU_OPTION.MINIMIZE:
|
|
1085
|
-
this.
|
|
1136
|
+
this.onWidgetSizeChange('min')
|
|
1137
|
+
break;
|
|
1138
|
+
case HEADER_MENU_OPTION.TOP:
|
|
1139
|
+
this.onWidgetSizeChange('top')
|
|
1086
1140
|
break;
|
|
1087
1141
|
}
|
|
1088
1142
|
}
|
|
@@ -1210,19 +1264,6 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1210
1264
|
this.logger.debug('[CONV-COMP] floating onNewConversationButtonClicked')
|
|
1211
1265
|
this.onNewConversationButtonClicked.emit()
|
|
1212
1266
|
}
|
|
1213
|
-
/** CALLED BY: conv-footer floating-button component */
|
|
1214
|
-
onBackButton(event: boolean){
|
|
1215
|
-
this.hideTextAreaContent = event;
|
|
1216
|
-
try{
|
|
1217
|
-
const tiledeskDiv = document.getElementById('chat21-footer')
|
|
1218
|
-
tiledeskDiv.classList.remove('maximize-width')
|
|
1219
|
-
// tiledeskDiv.style.width = '376px'
|
|
1220
|
-
// tiledeskDiv.style.maxHeight = '620px'
|
|
1221
|
-
}catch(e){
|
|
1222
|
-
this.logger.error('[CONV-COMP] onBackButton > Error :' + e);
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
}
|
|
1226
1267
|
// =========== END: event emitter function ====== //
|
|
1227
1268
|
|
|
1228
1269
|
|
|
@@ -1272,7 +1313,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1272
1313
|
private onIncreaseWith(){
|
|
1273
1314
|
try{
|
|
1274
1315
|
const tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
|
|
1275
|
-
tiledeskDiv.classList.add('
|
|
1316
|
+
tiledeskDiv.classList.add('max-size')
|
|
1276
1317
|
const chat21conversations = document.getElementById('chat21-conversations')
|
|
1277
1318
|
chat21conversations.style.borderRadius = '16px'
|
|
1278
1319
|
// tiledeskDiv.style.width = '696px'
|
|
@@ -1285,8 +1326,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1285
1326
|
private restoreDefaultWidgetSize(){
|
|
1286
1327
|
try{
|
|
1287
1328
|
const tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
|
|
1288
|
-
tiledeskDiv.classList.remove('
|
|
1289
|
-
tiledeskDiv.classList.remove('
|
|
1329
|
+
tiledeskDiv.classList.remove('max-size')
|
|
1330
|
+
tiledeskDiv.classList.remove('min-size')
|
|
1290
1331
|
// tiledeskDiv.style.width = '376px'
|
|
1291
1332
|
// tiledeskDiv.style.maxHeight = '620px'
|
|
1292
1333
|
}catch(e){
|
|
@@ -1373,9 +1414,9 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1373
1414
|
this.logger.log('[CONV-COMP] ----> FILE - (dragleave) drag ev ', event)
|
|
1374
1415
|
if (event.dataTransfer && event.dataTransfer.files) {
|
|
1375
1416
|
const files = event.dataTransfer.files;
|
|
1376
|
-
const canUploadFile = checkAcceptedFile(files[0].type, this.
|
|
1417
|
+
const canUploadFile = checkAcceptedFile(files[0].type, this.g.fileUploadAccept)
|
|
1377
1418
|
if(!canUploadFile){
|
|
1378
|
-
this.logger.error('[IMAGE-UPLOAD] detectFiles: can not upload current file type--> NOT ALLOWED', this.
|
|
1419
|
+
this.logger.error('[IMAGE-UPLOAD] detectFiles: can not upload current file type--> NOT ALLOWED', this.g.fileUploadAccept)
|
|
1379
1420
|
return;
|
|
1380
1421
|
}
|
|
1381
1422
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<div class="audio-recorder">
|
|
2
2
|
<button *ngIf="audioUrl" (click)="deleteRecording()">
|
|
3
3
|
<span class="v-align-center">
|
|
4
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px">
|
|
5
|
+
<path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm80-160h80v-360h-80v360Zm160 0h80v-360h-80v360Z"/>
|
|
6
|
+
</svg>
|
|
5
7
|
<!-- <i class="material-icons">delete_outline</i> -->
|
|
6
8
|
</span>
|
|
7
9
|
</button>
|
|
@@ -9,7 +11,6 @@
|
|
|
9
11
|
<chat-audio class="test" *ngIf="audioBlob && audioUrl"
|
|
10
12
|
[audioBlob] = "audioBlob"
|
|
11
13
|
[color]="'var(--chat-footer-color)'"
|
|
12
|
-
[fontSize]="stylesMap.get('fontSize')"
|
|
13
14
|
[stylesMap]="stylesMap">
|
|
14
15
|
</chat-audio>
|
|
15
16
|
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: 'Material Icons';
|
|
4
|
-
src: url('https://fonts.googleapis.com/icon?family=Material+Icons');
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.material-icons.mic_none::before {
|
|
8
|
-
content: 'mic_none';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
.audio-recorder {
|
|
12
2
|
text-align: center;
|
|
13
3
|
margin: 0px;
|
|
14
4
|
display: inline-flex;
|
|
15
5
|
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
6
|
+
// justify-content: center;
|
|
7
|
+
justify-content: space-between;
|
|
17
8
|
height: 100%;
|
|
18
9
|
width: 100%;
|
|
19
10
|
float: left;
|
|
@@ -22,8 +13,8 @@
|
|
|
22
13
|
|
|
23
14
|
::ng-deep chat-audio.test {
|
|
24
15
|
display: flex;
|
|
25
|
-
width:
|
|
26
|
-
margin: 8px 0;
|
|
16
|
+
width: 90%;
|
|
17
|
+
// margin: 8px 0;
|
|
27
18
|
pointer-events: auto;
|
|
28
19
|
border-radius: var(--chat-footer-border-radius);
|
|
29
20
|
background-color: var(--chat-footer-background-color);
|
|
@@ -52,10 +43,9 @@ button {
|
|
|
52
43
|
background-color: transparent;
|
|
53
44
|
color: var(--icon-fill-color);
|
|
54
45
|
fill: var(--icon-fill-color);
|
|
55
|
-
height: var(--chat-footer-height);
|
|
46
|
+
// height: var(--chat-footer-height);
|
|
56
47
|
|
|
57
48
|
display: flex;
|
|
58
|
-
align-self: flex-end;
|
|
59
49
|
// margin: 0 8px;
|
|
60
50
|
width: 34px;
|
|
61
51
|
text-align: center;
|
|
@@ -74,6 +64,8 @@ button {
|
|
|
74
64
|
display: inline-flex;
|
|
75
65
|
justify-content: center;
|
|
76
66
|
align-items: center;
|
|
67
|
+
padding: 0px;
|
|
68
|
+
z-index: 0;
|
|
77
69
|
}
|
|
78
70
|
|
|
79
71
|
.mic-button svg {
|
|
@@ -34,8 +34,6 @@
|
|
|
34
34
|
[ngClass]="{'button-in-msg' : message?.metadata && message?.metadata?.button}"
|
|
35
35
|
[message]="message"
|
|
36
36
|
[fontColor]="stylesMap.get('bubbleSentTextColor')"
|
|
37
|
-
[fontSize]="stylesMap.get('fontSize')"
|
|
38
|
-
[fontFamily]="stylesMap.get('fontFamily')"
|
|
39
37
|
[stylesMap]="stylesMap"
|
|
40
38
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
41
39
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
@@ -65,13 +63,11 @@
|
|
|
65
63
|
[ngClass]="{'slide-in-left': false}"
|
|
66
64
|
[class.no-background]="(isImage(message) || isFrame(message) || isCarousel(message)) && ((message?.text && message?.text.trim() === '') || !message?.text)"
|
|
67
65
|
[class.emoticon]="isEmojii(message?.text)"
|
|
68
|
-
[style.margin-left]="isSameSender(message?.sender, i)? '
|
|
66
|
+
[style.margin-left]="isSameSender(message?.sender, i)? 'calc(var(--avatar-width) + 10px)': null"
|
|
69
67
|
[ngStyle]="{'background': stylesMap.get('bubbleReceivedBackground'), 'color': stylesMap.get('bubbleReceivedTextColor')}"
|
|
70
68
|
[isSameSender]="isSameSender(message?.sender, i)"
|
|
71
69
|
[message]="message"
|
|
72
70
|
[fontColor]="stylesMap.get('bubbleReceivedTextColor')"
|
|
73
|
-
[fontSize]="stylesMap.get('fontSize')"
|
|
74
|
-
[fontFamily]="stylesMap.get('fontFamily')"
|
|
75
71
|
[stylesMap]="stylesMap"
|
|
76
72
|
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
77
73
|
(onAfterMessageRender)="onAfterMessageRenderFN($event)"
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @import 'src/app/sass/variables';
|
|
2
|
-
|
|
3
1
|
|
|
4
2
|
#scroll-me {
|
|
5
3
|
scroll-behavior: smooth;
|
|
@@ -36,26 +34,6 @@
|
|
|
36
34
|
// box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.4);
|
|
37
35
|
position: fixed;
|
|
38
36
|
.c21-body-container {
|
|
39
|
-
.c21-body-header {
|
|
40
|
-
.chat21-header-modal-select {
|
|
41
|
-
font-family: 'Google Sans', sans-serif !important;
|
|
42
|
-
padding: 0px;
|
|
43
|
-
background-color: #b9b9b921;
|
|
44
|
-
margin: 8px;
|
|
45
|
-
line-height: 1.2em;
|
|
46
|
-
color: #616161;
|
|
47
|
-
font-size: 15px;
|
|
48
|
-
text-align: center;
|
|
49
|
-
word-wrap: break-word;
|
|
50
|
-
border-radius: 8px;
|
|
51
|
-
}
|
|
52
|
-
.chat21-header-modal-select-more-of-one-dept {
|
|
53
|
-
position: relative;
|
|
54
|
-
height: auto;
|
|
55
|
-
padding: 10px;
|
|
56
|
-
margin: 30px 0 0 0;
|
|
57
|
-
}
|
|
58
|
-
} // end .chat21-sheet-header
|
|
59
37
|
|
|
60
38
|
.c21-body-content {
|
|
61
39
|
/* no conflict
|
|
@@ -133,7 +111,8 @@
|
|
|
133
111
|
.attachment_container {
|
|
134
112
|
display: flex;
|
|
135
113
|
align-content: center;
|
|
136
|
-
justify-content: flex-end;
|
|
114
|
+
// justify-content: flex-end;
|
|
115
|
+
justify-content: flex-start;
|
|
137
116
|
}
|
|
138
117
|
.carousel_container{
|
|
139
118
|
margin: 0px 20px;
|
|
@@ -284,21 +263,57 @@
|
|
|
284
263
|
}// end c21-body-container
|
|
285
264
|
}// end c21-body
|
|
286
265
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
266
|
+
/* LOADING */
|
|
267
|
+
/*http://tobiasahlin.com/spinkit/*/
|
|
268
|
+
#chat21-spinner {
|
|
269
|
+
display: none;
|
|
270
|
+
width: 70px;
|
|
271
|
+
min-height: 20px;
|
|
272
|
+
margin: 20px auto 0;
|
|
273
|
+
text-align: center;
|
|
274
|
+
}
|
|
275
|
+
#chat21-spinner.active {
|
|
276
|
+
display: block;
|
|
277
|
+
}
|
|
278
|
+
#chat21-spinner > div {
|
|
279
|
+
width: 12px;
|
|
280
|
+
height: 12px;
|
|
281
|
+
background-color: var(--blue);
|
|
282
|
+
border-radius: 100%;
|
|
283
|
+
display: inline-block;
|
|
284
|
+
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
285
|
+
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
286
|
+
}
|
|
287
|
+
#chat21-spinner .chat21-bounce1 {
|
|
288
|
+
-webkit-animation-delay: -0.32s;
|
|
289
|
+
animation-delay: -0.32s;
|
|
290
|
+
}
|
|
291
|
+
#chat21-spinner .chat21-bounce2 {
|
|
292
|
+
-webkit-animation-delay: -0.16s;
|
|
293
|
+
animation-delay: -0.16s;
|
|
294
|
+
}
|
|
295
|
+
#chat21-spinner span {
|
|
296
|
+
display: block;
|
|
297
|
+
margin: 0.5em 0 0 0;
|
|
298
|
+
color: var(--black);
|
|
299
|
+
/* text-transform: uppercase; */
|
|
300
|
+
-webkit-animation: pulse 2000ms linear infinite;
|
|
301
|
+
-moz-animation: pulse 2000ms linear infinite;
|
|
302
|
+
animation: pulse 2000ms linear infinite;
|
|
303
|
+
text-align: center;
|
|
304
|
+
}
|
|
291
305
|
@-webkit-keyframes sk-bouncedelay {
|
|
292
306
|
0%, 80%, 100% { -webkit-transform: scale(0) }
|
|
293
307
|
40% { -webkit-transform: scale(1.0) }
|
|
294
308
|
}
|
|
295
|
-
|
|
296
309
|
@keyframes sk-bouncedelay {
|
|
297
310
|
0%, 80%, 100% {
|
|
298
|
-
|
|
299
|
-
|
|
311
|
+
-webkit-transform: scale(0);
|
|
312
|
+
transform: scale(0);
|
|
300
313
|
} 40% {
|
|
301
|
-
|
|
302
|
-
|
|
314
|
+
-webkit-transform: scale(1.0);
|
|
315
|
+
transform: scale(1.0);
|
|
303
316
|
}
|
|
304
|
-
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// ============= END CSS c21-body ================= //
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
<!-- ICON ATTACHMENT -->
|
|
28
28
|
<label *ngIf="showAttachmentFooterButton" tabindex="1502" aria-label="allegati" for="chat21-file" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-start-upload-doc">
|
|
29
29
|
<span class="v-align-center">
|
|
30
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" >
|
|
31
|
-
<path d="
|
|
30
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24" viewBox="0 0 24 24" fill="currentColor">
|
|
31
|
+
<path d="M9.9,22.7c0,0-.1,0-.2,0-1.9.3-3.7-.2-5.2-1.4-3-2.3-3.6-6.4-1.4-9.5L9.5,2.5c.4-.5,1.1-.6,1.6-.3.5.4.6,1.1.3,1.6l-6.5,9.4c-1.4,2-1,4.8.9,6.3,1,.8,2.2,1.1,3.5.9,1.3-.2,2.4-.9,3.1-1.9l6-8.7c.9-1.2.6-3-.6-3.9-.6-.5-1.4-.6-2.1-.5-.8.1-1.4.5-1.9,1.1l-5.8,8.2c-.3.5-.2,1.1.2,1.5.2.2.5.3.8.2.3,0,.6-.2.7-.4l4.7-6.2c.4-.5,1.1-.6,1.6-.2.5.4.6,1.1.2,1.6l-4.7,6.2c-.5.7-1.4,1.2-2.3,1.3-.9.1-1.8-.2-2.5-.7-1.4-1.1-1.6-3.1-.6-4.6l5.8-8.2c.8-1.1,2-1.9,3.4-2.1,1.4-.2,2.7.1,3.8,1,2.2,1.7,2.7,4.8,1.1,7.1l-6,8.7c-1.1,1.5-2.6,2.5-4.4,2.8h0Z"/>
|
|
32
32
|
</svg>
|
|
33
33
|
</span>
|
|
34
34
|
<input
|
|
@@ -47,11 +47,16 @@
|
|
|
47
47
|
<!-- ICON EMOJII -->
|
|
48
48
|
<label *ngIf="showEmojiFooterButton" tabindex="1504" aria-label="emojii" for="chat21-emojii" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-emoticon-picker" (click)="onEmojiiPickerClicked()">
|
|
49
49
|
<span class="v-align-center">
|
|
50
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
|
51
|
-
<path
|
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="currentColor">
|
|
51
|
+
<path stroke-width=".4px" stroke="currentColor" d="M12,20.8c-5.1,0-9.3-4.2-9.3-9.3S6.9,2.2,12,2.2s9.3,4.2,9.3,9.3-4.2,9.3-9.3,9.3ZM12,3.6c-4.4,0-7.9,3.6-7.9,7.9s3.6,7.9,7.9,7.9,7.9-3.6,7.9-7.9-3.6-7.9-7.9-7.9Z"/>
|
|
52
|
+
<path stroke-width=".4px" stroke="currentColor" d="M12,17.2c-2.7,0-4.3-1.9-4.6-2.3-.2-.3-.2-.7.1-1s.7-.2,1,.1c.1.2,1.4,1.8,3.5,1.8s2.2,0,3.5-1.8c.2-.3.7-.4,1-.1s.4.7.1,1c-1.7,2.2-4.1,2.3-4.6,2.3Z"/>
|
|
53
|
+
<path d="M8.7,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
|
|
54
|
+
<path d="M15.5,10.9c-.9,0-1.6-.7-1.6-1.6s.7-1.6,1.6-1.6,1.6.7,1.6,1.6-.7,1.6-1.6,1.6Z"/>
|
|
55
|
+
|
|
56
|
+
<!-- <path d="M0,0H20.57V20.57H0V0Z" fill="none"/>
|
|
52
57
|
<circle cx="15.02" cy="9.86" r="1.29"/>
|
|
53
58
|
<circle cx="9.02" cy="9.86" r="1.29"/>
|
|
54
|
-
<path d="M12.02,15.43c-1.27,0-2.36-.69-2.96-1.71h-1.43c.69,1.76,2.39,3,4.39,3s3.7-1.24,4.39-3h-1.43c-.6,1.02-1.69,1.71-2.96,1.71Zm0-12C7.28,3.43,3.45,7.27,3.45,12s3.83,8.57,8.56,8.57,8.58-3.84,8.58-8.57S16.75,3.43,12.01,3.43Zm0,15.43c-3.79,0-6.86-3.07-6.86-6.86s3.07-6.86,6.86-6.86,6.86,3.07,6.86,6.86-3.07,6.86-6.86,6.86Z"/>
|
|
59
|
+
<path d="M12.02,15.43c-1.27,0-2.36-.69-2.96-1.71h-1.43c.69,1.76,2.39,3,4.39,3s3.7-1.24,4.39-3h-1.43c-.6,1.02-1.69,1.71-2.96,1.71Zm0-12C7.28,3.43,3.45,7.27,3.45,12s3.83,8.57,8.56,8.57,8.58-3.84,8.58-8.57S16.75,3.43,12.01,3.43Zm0,15.43c-3.79,0-6.86-3.07-6.86-6.86s3.07-6.86,6.86-6.86,6.86,3.07,6.86,6.86-3.07,6.86-6.86,6.86Z"/> -->
|
|
55
60
|
</svg>
|
|
56
61
|
</span>
|
|
57
62
|
</label>
|
|
@@ -85,8 +90,8 @@
|
|
|
85
90
|
<!-- ICON SEND -->
|
|
86
91
|
<div *ngIf="(textInputTextArea !== '' && !isStopRec) || !showAudioRecorderFooterButton" tabindex="-1" class="chat21-textarea-button" [class.disabled]="showAlertEmoji || showAlertUrl" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
|
|
87
92
|
<span class="v-align-center">
|
|
88
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
89
|
-
<path d="M1.8,
|
|
93
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve" fill="currentColor">
|
|
94
|
+
<path d="M1.8,20.6V3.4l20.2,8.6L1.8,20.6ZM3.9,17.3l12.6-5.4L3.9,6.6v3.7l6.4,1.6-6.4,1.6v3.8ZM3.9,17.3V6.6v10.7Z"/>
|
|
90
95
|
</svg>
|
|
91
96
|
</span>
|
|
92
97
|
</div>
|
|
@@ -107,7 +112,7 @@
|
|
|
107
112
|
<!-- EMOJII PICKER-->
|
|
108
113
|
<div [style.visibility]="isEmojiiPickerShow?'visible':'hidden'" class="emoji-container" id="emoji-mart-container" #emoji_mart_container>
|
|
109
114
|
<!-- <ng-container #emojii_container></ng-container> -->
|
|
110
|
-
|
|
115
|
+
<emoji-mart id="emoji-mart"
|
|
111
116
|
*ngIf="showEmojiPicker"
|
|
112
117
|
class="emoji-mart"
|
|
113
118
|
[showPreview]="emojiiOptions?.showPreview"
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @import 'src/app/sass/variables';
|
|
2
1
|
|
|
3
2
|
.textarea-container{
|
|
4
3
|
// padding: 8px 34px;
|
|
@@ -7,9 +6,8 @@
|
|
|
7
6
|
display: flex;
|
|
8
7
|
// width: 100%;
|
|
9
8
|
align-items: center;
|
|
10
|
-
gap: 8px;
|
|
11
9
|
justify-content: space-between;
|
|
12
|
-
|
|
10
|
+
gap: 8px;
|
|
13
11
|
|
|
14
12
|
//if attachment icon OR emoji icon is not in DOM -> increment textarea width
|
|
15
13
|
&:has(:not(#chat21-start-upload-doc), :not(#chat21-emoticon-picker)) .visible-text-area {
|
|
@@ -24,15 +22,15 @@
|
|
|
24
22
|
|
|
25
23
|
.icons-container{
|
|
26
24
|
display: flex;
|
|
27
|
-
align-self: flex-end;
|
|
25
|
+
// align-self: flex-end;
|
|
28
26
|
// margin-left: 8px;
|
|
29
27
|
// margin-right: 8px;
|
|
30
|
-
gap:
|
|
28
|
+
gap: 4px;
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
.visible-text-area {
|
|
34
32
|
width: 70%;
|
|
35
|
-
margin:
|
|
33
|
+
// margin: 12px 0px;
|
|
36
34
|
pointer-events: auto;
|
|
37
35
|
border-radius: var(--chat-footer-border-radius);
|
|
38
36
|
background-color: var(--chat-footer-background-color);
|
|
@@ -45,9 +43,10 @@
|
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
.chat21-textarea-button {
|
|
48
|
-
fill: var(--icon-fill-color);
|
|
46
|
+
// fill: var(--icon-fill-color);
|
|
47
|
+
color: var(--icon-fill-color);
|
|
49
48
|
pointer-events: auto;
|
|
50
|
-
height: var(--chat-footer-height);
|
|
49
|
+
// height: var(--chat-footer-height);
|
|
51
50
|
bottom: 22px;
|
|
52
51
|
opacity: 0.3;
|
|
53
52
|
cursor: initial;
|
|
@@ -207,7 +206,7 @@ textarea:active{
|
|
|
207
206
|
|
|
208
207
|
#chat21-button-send {
|
|
209
208
|
display: flex;
|
|
210
|
-
align-self: flex-end;
|
|
209
|
+
// align-self: flex-end;
|
|
211
210
|
// margin: 0 8px;
|
|
212
211
|
width: 34px;
|
|
213
212
|
text-align: center;
|
|
@@ -219,7 +218,7 @@ textarea:active{
|
|
|
219
218
|
width: 34px;
|
|
220
219
|
text-align: center;
|
|
221
220
|
justify-content: center;
|
|
222
|
-
height: var(--chat-footer-height);
|
|
221
|
+
// height: var(--chat-footer-height);
|
|
223
222
|
&.active{
|
|
224
223
|
width: 100%;
|
|
225
224
|
}
|
|
@@ -288,7 +287,7 @@ textarea:active{
|
|
|
288
287
|
|
|
289
288
|
#hiddenFooter{
|
|
290
289
|
position: absolute;
|
|
291
|
-
bottom:
|
|
290
|
+
bottom: 6px;
|
|
292
291
|
width: 100%;
|
|
293
292
|
height: var(--chat-footer-logo-height);
|
|
294
293
|
display: flex;
|
|
@@ -323,7 +322,7 @@ textarea:active{
|
|
|
323
322
|
font-weight: 500;
|
|
324
323
|
line-height: 22px;
|
|
325
324
|
|
|
326
|
-
font-family:
|
|
325
|
+
font-family: var(--font-family-powered-by);
|
|
327
326
|
letter-spacing: 0.24px;
|
|
328
327
|
-webkit-font-smoothing: antialiased;
|
|
329
328
|
padding: 4px 12px;
|
|
@@ -373,7 +372,7 @@ textarea:active{
|
|
|
373
372
|
font-size: 1.2em;
|
|
374
373
|
font-weight: 500;
|
|
375
374
|
line-height: 22px;
|
|
376
|
-
font-family:
|
|
375
|
+
font-family: var(--font-family);
|
|
377
376
|
letter-spacing: 0.24px;
|
|
378
377
|
-webkit-font-smoothing: antialiased;
|
|
379
378
|
padding: 4px 12px;
|
|
@@ -393,20 +392,20 @@ textarea:active{
|
|
|
393
392
|
|
|
394
393
|
|
|
395
394
|
.emoji-container {
|
|
396
|
-
height:
|
|
395
|
+
height: 319px;
|
|
397
396
|
position: absolute;
|
|
398
397
|
overflow: hidden;
|
|
399
|
-
width:
|
|
398
|
+
width: 338px;
|
|
400
399
|
bottom: 100%;
|
|
401
400
|
z-index: 10;
|
|
402
401
|
left: 10px;
|
|
403
|
-
box-shadow:
|
|
404
|
-
-webkit-box-shadow:
|
|
402
|
+
box-shadow: 0 -4px 14px -13px rgba(0, 0, 0 , 0.38);
|
|
403
|
+
-webkit-box-shadow: 0 -4px 14px -13px rgba(0, 0, 0 , 0.38);
|
|
405
404
|
}
|
|
406
405
|
.emoji-mart {
|
|
407
406
|
position: absolute;
|
|
408
407
|
// bottom: 40px;
|
|
409
408
|
// left: 10px;
|
|
410
409
|
border: none;
|
|
411
|
-
margin: -2px -2px 0px;
|
|
410
|
+
// margin: -2px -2px 0px;
|
|
412
411
|
}
|