@chat21/chat21-ionic 3.0.61-rc11 → 3.0.61-rc12
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 -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 +23 -5
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +142 -49
- 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 +20 -36
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -0
- 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 +9 -9
- package/src/app/components/sidebar/sidebar.component.ts +13 -10
- 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/global.scss +8 -0
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!-- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" -->
|
|
2
2
|
<!-- [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px'}" -->
|
|
3
3
|
<!-- isImage >{{isImage(message) }} message.metadata.width {{message?.metadata?.width }} -->
|
|
4
|
-
<div id="bubble-message"
|
|
5
|
-
|
|
6
|
-
[class.emoticon]="message?.emoticon">
|
|
4
|
+
<div id="bubble-message"
|
|
5
|
+
[ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px', 'width': (isImage(message) || isFrame(message))? message?.metadata?.width + 'px' : null }"
|
|
6
|
+
class="messages primary-color" [class.emoticon]="message?.emoticon">
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
<div>
|
|
@@ -18,19 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
<!-- [width]="getMetadataSize(message.metadata).width"
|
|
20
20
|
[height]="getMetadataSize(message.metadata).height" -->
|
|
21
|
-
<chat-image *ngIf="isImage(message)"
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
[width]="message.metadata.width"
|
|
25
|
-
[height]="message.metadata.height"
|
|
26
|
-
(onImageRendered)="onImageRenderedFN($event)">
|
|
21
|
+
<chat-image *ngIf="isImage(message)" [metadata]="message.metadata" [width]="message.metadata.width"
|
|
22
|
+
[height]="message.metadata.height" (onImageRendered)="onImageRenderedFN($event)">
|
|
27
23
|
</chat-image>
|
|
28
24
|
|
|
29
25
|
<!-- [width]="getMetadataSize(message.metadata).width" -->
|
|
30
26
|
<!-- [height]="getMetadataSize(message.metadata).height"> -->
|
|
31
|
-
<chat-frame *ngIf="isFrame(message)"
|
|
32
|
-
[metadata]="message.metadata"
|
|
33
|
-
[width]="message.metadata.width"
|
|
27
|
+
<chat-frame *ngIf="isFrame(message)" [metadata]="message.metadata" [width]="message.metadata.width"
|
|
34
28
|
[height]="message.metadata.height">
|
|
35
29
|
</chat-frame>
|
|
36
30
|
|
|
@@ -40,36 +34,26 @@
|
|
|
40
34
|
[height]="message.metadata.height">
|
|
41
35
|
</chat-frame> -->
|
|
42
36
|
|
|
43
|
-
<!-- message type:: text -->
|
|
44
|
-
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
45
|
-
|
|
46
|
-
<div *ngIf="message?.text" [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left"
|
|
47
|
-
content-type="template" (click)="handleTooltipEvents($event)">
|
|
48
|
-
<ng-template #timeTooltipLeft>
|
|
49
|
-
<!-- <span>{{message.timestamp | amTimeAgo}}</span> -->
|
|
50
|
-
<!-- <span> {{browserLang === 'it' ? (message.timestamp| amDateFormat:'DD MMM') : (message.timestamp |
|
|
51
|
-
amDateFormat:'MMM DD')}} </span> amCalendar -->
|
|
52
37
|
|
|
38
|
+
<!-- [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left" content-type="template" (click)="handleTooltipEvents($event)" -->
|
|
39
|
+
<div *ngIf="message?.text">
|
|
40
|
+
<span class="message-date"> {{message.timestamp | date:'HH:mm' }} </span>
|
|
41
|
+
<!-- <ng-template #timeTooltipLeft>
|
|
53
42
|
<span> {{message.timestamp | amCalendar }} </span>
|
|
54
|
-
</ng-template>
|
|
43
|
+
</ng-template> -->
|
|
55
44
|
|
|
56
|
-
<chat-text
|
|
57
|
-
[text]="message?.text"
|
|
58
|
-
[color]="textColor"
|
|
59
|
-
[message]="message"
|
|
45
|
+
<chat-text [text]="message?.text" [color]="textColor" [message]="message"
|
|
60
46
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
61
47
|
(onAfterMessageRender)="returnOnAfterMessageRender($event)">
|
|
62
48
|
</chat-text>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</
|
|
70
|
-
|
|
71
|
-
<p #messageEl [innerHTML]="printMessage(message, messageEl, this) | linky"></p>
|
|
72
|
-
</ng-template> -->
|
|
49
|
+
|
|
50
|
+
<ng-container *ngIf="areVisibleCAR && support_mode === true">
|
|
51
|
+
<ion-button shape="round" size="small" class="btn-add-msg-as-canned-response" ion-button fill="clear"
|
|
52
|
+
(click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
|
|
53
|
+
[options]="tooltipOptions" placement="bottom">
|
|
54
|
+
<ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
|
|
55
|
+
</ion-button>
|
|
56
|
+
</ng-container>
|
|
73
57
|
</div>
|
|
74
58
|
</div>
|
|
75
59
|
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss
CHANGED
|
@@ -47,5 +47,15 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
}
|
|
50
|
+
// > .button-native
|
|
51
|
+
.btn-add-msg-as-canned-response {
|
|
52
|
+
// padding-left: 5px ;
|
|
53
|
+
// padding-right: 5px ;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
--padding-end: 7px ;
|
|
56
|
+
--padding-start: 7px ;
|
|
57
|
+
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 6%)
|
|
58
|
+
|
|
59
|
+
}
|
|
50
60
|
|
|
51
61
|
|
package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
8
8
|
import { TranslateService } from '@ngx-translate/core';
|
|
9
9
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
10
10
|
import * as moment from 'moment';
|
|
11
|
+
import { CreateCannedResponsePage } from 'src/app/pages/create-canned-response/create-canned-response.page'
|
|
12
|
+
import { ModalController } from '@ionic/angular';
|
|
11
13
|
@Component({
|
|
12
14
|
selector: 'chat-bubble-message',
|
|
13
15
|
templateUrl: './bubble-message.component.html',
|
|
@@ -17,13 +19,15 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
17
19
|
|
|
18
20
|
@Input() message: MessageModel;
|
|
19
21
|
@Input() textColor: string;
|
|
22
|
+
@Input() areVisibleCAR: boolean;
|
|
23
|
+
@Input() support_mode: boolean;
|
|
20
24
|
@Output() onBeforeMessageRender = new EventEmitter();
|
|
21
25
|
@Output() onAfterMessageRender = new EventEmitter();
|
|
22
26
|
@Output() onImageRendered = new EventEmitter<boolean>()
|
|
23
27
|
isImage = isImage;
|
|
24
28
|
isFile = isFile;
|
|
25
29
|
isFrame = isFrame;
|
|
26
|
-
|
|
30
|
+
@Input() addAsCannedResponseTooltipText : string;
|
|
27
31
|
public browserLang: string;
|
|
28
32
|
|
|
29
33
|
tooltipOptions = {
|
|
@@ -41,46 +45,14 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
41
45
|
constructor(
|
|
42
46
|
public sanitizer: DomSanitizer,
|
|
43
47
|
private translate: TranslateService,
|
|
44
|
-
public tiledeskAuthService: TiledeskAuthService
|
|
45
|
-
|
|
48
|
+
public tiledeskAuthService: TiledeskAuthService,
|
|
49
|
+
public modalController: ModalController,
|
|
46
50
|
) {
|
|
47
51
|
// console.log('BUBBLE-MSG Hello !!!!')
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
ngOnInit() {
|
|
51
|
-
|
|
52
55
|
this.setMomentLocale()
|
|
53
|
-
// this.browserLang = this.translate.getBrowserLang();
|
|
54
|
-
|
|
55
|
-
// if (this.browserLang) {
|
|
56
|
-
// if (this.browserLang === 'it') {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// moment.locale('it', {
|
|
60
|
-
// calendar: {
|
|
61
|
-
// lastDay: '[Ieri alle] LT',
|
|
62
|
-
// sameDay: '[Oggi alle] LT',
|
|
63
|
-
// nextDay: '[Domani alle] LT',
|
|
64
|
-
// lastWeek: '[Ultimo] dddd [alle] LT',
|
|
65
|
-
// nextWeek: 'dddd [alle] LT',
|
|
66
|
-
// sameElse: 'lll'
|
|
67
|
-
// }
|
|
68
|
-
// });
|
|
69
|
-
|
|
70
|
-
// } else {
|
|
71
|
-
// moment.locale('en', {
|
|
72
|
-
// calendar: {
|
|
73
|
-
// lastDay: '[Yesterday at] LT',
|
|
74
|
-
// sameDay: '[Today at] LT',
|
|
75
|
-
// nextDay: '[Tomorrow at] LT',
|
|
76
|
-
// lastWeek: '[last] dddd [at] LT',
|
|
77
|
-
// nextWeek: 'dddd [at] LT',
|
|
78
|
-
// sameElse: 'lll'
|
|
79
|
-
// }
|
|
80
|
-
// });
|
|
81
|
-
// }
|
|
82
|
-
// }
|
|
83
|
-
|
|
84
56
|
}
|
|
85
57
|
|
|
86
58
|
|
|
@@ -109,15 +81,18 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
109
81
|
sameElse: 'LLLL'
|
|
110
82
|
}
|
|
111
83
|
});
|
|
84
|
+
// this.translate.getTranslation(chat_lang).subscribe((labels: string) => {
|
|
85
|
+
// console.log('[BUBBLE-MESSAGE] translations: ', labels);
|
|
86
|
+
// });
|
|
112
87
|
}
|
|
113
88
|
|
|
114
89
|
ngOnChanges() {
|
|
115
|
-
|
|
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)
|
|
116
93
|
if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
|
|
117
94
|
this.getMetadataSize(this.message.metadata)
|
|
118
|
-
// console.log('BUBBLE-MSG ngOnChanges message > metadata', this.message.metadata)
|
|
119
95
|
}
|
|
120
|
-
|
|
121
96
|
}
|
|
122
97
|
|
|
123
98
|
|
|
@@ -184,11 +159,11 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
184
159
|
const domRepresentation = document.getElementsByClassName('chat-tooltip');
|
|
185
160
|
if (domRepresentation) {
|
|
186
161
|
const item = domRepresentation[0] as HTMLInputElement;
|
|
187
|
-
if (!item.classList.contains('tooltip-show')) {
|
|
162
|
+
if (item && !item.classList.contains('tooltip-show')) {
|
|
188
163
|
item.classList.add('tooltip-show');
|
|
189
164
|
}
|
|
190
165
|
setTimeout(function () {
|
|
191
|
-
if (item.classList.contains('tooltip-show')) {
|
|
166
|
+
if (item && item.classList.contains('tooltip-show')) {
|
|
192
167
|
item.classList.remove('tooltip-show');
|
|
193
168
|
}
|
|
194
169
|
}, that.tooltipOptions['hideDelayAfterClick']);
|
|
@@ -224,6 +199,26 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
|
|
|
224
199
|
this.onImageRendered.emit(event)
|
|
225
200
|
}
|
|
226
201
|
|
|
202
|
+
async presentCreateCannedResponseModal(): Promise<any> {
|
|
203
|
+
this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
|
|
204
|
+
const attributes = {
|
|
205
|
+
message: this.message,
|
|
206
|
+
}
|
|
207
|
+
const modal: HTMLIonModalElement = await this.modalController.create({
|
|
208
|
+
component: CreateCannedResponsePage,
|
|
209
|
+
componentProps: attributes,
|
|
210
|
+
swipeToClose: false,
|
|
211
|
+
backdropDismiss: false,
|
|
212
|
+
})
|
|
213
|
+
modal.onDidDismiss().then((dataReturned: any) => {
|
|
214
|
+
//
|
|
215
|
+
this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
return await modal.present()
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
227
222
|
// printMessage(message, messageEl, component) {
|
|
228
223
|
// const messageOBJ = { message: message, sanitizer: this.sanitizer, messageEl: messageEl, component: component}
|
|
229
224
|
// this.onBeforeMessageRender.emit(messageOBJ)
|
|
@@ -150,6 +150,7 @@ ion-header {
|
|
|
150
150
|
|
|
151
151
|
.tile-info-with-ios {
|
|
152
152
|
left: 82px !important;
|
|
153
|
+
top: 10px!important;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
.user-presence-ios {
|
|
@@ -158,6 +159,7 @@ ion-header {
|
|
|
158
159
|
|
|
159
160
|
.avatar-container-ios {
|
|
160
161
|
left: 55px;
|
|
162
|
+
top: 10px;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
.resolve-conv-margin-right {
|
|
@@ -51,7 +51,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
51
51
|
conversation_with_fullname: string
|
|
52
52
|
platformName: string
|
|
53
53
|
conv_closed: boolean = false;
|
|
54
|
-
|
|
54
|
+
IS_ON_IOS_MOBILE_DEVICE: boolean
|
|
55
55
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -88,30 +88,35 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
88
88
|
// @ Lifehooks
|
|
89
89
|
// ----------------------------------------------------
|
|
90
90
|
ngOnInit() {
|
|
91
|
-
|
|
92
|
-
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser,
|
|
93
|
-
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar,
|
|
94
|
-
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conv_type', this.conv_type,
|
|
91
|
+
|
|
92
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - idLoggedUser', this.idLoggedUser,)
|
|
93
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conversationAvatar', this.conversationAvatar,)
|
|
94
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnInit) - conv_type', this.conv_type,)
|
|
95
95
|
this.conversation_with_fullname = this.conversationAvatar.conversation_with_fullname
|
|
96
96
|
this.listenToConversationHasBeenClosed()
|
|
97
|
-
this.initialize()
|
|
97
|
+
this.initialize();
|
|
98
|
+
// this.isOniOSMobileDevice()
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
isOniOSMobileDevice() {
|
|
102
|
+
this.IS_ON_IOS_MOBILE_DEVICE = false;
|
|
103
|
+
if (/iPad|iPhone|iPod/i.test(window.navigator.userAgent)) {
|
|
104
|
+
this.IS_ON_IOS_MOBILE_DEVICE = true;
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
// console.log('[CONVS-DETAIL][HEADER] IS_ON_IOS_MOBILE_DEVICE ', this.IS_ON_IOS_MOBILE_DEVICE)
|
|
108
|
+
return this.IS_ON_IOS_MOBILE_DEVICE;
|
|
98
109
|
}
|
|
99
110
|
|
|
100
111
|
ngOnChanges() {
|
|
101
|
-
this.logger.log(
|
|
102
|
-
'[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar',
|
|
103
|
-
this.conversationAvatar,
|
|
104
|
-
)
|
|
112
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar', this.conversationAvatar)
|
|
105
113
|
if (this.conversationAvatar) {
|
|
106
114
|
this.conversationAvatar.imageurl = this.imageRepoService.getImagePhotoUrl(
|
|
107
115
|
this.conversationAvatar.uid,
|
|
108
116
|
)
|
|
109
117
|
} else {
|
|
110
118
|
const channelType = setChannelType(this.idConv)
|
|
111
|
-
this.logger.log(
|
|
112
|
-
'[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED channelType ',
|
|
113
|
-
channelType,
|
|
114
|
-
)
|
|
119
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED channelType ', channelType)
|
|
115
120
|
this.conversationAvatar = setConversationAvatar(
|
|
116
121
|
this.idConv,
|
|
117
122
|
this.fullNameConv,
|
|
@@ -122,10 +127,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
122
127
|
this.conversationAvatar.uid,
|
|
123
128
|
)
|
|
124
129
|
}
|
|
125
|
-
this.logger.log(
|
|
126
|
-
'[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar',
|
|
127
|
-
this.conversationAvatar,
|
|
128
|
-
)
|
|
130
|
+
this.logger.log('[CONVS-DETAIL][HEADER] - (ngOnChanges) - conversationAvatar usecase UNDEFINED conversationAvatar', this.conversationAvatar)
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
this.logger.log(
|
|
@@ -162,20 +164,21 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
closeConversation() {
|
|
165
|
-
this.
|
|
167
|
+
this.logger.log('[CONVS-DETAIL][HEADER] click on RESOLVE this.events', this.events)
|
|
168
|
+
this.events.publish('conversation:closed', this.idConv)
|
|
166
169
|
}
|
|
167
170
|
|
|
168
171
|
listenToConversationHasBeenClosed() {
|
|
169
172
|
this.events.subscribe('conversationhasbeenclosed', (convId) => {
|
|
170
173
|
// console.log('[CONVS-DETAIL][HEADER] conversationhasbeenclosed convId', convId)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
if (convId === this.idConv) {
|
|
175
|
+
this.logger.log('[CONVS-DETAIL][HEADER] the conversation was closed',)
|
|
176
|
+
this.conv_closed = true;
|
|
177
|
+
}
|
|
175
178
|
});
|
|
176
179
|
}
|
|
177
180
|
|
|
178
|
-
|
|
181
|
+
|
|
179
182
|
|
|
180
183
|
onOpenCloseInfoConversation() {
|
|
181
184
|
this.openInfoMessage = false
|
|
@@ -188,7 +191,7 @@ export class HeaderConversationDetailComponent implements OnInit, OnChanges {
|
|
|
188
191
|
}
|
|
189
192
|
|
|
190
193
|
/** */
|
|
191
|
-
pushPage(event) {}
|
|
194
|
+
pushPage(event) { }
|
|
192
195
|
|
|
193
196
|
goBackToConversationList() {
|
|
194
197
|
this.router.navigateByUrl('/conversations-list')
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -38,36 +38,73 @@
|
|
|
38
38
|
|
|
39
39
|
<ion-col col-auto>
|
|
40
40
|
|
|
41
|
-
<div class="start-buttons" style="position: absolute;display: flex;">
|
|
42
|
-
|
|
43
|
-
<ng-container *ngIf="areVisibleCAR">
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<ion-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
<div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
|
|
42
|
+
|
|
43
|
+
<ng-container *ngIf="areVisibleCAR && support_mode === true">
|
|
44
|
+
<div class="canned-responses-btn-wpr" style="margin-left: -5px;"
|
|
45
|
+
tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
|
|
46
|
+
<ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
|
|
47
|
+
[disabled]="!IS_SUPPORT_GROUP_CONVERSATION || disableTextarea">
|
|
48
|
+
<ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
|
|
49
|
+
</ion-button>
|
|
50
|
+
</div>
|
|
51
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount === 0"
|
|
52
|
+
tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
53
|
+
class="no-canned-responses-btn-badge">
|
|
54
|
+
<ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
|
|
55
|
+
</div>
|
|
56
|
+
<div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount > 0"
|
|
57
|
+
tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
|
|
58
|
+
class="canned-responses-btn-badge">
|
|
59
|
+
<ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
|
|
60
|
+
</div>
|
|
61
|
+
</ng-container>
|
|
56
62
|
|
|
57
|
-
|
|
58
|
-
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
|
|
63
|
+
|
|
64
|
+
<div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
|
|
65
|
+
placement="top">
|
|
59
66
|
<ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
|
|
60
67
|
<ion-icon slot="icon-only" lazy="true" name="attach-outline"
|
|
61
68
|
style="font-size: 30px;transform: rotate(42deg);"></ion-icon>
|
|
62
69
|
<input #fileInput type="file" (change)="onFileSelected($event)" capture="camera" id="file-input"
|
|
63
70
|
[accept]="fileUploadAccept">
|
|
64
|
-
|
|
71
|
+
|
|
65
72
|
</ion-button>
|
|
66
|
-
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<!-- <ion-icon (click)="showEmojiPicker = !showEmojiPicker" color="secondary" name="happy" style="zoom:2;"></ion-icon> -->
|
|
77
|
+
<!-- --------------------------------------------- -->
|
|
78
|
+
<!-- Emoji Picker Button tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top" -->
|
|
79
|
+
<!-- --------------------------------------------- -->
|
|
80
|
+
<div class="emoji-picker-btn-wpr">
|
|
81
|
+
<ion-button ion-button fill="clear" class="emoji-picker-btn" (click)="showEmojiPicker = !showEmojiPicker"
|
|
82
|
+
[disabled]="disableTextarea">
|
|
83
|
+
<!-- <ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon> -->
|
|
84
|
+
<ion-icon slot="icon-only" lazy="true" name="happy-outline" style="font-size: 24px;"></ion-icon>
|
|
85
|
+
</ion-button>
|
|
86
|
+
|
|
87
|
+
<!-- <div class="emojiContainer" [style.height]="showEmojiPicker?'300px':'0px'"> -->
|
|
88
|
+
<!--Show/Hide emoji picker. Don't use *ngIf because the component will be created again and again and cause performance issue-->
|
|
89
|
+
<!-- <emoji-picker (onEmojiSelect)="addEmoji($event)"></emoji-picker> -->
|
|
90
|
+
<!-- { position: 'absolute', bottom: '20px', right: '20px' }" -->
|
|
91
|
+
<!-- --------------------------------------------------------------------- -->
|
|
92
|
+
<!-- https://www.npmjs.com/package/@ctrl/ngx-emoji-mart/v/1.0.6 -->
|
|
93
|
+
<!-- --------------------------------------------------------------------- -->
|
|
94
|
+
<!-- [style]="{ position: 'absolute', bottom: '53px', right: '-246px' }" -->
|
|
95
|
+
<emoji-mart [showPreview]="false" [perLine]="emojiPerLine" [style.visibility]="showEmojiPicker?'visible':'hidden'"
|
|
96
|
+
(emojiSelect)="addEmoji($event)" [ngClass]="{'emoji-mart-desktop': !IS_ON_MOBILE_DEVICE, 'emoji-mart-mobile': IS_ON_MOBILE_DEVICE }">
|
|
97
|
+
</emoji-mart>
|
|
98
|
+
<!-- </div> -->
|
|
99
|
+
|
|
67
100
|
</div>
|
|
68
101
|
</div>
|
|
69
102
|
|
|
70
|
-
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || support_mode === false}">
|
|
71
108
|
<ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
|
|
72
109
|
[placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
|
|
73
110
|
[(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss
CHANGED
|
@@ -44,8 +44,12 @@
|
|
|
44
44
|
position: relative;
|
|
45
45
|
// margin: 0 35px;
|
|
46
46
|
// width: calc(100% - 70px);
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
// ----- new after adding canned open /close canned responses
|
|
48
|
+
// margin: 0 70px;
|
|
49
|
+
// width: calc(100% - 100px);
|
|
50
|
+
// ----- new after adding emoji picker
|
|
51
|
+
margin: 0 108px;
|
|
52
|
+
width: calc(100% - 140px);
|
|
49
53
|
ion-textarea {
|
|
50
54
|
// border-radius: 4px;
|
|
51
55
|
border-radius: 20px; // NK edited
|
|
@@ -68,8 +72,8 @@
|
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
.text-message-no-cr {
|
|
71
|
-
|
|
72
|
-
width: calc(100% -
|
|
75
|
+
margin: 0 72px !important;
|
|
76
|
+
width: calc(100% - 101px) !important;
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -106,7 +110,6 @@
|
|
|
106
110
|
height: 33px !important;
|
|
107
111
|
}
|
|
108
112
|
|
|
109
|
-
|
|
110
113
|
.canned-responses-btn {
|
|
111
114
|
--padding-bottom: 0px;
|
|
112
115
|
--padding-top: 0px;
|
|
@@ -115,7 +118,17 @@
|
|
|
115
118
|
--padding-start: 2px;
|
|
116
119
|
height: 33px !important;
|
|
117
120
|
width: 33px;
|
|
118
|
-
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.emoji-picker-btn {
|
|
124
|
+
--padding-bottom: 0px;
|
|
125
|
+
--padding-top: 0px;
|
|
126
|
+
--border-radius: 50%;
|
|
127
|
+
--padding-end: 2px;
|
|
128
|
+
--padding-start: 2px;
|
|
129
|
+
height: 33px !important;
|
|
130
|
+
width: 33px;
|
|
131
|
+
}
|
|
119
132
|
|
|
120
133
|
.no-canned-responses-btn-badge {
|
|
121
134
|
position: absolute;
|
|
@@ -129,7 +142,7 @@
|
|
|
129
142
|
cursor: pointer;
|
|
130
143
|
}
|
|
131
144
|
.no-canned-responses-btn-badge:hover {
|
|
132
|
-
background-color: rgba(0, 0, 0, 0.05)
|
|
145
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
133
146
|
}
|
|
134
147
|
|
|
135
148
|
.canned-responses-btn-badge {
|
|
@@ -145,10 +158,9 @@
|
|
|
145
158
|
}
|
|
146
159
|
|
|
147
160
|
.canned-responses-btn-badge:hover {
|
|
148
|
-
background-color: rgba(0, 0, 0, 0.05)
|
|
161
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
149
162
|
}
|
|
150
163
|
|
|
151
|
-
|
|
152
164
|
.upload-image-btn .button-native {
|
|
153
165
|
border-radius: 50%;
|
|
154
166
|
}
|
|
@@ -163,6 +175,17 @@
|
|
|
163
175
|
pointer-events: none;
|
|
164
176
|
}
|
|
165
177
|
|
|
178
|
+
.emoji-mart-desktop {
|
|
179
|
+
position: absolute;
|
|
180
|
+
bottom: 53px;
|
|
181
|
+
right: -246px;
|
|
182
|
+
}
|
|
183
|
+
.emoji-mart-mobile {
|
|
184
|
+
position: absolute;
|
|
185
|
+
bottom: 50px;
|
|
186
|
+
right: -123px;
|
|
187
|
+
width: 230px;
|
|
188
|
+
}
|
|
166
189
|
// input[placeholder] { text-overflow: ellipsis; }
|
|
167
190
|
// ::-moz-placeholder { text-overflow: ellipsis; } /* firefox 19+ */
|
|
168
191
|
// input:-moz-placeholder { text-overflow: ellipsis; }
|