@chat21/chat21-ionic 3.0.61-rc7 → 3.0.62-rc2
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 +82 -0
- package/README.md +6 -0
- package/angular.json +2 -0
- package/config.xml +0 -1
- package/deploy_pre.sh +1 -1
- package/deploy_prod.sh +1 -1
- package/env.sample +1 -1
- package/package.json +4 -4
- package/src/app/app-routing.module.ts +15 -0
- package/src/app/app.component.ts +12 -9
- package/src/app/app.module.ts +11 -3
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +36 -25
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +160 -50
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +108 -18
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +21 -36
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +19 -7
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +35 -40
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -1
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +13 -10
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +7 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +2 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +142 -71
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +57 -20
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +32 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +98 -24
- package/src/app/components/ddp-header/ddp-header.component.html +9 -2
- package/src/app/components/ddp-header/ddp-header.component.ts +93 -18
- package/src/app/components/project-item/project-item.component.html +1 -1
- package/src/app/components/project-item/project-item.component.scss +1 -1
- package/src/app/components/project-item/project-item.component.ts +3 -3
- package/src/app/components/sidebar/sidebar.component.html +70 -58
- package/src/app/components/sidebar/sidebar.component.scss +21 -2
- package/src/app/components/sidebar/sidebar.component.ts +74 -26
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +20 -9
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +30 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +24 -8
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +5 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +19 -10
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +229 -389
- package/src/app/pages/conversations-list/conversations-list.page.ts +646 -454
- package/src/app/pages/create-canned-response/create-canned-response-routing.module.ts +17 -0
- package/src/app/pages/create-canned-response/create-canned-response.module.ts +30 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.html +150 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.scss +55 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.spec.ts +24 -0
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +319 -0
- package/src/app/pages/create-requester/create-requester-routing.module.ts +17 -0
- package/src/app/pages/create-requester/create-requester.module.ts +28 -0
- package/src/app/pages/create-requester/create-requester.page.html +67 -0
- package/src/app/pages/create-requester/create-requester.page.scss +30 -0
- package/src/app/pages/create-requester/create-requester.page.spec.ts +24 -0
- package/src/app/pages/create-requester/create-requester.page.ts +138 -0
- package/src/app/pages/create-ticket/create-ticket-routing.module.ts +17 -0
- package/src/app/pages/create-ticket/create-ticket.module.ts +28 -0
- package/src/app/pages/create-ticket/create-ticket.page.html +171 -0
- package/src/app/pages/create-ticket/create-ticket.page.scss +52 -0
- package/src/app/pages/create-ticket/create-ticket.page.spec.ts +24 -0
- package/src/app/pages/create-ticket/create-ticket.page.ts +432 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -11
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.scss +12 -1
- package/src/app/services/tiledesk/tiledesk.service.ts +190 -0
- package/src/app/shared/shared.module.ts +1 -1
- package/src/assets/i18n/de.json +37 -1
- package/src/assets/i18n/en.json +37 -1
- package/src/assets/i18n/es.json +38 -2
- package/src/assets/i18n/fr.json +38 -2
- package/src/assets/i18n/it.json +38 -2
- package/src/assets/i18n/pt.json +38 -2
- package/src/assets/i18n/ru.json +38 -2
- package/src/assets/i18n/sr.json +265 -0
- package/src/assets/i18n/tr.json +38 -3
- package/src/assets/images/default-avatar-x-select.png +0 -0
- package/src/assets/images/priority_icons/high.svg +3 -0
- package/src/assets/images/priority_icons/high_v2.svg +14 -0
- package/src/assets/images/priority_icons/low.svg +10 -0
- package/src/assets/images/priority_icons/low_v2.svg +14 -0
- package/src/assets/images/priority_icons/medium.svg +16 -0
- package/src/assets/images/priority_icons/medium_v2.svg +11 -0
- package/src/assets/images/priority_icons/urgent.svg +4 -0
- package/src/assets/images/priority_icons/urgent_v2.svg +16 -0
- package/src/chat-config-mqtt.json +25 -16
- package/src/chat-config-pre-test.json +1 -1
- package/src/chat-config-template.json +5 -4
- package/src/chat-config.json +1 -0
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -3
- package/src/chat21-core/utils/constants.ts +3 -1
- package/src/chat21-core/utils/utils-message.ts +19 -0
- package/src/global.scss +33 -9
|
@@ -11,7 +11,8 @@ import { skip } from 'rxjs/operators';
|
|
|
11
11
|
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
12
12
|
import { EventsService } from 'src/app/services/events-service';
|
|
13
13
|
import { tranlatedLanguage } from '../../../chat21-core/utils/constants';
|
|
14
|
-
import { avatarPlaceholder,
|
|
14
|
+
import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user';
|
|
15
|
+
import * as PACKAGE from 'package.json';
|
|
15
16
|
@Component({
|
|
16
17
|
selector: 'app-sidebar-user-details',
|
|
17
18
|
templateUrl: './sidebar-user-details.component.html',
|
|
@@ -40,6 +41,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
40
41
|
PAYD_PLAN_NAME_ENTERPRISE_msg: string;
|
|
41
42
|
PRO_PLAN_TRIAL_msg: string;
|
|
42
43
|
FREE_PLAN_msg: string;
|
|
44
|
+
LOGOUT_msg: string;
|
|
43
45
|
profile_name_translated: string;
|
|
44
46
|
SubscriptionPaymentProblem: string;
|
|
45
47
|
user: any
|
|
@@ -53,8 +55,10 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
53
55
|
public_Key: any
|
|
54
56
|
plan_name: string;
|
|
55
57
|
plan_subscription_is_active: boolean;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
59
|
+
version: string
|
|
60
|
+
test: Date = new Date();
|
|
61
|
+
company_name: string = 'Tiledesk'
|
|
58
62
|
constructor(
|
|
59
63
|
private translate: TranslateService,
|
|
60
64
|
public tiledeskAuthService: TiledeskAuthService,
|
|
@@ -68,6 +72,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
68
72
|
) { }
|
|
69
73
|
|
|
70
74
|
ngOnInit() {
|
|
75
|
+
this.version = PACKAGE.version;
|
|
71
76
|
this.getCurrentChatLangAndTranslateLabels();
|
|
72
77
|
this.subcribeToAuthStateChanged();
|
|
73
78
|
this.listenTocurrentProjectUserUserAvailability$();
|
|
@@ -95,12 +100,12 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
95
100
|
}
|
|
96
101
|
|
|
97
102
|
checkIfExistPhotoProfile(imageUrl) {
|
|
98
|
-
this.verifyImageURL(imageUrl,
|
|
103
|
+
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
99
104
|
|
|
100
105
|
if (imageExists === true) {
|
|
101
106
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
102
107
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
103
|
-
|
|
108
|
+
|
|
104
109
|
} else {
|
|
105
110
|
this.USER_PHOTO_PROFILE_EXIST = false;
|
|
106
111
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -124,7 +129,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
124
129
|
currentUser['fullname_initial'] = 'N/A'
|
|
125
130
|
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
126
131
|
}
|
|
127
|
-
}
|
|
132
|
+
}
|
|
128
133
|
|
|
129
134
|
verifyImageURL(image_url, callBack) {
|
|
130
135
|
const img = new Image();
|
|
@@ -198,7 +203,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
198
203
|
this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
|
|
199
204
|
}
|
|
200
205
|
|
|
201
|
-
|
|
206
|
+
|
|
202
207
|
if (tranlatedLanguage.includes(this.chat_lang)) {
|
|
203
208
|
this.logger.log('[SIDEBAR-USER-DETAILS] tranlatedLanguage includes', this.chat_lang, ': ', tranlatedLanguage.includes(this.chat_lang))
|
|
204
209
|
this.translate.use(this.chat_lang);
|
|
@@ -218,6 +223,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
218
223
|
this.getIsBusyTranslation();
|
|
219
224
|
this.getSubscriptionPaymentProblemTranslation();
|
|
220
225
|
this.getThePlanHasExpiredTranslation();
|
|
226
|
+
this.getLogoutTranslation();
|
|
221
227
|
}
|
|
222
228
|
|
|
223
229
|
|
|
@@ -276,6 +282,15 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
276
282
|
});
|
|
277
283
|
}
|
|
278
284
|
|
|
285
|
+
getLogoutTranslation() {
|
|
286
|
+
this.translate.get('LABEL_LOGOUT')
|
|
287
|
+
.subscribe((text: string) => {
|
|
288
|
+
// this.deleteContact_msg = text;
|
|
289
|
+
// console.log('[SIDEBAR-USER-DETAILS] - GET Logout label ', text)
|
|
290
|
+
this.LOGOUT_msg = text
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
279
294
|
getSubscriptionPaymentProblemTranslation() {
|
|
280
295
|
this.translate.get('SubscriptionPaymentProblem')
|
|
281
296
|
.subscribe((text: string) => {
|
|
@@ -298,7 +313,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
298
313
|
getCurrentStoredProject() {
|
|
299
314
|
try {
|
|
300
315
|
const project = localStorage.getItem('last_project')
|
|
301
|
-
if (project) {
|
|
316
|
+
if (project && project !== 'undefined') {
|
|
302
317
|
const projectObjct = JSON.parse(localStorage.getItem('last_project'))
|
|
303
318
|
// console.log('[SIDEBAR-USER-DETAILS] - GET STORED PROJECT ', projectObjct)
|
|
304
319
|
|
|
@@ -388,6 +403,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
388
403
|
});
|
|
389
404
|
}
|
|
390
405
|
|
|
406
|
+
|
|
391
407
|
|
|
392
408
|
|
|
393
409
|
listenTocurrentProjectUserUserAvailability$() {
|
|
@@ -35,6 +35,9 @@ import { SharedModule } from 'src/app/shared/shared.module';
|
|
|
35
35
|
// import { SharedConversationInfoModule } from 'src/app/shared/shared-conversation-info.module';
|
|
36
36
|
import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
|
|
37
37
|
import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
38
|
+
import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
39
|
+
|
|
40
|
+
|
|
38
41
|
@NgModule({
|
|
39
42
|
imports: [
|
|
40
43
|
CommonModule,
|
|
@@ -43,6 +46,7 @@ import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
|
43
46
|
TooltipModule,
|
|
44
47
|
ConversationDetailPageRoutingModule,
|
|
45
48
|
ScrollbarThemeModule,
|
|
49
|
+
PickerModule,
|
|
46
50
|
TranslateModule.forChild({
|
|
47
51
|
loader: {
|
|
48
52
|
provide: TranslateLoader,
|
|
@@ -58,7 +62,7 @@ import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
|
|
|
58
62
|
declarations: [
|
|
59
63
|
ConversationDetailPage,
|
|
60
64
|
HeaderConversationDetailComponent,
|
|
61
|
-
MessageTextAreaComponent
|
|
65
|
+
MessageTextAreaComponent
|
|
62
66
|
// BubbleDayMessageComponent,
|
|
63
67
|
// BubbleSystemMessageComponent,
|
|
64
68
|
// BubbleMyMessageComponent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<span *ngIf="conversationWith && loggedUser; then showConversation else showPlaceholder"></span>
|
|
2
2
|
<ng-template #showPlaceholder>
|
|
3
3
|
<!-- class="splash-page" -->
|
|
4
|
-
<ion-content
|
|
4
|
+
<ion-content padding>
|
|
5
5
|
<!-- <div padding class="image-splash-page"></div>
|
|
6
6
|
<div padding class="title-splash-page">
|
|
7
7
|
text new conversation + button
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<ion-grid style="height: 100%;">
|
|
11
11
|
<ion-row class="ion-justify-content-center ion-align-items-center" style="height: 100%; flex-direction: column">
|
|
12
|
-
<span *ngIf="isOnline === true && !showSpinner"
|
|
12
|
+
<span *ngIf="isOnline === true && !showSpinner"
|
|
13
|
+
style="color: #92949c; font-size: 16px;line-height: 18px;margin-top: -160px;">
|
|
13
14
|
<span *ngIf="conversation_count > 0 ">
|
|
14
15
|
{{'PleaseSelectChatToStartMessaging' | translate }}
|
|
15
16
|
</span>
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
<app-header-conversation-detail [isMobile]="isMobile" [idLoggedUser]="loggedUser.uid"
|
|
35
36
|
[conversationAvatar]="conversationAvatar" [translationMap]="translationMap"
|
|
36
37
|
(eventOpenCloseInfoConversation)="returnOpenCloseInfoConversation($event)"
|
|
37
|
-
[isOpenInfoConversation]="isOpenInfoConversation">
|
|
38
|
+
[isOpenInfoConversation]="isOpenInfoConversation" [conv_type]="conv_type">
|
|
38
39
|
</app-header-conversation-detail>
|
|
39
40
|
|
|
40
41
|
<ion-content id="conv-details">
|
|
@@ -136,15 +137,24 @@
|
|
|
136
137
|
<!-- ----------------------------------------------------------- -->
|
|
137
138
|
<!-- Canned responses -->
|
|
138
139
|
<!-- ----------------------------------------------------------- -->
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<ion-list class="canned-list">
|
|
140
|
+
<div id="canned">
|
|
141
|
+
<ion-list class="canned-list" *ngIf="tagsCannedFilter.length > 0 && HIDE_CANNED_RESPONSES === false">
|
|
142
142
|
<ion-item button="true" [ngClass]="{'is_active_item': i == arrowkeyLocation}" lines="none"
|
|
143
143
|
class="canned-item" id="{{'canned-item_'+ i }}"
|
|
144
144
|
*ngFor="let canned of tagsCannedFilter; let i = index;" [innerHtml]="canned.title"
|
|
145
145
|
(click)="replaceTagInMessage(canned, $event)">
|
|
146
146
|
</ion-item>
|
|
147
|
+
<ion-item class="canned-item add-canned-response-wpr" button="true" lines="none" (click)="presentCreateCannedResponseModal()">
|
|
148
|
+
<ion-icon class="add-canned-response-icon" name="flash-outline"></ion-icon>
|
|
149
|
+
<span class="add-canned-response-add-icon">+</span>
|
|
150
|
+
<label class="add-canned-response-label" >{{translationMap?.get('AddNewCannedResponse')}}</label>
|
|
151
|
+
</ion-item>
|
|
147
152
|
</ion-list>
|
|
153
|
+
<!-- <ion-list class="canned-list" *ngIf="tagsCannedFilter.length === 0 && HIDE_CANNED_RESPONSES === false">
|
|
154
|
+
<ion-item button="true" >
|
|
155
|
+
There are no canned responses available
|
|
156
|
+
</ion-item>
|
|
157
|
+
</ion-list> -->
|
|
148
158
|
</div>
|
|
149
159
|
|
|
150
160
|
|
|
@@ -155,15 +165,14 @@
|
|
|
155
165
|
<!-- openInfoConversation {{openInfoConversation}} - isMobile {{isMobile}} -->
|
|
156
166
|
<app-message-text-area
|
|
157
167
|
*ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
|
|
158
|
-
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [
|
|
159
|
-
[conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
168
|
+
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [support_mode]="support_mode"
|
|
169
|
+
[loggedUser]="loggedUser" [conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
160
170
|
(eventChangeTextArea)="returnChangeTextArea($event)"
|
|
161
171
|
(hasClickedOpenCannedResponses)="hasClickedOpenCannedResponses($event)"
|
|
162
172
|
(eventSendMessage)="returnSendMessage($event)" [translationMap]="translationMap"
|
|
163
173
|
[fileUploadAccept]="appConfigProvider.getConfig().fileUploadAccept"
|
|
164
174
|
[isOpenInfoConversation]="isOpenInfoConversation" [dropEvent]="dropEvent"
|
|
165
|
-
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)"
|
|
166
|
-
[disableTextarea]="disableTextarea">
|
|
175
|
+
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)" [disableTextarea]="disableTextarea">
|
|
167
176
|
</app-message-text-area>
|
|
168
177
|
<!-- [events]="eventsReplaceTexareaText.asObservable()" -->
|
|
169
178
|
</ion-row>
|
|
@@ -25,6 +25,34 @@
|
|
|
25
25
|
font-size: 24px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.add-canned-response-icon {
|
|
29
|
+
color: #b3bfd0;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
}
|
|
33
|
+
.add-canned-response-label {
|
|
34
|
+
color: #b3bfd0;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.add-canned-response-add-icon {
|
|
38
|
+
color: #b3bfd0;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
position: relative;
|
|
41
|
+
top: 4px;
|
|
42
|
+
left: -6px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > span {
|
|
46
|
+
color: #1877f2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > ion-icon {
|
|
50
|
+
color: #1877f2;
|
|
51
|
+
}
|
|
52
|
+
#canned > ion-list > ion-item.canned-item.add-canned-response-wpr:hover > label {
|
|
53
|
+
color: #1877f2;
|
|
54
|
+
}
|
|
55
|
+
|
|
28
56
|
// ion-back-button{
|
|
29
57
|
// display: none!important;
|
|
30
58
|
// }
|