@chat21/chat21-ionic 3.0.82-rc.3 → 3.0.82-rc.7
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 +8 -0
- package/package.json +3 -2
- package/src/app/components/canned-response/canned-response.component.html +2 -2
- package/src/app/components/canned-response/canned-response.component.scss +13 -8
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +10 -3
- package/src/app/components/conversation-info/info-content/info-content.component.html +6 -3
- package/src/app/components/conversation-info/info-content/info-content.component.ts +0 -4
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +6 -4
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +23 -0
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +1 -4
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +2 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +0 -1
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +2 -2
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +21 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +2 -2
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/assets/js/chat21client.js +2 -2
- package/src/chat-config-mqtt-localhost.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.82-rc.7
|
|
4
|
+
- bug-fixed: do not disable textArea if is a direct archived conversation
|
|
5
|
+
- bug-fixed: canned item not fire click event on Firefox browser
|
|
6
|
+
|
|
7
|
+
### 3.0.82-rc.6
|
|
8
|
+
- bug-fixed: axios is undefined in chat21Client.js
|
|
9
|
+
- bug-fixed: if userImage not exist in sidebar--user-detail, no info of fillColor exist
|
|
10
|
+
|
|
3
11
|
### 3.0.82-rc.3
|
|
4
12
|
- bug-fixed: incorrect dashboard urls in navbar
|
|
5
13
|
- changed: used logger in mqtt auth service
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chat21/chat21-ionic",
|
|
3
3
|
"author": "Tiledesk SRL",
|
|
4
|
-
"version": "3.0.82-rc.
|
|
4
|
+
"version": "3.0.82-rc.7",
|
|
5
5
|
"license": "MIT License",
|
|
6
6
|
"homepage": "https://tiledesk.com/",
|
|
7
7
|
"repository": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@ng-select/ng-select": "^3.7.3",
|
|
43
43
|
"@ngx-translate/core": "^12.1.2",
|
|
44
44
|
"@ngx-translate/http-loader": "^4.0.0",
|
|
45
|
+
"@types/marked": "^1.1.0",
|
|
45
46
|
"angular2-moment": "^1.9.0",
|
|
46
47
|
"autolinker": "^3.14.2",
|
|
47
48
|
"cordova-android": "9.1.0",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"core-js": "^2.5.4",
|
|
60
61
|
"file-saver": "^2.0.5",
|
|
61
62
|
"firebase": "^8.6.7",
|
|
62
|
-
"marked": "^2.
|
|
63
|
+
"marked": "^2.1.3",
|
|
63
64
|
"material-icons": "^1.11.2",
|
|
64
65
|
"moment": "^2.24.0",
|
|
65
66
|
"moment-timezone": "^0.5.28",
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*ngFor="let canned of tagsCannedFilter; let i = index;"
|
|
6
6
|
(click)="onClickCannedFN(canned, $event)">
|
|
7
7
|
<div class="cannedContent">
|
|
8
|
-
<ion-input [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}"
|
|
9
|
-
<ion-input [
|
|
8
|
+
<ion-input [class.readonly]="canned?.disabled" type="text" [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}"></ion-input>
|
|
9
|
+
<ion-input [class.readonly]="canned?.disabled" type="text" [(ngModel)]="canned.text" class="text truncate"></ion-input>
|
|
10
10
|
</div>
|
|
11
11
|
<ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && !canned.disabled" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
|
|
12
12
|
<ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && canned.disabled" (click)="onEditCanned(canned, $event)"></ion-icon>
|
|
@@ -104,15 +104,20 @@
|
|
|
104
104
|
&.title {
|
|
105
105
|
font-weight: 500;
|
|
106
106
|
}
|
|
107
|
+
|
|
108
|
+
&.readonly{
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
|
-
.native-input[disabled] {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
.native-textarea[disabled] {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
113
|
+
// .native-input[disabled] {
|
|
114
|
+
// opacity: 10 !important;
|
|
115
|
+
// cursor: pointer;
|
|
116
|
+
// }
|
|
117
|
+
// .native-textarea[disabled] {
|
|
118
|
+
// opacity: 10 !important;
|
|
119
|
+
// cursor: pointer;
|
|
120
|
+
// }
|
|
116
121
|
ion-icon {
|
|
117
122
|
zoom: 0.7;
|
|
118
123
|
}
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -112,9 +112,16 @@
|
|
|
112
112
|
|
|
113
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
|
-
[placeholder]="translationMap?.get('LABEL_ENTER_MSG_SHORT')"
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
[placeholder]="translationMap?.get('LABEL_ENTER_MSG_SHORT')"
|
|
116
|
+
autosize="false"
|
|
117
|
+
auto-grow="true"
|
|
118
|
+
autofocus="true"
|
|
119
|
+
[value]=""
|
|
120
|
+
[disabled]="disableTextarea"
|
|
121
|
+
[(ngModel)]="messageString"
|
|
122
|
+
(ionChange)="ionChange($event);"
|
|
123
|
+
(keydown.enter)="onKeydown($event, messageString)"
|
|
124
|
+
(paste)="onPaste($event)">
|
|
118
125
|
</ion-textarea>
|
|
119
126
|
</div>
|
|
120
127
|
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<ion-content [style.display]="openInfoConversation ? 'block' : 'none'">
|
|
2
2
|
|
|
3
|
-
<app-info-direct
|
|
3
|
+
<app-info-direct
|
|
4
|
+
[style.display]="panelType === 'direct-panel' ? 'content' : 'none'"
|
|
4
5
|
[member]=member
|
|
5
6
|
[translationMap]=translationMap
|
|
6
7
|
[conversationWith]= "conversationWith">
|
|
7
8
|
</app-info-direct>
|
|
8
9
|
|
|
9
|
-
<app-info-group
|
|
10
|
+
<app-info-group
|
|
11
|
+
[style.display]="panelType === 'group-panel' && IS_GROUP_PANEL === true ? 'content' : 'none'"
|
|
10
12
|
[groupDetail]="groupDetail"
|
|
11
13
|
[isMobile]="isMobile">
|
|
12
14
|
</app-info-group>
|
|
13
15
|
|
|
14
|
-
<app-info-support-group
|
|
16
|
+
<app-info-support-group
|
|
17
|
+
[style.display]="panelType === 'support-group-panel' ? 'block' : 'none'"
|
|
15
18
|
[urlConversationSupportGroup]="urlConversationSupportGroup">
|
|
16
19
|
</app-info-support-group>
|
|
17
20
|
|
|
@@ -63,9 +63,6 @@ export class InfoContentComponent implements OnInit {
|
|
|
63
63
|
public tiledeskService: TiledeskService
|
|
64
64
|
|
|
65
65
|
) {
|
|
66
|
-
this.logger.log('[INFO-CONTENT-COMP] HELLO (CONSTUCTOR) !!!!!');
|
|
67
|
-
// this.loggedUser = this.authService.getCurrentUser();
|
|
68
|
-
// this.logger.log('INFO-CONTENT-COMP loggedUser: ', this.loggedUser);
|
|
69
66
|
|
|
70
67
|
const appconfig = appConfigProvider.getConfig()
|
|
71
68
|
// this.tenant = appconfig.tenant;
|
|
@@ -76,7 +73,6 @@ export class InfoContentComponent implements OnInit {
|
|
|
76
73
|
this.route.paramMap.subscribe(params => {
|
|
77
74
|
this.logger.log('[INFO-CONTENT-COMP] initialize params: ', params);
|
|
78
75
|
this.conversationWith = params.get('IDConv');
|
|
79
|
-
this.logger.log('[INFO-CONTENT-COMP] - paramMap.subscribe conversationWith: ', this.conversationWith);
|
|
80
76
|
this.conversationWithFullname = params.get('FullNameConv');
|
|
81
77
|
this.conv_type = params.get('Convtype');
|
|
82
78
|
|
|
@@ -29,10 +29,12 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<div class="info-accordion-container">
|
|
33
|
+
<app-advanced-info-accordion class="info-accordion"
|
|
34
|
+
[advancedAttributes]="advancedAttributes"
|
|
35
|
+
[translationMap]="translationMap">
|
|
36
|
+
</app-advanced-info-accordion>
|
|
37
|
+
</div>
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
</ion-content>
|
|
@@ -59,4 +59,27 @@
|
|
|
59
59
|
.member-email {
|
|
60
60
|
text-align: center;
|
|
61
61
|
margin-top: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.info-accordion-container{
|
|
65
|
+
margin-left: 8px !important;
|
|
66
|
+
margin-right: 8px !important;
|
|
67
|
+
|
|
68
|
+
margin-top: 12px !important;
|
|
69
|
+
background-color: #fff;
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
box-shadow: rgba(0, 27, 71, 0.08) 0px 3px;
|
|
72
|
+
|
|
73
|
+
display: flex;
|
|
74
|
+
.info-accordion{
|
|
75
|
+
padding: 16px 12px !important;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
position: relative;
|
|
78
|
+
transition: all 0.2s ease-in-out 0s;
|
|
79
|
+
|
|
80
|
+
&:hover{
|
|
81
|
+
background-color: #f5f7f9;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
62
85
|
}
|
|
@@ -26,8 +26,6 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
26
26
|
|
|
27
27
|
ngOnInit() {
|
|
28
28
|
this.logger.log('InfoDirectComponent - ngOnInit');
|
|
29
|
-
|
|
30
|
-
this.initialize();
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
ngAfterViewInit() {
|
|
@@ -41,12 +39,11 @@ export class InfoDirectComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
41
39
|
this.logger.log('InfoDirectComponent - ngOnDestroy ' );
|
|
42
40
|
// this.unsubscribe$.next();
|
|
43
41
|
// this.unsubscribe$.complete();
|
|
44
|
-
|
|
45
|
-
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
ngOnChanges(){
|
|
49
45
|
if(this.member){
|
|
46
|
+
this.initialize();
|
|
50
47
|
this.member.imageurl = this.imageRepoService.getImagePhotoUrl(this.conversationWith)
|
|
51
48
|
}
|
|
52
49
|
}
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
onerror="this.src='assets/images/no_image_user.png'" />
|
|
26
26
|
|
|
27
27
|
<div *ngIf="!USER_PHOTO_PROFILE_EXIST" class="user-img-in-sidebar-user-details"
|
|
28
|
-
[ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.
|
|
28
|
+
[ngStyle]="{'background': 'linear-gradient(rgb(255,255,255) -125%,' + user?.fillColour + ')'}">
|
|
29
29
|
<span id="sidebaravatar-altenative-user-avatar" class="sidebar-user-details-altenative-user-avatar">
|
|
30
|
-
{{ user?.
|
|
30
|
+
{{ user?.fullname_initial }}
|
|
31
31
|
</span>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
@@ -41,7 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
41
41
|
|
|
42
42
|
isVisiblePAY: boolean;
|
|
43
43
|
public_Key: any
|
|
44
|
-
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
44
|
+
USER_PHOTO_PROFILE_EXIST: boolean = false;
|
|
45
45
|
version: string
|
|
46
46
|
company_name: string = 'Tiledesk'
|
|
47
47
|
DASHBOARD_URL: string;
|
|
@@ -90,7 +90,8 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
90
90
|
const currentUser = JSON.parse(storedCurrentUser);
|
|
91
91
|
this.logger.log('[SIDEBAR-USER-DETAILS] - subcribeToAuthStateChanged - currentUser ', currentUser)
|
|
92
92
|
if (currentUser) {
|
|
93
|
-
this.user = currentUser
|
|
93
|
+
this.user = currentUser
|
|
94
|
+
this.createUserAvatar(this.user);
|
|
94
95
|
this.getCurrentChatLangAndTranslateLabels(this.user);
|
|
95
96
|
this.photo_profile_URL = this.imageRepoService.getImagePhotoUrl(this.user.uid)
|
|
96
97
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL ', this.photo_profile_URL);
|
|
@@ -105,7 +106,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
105
106
|
|
|
106
107
|
checkIfExistPhotoProfile(imageUrl) {
|
|
107
108
|
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
108
|
-
|
|
109
|
+
|
|
109
110
|
if (imageExists === true) {
|
|
110
111
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
111
112
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -129,6 +130,23 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
132
|
|
|
133
|
+
createUserAvatar(currentUser) {
|
|
134
|
+
this.logger.log('[SIDEBAR] - createProjectUserAvatar ', currentUser)
|
|
135
|
+
let fullname = ''
|
|
136
|
+
if (currentUser && currentUser.firstname && currentUser.lastname) {
|
|
137
|
+
fullname = currentUser.firstname + ' ' + currentUser.lastname
|
|
138
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
139
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
140
|
+
} else if (currentUser && currentUser.firstname) {
|
|
141
|
+
fullname = currentUser.firstname
|
|
142
|
+
currentUser['fullname_initial'] = avatarPlaceholder(fullname)
|
|
143
|
+
currentUser['fillColour'] = getColorBck(fullname)
|
|
144
|
+
} else {
|
|
145
|
+
currentUser['fullname_initial'] = 'N/A'
|
|
146
|
+
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
132
150
|
// listenOpenUserSidebarEvent() {
|
|
133
151
|
// this.events.subscribe('userdetailsidebar:opened', (openUserDetailsSidebar) => {
|
|
134
152
|
// this.logger.log('[SIDEBAR-USER-DETAILS] - listenOpenUserSidebarEvent - openUserDetailsSidebar', openUserDetailsSidebar);
|
|
@@ -804,7 +804,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
804
804
|
conv.attributes['project_name']
|
|
805
805
|
)
|
|
806
806
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
807
|
-
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
807
|
+
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
808
808
|
}
|
|
809
809
|
})
|
|
810
810
|
}
|
|
@@ -824,7 +824,7 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
824
824
|
conv.attributes['project_name']
|
|
825
825
|
)
|
|
826
826
|
let duration = getDateDifference(conv.timestamp, Date.now())
|
|
827
|
-
duration.days > 10? this.disableTextarea = true: this.disableTextarea = false
|
|
827
|
+
duration.days > 10 && conv.channel_type !== TYPE_DIRECT? this.disableTextarea = true: this.disableTextarea = false
|
|
828
828
|
}
|
|
829
829
|
if(!conv){
|
|
830
830
|
this.conversationsHandlerService.getConversationDetail(this.conversationWith, (conv) => {
|
|
@@ -41,7 +41,7 @@ export class WebsocketService {
|
|
|
41
41
|
|
|
42
42
|
self.webSocketJs.ref(path, 'subscriptionToWsCurrentUser_allProject',
|
|
43
43
|
function (data, notification) {
|
|
44
|
-
|
|
44
|
+
console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
45
45
|
resolve(data)
|
|
46
46
|
// self.currentUserWsAvailability$.next(data.user_available);
|
|
47
47
|
self.currentProjectUserAvailability$.next(data)
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"APIendpoint": "http://localhost:8004/api",
|
|
22
22
|
"_log": true
|
|
23
23
|
},
|
|
24
|
-
"apiUrl": "http://localhost:
|
|
24
|
+
"apiUrl": "http://localhost:8081/api/",
|
|
25
25
|
"baseImageUrl": "http://localhost:3000/",
|
|
26
|
-
"dashboardUrl": "http://localhost:8081/",
|
|
26
|
+
"dashboardUrl": "http://localhost:8081/dashboard/",
|
|
27
27
|
"testsiteBaseUrl": "http://localhost:8081/widget/assets/twp/index.html",
|
|
28
28
|
"logLevel": "DEBUG",
|
|
29
29
|
"authPersistence": "LOCAL",
|