@chat21/chat21-ionic 3.0.64 → 3.0.65
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 +34 -2
- package/deploy_amazon_beta.sh +0 -0
- package/deploy_amazon_prod.sh +1 -0
- package/deploy_pre.sh +39 -6
- package/package.json +8 -3
- package/publiccode.yml +110 -0
- package/src/app/app.component.ts +40 -66
- package/src/app/app.module.ts +1 -0
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +2 -2
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +0 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -39
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +18 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -11
- package/src/app/chatlib/conversation-detail/message/html/html.component.html +1 -0
- package/src/app/chatlib/conversation-detail/message/html/html.component.scss +79 -0
- package/src/app/chatlib/conversation-detail/message/html/html.component.spec.ts +25 -0
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +33 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +18 -30
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +0 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +7 -5
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +21 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +2 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +2 -2
- package/src/app/components/project-item/project-item.component.ts +5 -0
- package/src/app/components/sidebar/sidebar.component.ts +8 -15
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +12 -23
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +3 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +88 -136
- package/src/app/directives/safe-html.pipe.ts +2 -2
- package/src/app/directives/truncate.pipe.spec.ts +8 -0
- package/src/app/directives/truncate.pipe.ts +15 -0
- package/src/app/pages/authentication/login/login.page.ts +0 -1
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.html +4 -2
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +56 -71
- package/src/app/pages/conversations-list/conversations-list.page.html +21 -12
- package/src/app/pages/conversations-list/conversations-list.page.ts +129 -367
- package/src/app/pages/loader-preview/loader-preview.module.ts +1 -2
- package/src/app/shared/shared.module.ts +4 -0
- package/src/assets/i18n/ar.json +266 -0
- package/src/assets/js/chat21client.js +58 -60
- package/src/chat21-core/models/conversation.ts +2 -2
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +26 -21
- package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +78 -23
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +16 -13
- package/src/chat21-core/utils/constants.ts +1 -1
- package/src/chat21-core/utils/utils-message.ts +2 -3
- package/src/global.scss +2 -2
- package/deploy_prod.sh +0 -11
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html
CHANGED
|
@@ -18,13 +18,18 @@
|
|
|
18
18
|
|
|
19
19
|
<!-- [width]="getMetadataSize(message.metadata).width"
|
|
20
20
|
[height]="getMetadataSize(message.metadata).height" -->
|
|
21
|
-
<chat-image *ngIf="isImage(message)"
|
|
22
|
-
[
|
|
21
|
+
<chat-image *ngIf="isImage(message)"
|
|
22
|
+
[metadata]="message.metadata"
|
|
23
|
+
[width]="message.metadata.width"
|
|
24
|
+
[height]="message.metadata.height"
|
|
25
|
+
(onImageRendered)="onImageRenderedFN($event)">
|
|
23
26
|
</chat-image>
|
|
24
27
|
|
|
25
28
|
<!-- [width]="getMetadataSize(message.metadata).width" -->
|
|
26
29
|
<!-- [height]="getMetadataSize(message.metadata).height"> -->
|
|
27
|
-
<chat-frame *ngIf="isFrame(message)"
|
|
30
|
+
<chat-frame *ngIf="isFrame(message)"
|
|
31
|
+
[metadata]="message.metadata"
|
|
32
|
+
[width]="message.metadata.width"
|
|
28
33
|
[height]="message.metadata.height">
|
|
29
34
|
</chat-frame>
|
|
30
35
|
|
|
@@ -42,13 +47,20 @@
|
|
|
42
47
|
<span> {{message.timestamp | amCalendar }} </span>
|
|
43
48
|
</ng-template> -->
|
|
44
49
|
|
|
45
|
-
<chat-text
|
|
46
|
-
|
|
50
|
+
<chat-text *ngIf="message?.type !=='html'"
|
|
51
|
+
[text]="message?.text"
|
|
52
|
+
[color]="textColor"
|
|
53
|
+
[message]="message"
|
|
54
|
+
[class.chat-text-emoticon]="message?.emoticon"
|
|
47
55
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
48
56
|
(onAfterMessageRender)="returnOnAfterMessageRender($event)">
|
|
49
57
|
</chat-text>
|
|
50
58
|
|
|
51
|
-
<
|
|
59
|
+
<chat-html *ngIf="message?.type==='html'"
|
|
60
|
+
[htmlText]="message?.text">
|
|
61
|
+
</chat-html>
|
|
62
|
+
|
|
63
|
+
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
52
64
|
<ion-button shape="round" size="small" class="btn-add-msg-as-canned-response" ion-button fill="clear"
|
|
53
65
|
(click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
|
|
54
66
|
[options]="tooltipOptions" placement="bottom">
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
20
20
|
@Input() message: MessageModel;
|
|
21
21
|
@Input() textColor: string;
|
|
22
22
|
@Input() areVisibleCAR: boolean;
|
|
23
|
-
@Input()
|
|
23
|
+
@Input() supportMode: boolean;
|
|
24
24
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
25
25
|
@Output() onAfterMessageRender = new EventEmitter();
|
|
26
26
|
@Output() onImageRendered = new EventEmitter<boolean>()
|
|
@@ -59,16 +59,12 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
59
59
|
setMomentLocale() {
|
|
60
60
|
this.browserLang = this.translate.getBrowserLang();
|
|
61
61
|
const currentUser = this.tiledeskAuthService.getCurrentUser();
|
|
62
|
-
this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUser ', currentUser)
|
|
63
62
|
let currentUserId = ''
|
|
64
63
|
if (currentUser) {
|
|
65
64
|
currentUserId = currentUser.uid
|
|
66
|
-
this.logger.log('[BUBBLE-MESSAGE] - ngOnInit - currentUserId ', currentUserId)
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
|
|
70
|
-
this.logger.log('[BUBBLE-MESSAGE] stored_preferred_lang: ', stored_preferred_lang);
|
|
71
|
-
|
|
72
68
|
|
|
73
69
|
let chat_lang = ''
|
|
74
70
|
if (this.browserLang && !stored_preferred_lang) {
|
|
@@ -81,15 +77,9 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
81
77
|
sameElse: 'LLLL'
|
|
82
78
|
}
|
|
83
79
|
});
|
|
84
|
-
// this.translate.getTranslation(chat_lang).subscribe((labels: string) => {
|
|
85
|
-
// console.log('[BUBBLE-MESSAGE] translations: ', labels);
|
|
86
|
-
// });
|
|
87
80
|
}
|
|
88
81
|
|
|
89
82
|
ngOnChanges() {
|
|
90
|
-
this.logger.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
|
|
91
|
-
this.logger.log('BUBBLE-MSG ngOnChanges areVisibleCAR', this.areVisibleCAR)
|
|
92
|
-
this.logger.log('BUBBLE-MSG ngOnChanges support_mode', this.support_mode)
|
|
93
83
|
if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
|
|
94
84
|
this.getMetadataSize(this.message.metadata)
|
|
95
85
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div id="htmlCode" #htmlCode [innerHTML]="htmlText | safeHtml"></div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// @import '../../../../sass/variables';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--themeColor: #62a8ea;
|
|
5
|
+
--foregroundColor: #ffffff;
|
|
6
|
+
--buttonFontSize: 12px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
::ng-deep {
|
|
11
|
+
|
|
12
|
+
.button-html {
|
|
13
|
+
padding: 8px 16px!important;
|
|
14
|
+
position: relative;
|
|
15
|
+
max-width: 300px;
|
|
16
|
+
min-width: inherit;
|
|
17
|
+
cursor: pointer !important;
|
|
18
|
+
border: 1px solid #62a8ea;
|
|
19
|
+
border-radius: 20px;
|
|
20
|
+
margin: 3px;
|
|
21
|
+
background: transparent;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
font-family: 'Muli', sans-serif !important;
|
|
24
|
+
font-size: 12px !important;
|
|
25
|
+
-o-text-overflow: ellipsis;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
letter-spacing: -0.24px;
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
color: #62a8ea;
|
|
31
|
+
line-height: 16px;
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.url {
|
|
36
|
+
transition: background-color .6s ease;
|
|
37
|
+
.icon-button-action {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: -1px;
|
|
40
|
+
right: 1px;
|
|
41
|
+
svg {
|
|
42
|
+
fill: #62a8ea;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.icon-button-action-self{
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: 1px;
|
|
48
|
+
svg {
|
|
49
|
+
fill: #62a8ea;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
&:focus,
|
|
53
|
+
&:hover {
|
|
54
|
+
color: white;
|
|
55
|
+
background: #62a8ea;
|
|
56
|
+
.icon-button-action, .icon-button-action-self {
|
|
57
|
+
svg {
|
|
58
|
+
fill: white;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&:active{
|
|
63
|
+
font-size: 20px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.text-html{
|
|
68
|
+
font-size: 1.4em;
|
|
69
|
+
margin: 0;
|
|
70
|
+
padding: 8px;
|
|
71
|
+
font-style: normal;
|
|
72
|
+
letter-spacing: normal;
|
|
73
|
+
font-stretch: normal;
|
|
74
|
+
font-variant: normal;
|
|
75
|
+
font-weight: 300;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { HtmlComponent } from './html.component';
|
|
4
|
+
|
|
5
|
+
describe('HtmlComponent', () => {
|
|
6
|
+
let component: HtmlComponent;
|
|
7
|
+
let fixture: ComponentFixture<HtmlComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [ HtmlComponent ]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fixture = TestBed.createComponent(HtmlComponent);
|
|
18
|
+
component = fixture.componentInstance;
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { Component, ElementRef, Input, OnInit, SimpleChange, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'chat-html',
|
|
6
|
+
templateUrl: './html.component.html',
|
|
7
|
+
styleUrls: ['./html.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class HtmlComponent implements OnInit {
|
|
10
|
+
|
|
11
|
+
@Input() htmlText: string;
|
|
12
|
+
@Input() fontSize: string;
|
|
13
|
+
@Input() themeColor: string;
|
|
14
|
+
@Input() foregroundColor: string;
|
|
15
|
+
|
|
16
|
+
@ViewChild('htmlCode', {static: true}) container;
|
|
17
|
+
|
|
18
|
+
constructor(private elementRef: ElementRef) { }
|
|
19
|
+
|
|
20
|
+
ngOnInit(){
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ngOnChanges(changes: SimpleChanges){
|
|
25
|
+
//decomment if element should have same color of themeColor and fregroundColor
|
|
26
|
+
if(this.fontSize) this.elementRef.nativeElement.style.setProperty('--buttonFontSize', this.fontSize);
|
|
27
|
+
if(this.themeColor) this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
|
|
28
|
+
if(this.foregroundColor) this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
<ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation?.uid === uidConvSelected"
|
|
79
|
-
*ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
|
|
79
|
+
*ngFor="let conversation of listConversations; let index= index" (click)="openConversationByID(conversation)" detail=false>
|
|
80
80
|
<div tabindex="0"></div>
|
|
81
81
|
|
|
82
82
|
<!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
|
|
@@ -41,7 +41,7 @@ export class IonListConversationsComponent extends ListConversationsComponent im
|
|
|
41
41
|
public alert_lbl: string;
|
|
42
42
|
public actionNotAllowed_lbl: string;
|
|
43
43
|
public youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl: string;
|
|
44
|
-
public ok_lbl: string;
|
|
44
|
+
public ok_lbl: string;
|
|
45
45
|
|
|
46
46
|
tooltip_options = {
|
|
47
47
|
'show-delay': 0,
|
|
@@ -119,35 +119,22 @@ public ok_lbl: string;
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
translateLbls() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
this.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.subscribe((text: string) => {
|
|
139
|
-
this.actionNotAllowed_lbl = text;
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
this.translate.get('YouAreNoLongerAmongTheTeammatesManagingThisConversation')
|
|
143
|
-
.subscribe((text: string) => {
|
|
144
|
-
this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = text;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
this.translate.get('CLOSE_ALERT_CONFIRM_LABEL')
|
|
148
|
-
.subscribe((text: string) => {
|
|
149
|
-
this.ok_lbl = text;
|
|
150
|
-
});
|
|
122
|
+
const translationKeys = [
|
|
123
|
+
'Resolve',
|
|
124
|
+
'Archive',
|
|
125
|
+
'ALERT_TITLE',
|
|
126
|
+
'ActionNotAllowed',
|
|
127
|
+
'CLOSE_ALERT_CONFIRM_LABEL',
|
|
128
|
+
'YouAreNoLongerAmongTheTeammatesManagingThisConversation'
|
|
129
|
+
]
|
|
130
|
+
this.translate.get(['Resolve', 'Archive', 'ALERT_TITLE']).subscribe((translations: string) => {
|
|
131
|
+
this.resolve_btn_tooltip = translations['Resolve'];
|
|
132
|
+
this.archive_btn_tooltip = translations['Archive'];
|
|
133
|
+
this.alert_lbl = translations['ALERT_TITLE']
|
|
134
|
+
this.actionNotAllowed_lbl = translations['ActionNotAllowed']
|
|
135
|
+
this.ok_lbl = translations['CLOSE_ALERT_CONFIRM_LABEL']
|
|
136
|
+
this.youAreNoLongerAmongTheTeammatesManagingThisConversation_lbl = translations['YouAreNoLongerAmongTheTeammatesManagingThisConversation']
|
|
137
|
+
});
|
|
151
138
|
}
|
|
152
139
|
|
|
153
140
|
setMomentLocale() {
|
|
@@ -227,6 +214,7 @@ public ok_lbl: string;
|
|
|
227
214
|
var conversationId = conversation.uid;
|
|
228
215
|
this.logger.log('[ION-LIST-CONVS-COMP] - closeConversation - conversationId ', conversationId)
|
|
229
216
|
this.onCloseConversation.emit(conversation)
|
|
217
|
+
let currentIndex = this.listConversations.findIndex(conv => conv.uid === conversation.uid)
|
|
230
218
|
}
|
|
231
219
|
|
|
232
220
|
|
|
@@ -59,7 +59,6 @@ export class ListConversationsComponent implements OnInit {
|
|
|
59
59
|
public openConversationByID(conversation) {
|
|
60
60
|
this.logger.log('[LISTCONVERSATIONS-W] openConversationByID: ', conversation);
|
|
61
61
|
if (conversation) {
|
|
62
|
-
this.logger.log(conversation.recipient_fullname)
|
|
63
62
|
// this.conversationsService.updateIsNew(conversation);
|
|
64
63
|
// this.conversationsService.updateConversationBadge();
|
|
65
64
|
this.uidConvSelected = conversation.uid
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<ion-header no-border class="ion-no-border">
|
|
2
|
-
<ion-toolbar
|
|
3
|
-
<ion-buttons slot="start" style="height:60px">
|
|
2
|
+
<ion-toolbar>
|
|
3
|
+
<ion-buttons slot="start" style="height:60px" *ngIf="isMobile">
|
|
4
4
|
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
5
|
-
<ion-back-button style="display: block;" text=""
|
|
5
|
+
<ion-back-button style="display: block;" text="" (click)="goBackToConversationList()">
|
|
6
6
|
</ion-back-button>
|
|
7
7
|
</ion-buttons>
|
|
8
8
|
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
13
13
|
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
14
14
|
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
15
|
-
<app-avatar-profile
|
|
15
|
+
<app-avatar-profile
|
|
16
|
+
[itemAvatar]=conversationAvatar>
|
|
17
|
+
</app-avatar-profile>
|
|
16
18
|
</div>
|
|
17
19
|
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
18
20
|
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
33
35
|
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
34
36
|
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
35
|
-
<span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
|
|
37
|
+
<span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
|
|
36
38
|
<!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
|
|
37
39
|
|
|
38
40
|
</div>
|
|
@@ -4,8 +4,29 @@ ion-header {
|
|
|
4
4
|
border-bottom-style: solid;
|
|
5
5
|
border-color: var(--light-gray);
|
|
6
6
|
border-bottom-width: thin;
|
|
7
|
+
ion-toolbar{
|
|
8
|
+
height: 60px;
|
|
9
|
+
.flex-container{
|
|
10
|
+
display: flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.back-flex-container{
|
|
14
|
+
flex: 0 1 auto;
|
|
15
|
+
order: 0;
|
|
16
|
+
}
|
|
17
|
+
.user-info-flex-container{
|
|
18
|
+
flex: 0 1 auto;
|
|
19
|
+
order: 1;
|
|
20
|
+
}
|
|
21
|
+
.resolve-flex-container{
|
|
22
|
+
flex: 0 1 auto;
|
|
23
|
+
order: 2;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
7
26
|
ion-title {
|
|
8
27
|
text-align: left;
|
|
28
|
+
padding-inline: unset;
|
|
29
|
+
margin: 0px 10px;
|
|
9
30
|
height: 40px;
|
|
10
31
|
width: 100%;
|
|
11
32
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<ion-header no-border class="ion-no-border">
|
|
2
|
+
<ion-toolbar style="height:60px">
|
|
3
|
+
<div class="flex-container">
|
|
4
|
+
<div class="back-flex-container">
|
|
5
|
+
<ion-buttons slot="start" style="height:60px">
|
|
6
|
+
<!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
|
|
7
|
+
<ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
|
|
8
|
+
</ion-back-button>
|
|
9
|
+
</ion-buttons>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="user-info-flex-container">
|
|
12
|
+
<div style="display: flex;">
|
|
13
|
+
<div>1</div>
|
|
14
|
+
<div>2</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div class="resolve-flex-container">
|
|
19
|
+
<ion-buttons slot="end">
|
|
20
|
+
|
|
21
|
+
<!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
|
|
22
|
+
<ion-icon name="ticket-outline"></ion-icon>
|
|
23
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
|
|
24
|
+
</ion-button> -->
|
|
25
|
+
|
|
26
|
+
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
|
|
27
|
+
(click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
|
|
28
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
29
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
30
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
31
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
32
|
+
</ion-button>
|
|
33
|
+
|
|
34
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
35
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
36
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
37
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
38
|
+
|
|
39
|
+
</ion-button>
|
|
40
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
41
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
42
|
+
</ion-button>
|
|
43
|
+
|
|
44
|
+
</ion-buttons>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
</ion-toolbar>
|
|
49
|
+
</ion-header>
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
<ion-title [class.info-open]="openInfoConversation || openInfoMessage">
|
|
55
|
+
|
|
56
|
+
<div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
|
|
57
|
+
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
|
|
58
|
+
<div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
|
|
59
|
+
[ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
|
|
60
|
+
<app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
|
|
61
|
+
</div>
|
|
62
|
+
<!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
|
|
63
|
+
<div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
|
|
64
|
+
<app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
|
|
65
|
+
[borderColor]=borderColor [fontColor]=fontColor>
|
|
66
|
+
</app-user-presence>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div *ngIf="conversationAvatar" class="user-typing">
|
|
70
|
+
<app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
|
|
71
|
+
[translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
|
|
72
|
+
</app-user-typing>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
</div>
|
|
76
|
+
<!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
|
|
77
|
+
<!-- (click)="onOpenCloseInfoConversation()" -->
|
|
78
|
+
<div *ngIf="conversationAvatar" class="tile-info-with"
|
|
79
|
+
[ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
|
|
80
|
+
<span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
|
|
81
|
+
<!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
|
|
86
|
+
<span class="tile-username">{{ conversationWithFullname }} </span>
|
|
87
|
+
</div> -->
|
|
88
|
+
|
|
89
|
+
</ion-title>
|
|
90
|
+
<!-- openInfoConversation {{openInfoConversation}} -->
|
|
91
|
+
<ion-buttons slot="end">
|
|
92
|
+
|
|
93
|
+
<!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
|
|
94
|
+
<ion-icon name="ticket-outline"></ion-icon>
|
|
95
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
|
|
96
|
+
</ion-button> -->
|
|
97
|
+
|
|
98
|
+
<ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
|
|
99
|
+
(click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
|
|
100
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
101
|
+
<ion-icon name="archive-outline"></ion-icon>
|
|
102
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
103
|
+
<span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
|
|
104
|
+
</ion-button>
|
|
105
|
+
|
|
106
|
+
<ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
107
|
+
<!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
|
|
108
|
+
<ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
|
|
109
|
+
<!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
|
|
110
|
+
|
|
111
|
+
</ion-button>
|
|
112
|
+
<ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
|
|
113
|
+
<ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
|
|
114
|
+
</ion-button>
|
|
115
|
+
|
|
116
|
+
</ion-buttons>
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
|
|
42
42
|
|
|
43
|
-
<ng-container *ngIf="areVisibleCAR &&
|
|
43
|
+
<ng-container *ngIf="areVisibleCAR && supportMode">
|
|
44
44
|
<div class="canned-responses-btn-wpr" style="margin-left: -5px;"
|
|
45
45
|
tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
46
46
|
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false ||
|
|
113
|
+
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
|
|
114
114
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
115
115
|
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
116
116
|
[(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -46,7 +46,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
46
46
|
@Input() tagsCannedFilter: any = [];
|
|
47
47
|
@Input() tagsCannedCount: number;
|
|
48
48
|
@Input() areVisibleCAR: boolean;
|
|
49
|
-
@Input()
|
|
49
|
+
@Input() supportMode: boolean;
|
|
50
50
|
@Input() events: Observable<void>;
|
|
51
51
|
@Input() fileUploadAccept: string
|
|
52
52
|
@Input() isOpenInfoConversation: boolean;
|
|
@@ -157,7 +157,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
157
157
|
} else {
|
|
158
158
|
this.IS_SUPPORT_GROUP_CONVERSATION = false
|
|
159
159
|
}
|
|
160
|
-
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges
|
|
160
|
+
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
|
|
161
161
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
|
|
162
162
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
|
|
163
163
|
this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges tagsCannedFilter ", this.tagsCannedFilter);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EventsService } from './../../services/events-service';
|
|
1
2
|
import { Component, EventEmitter, HostListener, OnInit, Output } from '@angular/core';
|
|
2
3
|
import { WebsocketService } from 'src/app/services/websocket/websocket.service';
|
|
3
4
|
import { Subject } from 'rxjs';
|
|
@@ -53,6 +54,7 @@ export class ProjectItemComponent implements OnInit {
|
|
|
53
54
|
public tiledeskService: TiledeskService,
|
|
54
55
|
public webSocketJs: WebSocketJs,
|
|
55
56
|
private appConfigProvider: AppConfigProvider,
|
|
57
|
+
public events: EventsService
|
|
56
58
|
) { }
|
|
57
59
|
|
|
58
60
|
ngOnInit() {
|
|
@@ -209,10 +211,13 @@ export class ProjectItemComponent implements OnInit {
|
|
|
209
211
|
this.logger.log('[PROJECT-ITEM] - LAST PROJECT PARSED ', this.project)
|
|
210
212
|
}
|
|
211
213
|
|
|
214
|
+
|
|
215
|
+
|
|
212
216
|
|
|
213
217
|
}
|
|
214
218
|
|
|
215
219
|
doProjectSubscriptions(project) {
|
|
220
|
+
this.events.publish('storage:last_project', project)
|
|
216
221
|
this.logger.log('[PROJECT-ITEM] doProjectSubscriptions project ', project)
|
|
217
222
|
if (project) {
|
|
218
223
|
const user_role = this.project.role
|
|
@@ -83,21 +83,14 @@ export class SidebarComponent implements OnInit {
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
getStoredProjectAndUserRole() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
this.USER_ROLE = project.role;
|
|
96
|
-
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
97
|
-
this.buildURLs(this.USER_ROLE)
|
|
98
|
-
} else {
|
|
99
|
-
this.logger.error('[SIDEBAR] stored_project not found in storage', stored_project)
|
|
100
|
-
}
|
|
86
|
+
this.events.subscribe('storage:last_project',project =>{
|
|
87
|
+
this.logger.log('[SIDEBAR] stored_project ', project)
|
|
88
|
+
if (project && project !== 'undefined') {
|
|
89
|
+
this.project_id = project.id_project.id
|
|
90
|
+
this.USER_ROLE = project.role;
|
|
91
|
+
this.buildURLs(this.USER_ROLE)
|
|
92
|
+
}
|
|
93
|
+
})
|
|
101
94
|
}
|
|
102
95
|
|
|
103
96
|
buildURLs(USER_ROLE) {
|