@chat21/chat21-web-widget 5.0.53-rc.3 → 5.0.53-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -2
- package/package.json +1 -1
- package/src/app/app.component.ts +18 -8
- package/src/app/app.module.ts +10 -8
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +15 -1
- 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 +83 -72
- package/src/app/component/last-message/last-message.component.scss +98 -42
- package/src/app/component/last-message/last-message.component.spec.ts +2 -2
- package/src/app/component/last-message/last-message.component.ts +49 -25
- 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 +0 -5
- 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 +4 -0
- 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 +2 -0
- package/src/app/{directives → pipe}/html-entites-encode.pipe.spec.ts +0 -0
- package/src/app/{directives → pipe}/html-entities-encode.pipe.ts +0 -0
- package/src/app/{directives → pipe}/marked.pipe.spec.ts +0 -0
- package/src/app/{directives → pipe}/marked.pipe.ts +0 -0
- package/src/app/{directives → pipe}/safe-html.pipe.spec.ts +0 -0
- package/src/app/{directives → pipe}/safe-html.pipe.ts +0 -0
- package/src/app/providers/events.service.spec.ts +16 -0
- package/src/app/providers/events.service.ts +76 -0
- package/src/app/providers/global-settings.service.ts +11 -12
- package/src/app/utils/globals.ts +4 -1
- package/src/app/utils/rules.ts +88 -5
- package/src/assets/js/chat21client.js +27 -4
- package/src/assets/twp/chatbot-panel.html +0 -5
- package/src/chat21-core/models/conversation.ts +2 -2
- package/src/chat21-core/models/upload.ts +1 -0
- package/src/chat21-core/providers/abstract/presence.service.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +78 -106
- package/src/chat21-core/providers/firebase/firebase-presence.service.ts +4 -0
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +2 -29
- package/src/chat21-core/providers/mqtt/mqtt-presence.service.ts +13 -156
- package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +21 -4
- package/src/chat21-core/utils/utils-message.ts +36 -0
- package/src/iframe-style.css +2 -2
- package/src/models/project.ts +4 -1
- package/src/models/rule.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.53-rc.4
|
|
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
|
|
17
|
+
|
|
3
18
|
### 5.0.53-rc.3
|
|
4
19
|
- added: html descriptions to index.html and index-dev.html
|
|
5
20
|
- changed: script tag for style.css to link tag with rel="stylesheet"
|
|
@@ -8,7 +23,6 @@
|
|
|
8
23
|
- removed: jquery plugin
|
|
9
24
|
- removed: relativeLinkResolution from forRoot in RooterModule
|
|
10
25
|
|
|
11
|
-
|
|
12
26
|
### 5.0.53-rc.2
|
|
13
27
|
- added: angular 15 engine
|
|
14
28
|
- added: custom tooltip directive
|
|
@@ -24,7 +38,6 @@
|
|
|
24
38
|
- removed: document.write() injection
|
|
25
39
|
- removed: unused html test file
|
|
26
40
|
|
|
27
|
-
|
|
28
41
|
### 5.0.52 in PROD
|
|
29
42
|
|
|
30
43
|
### 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,9 +167,12 @@ 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
|
-
|
|
170
|
+
if(conversation.is_new && conversation.sender !== this.g.senderId && !isInfo(conversation)){
|
|
171
|
+
that.lastConversation = conversation;
|
|
172
|
+
that.g.isOpenNewMessage = true;
|
|
173
|
+
that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
|
|
174
|
+
}
|
|
175
|
+
|
|
173
176
|
|
|
174
177
|
let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
|
|
175
178
|
that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
|
|
@@ -398,6 +401,12 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
398
401
|
that.showWidget();
|
|
399
402
|
}
|
|
400
403
|
|
|
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
|
+
|
|
401
410
|
} else if (state && state === AUTH_STATE_OFFLINE) {
|
|
402
411
|
/** non sono loggato */
|
|
403
412
|
that.logger.info('[APP-COMP] OFFLINE - NO CURRENT USER AUTENTICATE: ');
|
|
@@ -783,11 +792,11 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
783
792
|
if (CLIENT_BROWSER) {
|
|
784
793
|
attributes['client'] = CLIENT_BROWSER;
|
|
785
794
|
}
|
|
786
|
-
if (location
|
|
787
|
-
attributes['sourcePage'] = location.href;
|
|
795
|
+
if (this.g.windowContext.window.location) {
|
|
796
|
+
attributes['sourcePage'] = this.g.windowContext.window.location.href;
|
|
788
797
|
}
|
|
789
|
-
if(document
|
|
790
|
-
attributes['sourceTitle'] = document.title;
|
|
798
|
+
if(this.g.windowContext.window.document){
|
|
799
|
+
attributes['sourceTitle'] = this.g.windowContext.window.document.title;
|
|
791
800
|
}
|
|
792
801
|
if (projectid) {
|
|
793
802
|
attributes['projectId'] = projectid;
|
|
@@ -1493,6 +1502,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1493
1502
|
// this.g.windowContext.window.document.title = this.tabTitle
|
|
1494
1503
|
} else {
|
|
1495
1504
|
// TAB IS ACTIVE --> restore title and DO NOT SOUND
|
|
1505
|
+
this.presenceService.imHere()
|
|
1496
1506
|
clearInterval(this.setIntervalTime)
|
|
1497
1507
|
this.setIntervalTime = null;
|
|
1498
1508
|
this.isTabVisible = true;
|
package/src/app/app.module.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventsService } from './providers/events.service';
|
|
1
2
|
|
|
2
3
|
// ************** COMPONENTS ************** //
|
|
3
4
|
import { AppComponent } from './app.component';
|
|
@@ -61,9 +62,9 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
|
61
62
|
import { INGXLoggerMetadata, LoggerModule, NGXLogger, NgxLoggerLevel, NGXLoggerServerService, TOKEN_LOGGER_SERVER_SERVICE } from "ngx-logger";
|
|
62
63
|
|
|
63
64
|
//DIRECTIVES
|
|
64
|
-
import { HtmlEntitiesEncodePipe } from './
|
|
65
|
-
import { MarkedPipe } from './
|
|
66
|
-
import { SafeHtmlPipe } from './
|
|
65
|
+
import { HtmlEntitiesEncodePipe } from './pipe/html-entities-encode.pipe';
|
|
66
|
+
import { MarkedPipe } from './pipe/marked.pipe';
|
|
67
|
+
import { SafeHtmlPipe } from './pipe/safe-html.pipe';
|
|
67
68
|
|
|
68
69
|
//LOGGER SERVICES
|
|
69
70
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
@@ -193,7 +194,7 @@ export function conversationHandlerFactory(chat21Service: Chat21Service, appConf
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
|
|
196
|
-
export function typingFactory(appConfig: AppConfigService) {
|
|
197
|
+
export function typingFactory(chat21Service: Chat21Service, appConfig: AppConfigService) {
|
|
197
198
|
const config = appConfig.getConfig()
|
|
198
199
|
if (config.chatEngine === CHAT_ENGINE_MQTT) {
|
|
199
200
|
return new MQTTTypingService();
|
|
@@ -202,10 +203,10 @@ export function typingFactory(appConfig: AppConfigService) {
|
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
205
|
|
|
205
|
-
export function presenceFactory(appConfig: AppConfigService) {
|
|
206
|
+
export function presenceFactory(chat21Service: Chat21Service, appConfig: AppConfigService) {
|
|
206
207
|
const config = appConfig.getConfig()
|
|
207
208
|
if (config.chatEngine === CHAT_ENGINE_MQTT) {
|
|
208
|
-
return new MQTTPresenceService();
|
|
209
|
+
return new MQTTPresenceService(chat21Service);
|
|
209
210
|
} else {
|
|
210
211
|
return new FirebasePresenceService();
|
|
211
212
|
}
|
|
@@ -319,6 +320,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
319
320
|
Rules,
|
|
320
321
|
GlobalSettingsService,
|
|
321
322
|
SettingsSaverService,
|
|
323
|
+
EventsService,
|
|
322
324
|
StarRatingWidgetService,
|
|
323
325
|
{
|
|
324
326
|
provide: APP_INITIALIZER,
|
|
@@ -363,12 +365,12 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
363
365
|
{
|
|
364
366
|
provide: PresenceService,
|
|
365
367
|
useFactory: presenceFactory,
|
|
366
|
-
deps: [AppConfigService]
|
|
368
|
+
deps: [Chat21Service, AppConfigService]
|
|
367
369
|
},
|
|
368
370
|
{
|
|
369
371
|
provide: TypingService,
|
|
370
372
|
useFactory: typingFactory,
|
|
371
|
-
deps: [AppConfigService]
|
|
373
|
+
deps: [Chat21Service, AppConfigService]
|
|
372
374
|
},
|
|
373
375
|
{
|
|
374
376
|
provide: UploadService,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventsService } from './../../../providers/events.service';
|
|
1
2
|
import { ChatManager } from 'src/chat21-core/providers/chat-manager';
|
|
2
3
|
|
|
3
4
|
import { ConversationFooterComponent } from './../conversation-footer/conversation-footer.component';
|
|
@@ -182,7 +183,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
182
183
|
public typingService: TypingService,
|
|
183
184
|
private tiledeskRequestService: TiledeskRequestsService,
|
|
184
185
|
private changeDetectorRef: ChangeDetectorRef,
|
|
185
|
-
private elementRef: ElementRef
|
|
186
|
+
private elementRef: ElementRef,
|
|
187
|
+
private events: EventsService
|
|
186
188
|
) { }
|
|
187
189
|
|
|
188
190
|
onResize(event){
|
|
@@ -828,6 +830,18 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
828
830
|
this.subscriptions.push(subscribe);
|
|
829
831
|
}
|
|
830
832
|
|
|
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
|
+
|
|
831
845
|
}
|
|
832
846
|
|
|
833
847
|
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 '../../../pipe/marked.pipe';
|
|
6
|
+
import { HtmlEntitiesEncodePipe } from '../../../pipe/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,83 +1,94 @@
|
|
|
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">
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
<div class="headerPreviewMessage">
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
<div class="boxButtons">
|
|
7
|
+
|
|
8
|
+
<div role="button" tabindex="0" class="buttonMore" (click)="openConversationByID(conversation)">
|
|
9
|
+
<span>View more</span>
|
|
10
|
+
</div>
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</div>
|
|
12
|
+
<div aria-label="Dismiss" role="button" tabindex="0" class="buttonClose" (click)="closeMessagePreview()">
|
|
13
|
+
<span>
|
|
14
|
+
<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);">
|
|
15
|
+
<path d="M0 0h24v24H0V0z" fill="none"></path>
|
|
16
|
+
<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>
|
|
17
|
+
</svg>
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
23
20
|
|
|
24
21
|
</div>
|
|
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
|
+
|
|
25
32
|
|
|
26
|
-
<div class="previewNewMessagge" (click)="openConversationByID(conversation)">
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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>
|
|
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>
|
|
60
|
+
|
|
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>
|
|
79
82
|
</div>
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<!-- <div class="c21-time c21-text">
|
|
88
|
+
<time *ngIf="conversation.timestamp !== '{.sv: timestamp}'" >{{conversation.timestamp | amTimeAgo}} </time>
|
|
89
|
+
</div> -->
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</div>
|
|
82
93
|
|
|
83
94
|
</div>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import 'src/app/sass/variables';
|
|
2
|
+
|
|
1
3
|
:host .c21-avatar-image ::ng-deep > chat-avatar-image {
|
|
2
4
|
|
|
3
5
|
.c21-icon-avatar {
|
|
@@ -17,32 +19,39 @@
|
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
#messagePreview {
|
|
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
|
-
|
|
22
|
+
// position: relative;
|
|
23
|
+
// width: 320px;
|
|
24
|
+
// /* bottom: 90; */
|
|
25
|
+
// max-height: 200px;
|
|
26
|
+
// height: 200px; //100%;
|
|
27
|
+
// padding: 0px 10px 10px;
|
|
28
|
+
// background-color: transparent;
|
|
29
|
+
|
|
30
|
+
// font-family: "Helvetica Neue", "Apple Color Emoji", Helvetica, Arial, sans-serif;
|
|
31
|
+
// font-size: 100%;
|
|
32
|
+
// font-style: normal;
|
|
33
|
+
// letter-spacing: normal;
|
|
34
|
+
// font-stretch: normal;
|
|
35
|
+
// font-weight: normal;
|
|
36
|
+
// text-align: left;
|
|
37
|
+
// text-align-last: initial;
|
|
38
|
+
// text-indent: 0px;
|
|
39
|
+
// text-shadow: none;
|
|
40
|
+
// text-transform: none;
|
|
41
|
+
// box-sizing: content-box;
|
|
42
|
+
// -webkit-font-smoothing: antialiased;
|
|
43
|
+
// line-height: 1;
|
|
44
|
+
// font-variant: normal;
|
|
45
|
+
|
|
46
|
+
position: fixed;
|
|
47
|
+
// right: 5px;
|
|
48
|
+
bottom: 90px;
|
|
49
|
+
max-height: calc(100% - 75px);
|
|
50
|
+
width: 375px;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#messagePreview:hover {
|
|
46
55
|
.boxButtons {
|
|
47
56
|
display: block;
|
|
48
57
|
-webkit-animation: fade-in-dw-up 0.3s ease-in 0.0s;
|
|
@@ -50,17 +59,43 @@
|
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
|
|
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
|
+
|
|
53
89
|
.previewNewMessagge {
|
|
54
90
|
position: relative;
|
|
55
91
|
box-sizing: border-box;
|
|
56
92
|
background-color: rgb(255, 255, 255);
|
|
57
|
-
box-shadow: rgba(
|
|
93
|
+
box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 12px 0px;
|
|
58
94
|
clear: both;
|
|
59
95
|
margin-left: 45px;
|
|
60
96
|
margin-bottom: 8px;
|
|
61
|
-
border-radius:
|
|
62
|
-
padding:
|
|
63
|
-
font-size: 14px;
|
|
97
|
+
border-radius: 12px 12px 12px 0px;
|
|
98
|
+
padding: 5px;
|
|
64
99
|
}
|
|
65
100
|
|
|
66
101
|
.previewNewMessagge::after {
|
|
@@ -77,22 +112,43 @@
|
|
|
77
112
|
|
|
78
113
|
.c21-text.message_sender_fullname {
|
|
79
114
|
font-size: 13px;
|
|
80
|
-
padding:
|
|
81
|
-
margin:
|
|
115
|
+
padding: 0px 10px;
|
|
116
|
+
margin: 4px 0px;
|
|
82
117
|
clear: both;
|
|
83
118
|
color: rgb(104, 104, 104);
|
|
84
119
|
}
|
|
85
120
|
|
|
86
121
|
.c21-box-text {
|
|
87
|
-
max-height:
|
|
122
|
+
max-height: 110px;
|
|
123
|
+
height: 100%;
|
|
124
|
+
width: 100%;
|
|
88
125
|
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
|
+
|
|
89
134
|
}
|
|
90
135
|
|
|
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
|
+
|
|
91
147
|
.c21-text {
|
|
92
148
|
font-size: 14px;
|
|
93
149
|
color: black;
|
|
94
|
-
padding:
|
|
95
|
-
margin:
|
|
150
|
+
padding: 0px 10px;
|
|
151
|
+
margin: 0px 0px;// margin: 4 0;
|
|
96
152
|
line-height: 1.4;
|
|
97
153
|
word-break: break-word;
|
|
98
154
|
}
|
|
@@ -113,7 +169,7 @@
|
|
|
113
169
|
|
|
114
170
|
.c21-text.c21-time {
|
|
115
171
|
font-size: 13px;
|
|
116
|
-
padding:
|
|
172
|
+
padding: 0px 10px;
|
|
117
173
|
clear: both;
|
|
118
174
|
color: rgb(115, 115, 118);
|
|
119
175
|
}
|
|
@@ -151,7 +207,7 @@
|
|
|
151
207
|
.headerPreviewMessage {
|
|
152
208
|
position: relative;
|
|
153
209
|
height: 40;// height: 50;
|
|
154
|
-
margin:
|
|
210
|
+
margin: 10px 0px 0px 50px;
|
|
155
211
|
}
|
|
156
212
|
|
|
157
213
|
.boxButtons {
|
|
@@ -192,18 +248,18 @@
|
|
|
192
248
|
.buttonClose span {
|
|
193
249
|
width: 32px;
|
|
194
250
|
height: 32px;
|
|
195
|
-
padding:
|
|
251
|
+
padding: 0px;
|
|
196
252
|
}
|
|
197
253
|
|
|
198
254
|
.buttonClose span svg {
|
|
199
|
-
padding:
|
|
255
|
+
padding: 6px;
|
|
200
256
|
}
|
|
201
257
|
|
|
202
258
|
#new_message {
|
|
203
259
|
position: absolute;
|
|
204
|
-
left:
|
|
205
|
-
right:
|
|
206
|
-
bottom:
|
|
260
|
+
left: 0px;
|
|
261
|
+
right: 10px;
|
|
262
|
+
bottom: 0px;
|
|
207
263
|
}
|
|
208
264
|
|
|
209
265
|
/* ==================== MOBILE VERSION ==================== */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MarkedPipe } from './../../
|
|
1
|
+
import { MarkedPipe } from './../../pipe/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 '../../pipe/html-entities-encode.pipe';
|
|
9
9
|
|
|
10
10
|
describe('LastMessageComponent', () => {
|
|
11
11
|
let component: LastMessageComponent;
|