@chat21/chat21-web-widget 5.0.53-rc.4 → 5.0.53
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 +3 -14
- package/package.json +1 -1
- package/src/app/app.component.ts +8 -18
- package/src/app/app.module.ts +8 -10
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +1 -15
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +2 -2
- package/src/app/component/last-message/last-message.component.html +72 -83
- package/src/app/component/last-message/last-message.component.scss +42 -98
- package/src/app/component/last-message/last-message.component.spec.ts +2 -2
- package/src/app/component/last-message/last-message.component.ts +25 -49
- package/src/app/component/list-all-conversations/list-all-conversations.component.ts +1 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +5 -0
- package/src/app/component/message/html/html.component.spec.ts +1 -1
- package/src/app/component/message/info-message/info-message.component.spec.ts +1 -1
- package/src/app/component/message/text/text.component.scss +0 -4
- package/src/app/component/message/text/text.component.spec.ts +2 -2
- package/src/app/component/message-attachment/message-attachment.component.html +1 -1
- package/src/app/component/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/{pipe → directives}/html-entites-encode.pipe.spec.ts +0 -0
- package/src/app/{pipe → directives}/html-entities-encode.pipe.ts +0 -0
- package/src/app/{pipe → directives}/marked.pipe.spec.ts +0 -0
- package/src/app/{pipe → directives}/marked.pipe.ts +0 -0
- package/src/app/{pipe → directives}/safe-html.pipe.spec.ts +0 -0
- package/src/app/{pipe → directives}/safe-html.pipe.ts +0 -0
- package/src/app/providers/global-settings.service.ts +12 -11
- package/src/app/utils/globals.ts +0 -3
- package/src/app/utils/rules.ts +5 -88
- package/src/assets/js/chat21client.js +4 -27
- package/src/assets/twp/index-dev.html +1 -1
- package/src/assets/twp/index.html +1 -1
- package/src/chat21-core/models/conversation.ts +2 -2
- package/src/chat21-core/models/upload.ts +0 -1
- package/src/chat21-core/providers/abstract/presence.service.ts +0 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +106 -78
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +0 -4
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +29 -2
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +156 -13
- package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +4 -21
- package/src/chat21-core/utils/utils-message.ts +0 -36
- package/src/iframe-style.css +2 -2
- package/src/models/project.ts +1 -4
- package/src/app/providers/events.service.spec.ts +0 -16
- package/src/app/providers/events.service.ts +0 -76
- package/src/launch_old.js +0 -446
- package/src/models/rule.ts +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
-
### 5.0.53
|
|
4
|
-
- added: proactive rules from /widget/botsRules
|
|
5
|
-
- added: imHere method for presence service
|
|
6
|
-
- added: limit parameter to message-attachment component
|
|
7
|
-
- added: send message on attachment button clicked on last-message component
|
|
8
|
-
- added: events service
|
|
9
|
-
- added: /requests/messages tiledesk api
|
|
10
|
-
- added: convertConversationToMessage utils function in last-message component
|
|
11
|
-
- changed: last-message UI
|
|
12
|
-
- upgraded: chat21client.js to v0.1.12.4
|
|
13
|
-
- changed: pipe files moved from /directives folder to /pipe folder
|
|
14
|
-
- changed: moved isSender function from service to utils-message
|
|
15
|
-
- bug-fixed: location.href and document.title is wrong (about:srcdoc)
|
|
16
|
-
- bug-fixed: wait 2s before publish ImHere event to MQTT presence
|
|
3
|
+
### 5.0.53 in PROD
|
|
17
4
|
|
|
18
5
|
### 5.0.53-rc.3
|
|
19
6
|
- added: html descriptions to index.html and index-dev.html
|
|
@@ -23,6 +10,7 @@
|
|
|
23
10
|
- removed: jquery plugin
|
|
24
11
|
- removed: relativeLinkResolution from forRoot in RooterModule
|
|
25
12
|
|
|
13
|
+
|
|
26
14
|
### 5.0.53-rc.2
|
|
27
15
|
- added: angular 15 engine
|
|
28
16
|
- added: custom tooltip directive
|
|
@@ -38,6 +26,7 @@
|
|
|
38
26
|
- removed: document.write() injection
|
|
39
27
|
- removed: unused html test file
|
|
40
28
|
|
|
29
|
+
|
|
41
30
|
### 5.0.52 in PROD
|
|
42
31
|
|
|
43
32
|
### 5.0.52-rc.4
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -148,7 +148,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
148
148
|
that.disposeWidget();
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
if(conversation.is_new && conversation.sender !== this.g.senderId && !isInfo(conversation)){
|
|
153
153
|
that.manageTabNotification();
|
|
154
154
|
}
|
|
@@ -167,12 +167,9 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
167
167
|
} else {
|
|
168
168
|
// if(conversation.is_new && isJustRecived(this.g.startedAt.getTime(), conversation.timestamp)){
|
|
169
169
|
//widget closed
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
|
|
174
|
-
}
|
|
175
|
-
|
|
170
|
+
that.lastConversation = conversation;
|
|
171
|
+
that.g.isOpenNewMessage = true;
|
|
172
|
+
that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
|
|
176
173
|
|
|
177
174
|
let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
|
|
178
175
|
that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
|
|
@@ -401,12 +398,6 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
401
398
|
that.showWidget();
|
|
402
399
|
}
|
|
403
400
|
|
|
404
|
-
if(this.g.botsRules){
|
|
405
|
-
const rules = new Rules(that.tiledeskRequestsService, that.appStorageService,that.g)
|
|
406
|
-
rules.initRules(that.g.windowContext, that.g.tiledeskToken, user, that.generateNewUidConversation(), that.g.botsRules)
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
401
|
} else if (state && state === AUTH_STATE_OFFLINE) {
|
|
411
402
|
/** non sono loggato */
|
|
412
403
|
that.logger.info('[APP-COMP] OFFLINE - NO CURRENT USER AUTENTICATE: ');
|
|
@@ -792,11 +783,11 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
792
783
|
if (CLIENT_BROWSER) {
|
|
793
784
|
attributes['client'] = CLIENT_BROWSER;
|
|
794
785
|
}
|
|
795
|
-
if (
|
|
796
|
-
attributes['sourcePage'] =
|
|
786
|
+
if (location.href) {
|
|
787
|
+
attributes['sourcePage'] = location.href;
|
|
797
788
|
}
|
|
798
|
-
if(
|
|
799
|
-
attributes['sourceTitle'] =
|
|
789
|
+
if(document.title){
|
|
790
|
+
attributes['sourceTitle'] = document.title;
|
|
800
791
|
}
|
|
801
792
|
if (projectid) {
|
|
802
793
|
attributes['projectId'] = projectid;
|
|
@@ -1502,7 +1493,6 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1502
1493
|
// this.g.windowContext.window.document.title = this.tabTitle
|
|
1503
1494
|
} else {
|
|
1504
1495
|
// TAB IS ACTIVE --> restore title and DO NOT SOUND
|
|
1505
|
-
this.presenceService.imHere()
|
|
1506
1496
|
clearInterval(this.setIntervalTime)
|
|
1507
1497
|
this.setIntervalTime = null;
|
|
1508
1498
|
this.isTabVisible = true;
|
package/src/app/app.module.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventsService } from './providers/events.service';
|
|
2
1
|
|
|
3
2
|
// ************** COMPONENTS ************** //
|
|
4
3
|
import { AppComponent } from './app.component';
|
|
@@ -62,9 +61,9 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
|
62
61
|
import { INGXLoggerMetadata, LoggerModule, NGXLogger, NgxLoggerLevel, NGXLoggerServerService, TOKEN_LOGGER_SERVER_SERVICE } from "ngx-logger";
|
|
63
62
|
|
|
64
63
|
//DIRECTIVES
|
|
65
|
-
import { HtmlEntitiesEncodePipe } from './
|
|
66
|
-
import { MarkedPipe } from './
|
|
67
|
-
import { SafeHtmlPipe } from './
|
|
64
|
+
import { HtmlEntitiesEncodePipe } from './directives/html-entities-encode.pipe';
|
|
65
|
+
import { MarkedPipe } from './directives/marked.pipe';
|
|
66
|
+
import { SafeHtmlPipe } from './directives/safe-html.pipe';
|
|
68
67
|
|
|
69
68
|
//LOGGER SERVICES
|
|
70
69
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
@@ -194,7 +193,7 @@ export function conversationHandlerFactory(chat21Service: Chat21Service, appConf
|
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
|
|
197
|
-
export function typingFactory(
|
|
196
|
+
export function typingFactory(appConfig: AppConfigService) {
|
|
198
197
|
const config = appConfig.getConfig()
|
|
199
198
|
if (config.chatEngine === CHAT_ENGINE_MQTT) {
|
|
200
199
|
return new MQTTTypingService();
|
|
@@ -203,10 +202,10 @@ export function typingFactory(chat21Service: Chat21Service, appConfig: AppConfig
|
|
|
203
202
|
}
|
|
204
203
|
}
|
|
205
204
|
|
|
206
|
-
export function presenceFactory(
|
|
205
|
+
export function presenceFactory(appConfig: AppConfigService) {
|
|
207
206
|
const config = appConfig.getConfig()
|
|
208
207
|
if (config.chatEngine === CHAT_ENGINE_MQTT) {
|
|
209
|
-
return new MQTTPresenceService(
|
|
208
|
+
return new MQTTPresenceService();
|
|
210
209
|
} else {
|
|
211
210
|
return new FirebasePresenceService();
|
|
212
211
|
}
|
|
@@ -320,7 +319,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
320
319
|
Rules,
|
|
321
320
|
GlobalSettingsService,
|
|
322
321
|
SettingsSaverService,
|
|
323
|
-
EventsService,
|
|
324
322
|
StarRatingWidgetService,
|
|
325
323
|
{
|
|
326
324
|
provide: APP_INITIALIZER,
|
|
@@ -365,12 +363,12 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
365
363
|
{
|
|
366
364
|
provide: PresenceService,
|
|
367
365
|
useFactory: presenceFactory,
|
|
368
|
-
deps: [
|
|
366
|
+
deps: [AppConfigService]
|
|
369
367
|
},
|
|
370
368
|
{
|
|
371
369
|
provide: TypingService,
|
|
372
370
|
useFactory: typingFactory,
|
|
373
|
-
deps: [
|
|
371
|
+
deps: [AppConfigService]
|
|
374
372
|
},
|
|
375
373
|
{
|
|
376
374
|
provide: UploadService,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventsService } from './../../../providers/events.service';
|
|
2
1
|
import { ChatManager } from 'src/chat21-core/providers/chat-manager';
|
|
3
2
|
|
|
4
3
|
import { ConversationFooterComponent } from './../conversation-footer/conversation-footer.component';
|
|
@@ -183,8 +182,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
183
182
|
public typingService: TypingService,
|
|
184
183
|
private tiledeskRequestService: TiledeskRequestsService,
|
|
185
184
|
private changeDetectorRef: ChangeDetectorRef,
|
|
186
|
-
private elementRef: ElementRef
|
|
187
|
-
private events: EventsService
|
|
185
|
+
private elementRef: ElementRef
|
|
188
186
|
) { }
|
|
189
187
|
|
|
190
188
|
onResize(event){
|
|
@@ -830,18 +828,6 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
830
828
|
this.subscriptions.push(subscribe);
|
|
831
829
|
}
|
|
832
830
|
|
|
833
|
-
subscribtionKey = 'lastMessage:attachmentButtonClicked';
|
|
834
|
-
this.events.subscribe('lastMessage:attachmentButtonClicked', (event: any) => {
|
|
835
|
-
this.logger.debug('[CONV-COMP] ***** lastMessage:attachmentButtonClicked *****', event);
|
|
836
|
-
if (event) {
|
|
837
|
-
const conversationUid = event.message.conversation_with; //support-group-...
|
|
838
|
-
if(this.conversationId === conversationUid){
|
|
839
|
-
this.onAttachmentButtonClicked(event)
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
});
|
|
843
|
-
|
|
844
|
-
|
|
845
831
|
}
|
|
846
832
|
|
|
847
833
|
checkMessagesLegntForTranscriptDownloadMenuOption(){
|
|
@@ -2,8 +2,8 @@ import { MomentModule } from 'ngx-moment';
|
|
|
2
2
|
import { async, ComponentFixture, TestBed, waitForAsync, inject } from '@angular/core/testing';
|
|
3
3
|
|
|
4
4
|
import { ConversationContentComponent } from './conversation-content.component';
|
|
5
|
-
import { MarkedPipe } from '../../../
|
|
6
|
-
import { HtmlEntitiesEncodePipe } from '../../../
|
|
5
|
+
import { MarkedPipe } from '../../../directives/marked.pipe';
|
|
6
|
+
import { HtmlEntitiesEncodePipe } from '../../../directives/html-entities-encode.pipe';
|
|
7
7
|
import { UploadService } from '../../../../chat21-core/providers/abstract/upload.service';
|
|
8
8
|
import { CustomLogger } from '../../../../chat21-core/providers/logger/customLogger';
|
|
9
9
|
import { LoggerInstance } from '../../../../chat21-core/providers/logger/loggerInstance';
|
|
@@ -1,94 +1,83 @@
|
|
|
1
|
-
<div *ngIf="conversation && g.isOpenNewMessage" id="messagePreview"
|
|
1
|
+
<div *ngIf="conversation && g.isOpenNewMessage" id="messagePreview">
|
|
2
2
|
<!-- message recipient:: -->
|
|
3
|
+
<div role="messaggio" id="new_message">
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
<div class="headerPreviewMessage">
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
<div class="boxButtons">
|
|
8
|
+
|
|
9
|
+
<div role="button" tabindex="0" class="buttonMore" (click)="openConversationByID(conversation)">
|
|
10
|
+
<span>View more</span>
|
|
11
|
+
</div>
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
<div aria-label="Dismiss" role="button" tabindex="0" class="buttonClose" (click)="closeMessagePreview()">
|
|
14
|
+
<span>
|
|
15
|
+
<svg aria-labelledby="altIconTitle" height="20px" role="img" viewBox="0 0 24 24" width="20px" xmlns="http://www.w3.org/2000/svg" style="fill: rgb(255, 255, 255);">
|
|
16
|
+
<path d="M0 0h24v24H0V0z" fill="none"></path>
|
|
17
|
+
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path>
|
|
18
|
+
</svg>
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<div>
|
|
27
|
-
<!-- <div role="messaggio" class="c21-text message_sender_fullname">{{conversation.sender_fullname}}</div> -->
|
|
28
|
-
<!-- <img *ngIf="conversation.type == 'image' && conversation.metadata" class="message-content message-content-image"
|
|
29
|
-
[src]="conversation.metadata.src" [width]="getSizeImg(conversation).width"
|
|
30
|
-
[height]="getSizeImg(conversation).height" /> -->
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<div class="previewNewMessagge msg_container" (click)="openConversationByID(conversation)">
|
|
34
|
-
|
|
35
|
-
<!-- <div *ngIf="isImage(conversation)">
|
|
36
|
-
<chat-image
|
|
37
|
-
[metadata]="fileSelected"
|
|
38
|
-
[width]="fileSelected?.width"
|
|
39
|
-
[height]="fileSelected?.height">
|
|
40
|
-
</chat-image>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<div *ngIf="conversation.type == 'text'" class="c21-box-text">
|
|
44
|
-
<chat-text
|
|
45
|
-
[text]="conversation?.last_message_text"
|
|
46
|
-
[fontSize]="stylesMap?.get('fontSize')"
|
|
47
|
-
[fontFamily]="stylesMap?.get('fontFamily')">
|
|
48
|
-
</chat-text>
|
|
49
|
-
</div> -->
|
|
50
|
-
|
|
51
|
-
<chat-bubble-message class="messages no-background"
|
|
52
|
-
[class.emoticon]="isEmojii(message?.text)"
|
|
53
|
-
[ngClass]="{'button-in-msg' : message?.metadata && message?.metadata?.button}"
|
|
54
|
-
[message]="message"
|
|
55
|
-
[fontColor]="stylesMap.get('bubbleReceivedTextColor')"
|
|
56
|
-
[fontSize]="stylesMap.get('fontSize')"
|
|
57
|
-
[fontFamily]="stylesMap.get('fontFamily')"
|
|
58
|
-
[stylesMap]="stylesMap">
|
|
59
|
-
</chat-bubble-message>
|
|
22
|
+
</div>
|
|
60
23
|
|
|
61
|
-
<div class="c21-icon-avatar">
|
|
62
|
-
<div class="c21-avatar-image profile_image">
|
|
63
|
-
<chat-avatar-image class="slide-in-left"
|
|
64
|
-
[senderID]="message?.sender"
|
|
65
|
-
[senderFullname]="message?.sender_fullname"
|
|
66
|
-
[baseLocation]="baseLocation">
|
|
67
|
-
</chat-avatar-image>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div *ngIf="message.attributes && message.attributes.attachment " class="conversations-buttons">
|
|
74
|
-
<chat-message-attachment
|
|
75
|
-
style="height: 100%; display: block;"
|
|
76
|
-
[message]="message"
|
|
77
|
-
[isLastMessage] = "true"
|
|
78
|
-
[limit]="3"
|
|
79
|
-
[stylesMap]="stylesMap"
|
|
80
|
-
(onAttachmentButtonClicked)="onAttachmentButtonClicked($event)">
|
|
81
|
-
</chat-message-attachment>
|
|
82
24
|
</div>
|
|
83
|
-
|
|
84
|
-
|
|
85
25
|
|
|
26
|
+
<div class="previewNewMessagge" (click)="openConversationByID(conversation)">
|
|
27
|
+
<div role="messaggio" class="c21-text message_sender_fullname">{{conversation.sender_fullname}}</div>
|
|
28
|
+
<!-- <img *ngIf="conversation.type == 'image' && conversation.metadata" class="message-content message-content-image"
|
|
29
|
+
[src]="conversation.metadata.src" [width]="getSizeImg(conversation).width"
|
|
30
|
+
[height]="getSizeImg(conversation).height" /> -->
|
|
31
|
+
|
|
32
|
+
<!-- <div *ngIf="isImage(conversation)" class="c21-img">
|
|
33
|
+
<chat-image *ngIf="isImage(conversation)"
|
|
34
|
+
[metadata]="conversation?.metadata"
|
|
35
|
+
[width]="getMetadataSize(conversation?.metadata).width"
|
|
36
|
+
[height]="getMetadataSize(conversation?.metadata).height">
|
|
37
|
+
</chat-image>
|
|
38
|
+
</div> -->
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
<div *ngIf="conversation.type == 'text'" class="c21-box-text">
|
|
42
|
+
<div *ngIf="isPopupUrl(conversation.last_message_text); then contentPopup else contentNewTab">here
|
|
43
|
+
is ignored</div>
|
|
44
|
+
<ng-template #contentPopup>
|
|
45
|
+
<p class="c21-link"
|
|
46
|
+
(click)="popupUrl(g.windowContext, conversation.last_message_text,'windowName')">{{strip_tags(conversation.last_message_text)}}
|
|
47
|
+
</p>
|
|
48
|
+
</ng-template>
|
|
49
|
+
<ng-template #contentNewTab>
|
|
50
|
+
<p class="c21-text overflow4Lines" [innerHTML]="conversation.last_message_text | htmlEntitiesEncode | marked"></p>
|
|
51
|
+
</ng-template>
|
|
52
|
+
|
|
53
|
+
<!-- NOT AVAILABLE WITH FIREBASE DUE TO INCOMPATIBILITY WITH conversation OBJECT-->
|
|
54
|
+
<!-- <div *ngIf="conversation.attributes && conversation.attributes.attachment " class="slide-in-left" >
|
|
55
|
+
<chat-message-attachment
|
|
56
|
+
style="height: 100%; display: block;"
|
|
57
|
+
[message]="conversation"
|
|
58
|
+
[isLastMessage] = "true"
|
|
59
|
+
[stylesMap]="stylesMap"
|
|
60
|
+
(onAttachmentButtonClicked)="onAttachmentButtonClicked($event)">
|
|
61
|
+
</chat-message-attachment>
|
|
62
|
+
</div> -->
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="c21-time c21-text">
|
|
66
|
+
<time *ngIf="conversation.timestamp !== '{.sv: timestamp}'" >{{conversation.timestamp | amTimeAgo}} </time>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="c21-icon-avatar">
|
|
70
|
+
<div class="c21-avatar-image profile_image">
|
|
71
|
+
<chat-avatar-image class="slide-in-left"
|
|
72
|
+
[senderID]="conversation.sender"
|
|
73
|
+
[senderFullname]="conversation.sender_fullname"
|
|
74
|
+
[baseLocation]="baseLocation">
|
|
75
|
+
</chat-avatar-image>
|
|
76
|
+
<!-- <img src="{{conversation.image}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/images/avatar_bot_tiledesk.svg'" /> -->
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
86
80
|
|
|
87
|
-
|
|
88
|
-
<time *ngIf="conversation.timestamp !== '{.sv: timestamp}'" >{{conversation.timestamp | amTimeAgo}} </time>
|
|
89
|
-
</div> -->
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</div>
|
|
81
|
+
</div>
|
|
93
82
|
|
|
94
83
|
</div>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import 'src/app/sass/variables';
|
|
2
|
-
|
|
3
1
|
:host .c21-avatar-image ::ng-deep > chat-avatar-image {
|
|
4
2
|
|
|
5
3
|
.c21-icon-avatar {
|
|
@@ -19,39 +17,32 @@
|
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
#messagePreview {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
bottom: 90px;
|
|
49
|
-
max-height: calc(100% - 75px);
|
|
50
|
-
width: 375px;
|
|
51
|
-
max-width: 100%;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#messagePreview:hover {
|
|
20
|
+
position: relative;
|
|
21
|
+
width: 320px;
|
|
22
|
+
/* bottom: 90; */
|
|
23
|
+
max-height: 200px;
|
|
24
|
+
height: 100%;
|
|
25
|
+
padding: 0px 10px 10px;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
|
|
28
|
+
font-family: "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif;
|
|
29
|
+
font-size: 100%;
|
|
30
|
+
font-style: normal;
|
|
31
|
+
letter-spacing: normal;
|
|
32
|
+
font-stretch: normal;
|
|
33
|
+
font-weight: normal;
|
|
34
|
+
text-align: left;
|
|
35
|
+
text-align-last: initial;
|
|
36
|
+
text-indent: 0px;
|
|
37
|
+
text-shadow: none;
|
|
38
|
+
text-transform: none;
|
|
39
|
+
box-sizing: content-box;
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
line-height: 1;
|
|
42
|
+
font-variant: normal;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#new_message:hover {
|
|
55
46
|
.boxButtons {
|
|
56
47
|
display: block;
|
|
57
48
|
-webkit-animation: fade-in-dw-up 0.3s ease-in 0.0s;
|
|
@@ -59,43 +50,17 @@
|
|
|
59
50
|
}
|
|
60
51
|
}
|
|
61
52
|
|
|
62
|
-
|
|
63
|
-
.messages {
|
|
64
|
-
border-radius: $border-radius-bubble-message;
|
|
65
|
-
padding: 0;
|
|
66
|
-
word-wrap: break-word;
|
|
67
|
-
// padding: 14px;
|
|
68
|
-
// padding: 6px 6px 6px 6px;
|
|
69
|
-
// box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
70
|
-
// -webkit-animation: heartbeat 1.5s ease-in-out both;
|
|
71
|
-
// animation: heartbeat 1.5s ease-in-out both;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.no-background{
|
|
75
|
-
background: transparent!important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.emoticon {
|
|
79
|
-
background-color: transparent!important;
|
|
80
|
-
font-size: 4em;
|
|
81
|
-
margin: -15px 20px -10px 10px;
|
|
82
|
-
.message_innerhtml {
|
|
83
|
-
padding: 0;
|
|
84
|
-
margin: 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
53
|
.previewNewMessagge {
|
|
90
54
|
position: relative;
|
|
91
55
|
box-sizing: border-box;
|
|
92
56
|
background-color: rgb(255, 255, 255);
|
|
93
|
-
box-shadow: rgba(
|
|
57
|
+
box-shadow: rgba(35, 47, 53, 0.09) 0px 2px 8px 0px;
|
|
94
58
|
clear: both;
|
|
95
59
|
margin-left: 45px;
|
|
96
60
|
margin-bottom: 8px;
|
|
97
|
-
border-radius:
|
|
98
|
-
padding:
|
|
61
|
+
border-radius: 5px 5px 5px 0px;
|
|
62
|
+
padding: 4;
|
|
63
|
+
font-size: 14px;
|
|
99
64
|
}
|
|
100
65
|
|
|
101
66
|
.previewNewMessagge::after {
|
|
@@ -112,43 +77,22 @@
|
|
|
112
77
|
|
|
113
78
|
.c21-text.message_sender_fullname {
|
|
114
79
|
font-size: 13px;
|
|
115
|
-
padding:
|
|
116
|
-
margin:
|
|
80
|
+
padding: 0 10;
|
|
81
|
+
margin: 4 0;
|
|
117
82
|
clear: both;
|
|
118
83
|
color: rgb(104, 104, 104);
|
|
119
84
|
}
|
|
120
85
|
|
|
121
86
|
.c21-box-text {
|
|
122
|
-
max-height:
|
|
123
|
-
height: 100%;
|
|
124
|
-
width: 100%;
|
|
87
|
+
max-height: 110;
|
|
125
88
|
overflow-y: auto;
|
|
126
|
-
overflow-x: hidden;
|
|
127
|
-
border-radius: 12px 12px 12px 0px;
|
|
128
|
-
|
|
129
|
-
&::-webkit-scrollbar {
|
|
130
|
-
width: 6px;
|
|
131
|
-
background-color: #00000000!important;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
89
|
}
|
|
135
90
|
|
|
136
|
-
.c21-box-text:hover {
|
|
137
|
-
&::-webkit-scrollbar-track {
|
|
138
|
-
background-color: #f9f9f9 !important;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&::-webkit-scrollbar-thumb {
|
|
142
|
-
background: #d3d6dc;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
91
|
.c21-text {
|
|
148
92
|
font-size: 14px;
|
|
149
93
|
color: black;
|
|
150
|
-
padding:
|
|
151
|
-
margin:
|
|
94
|
+
padding: 0 10;
|
|
95
|
+
margin: 0 0;// margin: 4 0;
|
|
152
96
|
line-height: 1.4;
|
|
153
97
|
word-break: break-word;
|
|
154
98
|
}
|
|
@@ -169,7 +113,7 @@
|
|
|
169
113
|
|
|
170
114
|
.c21-text.c21-time {
|
|
171
115
|
font-size: 13px;
|
|
172
|
-
padding:
|
|
116
|
+
padding: 0 10;
|
|
173
117
|
clear: both;
|
|
174
118
|
color: rgb(115, 115, 118);
|
|
175
119
|
}
|
|
@@ -207,7 +151,7 @@
|
|
|
207
151
|
.headerPreviewMessage {
|
|
208
152
|
position: relative;
|
|
209
153
|
height: 40;// height: 50;
|
|
210
|
-
margin:
|
|
154
|
+
margin: 10 0 0 50;
|
|
211
155
|
}
|
|
212
156
|
|
|
213
157
|
.boxButtons {
|
|
@@ -248,18 +192,18 @@
|
|
|
248
192
|
.buttonClose span {
|
|
249
193
|
width: 32px;
|
|
250
194
|
height: 32px;
|
|
251
|
-
padding:
|
|
195
|
+
padding: 0;
|
|
252
196
|
}
|
|
253
197
|
|
|
254
198
|
.buttonClose span svg {
|
|
255
|
-
padding:
|
|
199
|
+
padding: 6;
|
|
256
200
|
}
|
|
257
201
|
|
|
258
202
|
#new_message {
|
|
259
203
|
position: absolute;
|
|
260
|
-
left:
|
|
261
|
-
right:
|
|
262
|
-
bottom:
|
|
204
|
+
left: 0;
|
|
205
|
+
right: 10;
|
|
206
|
+
bottom: 0;
|
|
263
207
|
}
|
|
264
208
|
|
|
265
209
|
/* ==================== MOBILE VERSION ==================== */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MarkedPipe } from './../../
|
|
1
|
+
import { MarkedPipe } from './../../directives/marked.pipe';
|
|
2
2
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
3
3
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
4
4
|
import { ImageRepoService } from '../../../chat21-core/providers/abstract/image-repo.service';
|
|
5
5
|
import { Globals } from '../../utils/globals';
|
|
6
6
|
|
|
7
7
|
import { LastMessageComponent } from './last-message.component';
|
|
8
|
-
import { HtmlEntitiesEncodePipe } from '../../
|
|
8
|
+
import { HtmlEntitiesEncodePipe } from '../../directives/html-entities-encode.pipe';
|
|
9
9
|
|
|
10
10
|
describe('LastMessageComponent', () => {
|
|
11
11
|
let component: LastMessageComponent;
|