@chat21/chat21-web-widget 5.0.47-rc.1 → 5.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/assets/i18n/en.json +1 -0
- package/dist/assets/images/website mockup.jpg +0 -0
- package/dist/assets/twp/chatbot-panel.html +612 -0
- package/dist/assets/twp/index-dev.html +53 -0
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/app/component/home/home.component.html +81 -1
- package/src/app/component/home/home.component.scss +34 -0
- package/src/app/component/home/home.component.ts +23 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +27 -27
- package/src/app/providers/global-settings.service.ts +16 -1
- package/src/app/utils/globals.ts +10 -1
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/images/website mockup.jpg +0 -0
- package/src/assets/twp/chatbot-panel.html +612 -0
- package/src/assets/twp/index-dev.html +53 -0
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<svg role="img" aria-labelledby="altIconTitle" [ngStyle]="{'fill': g.themeForegroundColor }" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" viewBox="0 0 24 24">
|
|
14
14
|
<path fill="none" d="M0 0h24v24H0V0z"/>
|
|
15
15
|
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>
|
|
16
|
-
<title id="altIconTitle">{{
|
|
16
|
+
<title id="altIconTitle">{{translationMapHeader?.get('BUTTON_CLOSE_TO_ICON')}}</title>
|
|
17
17
|
</svg>
|
|
18
18
|
</button>
|
|
19
19
|
</div>
|
|
@@ -67,6 +67,86 @@
|
|
|
67
67
|
|
|
68
68
|
</div>
|
|
69
69
|
|
|
70
|
+
<!-- FOOTER - CONTENT -->
|
|
71
|
+
<div class="c21-footer-content fade-in-bottom-footer" >
|
|
72
|
+
<div id="c21-whatsapp" *ngIf="g?.whatsappNumber && g?.whatsappNumber.trim() !== ''">
|
|
73
|
+
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('whatsapp')">
|
|
74
|
+
<span class="v-align-center">
|
|
75
|
+
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
76
|
+
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
77
|
+
</svg> -->
|
|
78
|
+
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" viewBox="0 0 1219.547 1225.016">
|
|
79
|
+
<path fill="#E0E0E0" d="M1041.858 178.02C927.206 63.289 774.753.07 612.325 0 277.617 0 5.232 272.298 5.098 606.991c-.039 106.986 27.915 211.42 81.048 303.476L0 1225.016l321.898-84.406c88.689 48.368 188.547 73.855 290.166 73.896h.258.003c334.654 0 607.08-272.346 607.222-607.023.056-162.208-63.052-314.724-177.689-429.463zm-429.533 933.963h-.197c-90.578-.048-179.402-24.366-256.878-70.339l-18.438-10.93-191.021 50.083 51-186.176-12.013-19.087c-50.525-80.336-77.198-173.175-77.16-268.504.111-278.186 226.507-504.503 504.898-504.503 134.812.056 261.519 52.604 356.814 147.965 95.289 95.36 147.728 222.128 147.688 356.948-.118 278.195-226.522 504.543-504.693 504.543z"/>
|
|
80
|
+
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="609.77" y1="1190.114" x2="609.77" y2="21.084">
|
|
81
|
+
<stop offset="0" stop-color="#20b038"/>
|
|
82
|
+
<stop offset="1" stop-color="#60d66a"/>
|
|
83
|
+
</linearGradient><path fill="url(#a)" d="M27.875 1190.114l82.211-300.18c-50.719-87.852-77.391-187.523-77.359-289.602.133-319.398 260.078-579.25 579.469-579.25 155.016.07 300.508 60.398 409.898 169.891 109.414 109.492 169.633 255.031 169.57 409.812-.133 319.406-260.094 579.281-579.445 579.281-.023 0 .016 0 0 0h-.258c-96.977-.031-192.266-24.375-276.898-70.5l-307.188 80.548z"/>
|
|
84
|
+
<image overflow="visible" opacity=".08" width="20" height="20" xlink:href="FCC0802E2AF8A915.png" transform="translate(270.984 291.372)"/>
|
|
85
|
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" d="M462.273 349.294c-11.234-24.977-23.062-25.477-33.75-25.914-8.742-.375-18.75-.352-28.742-.352-10 0-26.25 3.758-39.992 18.766-13.75 15.008-52.5 51.289-52.5 125.078 0 73.797 53.75 145.102 61.242 155.117 7.5 10 103.758 166.266 256.203 226.383 126.695 49.961 152.477 40.023 179.977 37.523s88.734-36.273 101.234-71.297c12.5-35.016 12.5-65.031 8.75-71.305-3.75-6.25-13.75-10-28.75-17.5s-88.734-43.789-102.484-48.789-23.75-7.5-33.75 7.516c-10 15-38.727 48.773-47.477 58.773-8.75 10.023-17.5 11.273-32.5 3.773-15-7.523-63.305-23.344-120.609-74.438-44.586-39.75-74.688-88.844-83.438-103.859-8.75-15-.938-23.125 6.586-30.602 6.734-6.719 15-17.508 22.5-26.266 7.484-8.758 9.984-15.008 14.984-25.008 5-10.016 2.5-18.773-1.25-26.273s-32.898-81.67-46.234-111.326z"/>
|
|
86
|
+
<path fill="#FFF" d="M1036.898 176.091C923.562 62.677 772.859.185 612.297.114 281.43.114 12.172 269.286 12.039 600.137 12 705.896 39.633 809.13 92.156 900.13L7 1211.067l318.203-83.438c87.672 47.812 186.383 73.008 286.836 73.047h.255.003c330.812 0 600.109-269.219 600.25-600.055.055-160.343-62.328-311.108-175.649-424.53zm-424.601 923.242h-.195c-89.539-.047-177.344-24.086-253.93-69.531l-18.227-10.805-188.828 49.508 50.414-184.039-11.875-18.867c-49.945-79.414-76.312-171.188-76.273-265.422.109-274.992 223.906-498.711 499.102-498.711 133.266.055 258.516 52 352.719 146.266 94.195 94.266 146.031 219.578 145.992 352.852-.118 274.999-223.923 498.749-498.899 498.749z"/>
|
|
87
|
+
<title id="altIconTitle">Whatsapp</title>
|
|
88
|
+
</svg>
|
|
89
|
+
</span>
|
|
90
|
+
<div class="clear"></div>
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
<div id="c21-telegram" *ngIf="g?.telegramUsername && g?.telegramUsername.trim() !== ''">
|
|
94
|
+
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('telegram')">
|
|
95
|
+
<span class="v-align-center">
|
|
96
|
+
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
97
|
+
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
98
|
+
</svg> -->
|
|
99
|
+
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26" height="26" viewBox="0 0 368 368" style="enable-background:new 0 0 368 368;" xml:space="preserve">
|
|
100
|
+
<g id="XMLID_1_">
|
|
101
|
+
<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="-66.831" y1="-68.1757" x2="-65.3102" y2="-68.1757" gradientTransform="matrix(-60 139.992 -139.992 -60 -13316.416 5324.4634)">
|
|
102
|
+
<stop offset="0" style="stop-color:#37AEE2"/>
|
|
103
|
+
<stop offset="1" style="stop-color:#1E96C8"/>
|
|
104
|
+
</linearGradient>
|
|
105
|
+
<circle id="XMLID_3_" fill="url(#XMLID_7_)" cx="184" cy="184" r="182.5"/>
|
|
106
|
+
<path id="XMLID_4_" fill="#C8DAEA" d="M150.5,267.6c-5.9,0-4.9-2.2-6.9-7.9l-17.4-57.2L260,123.2"/>
|
|
107
|
+
<path id="XMLID_5_" fill="#A9C9DD" d="M150.5,267.6c4.6,0,6.6-2.1,9.1-4.6l24.3-23.7l-30.4-18.3"/>
|
|
108
|
+
<linearGradient id="XMLID_8_" gradientUnits="userSpaceOnUse" x1="-61.9167" y1="-70.9915" x2="-60.3959" y2="-70.9915" gradientTransform="matrix(24.9894 40.0038 -47.6951 20.9596 -1641.849 4153.2417)">
|
|
109
|
+
<stop offset="0" style="stop-color:#EFF7FC"/>
|
|
110
|
+
<stop offset="1" style="stop-color:#FFFFFF"/>
|
|
111
|
+
</linearGradient>
|
|
112
|
+
<path id="XMLID_6_" fill="url(#XMLID_8_)" d="M153.6,221.1l73.5,54.3c8.4,4.6,14.4,2.2,16.5-7.8l29.9-141.1c3.1-12.3-4.7-17.9-12.7-14.2 L85.2,180.2c-12,4.8-11.9,11.5-2.2,14.5l45.1,14.1l104.4-65.9c4.9-3,9.5-1.4,5.7,1.9"/>
|
|
113
|
+
</g>
|
|
114
|
+
<title id="altIconTitle">Telegram</title>
|
|
115
|
+
</svg>
|
|
116
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
117
|
+
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M13.92,11.22s-1.22-.6-1.44-.68a.76.76,0,0,0-.27-.06.46.46,0,0,0-.4.24c-.12.17-.48.59-.59.72l-.05,0-.25-.1A6.22,6.22,0,0,1,8.54,9.26l0,0s.05-.06.07-.09l.2-.23.1-.11a1.36,1.36,0,0,0,.19-.31l0-.05a.54.54,0,0,0,0-.52c0-.06-.53-1.27-.58-1.4-.13-.31-.3-.45-.54-.45H7.88a3,3,0,0,0-1,.26,2.08,2.08,0,0,0-.77,1.76A3.78,3.78,0,0,0,7,10.17a.09.09,0,0,0,0,.05,7.81,7.81,0,0,0,3.33,2.89,5.37,5.37,0,0,0,2,.51h0l.32,0h.06a2.13,2.13,0,0,0,1.48-1,1.7,1.7,0,0,0,.09-1.08A.72.72,0,0,0,13.92,11.22Z" transform="translate(-1.83 -1.83)"/>
|
|
118
|
+
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M10.14,1.83a8,8,0,0,0-8,8,7.86,7.86,0,0,0,1.1,4L1.85,17.89a.19.19,0,0,0,0,.21.21.21,0,0,0,.15.07h.06l4.24-1.35a8,8,0,0,0,11.82-7A8,8,0,0,0,10.14,1.83Zm0,14.27a6.37,6.37,0,0,1-3.49-1,.19.19,0,0,0-.12,0H6.47l-2.12.68.68-2a.22.22,0,0,0,0-.19A6.22,6.22,0,0,1,3.79,9.8a6.36,6.36,0,1,1,6.35,6.3Z" transform="translate(-1.83 -1.83)"/>
|
|
119
|
+
</svg> -->
|
|
120
|
+
</span>
|
|
121
|
+
<div class="clear"></div>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
<div id="c21-messanger" *ngIf="g?.messangerPageTitle && g?.messangerPageTitle.trim() !== ''">
|
|
125
|
+
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('messanger')">
|
|
126
|
+
<span class="v-align-center">
|
|
127
|
+
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
128
|
+
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
129
|
+
</svg> -->
|
|
130
|
+
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" width="26" height="26" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 800 800">
|
|
131
|
+
<radialGradient id="Gradient" cx="101.925" cy="809.0079" r="1.0896" gradientTransform="matrix(800 0 0 -799.9985 -81386 648000.75)" gradientUnits="userSpaceOnUse">
|
|
132
|
+
<stop offset="0" style="stop-color:#0099FF"/>
|
|
133
|
+
<stop offset="0.6098" style="stop-color:#A033FF"/>
|
|
134
|
+
<stop offset="0.9348" style="stop-color:#FF5280"/>
|
|
135
|
+
<stop offset="1" style="stop-color:#FF7061"/>
|
|
136
|
+
</radialGradient>
|
|
137
|
+
<path fill="url(#Gradient)" d="M400,0C174.7,0,0,165.1,0,388c0,116.6,47.8,217.4,125.6,287c6.5,5.8,10.5,14,10.7,22.8l2.2,71.2 c0.7,22.7,24.1,37.5,44.9,28.3l79.4-35c6.7-3,14.3-3.5,21.4-1.6c36.5,10,75.3,15.4,115.8,15.4c225.3,0,400-165.1,400-388 S625.3,0,400,0z"/>
|
|
138
|
+
<path fill="#FFFFFF" d="M159.8,501.5l117.5-186.4c18.7-29.7,58.7-37,86.8-16l93.5,70.1c8.6,6.4,20.4,6.4,28.9-0.1 l126.2-95.8c16.8-12.8,38.8,7.4,27.6,25.3L522.7,484.9c-18.7,29.7-58.7,37-86.8,16l-93.5-70.1c-8.6-6.4-20.4-6.4-28.9,0.1 l-126.2,95.8C170.5,539.5,148.5,519.4,159.8,501.5z"/>
|
|
139
|
+
<title id="altIconTitle">Facebook Messanger</title>
|
|
140
|
+
</svg>
|
|
141
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
142
|
+
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M13.92,11.22s-1.22-.6-1.44-.68a.76.76,0,0,0-.27-.06.46.46,0,0,0-.4.24c-.12.17-.48.59-.59.72l-.05,0-.25-.1A6.22,6.22,0,0,1,8.54,9.26l0,0s.05-.06.07-.09l.2-.23.1-.11a1.36,1.36,0,0,0,.19-.31l0-.05a.54.54,0,0,0,0-.52c0-.06-.53-1.27-.58-1.4-.13-.31-.3-.45-.54-.45H7.88a3,3,0,0,0-1,.26,2.08,2.08,0,0,0-.77,1.76A3.78,3.78,0,0,0,7,10.17a.09.09,0,0,0,0,.05,7.81,7.81,0,0,0,3.33,2.89,5.37,5.37,0,0,0,2,.51h0l.32,0h.06a2.13,2.13,0,0,0,1.48-1,1.7,1.7,0,0,0,.09-1.08A.72.72,0,0,0,13.92,11.22Z" transform="translate(-1.83 -1.83)"/>
|
|
143
|
+
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M10.14,1.83a8,8,0,0,0-8,8,7.86,7.86,0,0,0,1.1,4L1.85,17.89a.19.19,0,0,0,0,.21.21.21,0,0,0,.15.07h.06l4.24-1.35a8,8,0,0,0,11.82-7A8,8,0,0,0,10.14,1.83Zm0,14.27a6.37,6.37,0,0,1-3.49-1,.19.19,0,0,0-.12,0H6.47l-2.12.68.68-2a.22.22,0,0,0,0-.19A6.22,6.22,0,0,1,3.79,9.8a6.36,6.36,0,1,1,6.35,6.3Z" transform="translate(-1.83 -1.83)"/>
|
|
144
|
+
</svg> -->
|
|
145
|
+
</span>
|
|
146
|
+
<div class="clear"></div>
|
|
147
|
+
</button>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
70
150
|
|
|
71
151
|
<!-- FOOTER -->
|
|
72
152
|
<div class="c21-footer fade-in-bottom-footer">
|
|
@@ -198,6 +198,40 @@
|
|
|
198
198
|
// }
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
.c21-footer-content{
|
|
202
|
+
position: absolute;
|
|
203
|
+
width: 100%;
|
|
204
|
+
height: 40px; //30px;
|
|
205
|
+
bottom: 40px;
|
|
206
|
+
// left: 0px;
|
|
207
|
+
// right: 0px;
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
background-color: white;
|
|
212
|
+
// box-shadow: 0 0px 10px 0px $trasp-light-gray;
|
|
213
|
+
z-index: 20;
|
|
214
|
+
gap: 10px;
|
|
215
|
+
// border-top: 1px solid $trasp-light-gray;
|
|
216
|
+
#c21-whatsapp, #c21-telegram, #c21-messanger{
|
|
217
|
+
.c21-button-primary{
|
|
218
|
+
background-color: transparent;
|
|
219
|
+
color: white;
|
|
220
|
+
margin: 0;
|
|
221
|
+
padding: 5px;
|
|
222
|
+
height: 35px;
|
|
223
|
+
width: 35px;
|
|
224
|
+
display: flex;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
&:hover svg{
|
|
229
|
+
transform: scale(1.2);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
201
235
|
/********* c21-footer **********/
|
|
202
236
|
.c21-footer {
|
|
203
237
|
position: absolute;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef, ViewChild, Component, OnInit, Input, Output, EventEmitter, ViewEncapsulation, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
2
3
|
import { ConversationModel } from '../../../chat21-core/models/conversation';
|
|
3
4
|
import { LoggerService } from '../../../chat21-core/providers/abstract/logger.service';
|
|
4
5
|
import { LoggerInstance } from '../../../chat21-core/providers/logger/loggerInstance';
|
|
@@ -48,13 +49,23 @@ export class HomeComponent implements OnInit, AfterViewInit {
|
|
|
48
49
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
49
50
|
|
|
50
51
|
constructor(
|
|
51
|
-
public g: Globals
|
|
52
|
+
public g: Globals,
|
|
53
|
+
private customTranslateService: CustomTranslateService,
|
|
52
54
|
) {
|
|
53
55
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
ngOnInit() {
|
|
57
59
|
this.logger.debug('[HOME-COMP] ngOnInit');
|
|
60
|
+
this.initiTranslations()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
initiTranslations(){
|
|
64
|
+
|
|
65
|
+
let keysHeader = [
|
|
66
|
+
'BUTTON_CLOSE_TO_ICON'
|
|
67
|
+
]
|
|
68
|
+
this.translationMapHeader = this.customTranslateService.translateLanguage(keysHeader)
|
|
58
69
|
}
|
|
59
70
|
|
|
60
71
|
ngAfterViewInit(){
|
|
@@ -92,6 +103,17 @@ export class HomeComponent implements OnInit, AfterViewInit {
|
|
|
92
103
|
this.onOpenAllConvesations.emit();
|
|
93
104
|
}
|
|
94
105
|
|
|
106
|
+
openConversationOnPlatform(platform: "telegram" | "whatsapp" | "messanger" ){
|
|
107
|
+
if(platform === 'telegram'){
|
|
108
|
+
window.open('https://telegram.me'+this.g.telegramUsername, '_blank')
|
|
109
|
+
}else if(platform === 'whatsapp'){
|
|
110
|
+
window.open('https://wa.me/'+this.g.whatsappNumber, '_blank')
|
|
111
|
+
}else if(platform=== 'messanger'){
|
|
112
|
+
window.open('https://m.me/'+this.g.messangerPageTitle, '_blank')
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
|
|
95
117
|
onConversationSelectedFN(conversation: ConversationModel) {
|
|
96
118
|
if(conversation){
|
|
97
119
|
// rimuovo classe animazione
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" -->
|
|
2
2
|
<!-- ngStyle]="{'padding': (isImage(message) || isFrame(message))?'1px':'0 8px'}" -->
|
|
3
3
|
<!-- 'width': (isImage(message) || isFrame(message))? sizeImage?.width + 'px': null -->
|
|
4
|
-
<div [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0 0px':'0 8px'}" class="messages primary-color">
|
|
4
|
+
<div id="bubble-message" [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0 0px':'0 8px'}" class="messages primary-color">
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
<div>
|
|
@@ -52,33 +52,33 @@
|
|
|
52
52
|
</ng-template>
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
<!-- [htmlEnabled]="(message?.type==='html')? true : false" -->
|
|
56
|
+
<chat-text *ngIf="message?.type !=='html'"
|
|
57
|
+
[text]="message?.text"
|
|
58
|
+
[color]="fontColor"
|
|
59
|
+
[fontSize]="fontSize"
|
|
60
|
+
[fontFamily]="fontFamily"
|
|
61
|
+
(onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
|
|
62
|
+
(onAfterMessageRender)="onAfterMessageRenderFN($event)">
|
|
63
|
+
</chat-text>
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
<chat-html *ngIf="message?.type==='html'"
|
|
66
|
+
[htmlText]="message?.text"
|
|
67
|
+
[fontSize]="stylesMap.get('buttonFontSize')"
|
|
68
|
+
[themeColor]="stylesMap.get('themeColor')"
|
|
69
|
+
[foregroundColor]="stylesMap.get('foregroundColor')">
|
|
70
|
+
</chat-html>
|
|
71
|
+
<!-- <p #messageEl class="message_innerhtml marked" [innerHTML]="printMessage(message, messageEl, this) | marked"></p> -->
|
|
72
|
+
<!-- <div *ngIf="isPopupUrl(message.text); then contentPopup else contentNewTab">here
|
|
73
|
+
is ignored</div>
|
|
74
|
+
<ng-template #contentPopup>
|
|
75
|
+
<p style="text-decoration: underline; padding:8px; cursor: pointer;"
|
|
76
|
+
(click)="popupUrl(g.windowContext, message.text,'windowName')">{{strip_tags(message.text)}}</p>
|
|
77
|
+
</ng-template>
|
|
78
|
+
<ng-template #contentNewTab>
|
|
79
|
+
<p #messageEl [innerHTML]="printMessage(message, messageEl, this) | linky"></p>
|
|
80
|
+
</ng-template> -->
|
|
81
|
+
</div>
|
|
82
82
|
|
|
83
83
|
</div>
|
|
84
84
|
|
|
@@ -999,7 +999,22 @@ export class GlobalSettingsService {
|
|
|
999
999
|
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > participants:: ', TEMP]);
|
|
1000
1000
|
if (TEMP !== undefined) {
|
|
1001
1001
|
globals.participants = TEMP.split(',').map(key => { return key.trim()});;
|
|
1002
|
-
}
|
|
1002
|
+
}
|
|
1003
|
+
TEMP = tiledeskSettings['whatsappNumber'];
|
|
1004
|
+
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > whatsappNumber:: ', TEMP]);
|
|
1005
|
+
if (TEMP !== undefined) {
|
|
1006
|
+
globals.whatsappNumber = TEMP;
|
|
1007
|
+
}
|
|
1008
|
+
TEMP = tiledeskSettings['messangerPageTitle'];
|
|
1009
|
+
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > messangerPageTitle:: ', TEMP]);
|
|
1010
|
+
if (TEMP !== undefined) {
|
|
1011
|
+
globals.messangerPageTitle = TEMP;
|
|
1012
|
+
}
|
|
1013
|
+
TEMP = tiledeskSettings['telegramUsername'];
|
|
1014
|
+
// this.logger.debug('[GLOBAL-SET] setVariablesFromSettings > telegramUsername:: ', TEMP]);
|
|
1015
|
+
if (TEMP !== undefined) {
|
|
1016
|
+
globals.telegramUsername = TEMP;
|
|
1017
|
+
}
|
|
1003
1018
|
}
|
|
1004
1019
|
|
|
1005
1020
|
/**
|
package/src/app/utils/globals.ts
CHANGED
|
@@ -217,6 +217,9 @@ export class Globals {
|
|
|
217
217
|
allowReopen: boolean; // ******* new ********
|
|
218
218
|
continueConversationBeforeTime: number; // ******* new ********
|
|
219
219
|
participants: Array<string>; // ******* new ********
|
|
220
|
+
whatsappNumber: string; // ******* new ********
|
|
221
|
+
messangerPageTitle: string; // ******* new ********
|
|
222
|
+
telegramUsername: string; // ******* new ********
|
|
220
223
|
constructor(
|
|
221
224
|
) {
|
|
222
225
|
// console.log(' ---------------- 1: initDefafultParameters ---------------- ');
|
|
@@ -391,7 +394,13 @@ export class Globals {
|
|
|
391
394
|
this.continueConversationBeforeTime = 48;
|
|
392
395
|
/** enable user to continue archived confersation before the value time from last timeout message */
|
|
393
396
|
this.participants = [];
|
|
394
|
-
|
|
397
|
+
/** enable user to talk with specific chat-bots/humans */
|
|
398
|
+
this.whatsappNumber = '';
|
|
399
|
+
/**enable user to set a whatsapp business number to chat with */
|
|
400
|
+
this.messangerPageTitle = ''
|
|
401
|
+
/**enable user to set a facebook messanger page to chat with */
|
|
402
|
+
this.telegramUsername = ''
|
|
403
|
+
/**enable user to set a telegram number to chat with */
|
|
395
404
|
|
|
396
405
|
this.showWaitTime = true;
|
|
397
406
|
|
package/src/assets/i18n/en.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"LABEL_TU": "",
|
|
3
3
|
"LABEL_PLACEHOLDER": "type your message..",
|
|
4
4
|
"LABEL_START_NW_CONV": "New conversation",
|
|
5
|
+
"LABEL_WHATSAPP": "Message us",
|
|
5
6
|
"LABEL_FIRST_MSG": "Describe shortly your problem, you will be contacted by an agent.",
|
|
6
7
|
"LABEL_FIRST_MSG_NO_AGENTS": "🤔 All operators are offline at the moment. You can anyway describe your problem. It will be assigned to the support team who will answer you as soon as possible.",
|
|
7
8
|
"LABEL_SELECT_TOPIC": "Select a topic",
|
|
Binary file
|