@chat21/chat21-ionic 3.0.61-rc2 → 3.0.61-rc21
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 +90 -0
- package/angular.json +2 -0
- package/config.xml +4 -5
- package/deploy_pre.sh +27 -27
- package/deploy_prod.sh +5 -1
- package/env.sample +1 -1
- package/package.json +8 -8
- package/resources/{Android → android}/icon/drawable-hdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-ldpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-mdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon/drawable-xxxhdpi-icon.png +0 -0
- package/resources/{Android → android}/icon.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/{Android → android}/splash.png +0 -0
- package/src/app/app-routing.module.ts +15 -0
- package/src/app/app.component.html +4 -3
- package/src/app/app.component.scss +6 -1
- package/src/app/app.component.ts +29 -18
- 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 +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/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +6 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +89 -21
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +37 -33
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +7 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +148 -63
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +59 -22
- 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 +102 -23
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -2
- package/src/app/components/ddp-header/ddp-header.component.html +11 -4
- package/src/app/components/ddp-header/ddp-header.component.ts +94 -19
- package/src/app/components/project-item/project-item.component.html +2 -2
- package/src/app/components/project-item/project-item.component.scss +1 -1
- package/src/app/components/project-item/project-item.component.ts +1 -1
- package/src/app/components/sidebar/sidebar.component.html +151 -86
- package/src/app/components/sidebar/sidebar.component.scss +72 -4
- package/src/app/components/sidebar/sidebar.component.ts +211 -72
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +29 -10
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.scss +53 -29
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +176 -97
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +6 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.html +20 -10
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +28 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +1124 -777
- package/src/app/pages/conversations-list/conversations-list.module.ts +2 -1
- package/src/app/pages/conversations-list/conversations-list.page.html +9 -6
- package/src/app/pages/conversations-list/conversations-list.page.scss +9 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +724 -436
- 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 +226 -166
- package/src/app/pages/profile-info/profile-info.page.html +2 -2
- package/src/app/pages/profile-info/profile-info.page.scss +13 -2
- package/src/app/services/tiledesk/tiledesk.service.ts +209 -0
- package/src/app/shared/shared.module.ts +1 -1
- package/src/app/utils/scrollbar-theme.directive.ts +58 -24
- package/src/assets/i18n/de.json +46 -7
- package/src/assets/i18n/en.json +42 -3
- package/src/assets/i18n/es.json +42 -3
- package/src/assets/i18n/fr.json +45 -6
- package/src/assets/i18n/it.json +42 -3
- package/src/assets/i18n/pt.json +42 -3
- package/src/assets/i18n/ru.json +43 -4
- package/src/assets/i18n/sr.json +265 -0
- package/src/assets/i18n/tr.json +42 -4
- package/src/assets/images/default-avatar-x-select.png +0 -0
- package/src/assets/images/language_flag/hr.png +0 -0
- package/src/assets/images/language_flag/sr.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-pre-test.json +1 -1
- package/src/chat-config-template.json +1 -1
- package/src/chat-config.json +1 -1
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -3
- package/src/chat21-core/utils/constants.ts +6 -1
- package/src/chat21-core/utils/utils-message.ts +19 -0
- package/src/global.scss +65 -111
- package/publish_pre.sh +0 -33
- package/publish_prod.sh +0 -33
|
@@ -54,12 +54,23 @@
|
|
|
54
54
|
<!-- ----------------------------------------------------------- -->
|
|
55
55
|
|
|
56
56
|
<div class="conversation-wpr" style="height: 100%;">
|
|
57
|
-
<div *ngFor="let message of messages; let i = index">
|
|
57
|
+
<div *ngFor="let message of messages; let i = index; let first = first; trackBy: trackByFn">
|
|
58
|
+
|
|
59
|
+
<ng-container *ngIf="first || (messages[i - 1].timestamp | date:'d') !== (message.timestamp | date:'d')">
|
|
60
|
+
<div class="long-date-divider-wpr">
|
|
61
|
+
<div class="long-date-divider-border-b"></div>
|
|
62
|
+
<div class="long-date-divider">
|
|
63
|
+
<!-- {{message.timestamp | date: 'longDate' : 'it'}} -->
|
|
64
|
+
{{message.timestamp | amDateFormat:'LL'}}
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
<div class="long-date-divider-border-b"></div>
|
|
68
|
+
</div>
|
|
69
|
+
</ng-container>
|
|
58
70
|
|
|
59
71
|
<div class="align-center" class="ion-text-center" *ngIf="messageType(MESSAGE_TYPE_INFO, message)"
|
|
60
72
|
class="msg_info_container">
|
|
61
|
-
<chat-info-message class="messages"
|
|
62
|
-
[message]="message">
|
|
73
|
+
<chat-info-message class="messages" [message]="message">
|
|
63
74
|
</chat-info-message>
|
|
64
75
|
</div>
|
|
65
76
|
|
|
@@ -67,13 +78,15 @@
|
|
|
67
78
|
<div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_MINE, message)" class="msg_container base_sent">
|
|
68
79
|
|
|
69
80
|
<!--backgroundColor non viene ancora usato -->
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
[ngClass]="{'
|
|
73
|
-
[
|
|
74
|
-
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
75
|
-
(onAfterMessageRender)="returnOnAfterMessageRender($event)"
|
|
76
|
-
|
|
81
|
+
|
|
82
|
+
<chat-bubble-message style="position: relative;"
|
|
83
|
+
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_sent"
|
|
84
|
+
id="message_msg_sent" [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}"
|
|
85
|
+
[message]="message" [textColor]="'col-msg-sent'" (onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
86
|
+
(onAfterMessageRender)="returnOnAfterMessageRender($event)" (onImageRendered)="onImageRenderedFN($event)"
|
|
87
|
+
[addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText" [areVisibleCAR]="areVisibleCAR"
|
|
88
|
+
[support_mode]="support_mode"
|
|
89
|
+
[class.emoticon]="message?.emoticon">
|
|
77
90
|
</chat-bubble-message>
|
|
78
91
|
|
|
79
92
|
<!-- icon status message -->
|
|
@@ -98,32 +111,30 @@
|
|
|
98
111
|
</chat-avatar-image> -->
|
|
99
112
|
|
|
100
113
|
<!--backgroundColor non viene ancora usato -->
|
|
101
|
-
|
|
102
|
-
<chat-bubble-message
|
|
103
|
-
[
|
|
104
|
-
[textColor]="'black'"
|
|
114
|
+
|
|
115
|
+
<chat-bubble-message style="position: relative;"
|
|
116
|
+
[ngClass]="{'has-metadata': (isImage(message) || isFrame(message))}" class="messages msg_receive"
|
|
117
|
+
id="message_msg_receive" [message]="message" [textColor]="'black'"
|
|
105
118
|
(onBeforeMessageRender)="returnOnBeforeMessageRender($event)"
|
|
106
|
-
(onAfterMessageRender)="returnOnAfterMessageRender($event)"
|
|
107
|
-
|
|
119
|
+
(onAfterMessageRender)="returnOnAfterMessageRender($event)" (onImageRendered)="onImageRenderedFN($event)"
|
|
120
|
+
[addAsCannedResponseTooltipText]="addAsCannedResponseTooltipText" [areVisibleCAR]="areVisibleCAR"
|
|
121
|
+
[support_mode]="support_mode"
|
|
122
|
+
[class.emoticon]="message?.emoticon">
|
|
108
123
|
</chat-bubble-message>
|
|
109
124
|
</div>
|
|
110
125
|
|
|
111
126
|
<!-- message type:: button && -->
|
|
112
|
-
<div *ngIf="message?.attributes && message?.attributes?.attachment " class="slide-in-left"
|
|
113
|
-
<chat-message-attachment
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
[isLastMessage] = "isLastMessage(message?.uid)"
|
|
117
|
-
[stylesMap]="stylesMap"
|
|
118
|
-
(onAttachmentButtonClicked)="returnOnAttachmentButtonClicked($event)">
|
|
127
|
+
<div *ngIf="message?.attributes && message?.attributes?.attachment " class="slide-in-left">
|
|
128
|
+
<chat-message-attachment style="height: 100%; display: block;" [message]="message"
|
|
129
|
+
[isLastMessage]="isLastMessage(message?.uid)" [stylesMap]="stylesMap"
|
|
130
|
+
(onAttachmentButtonClicked)="returnOnAttachmentButtonClicked($event)">
|
|
119
131
|
</chat-message-attachment>
|
|
120
132
|
</div>
|
|
121
133
|
</div>
|
|
122
134
|
<!-- (fileType === 'file' && uploadProgress !== 100) -->
|
|
123
135
|
|
|
124
136
|
<!-- uploadProgress -> {{ uploadProgress }} -->
|
|
125
|
-
<div *ngIf="uploadProgress !== 100" class="msg_container base_sent"
|
|
126
|
-
style="margin-right: 20px;">
|
|
137
|
+
<div *ngIf="uploadProgress !== 100" class="msg_container base_sent" style="margin-right: 20px;">
|
|
127
138
|
<div class="messages msg_sent">
|
|
128
139
|
<div class="spinner">
|
|
129
140
|
<div class="bounce1"></div>
|
|
@@ -2,29 +2,30 @@
|
|
|
2
2
|
color: lightblue;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
:host .base_sent .msg_sent ::ng-deep div > div > div > chat-text > p > p
|
|
6
|
-
margin-top:12px !important;
|
|
5
|
+
:host .base_sent .msg_sent ::ng-deep div > div > div > chat-text > p > p {
|
|
6
|
+
margin-top: 12px !important;
|
|
7
7
|
// white-space: nowrap;
|
|
8
8
|
// overflow: hidden;
|
|
9
9
|
// text-overflow: ellipsis;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:host .base_sent .msg_sent ::ng-deep > div > div > chat-image > div
|
|
12
|
+
:host .base_sent .msg_sent ::ng-deep > div > div > chat-image > div {
|
|
13
13
|
// display: none !important;
|
|
14
14
|
// border-radius: unset !important;
|
|
15
|
-
img,
|
|
15
|
+
img,
|
|
16
|
+
.loader {
|
|
16
17
|
border-top-right-radius: 6px !important;
|
|
17
18
|
border-top-left-radius: 16px !important;
|
|
18
19
|
border-bottom-left-radius: 16px !important;
|
|
19
20
|
border-bottom-right-radius: 0px;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
:host .base_receive .msg_receive ::ng-deep > div > div > chat-image > div > img {
|
|
25
25
|
// display: none !important;
|
|
26
26
|
// border-radius: unset !important;
|
|
27
|
-
img,
|
|
27
|
+
img,
|
|
28
|
+
.loader {
|
|
28
29
|
border-top-left-radius: 6px !important;
|
|
29
30
|
border-top-right-radius: 16px !important;
|
|
30
31
|
border-bottom-right-radius: 16px !important;
|
|
@@ -38,9 +39,8 @@ ion-item {
|
|
|
38
39
|
--min-height: 20px;
|
|
39
40
|
--border-style: none;
|
|
40
41
|
|
|
41
|
-
.input-wrapper{
|
|
42
|
-
|
|
43
|
-
.align-center{
|
|
42
|
+
.input-wrapper {
|
|
43
|
+
.align-center {
|
|
44
44
|
display: block;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -53,12 +53,12 @@ ion-item {
|
|
|
53
53
|
//opacity: 0px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.msg_info_container{
|
|
56
|
+
.msg_info_container {
|
|
57
57
|
text-align: center;
|
|
58
58
|
padding: 2px 0px 2px 0px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.message_sender_fullname{
|
|
61
|
+
.message_sender_fullname {
|
|
62
62
|
font-size: 0.7em;
|
|
63
63
|
margin: 0 0 1px 10px;
|
|
64
64
|
color: var(--gray);
|
|
@@ -72,15 +72,15 @@ ion-item {
|
|
|
72
72
|
// padding: 6px 6px 6px 6px;
|
|
73
73
|
// box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
74
74
|
// -webkit-animation: heartbeat 1.5s ease-in-out both;
|
|
75
|
-
// animation: heartbeat 1.5s ease-in-out both;
|
|
75
|
+
// animation: heartbeat 1.5s ease-in-out both;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
/* send message */
|
|
79
79
|
.base_sent {
|
|
80
80
|
align-items: flex-end;
|
|
81
81
|
justify-content: flex-end;
|
|
82
|
-
padding: 2px 0px 4px 40px;
|
|
83
|
-
|
|
82
|
+
// padding: 2px 0px 4px 40px;
|
|
83
|
+
padding: 2px 0px 14px 40px; // edited to display the date at the bottom of the "message bubble"
|
|
84
84
|
.msg_sent {
|
|
85
85
|
background-color: var(--bobble-blue);
|
|
86
86
|
color: var(--col-msg-sent);
|
|
@@ -89,18 +89,23 @@ ion-item {
|
|
|
89
89
|
max-width: calc(100% - 70px);
|
|
90
90
|
min-width: 14px;
|
|
91
91
|
border-top-right-radius: 8px;
|
|
92
|
-
border-bottom-right-radius: 0px;
|
|
93
|
-
|
|
92
|
+
border-bottom-right-radius: 0px;
|
|
93
|
+
}
|
|
94
|
+
.emoticon {
|
|
95
|
+
background: unset !important;
|
|
96
|
+
font-size: 4em;
|
|
97
|
+
padding-bottom: 21px;
|
|
98
|
+
padding-top: 30px;
|
|
94
99
|
}
|
|
95
|
-
|
|
96
100
|
.has-metadata {
|
|
97
101
|
max-width: 100% !important;
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
|
-
|
|
104
|
+
|
|
101
105
|
/** recive message **/
|
|
102
106
|
.base_receive {
|
|
103
|
-
padding: 0px 0px 6px 0px;
|
|
107
|
+
// padding: 0px 0px 6px 0px;
|
|
108
|
+
padding: 0px 0px 15px 0px; // edited to display the date at the bottom of the "message bubble"
|
|
104
109
|
/* avatar */
|
|
105
110
|
.content-avatar {
|
|
106
111
|
position: relative;
|
|
@@ -109,7 +114,7 @@ ion-item {
|
|
|
109
114
|
height: 28px;
|
|
110
115
|
margin-right: 6px;
|
|
111
116
|
|
|
112
|
-
.profile_image{
|
|
117
|
+
.profile_image {
|
|
113
118
|
position: relative;
|
|
114
119
|
width: 25px;
|
|
115
120
|
height: 25px;
|
|
@@ -118,7 +123,7 @@ ion-item {
|
|
|
118
123
|
background-color: #ffffff;
|
|
119
124
|
border: 1px solid #e2e2e2;
|
|
120
125
|
}
|
|
121
|
-
.profile_image img{
|
|
126
|
+
.profile_image img {
|
|
122
127
|
max-width: 100%;
|
|
123
128
|
width: 100%;
|
|
124
129
|
height: 100%;
|
|
@@ -139,15 +144,19 @@ ion-item {
|
|
|
139
144
|
width: auto;
|
|
140
145
|
border-top-left-radius: 8px;
|
|
141
146
|
border-bottom-left-radius: 0px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.emoticon {
|
|
150
|
+
background: unset !important;
|
|
151
|
+
font-size: 4em;
|
|
152
|
+
}
|
|
142
153
|
|
|
143
|
-
}
|
|
144
|
-
|
|
145
154
|
.has-metadata {
|
|
146
155
|
max-width: 100% !important;
|
|
147
156
|
}
|
|
148
157
|
}
|
|
149
158
|
|
|
150
|
-
.time{
|
|
159
|
+
.time {
|
|
151
160
|
margin-bottom: 20px;
|
|
152
161
|
}
|
|
153
162
|
|
|
@@ -158,42 +167,143 @@ ion-item {
|
|
|
158
167
|
min-height: 20px;
|
|
159
168
|
padding: 7px;
|
|
160
169
|
text-align: center;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.spinner > div {
|
|
164
173
|
width: 10px;
|
|
165
174
|
height: 10px;
|
|
166
175
|
background-color: rgb(255, 255, 255);
|
|
167
|
-
|
|
176
|
+
|
|
168
177
|
border-radius: 100%;
|
|
169
178
|
display: inline-block;
|
|
170
179
|
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
171
180
|
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.spinner .bounce1 {
|
|
175
184
|
-webkit-animation-delay: -0.32s;
|
|
176
185
|
animation-delay: -0.32s;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.spinner .bounce2 {
|
|
180
189
|
-webkit-animation-delay: -0.16s;
|
|
181
190
|
animation-delay: -0.16s;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
0%,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
transform: scale(0);
|
|
193
|
-
} 40% {
|
|
194
|
-
-webkit-transform: scale(1.0);
|
|
195
|
-
transform: scale(1.0);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@-webkit-keyframes sk-bouncedelay {
|
|
194
|
+
0%,
|
|
195
|
+
80%,
|
|
196
|
+
100% {
|
|
197
|
+
-webkit-transform: scale(0);
|
|
198
|
+
}
|
|
199
|
+
40% {
|
|
200
|
+
-webkit-transform: scale(1);
|
|
196
201
|
}
|
|
197
|
-
|
|
202
|
+
}
|
|
198
203
|
|
|
204
|
+
@keyframes sk-bouncedelay {
|
|
205
|
+
0%,
|
|
206
|
+
80%,
|
|
207
|
+
100% {
|
|
208
|
+
-webkit-transform: scale(0);
|
|
209
|
+
transform: scale(0);
|
|
210
|
+
}
|
|
211
|
+
40% {
|
|
212
|
+
-webkit-transform: scale(1);
|
|
213
|
+
transform: scale(1);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ---------------------------------------------------------
|
|
218
|
+
// Button add canned on the fly
|
|
219
|
+
// ---------------------------------------------------------
|
|
220
|
+
:host .base_sent .msg_sent ::ng-deep div > div > div > ion-button {
|
|
221
|
+
display: none;
|
|
222
|
+
position: absolute;
|
|
223
|
+
top: -3px;
|
|
224
|
+
left: -31px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// :host .base_sent .msg_sent:hover ::ng-deep div > div > div > ion-button {
|
|
228
|
+
:host .base_sent:hover .msg_sent ::ng-deep div > div > div > ion-button {
|
|
229
|
+
display: block;
|
|
230
|
+
// position: absolute;
|
|
231
|
+
// top: -11px;
|
|
232
|
+
// left: -26px;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:host .base_receive .msg_receive ::ng-deep div > div > ion-button {
|
|
236
|
+
display: none;
|
|
237
|
+
position: absolute;
|
|
238
|
+
top: -3px;
|
|
239
|
+
right: -31px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// :host .base_receive .msg_receive:hover ::ng-deep div > div > ion-button {
|
|
243
|
+
:host .base_receive:hover .msg_receive ::ng-deep div > div > ion-button {
|
|
244
|
+
display: block;
|
|
245
|
+
// position: absolute;
|
|
246
|
+
// top: -11px;
|
|
247
|
+
// left: 91px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ---------------------------------------------------------
|
|
251
|
+
// Long date divider
|
|
252
|
+
// ---------------------------------------------------------
|
|
253
|
+
.long-date-divider-wpr {
|
|
254
|
+
justify-content: center !important;
|
|
255
|
+
align-items: center !important;
|
|
256
|
+
display: flex !important;
|
|
257
|
+
margin-top: 0.75rem !important;
|
|
258
|
+
margin-bottom: 0.75rem !important;
|
|
259
|
+
}
|
|
199
260
|
|
|
261
|
+
.long-date-divider-border-b {
|
|
262
|
+
border-bottom: 1px solid #dee5ee !important;
|
|
263
|
+
flex: 1 1 auto !important;
|
|
264
|
+
margin-left: 1.1rem !important;
|
|
265
|
+
margin-right: 1.1rem !important;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.long-date-divider {
|
|
269
|
+
flex: 0 0 auto !important;
|
|
270
|
+
font-size: 0.75rem !important;
|
|
271
|
+
font-weight: 500 !important;
|
|
272
|
+
line-height: 1.25rem !important;
|
|
273
|
+
margin-left: 1rem !important;
|
|
274
|
+
margin-right: 1rem !important;
|
|
275
|
+
color: #64748b;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// ---------------------------------------------------------
|
|
279
|
+
// message date
|
|
280
|
+
// ---------------------------------------------------------
|
|
281
|
+
:host .base_sent .msg_sent ::ng-deep div > div > div > .message-date {
|
|
282
|
+
position: absolute;
|
|
283
|
+
bottom: -11px;
|
|
284
|
+
color: #64748b;
|
|
285
|
+
font-size: 10px;
|
|
286
|
+
right: 0px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
:host .base_receive .msg_receive ::ng-deep div > div > .message-date {
|
|
290
|
+
position: absolute;
|
|
291
|
+
bottom: -11px;
|
|
292
|
+
color: #64748b;
|
|
293
|
+
font-size: 10px;
|
|
294
|
+
left: 0px;
|
|
295
|
+
}
|
|
296
|
+
// ---------------------------------------------------------
|
|
297
|
+
// emoticon
|
|
298
|
+
// ---------------------------------------------------------
|
|
299
|
+
|
|
300
|
+
:host .base_sent .msg_sent ::ng-deep div > div > div > .chat-text-emoticon > p > p {
|
|
301
|
+
margin-bottom: 6px !important;
|
|
302
|
+
margin-right: -7px !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
:host .base_receive .msg_receive ::ng-deep div > div > div > .chat-text-emoticon > p > p {
|
|
306
|
+
margin-bottom: 41px !important;
|
|
307
|
+
margin-left: -8px !important;
|
|
308
|
+
margin-top: 49px !important;
|
|
309
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
|
|
2
|
-
import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter} from '@angular/core';
|
|
2
|
+
import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
import { MESSAGE_TYPE_INFO, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
|
|
@@ -9,23 +9,29 @@ import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
|
|
|
9
9
|
|
|
10
10
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
11
11
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
12
|
-
|
|
12
|
+
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
13
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
14
|
+
import * as moment from 'moment';
|
|
15
|
+
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
13
16
|
@Component({
|
|
14
17
|
selector: 'ion-conversation-detail',
|
|
15
18
|
templateUrl: './ion-conversation-detail.component.html',
|
|
16
19
|
styleUrls: ['./ion-conversation-detail.component.scss'],
|
|
17
20
|
})
|
|
18
21
|
export class IonConversationDetailComponent extends ConversationContentComponent implements OnInit {
|
|
19
|
-
|
|
22
|
+
|
|
20
23
|
@Input() senderId: string;
|
|
21
24
|
@Input() channelType: string;
|
|
22
|
-
@Output() onImageRendered = new EventEmitter<boolean>()
|
|
25
|
+
@Output() onImageRendered = new EventEmitter<boolean>()
|
|
23
26
|
@Output() onAddUploadingBubble = new EventEmitter<boolean>();
|
|
24
|
-
|
|
25
27
|
|
|
28
|
+
public public_Key: any
|
|
29
|
+
public areVisibleCAR: boolean
|
|
30
|
+
public support_mode: boolean
|
|
26
31
|
public uploadProgress: number = 100
|
|
27
32
|
public fileType: any
|
|
28
|
-
|
|
33
|
+
public browserLang: string;
|
|
34
|
+
public addAsCannedResponseTooltipText: string;
|
|
29
35
|
isImage = isImage;
|
|
30
36
|
isFile = isFile;
|
|
31
37
|
isFrame = isFrame;
|
|
@@ -47,38 +53,105 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
47
53
|
*/
|
|
48
54
|
constructor(
|
|
49
55
|
public cdref: ChangeDetectorRef,
|
|
50
|
-
public uploadService: UploadService
|
|
56
|
+
public uploadService: UploadService,
|
|
57
|
+
public tiledeskAuthService: TiledeskAuthService,
|
|
58
|
+
private translate: TranslateService,
|
|
59
|
+
public appConfigProvider: AppConfigProvider,
|
|
51
60
|
) {
|
|
52
61
|
super(cdref, uploadService)
|
|
53
|
-
|
|
62
|
+
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
ngOnInit() {
|
|
57
|
-
|
|
65
|
+
ngOnInit() {
|
|
66
|
+
this.getOSCODE()
|
|
67
|
+
this.listenToUploadFileProgress();
|
|
68
|
+
this.setMomentLocaleAndGetTranslation();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
getOSCODE() {
|
|
72
|
+
this.support_mode = this.appConfigProvider.getConfig().supportMode
|
|
73
|
+
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
|
|
74
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
|
|
75
|
+
|
|
76
|
+
if (this.public_Key) {
|
|
77
|
+
let keys = this.public_Key.split('-')
|
|
78
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - public_Key keys', keys)
|
|
79
|
+
|
|
80
|
+
keys.forEach((key) => {
|
|
81
|
+
if (key.includes('CAR')) {
|
|
82
|
+
let car = key.split(':')
|
|
83
|
+
if (car[1] === 'F') {
|
|
84
|
+
this.areVisibleCAR = false
|
|
85
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
86
|
+
} else {
|
|
87
|
+
this.areVisibleCAR = true
|
|
88
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
if (!this.public_Key.includes('CAR')) {
|
|
94
|
+
this.areVisibleCAR = false
|
|
95
|
+
console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] PUBLIC-KEY - areVisibleCAR', this.areVisibleCAR)
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
this.areVisibleCAR = false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
setMomentLocaleAndGetTranslation() {
|
|
103
|
+
this.browserLang = this.translate.getBrowserLang();
|
|
104
|
+
const currentUser = this.tiledeskAuthService.getCurrentUser();
|
|
105
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - ngOnInit - currentUser ', currentUser)
|
|
106
|
+
let currentUserId = ''
|
|
107
|
+
if (currentUser) {
|
|
108
|
+
currentUserId = currentUser.uid
|
|
109
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL]] - ngOnInit - currentUserId ', currentUserId)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const stored_preferred_lang = localStorage.getItem(currentUserId + '_lang');
|
|
113
|
+
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] stored_preferred_lang: ', stored_preferred_lang);
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
let chat_lang = ''
|
|
117
|
+
if (this.browserLang && !stored_preferred_lang) {
|
|
118
|
+
chat_lang = this.browserLang
|
|
119
|
+
} else if (this.browserLang && stored_preferred_lang) {
|
|
120
|
+
chat_lang = stored_preferred_lang
|
|
121
|
+
}
|
|
122
|
+
moment.locale(chat_lang)
|
|
123
|
+
// this.translate.getTranslation(chat_lang).subscribe((labels: string) => {
|
|
124
|
+
// console.log('[CONVS-DETAIL] translations: ', labels);
|
|
125
|
+
// });
|
|
126
|
+
this.translate.get('AddAsCannedResponse')
|
|
127
|
+
.subscribe((text: string) => {
|
|
128
|
+
// console.log('[CONVS-DETAIL] AddAsCannedResponse translated: ', text);
|
|
129
|
+
this.addAsCannedResponseTooltipText = text
|
|
130
|
+
})
|
|
58
131
|
}
|
|
59
132
|
|
|
60
133
|
listenToUploadFileProgress() {
|
|
61
134
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - calling BSStateUpload ');
|
|
62
135
|
this.uploadService.BSStateUpload.subscribe((data: any) => {
|
|
63
136
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - BSStateUpload data', data);
|
|
64
|
-
|
|
137
|
+
|
|
65
138
|
if (data) {
|
|
66
139
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - BSStateUpload data.upload', data.upload);
|
|
67
140
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - BSStateUpload data.upload typeof', typeof data.upload);
|
|
68
141
|
this.uploadProgress = data.upload
|
|
69
142
|
|
|
70
|
-
if (isNaN(data.upload))
|
|
143
|
+
if (isNaN(data.upload)) {
|
|
71
144
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - BSStateUpload data.upload IS NaN (e.g. file size is 0)');
|
|
72
145
|
this.uploadProgress = 100
|
|
73
146
|
}
|
|
74
147
|
// if (data.type.startsWith("application")) {
|
|
75
148
|
// if (!data.type.startsWith("image")) {
|
|
76
|
-
|
|
77
|
-
// this.fileType = 'file'
|
|
78
149
|
|
|
79
|
-
|
|
150
|
+
// this.fileType = 'file'
|
|
151
|
+
|
|
152
|
+
this.addUploadingBubblePlaceholder(true)
|
|
80
153
|
|
|
81
|
-
|
|
154
|
+
// this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] FIREBASE-UPLOAD - BSStateUpload this.fileType', this.fileType);
|
|
82
155
|
// }
|
|
83
156
|
}
|
|
84
157
|
});
|
|
@@ -88,10 +161,20 @@ export class IonConversationDetailComponent extends ConversationContentComponent
|
|
|
88
161
|
this.onAddUploadingBubble.emit(value);
|
|
89
162
|
}
|
|
90
163
|
|
|
91
|
-
onImageRenderedFN(event){
|
|
164
|
+
onImageRenderedFN(event) {
|
|
92
165
|
this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - onImageRenderedFN:::ionic', event)
|
|
93
166
|
this.onImageRendered.emit(event)
|
|
94
167
|
}
|
|
95
168
|
|
|
96
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Track by function for ngFor loops
|
|
171
|
+
*
|
|
172
|
+
* @param index
|
|
173
|
+
* @param item
|
|
174
|
+
*/
|
|
175
|
+
trackByFn(index: number, item: any): any {
|
|
176
|
+
// console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - trackByFn index', index)
|
|
177
|
+
// console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - trackByFn item', item)
|
|
178
|
+
return item.uid || index;
|
|
179
|
+
}
|
|
97
180
|
}
|