@chat21/chat21-ionic 3.0.61-rc11 → 3.0.61-rc15
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 +22 -0
- package/angular.json +1 -0
- package/package.json +2 -1
- package/src/app/app-routing.module.ts +5 -0
- package/src/app/app.module.ts +6 -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 +101 -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/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 +28 -25
- 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 +93 -24
- package/src/app/components/project-item/project-item.component.scss +1 -1
- package/src/app/components/sidebar/sidebar.component.html +36 -35
- package/src/app/components/sidebar/sidebar.component.ts +72 -26
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +7 -0
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +13 -1
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +11 -7
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +5 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +19 -11
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +221 -368
- package/src/app/pages/conversations-list/conversations-list.page.ts +6 -18
- 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.page.html +1 -1
- package/src/app/pages/create-requester/create-requester.page.ts +1 -0
- package/src/app/pages/create-ticket/create-ticket.page.html +1 -1
- package/src/app/pages/create-ticket/create-ticket.page.ts +13 -4
- 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 +28 -0
- package/src/app/shared/shared.module.ts +1 -1
- package/src/assets/i18n/de.json +17 -3
- package/src/assets/i18n/en.json +17 -3
- package/src/assets/i18n/es.json +17 -3
- package/src/assets/i18n/fr.json +17 -3
- package/src/assets/i18n/it.json +17 -3
- package/src/assets/i18n/pt.json +17 -3
- package/src/assets/i18n/ru.json +17 -3
- package/src/assets/i18n/sr.json +17 -3
- package/src/assets/i18n/tr.json +17 -3
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -3
- package/src/chat21-core/utils/utils-message.ts +19 -0
- package/src/global.scss +8 -0
|
@@ -13,7 +13,7 @@ import { EventsService } from 'src/app/services/events-service';
|
|
|
13
13
|
import { tranlatedLanguage } from '../../../chat21-core/utils/constants';
|
|
14
14
|
|
|
15
15
|
// utils
|
|
16
|
-
import { avatarPlaceholder,
|
|
16
|
+
import { avatarPlaceholder, getColorBck } from 'src/chat21-core/utils/utils-user';
|
|
17
17
|
|
|
18
18
|
@Component({
|
|
19
19
|
selector: 'app-sidebar',
|
|
@@ -49,6 +49,15 @@ export class SidebarComponent implements OnInit {
|
|
|
49
49
|
countClickOnOpenUserDetailSidebar: number = 0
|
|
50
50
|
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
51
51
|
currentUser: any;
|
|
52
|
+
dashboard_home_url: string;
|
|
53
|
+
dashboard_bots_url: string;
|
|
54
|
+
dashboard_convs_url: string;
|
|
55
|
+
dashboard_contacts_url: string;
|
|
56
|
+
dashboard_app_url: string;
|
|
57
|
+
dashboard_analytics_url: string;
|
|
58
|
+
dashboard_activities_url: string;
|
|
59
|
+
dashboard_history_url: string;
|
|
60
|
+
dashboard_settings_url: string;
|
|
52
61
|
constructor(
|
|
53
62
|
public imageRepoService: ImageRepoService,
|
|
54
63
|
public appStorageService: AppStorageService,
|
|
@@ -59,13 +68,13 @@ export class SidebarComponent implements OnInit {
|
|
|
59
68
|
public appConfigProvider: AppConfigProvider,
|
|
60
69
|
private translate: TranslateService,
|
|
61
70
|
public events: EventsService,
|
|
62
|
-
|
|
71
|
+
|
|
63
72
|
) { }
|
|
64
73
|
|
|
65
74
|
ngOnInit() {
|
|
66
75
|
this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl + '#/project/';
|
|
67
76
|
// console.log('[SIDEBAR] DASHBOARD_URL ', this.DASHBOARD_URL)
|
|
68
|
-
this.
|
|
77
|
+
this.getStoredProjectAndUserRole()
|
|
69
78
|
this.subcribeToAuthStateChanged()
|
|
70
79
|
this.listenTocurrentProjectUserUserAvailability$()
|
|
71
80
|
this.getOSCODE();
|
|
@@ -84,8 +93,44 @@ export class SidebarComponent implements OnInit {
|
|
|
84
93
|
// height: '35px'
|
|
85
94
|
// };
|
|
86
95
|
// }
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
getStoredProjectAndUserRole() {
|
|
102
|
+
const stored_project = localStorage.getItem('last_project')
|
|
103
|
+
// console.log('[SIDEBAR] stored_project ', stored_project)
|
|
104
|
+
if (stored_project) {
|
|
105
|
+
const project = JSON.parse(stored_project)
|
|
106
|
+
this.logger.log('[SIDEBAR] project ', project)
|
|
107
|
+
|
|
108
|
+
this.project_id = project.id_project.id
|
|
109
|
+
this.logger.log('[SIDEBAR] project_id ', this.project_id)
|
|
110
|
+
|
|
111
|
+
this.USER_ROLE = project.role;
|
|
112
|
+
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
113
|
+
this.buildURLs(this.USER_ROLE)
|
|
114
|
+
}
|
|
87
115
|
}
|
|
88
116
|
|
|
117
|
+
buildURLs(USER_ROLE) {
|
|
118
|
+
this.dashboard_home_url = this.DASHBOARD_URL + this.project_id + '/home'
|
|
119
|
+
this.dashboard_bots_url = this.DASHBOARD_URL + this.project_id + '/bots'
|
|
120
|
+
this.dashboard_convs_url = this.DASHBOARD_URL + this.project_id + '/wsrequests'
|
|
121
|
+
this.dashboard_contacts_url = this.DASHBOARD_URL + this.project_id + '/contacts'
|
|
122
|
+
this.dashboard_app_url = this.DASHBOARD_URL + this.project_id + '/app-store'
|
|
123
|
+
this.dashboard_analytics_url = this.DASHBOARD_URL + this.project_id + '/analytics'
|
|
124
|
+
this.dashboard_activities_url = this.DASHBOARD_URL + this.project_id + '/activities'
|
|
125
|
+
this.dashboard_history_url = this.DASHBOARD_URL + this.project_id + '/history'
|
|
126
|
+
this.dashboard_settings_url = ''
|
|
127
|
+
if (USER_ROLE !== 'agent') {
|
|
128
|
+
this.dashboard_settings_url = this.DASHBOARD_URL + this.project_id + '/widget-set-up'
|
|
129
|
+
} else if (USER_ROLE === 'agent') {
|
|
130
|
+
this.dashboard_settings_url = this.DASHBOARD_URL + this.project_id + '/cannedresponses'
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
89
134
|
|
|
90
135
|
subcribeToAuthStateChanged() {
|
|
91
136
|
this.messagingAuthService.BSAuthStateChanged.subscribe((state) => {
|
|
@@ -106,12 +151,12 @@ export class SidebarComponent implements OnInit {
|
|
|
106
151
|
}
|
|
107
152
|
|
|
108
153
|
checkIfExistPhotoProfile(imageUrl) {
|
|
109
|
-
this.verifyImageURL(imageUrl,
|
|
154
|
+
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
110
155
|
|
|
111
156
|
if (imageExists === true) {
|
|
112
157
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
113
158
|
this.logger.log('[SIDEBAR] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
114
|
-
|
|
159
|
+
|
|
115
160
|
} else {
|
|
116
161
|
this.USER_PHOTO_PROFILE_EXIST = false;
|
|
117
162
|
this.logger.log('[SIDEBAR] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -134,7 +179,7 @@ export class SidebarComponent implements OnInit {
|
|
|
134
179
|
currentUser['fullname_initial'] = 'N/A'
|
|
135
180
|
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
136
181
|
}
|
|
137
|
-
}
|
|
182
|
+
}
|
|
138
183
|
|
|
139
184
|
verifyImageURL(image_url, callBack) {
|
|
140
185
|
const img = new Image();
|
|
@@ -380,36 +425,21 @@ export class SidebarComponent implements OnInit {
|
|
|
380
425
|
|
|
381
426
|
|
|
382
427
|
|
|
383
|
-
|
|
384
|
-
getStoredProjectAndDashboardBaseUrl() {
|
|
385
|
-
const stored_project = localStorage.getItem('last_project')
|
|
386
|
-
// console.log('[SIDEBAR] stored_project ', stored_project)
|
|
387
|
-
if (stored_project) {
|
|
388
|
-
const project = JSON.parse(stored_project)
|
|
389
|
-
this.logger.log('[SIDEBAR] project ', project)
|
|
390
|
-
|
|
391
|
-
this.project_id = project.id_project.id
|
|
392
|
-
this.logger.log('[SIDEBAR] project_id ', this.project_id)
|
|
393
|
-
|
|
394
|
-
this.USER_ROLE = project.role;
|
|
395
|
-
this.logger.log('[SIDEBAR] USER_ROLE ', this.USER_ROLE)
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
428
|
goToHome() {
|
|
400
429
|
let url = this.DASHBOARD_URL + this.project_id + '/home'
|
|
430
|
+
this.dashboard_home_url = url;
|
|
401
431
|
const myWindow = window.open(url, '_self');
|
|
402
432
|
myWindow.focus();
|
|
403
433
|
}
|
|
404
434
|
|
|
405
|
-
|
|
406
|
-
let url = this.DASHBOARD_URL + this.project_id + '/
|
|
435
|
+
goToBots() {
|
|
436
|
+
let url = this.DASHBOARD_URL + this.project_id + '/bots'
|
|
407
437
|
const myWindow = window.open(url, '_self');
|
|
408
438
|
myWindow.focus();
|
|
409
439
|
}
|
|
410
440
|
|
|
411
|
-
|
|
412
|
-
let url = this.DASHBOARD_URL + this.project_id + '/
|
|
441
|
+
goToConversations() {
|
|
442
|
+
let url = this.DASHBOARD_URL + this.project_id + '/wsrequests'
|
|
413
443
|
const myWindow = window.open(url, '_self');
|
|
414
444
|
myWindow.focus();
|
|
415
445
|
}
|
|
@@ -446,12 +476,28 @@ export class SidebarComponent implements OnInit {
|
|
|
446
476
|
myWindow.focus();
|
|
447
477
|
}
|
|
448
478
|
|
|
479
|
+
goToWidgetSetUpOrToCannedResponses() {
|
|
480
|
+
if (this.USER_ROLE !== 'agent') {
|
|
481
|
+
this.goToWidgetSetUp()
|
|
482
|
+
} else if (this.USER_ROLE === 'agent') {
|
|
483
|
+
this.goToSettings_CannedResponses()
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
goToWidgetSetUp() {
|
|
488
|
+
let url = this.DASHBOARD_URL + this.project_id + '/widget-set-up'
|
|
489
|
+
const myWindow = window.open(url, '_self');
|
|
490
|
+
myWindow.focus();
|
|
491
|
+
}
|
|
492
|
+
|
|
449
493
|
goToSettings_CannedResponses() {
|
|
450
494
|
let url = this.DASHBOARD_URL + this.project_id + '/cannedresponses'
|
|
451
495
|
const myWindow = window.open(url, '_self');
|
|
452
496
|
myWindow.focus();
|
|
453
497
|
}
|
|
454
498
|
|
|
499
|
+
|
|
500
|
+
|
|
455
501
|
public translations() {
|
|
456
502
|
const keys = [
|
|
457
503
|
'Available',
|
|
@@ -107,4 +107,11 @@
|
|
|
107
107
|
<div> Logout</div>
|
|
108
108
|
</section>
|
|
109
109
|
|
|
110
|
+
<section class="user-details-footer-chat-version">
|
|
111
|
+
<div class="chat-version">
|
|
112
|
+
<!-- © {{test | date: 'yyyy'}} {{company_name}} ver {{version}} -->
|
|
113
|
+
ver {{version}}
|
|
114
|
+
</div>
|
|
115
|
+
</section>
|
|
116
|
+
|
|
110
117
|
</div>
|
|
@@ -275,6 +275,18 @@ button.user-details-btn-close {
|
|
|
275
275
|
color: #fff;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
.user-details-footer-chat-version {
|
|
279
|
+
position: absolute;
|
|
280
|
+
bottom: 11px;
|
|
281
|
+
text-align: center;
|
|
282
|
+
margin: auto;
|
|
283
|
+
transform: translateX(-50%);
|
|
284
|
+
left: 50%;
|
|
285
|
+
margin: auto;
|
|
286
|
+
font-size: 12px;
|
|
287
|
+
font-weight: 400;
|
|
288
|
+
}
|
|
289
|
+
|
|
278
290
|
:host ::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-bar {
|
|
279
291
|
background-color: #a9afbb;
|
|
280
292
|
margin-left: 30px;
|
|
@@ -315,4 +327,4 @@ button.user-details-btn-close {
|
|
|
315
327
|
font-weight: 400;
|
|
316
328
|
font-family: "Poppins";
|
|
317
329
|
font-size: 32px;
|
|
318
|
-
}
|
|
330
|
+
}
|
|
@@ -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',
|
|
@@ -53,8 +54,10 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
53
54
|
public_Key: any
|
|
54
55
|
plan_name: string;
|
|
55
56
|
plan_subscription_is_active: boolean;
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
USER_PHOTO_PROFILE_EXIST: boolean;
|
|
58
|
+
version: string
|
|
59
|
+
test: Date = new Date();
|
|
60
|
+
company_name: string = 'Tiledesk'
|
|
58
61
|
constructor(
|
|
59
62
|
private translate: TranslateService,
|
|
60
63
|
public tiledeskAuthService: TiledeskAuthService,
|
|
@@ -68,6 +71,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
68
71
|
) { }
|
|
69
72
|
|
|
70
73
|
ngOnInit() {
|
|
74
|
+
this.version = PACKAGE.version;
|
|
71
75
|
this.getCurrentChatLangAndTranslateLabels();
|
|
72
76
|
this.subcribeToAuthStateChanged();
|
|
73
77
|
this.listenTocurrentProjectUserUserAvailability$();
|
|
@@ -95,12 +99,12 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
checkIfExistPhotoProfile(imageUrl) {
|
|
98
|
-
this.verifyImageURL(imageUrl,
|
|
102
|
+
this.verifyImageURL(imageUrl, (imageExists) => {
|
|
99
103
|
|
|
100
104
|
if (imageExists === true) {
|
|
101
105
|
this.USER_PHOTO_PROFILE_EXIST = true;
|
|
102
106
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
103
|
-
|
|
107
|
+
|
|
104
108
|
} else {
|
|
105
109
|
this.USER_PHOTO_PROFILE_EXIST = false;
|
|
106
110
|
this.logger.log('[SIDEBAR-USER-DETAILS] photo_profile_URL IMAGE EXIST ', imageExists)
|
|
@@ -124,7 +128,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
124
128
|
currentUser['fullname_initial'] = 'N/A'
|
|
125
129
|
currentUser['fillColour'] = 'rgb(98, 100, 167)'
|
|
126
130
|
}
|
|
127
|
-
}
|
|
131
|
+
}
|
|
128
132
|
|
|
129
133
|
verifyImageURL(image_url, callBack) {
|
|
130
134
|
const img = new Image();
|
|
@@ -198,7 +202,7 @@ export class SidebarUserDetailsComponent implements OnInit, OnChanges {
|
|
|
198
202
|
this.logger.log('[SIDEBAR-USER-DETAILS] chat_lang: ', this.chat_lang);
|
|
199
203
|
}
|
|
200
204
|
|
|
201
|
-
|
|
205
|
+
|
|
202
206
|
if (tranlatedLanguage.includes(this.chat_lang)) {
|
|
203
207
|
this.logger.log('[SIDEBAR-USER-DETAILS] tranlatedLanguage includes', this.chat_lang, ': ', tranlatedLanguage.includes(this.chat_lang))
|
|
204
208
|
this.translate.use(this.chat_lang);
|
|
@@ -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,8 +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
|
-
[conv_type]="conv_type">
|
|
38
|
+
[isOpenInfoConversation]="isOpenInfoConversation" [conv_type]="conv_type">
|
|
39
39
|
</app-header-conversation-detail>
|
|
40
40
|
|
|
41
41
|
<ion-content id="conv-details">
|
|
@@ -137,15 +137,24 @@
|
|
|
137
137
|
<!-- ----------------------------------------------------------- -->
|
|
138
138
|
<!-- Canned responses -->
|
|
139
139
|
<!-- ----------------------------------------------------------- -->
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<ion-list class="canned-list">
|
|
140
|
+
<div id="canned">
|
|
141
|
+
<ion-list class="canned-list" *ngIf="tagsCannedFilter.length > 0 && HIDE_CANNED_RESPONSES === false">
|
|
143
142
|
<ion-item button="true" [ngClass]="{'is_active_item': i == arrowkeyLocation}" lines="none"
|
|
144
143
|
class="canned-item" id="{{'canned-item_'+ i }}"
|
|
145
144
|
*ngFor="let canned of tagsCannedFilter; let i = index;" [innerHtml]="canned.title"
|
|
146
145
|
(click)="replaceTagInMessage(canned, $event)">
|
|
147
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>
|
|
148
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> -->
|
|
149
158
|
</div>
|
|
150
159
|
|
|
151
160
|
|
|
@@ -156,15 +165,14 @@
|
|
|
156
165
|
<!-- openInfoConversation {{openInfoConversation}} - isMobile {{isMobile}} -->
|
|
157
166
|
<app-message-text-area
|
|
158
167
|
*ngIf="(openInfoConversation === false && isMobile === true) || (openInfoConversation === true && isMobile === false) || (openInfoConversation === false && isMobile === false)"
|
|
159
|
-
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [
|
|
160
|
-
[conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
168
|
+
[tagsCannedCount]="tagsCannedCount" [areVisibleCAR]="areVisibleCAR" [support_mode]="support_mode"
|
|
169
|
+
[loggedUser]="loggedUser" [conversationWith]="conversationWith" [tagsCannedFilter]="tagsCannedFilter"
|
|
161
170
|
(eventChangeTextArea)="returnChangeTextArea($event)"
|
|
162
171
|
(hasClickedOpenCannedResponses)="hasClickedOpenCannedResponses($event)"
|
|
163
172
|
(eventSendMessage)="returnSendMessage($event)" [translationMap]="translationMap"
|
|
164
173
|
[fileUploadAccept]="appConfigProvider.getConfig().fileUploadAccept"
|
|
165
174
|
[isOpenInfoConversation]="isOpenInfoConversation" [dropEvent]="dropEvent"
|
|
166
|
-
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)"
|
|
167
|
-
[disableTextarea]="disableTextarea">
|
|
175
|
+
(onPresentModalScrollToBottom)="onPresentModalScrollToBottom($event)" [disableTextarea]="disableTextarea">
|
|
168
176
|
</app-message-text-area>
|
|
169
177
|
<!-- [events]="eventsReplaceTexareaText.asObservable()" -->
|
|
170
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
|
// }
|