@chat21/chat21-web-widget 5.0.83-rc.3 → 5.0.83
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 +5 -0
- package/deploy_amazon_beta.sh +5 -8
- package/deploy_amazon_prod.sh +3 -10
- package/package.json +1 -1
- package/src/app/app.module.ts +2 -5
- package/src/app/component/conversation-detail/conversation/conversation.component.html +4 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +11 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +33 -9
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +3 -14
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +10 -26
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +49 -131
- package/src/app/component/message/audio/audio.component.html +20 -0
- package/src/app/component/message/audio/audio.component.scss +122 -0
- package/src/app/component/message/{audio-track/audio-track.component.spec.ts → audio/audio.component.spec.ts} +6 -6
- package/src/app/component/message/audio/audio.component.ts +122 -0
- package/src/app/component/message/bubble-message/bubble-message.component.html +5 -30
- package/src/app/component/message/bubble-message/bubble-message.component.scss +0 -7
- package/src/app/component/message/bubble-message/bubble-message.component.ts +0 -1
- package/src/app/modals/confirm-close/confirm-close.component.html +28 -1
- package/src/app/modals/confirm-close/confirm-close.component.scss +51 -0
- package/src/app/modals/confirm-close/confirm-close.component.ts +14 -5
- package/src/app/utils/globals.ts +1 -1
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/i18n/es.json +1 -0
- package/src/assets/i18n/fr.json +1 -0
- package/src/assets/i18n/it.json +1 -0
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +0 -29
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +0 -103
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +0 -23
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -96
- package/src/app/component/message/audio-track/audio-track.component.html +0 -32
- package/src/app/component/message/audio-track/audio-track.component.scss +0 -107
- package/src/app/component/message/audio-track/audio-track.component.ts +0 -147
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
+
# 5.0.83 in PROD
|
|
10
|
+
|
|
11
|
+
# 5.0.83-rc.4
|
|
12
|
+
- **added**: confirm-close modal before close a chat
|
|
13
|
+
|
|
9
14
|
# 5.0.83-rc.3
|
|
10
15
|
- **added**: send '/start' info message on restart header menu option
|
|
11
16
|
- **bug-fixed**: close header menu option not send the last conversation id to close
|
package/deploy_amazon_beta.sh
CHANGED
|
@@ -4,10 +4,6 @@ echo "version $version"
|
|
|
4
4
|
|
|
5
5
|
ng build --configuration="pre" --aot=true --base-href --build-optimizer=true
|
|
6
6
|
|
|
7
|
-
### SET HASHING : START ###
|
|
8
|
-
cp ./src/launch_template.js ./dist/launch.js
|
|
9
|
-
node ./src/build_launch.js
|
|
10
|
-
### SET HASHING : END ###
|
|
11
7
|
|
|
12
8
|
# ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #
|
|
13
9
|
|
|
@@ -28,10 +24,11 @@ node ./src/build_launch.js
|
|
|
28
24
|
|
|
29
25
|
# ########## --->>>> FIREBASE folder START <<<<<------ ########## #
|
|
30
26
|
cd dist
|
|
31
|
-
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300
|
|
32
|
-
aws s3 sync . s3://tiledesk-widget-pre/v5
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300
|
|
28
|
+
aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300
|
|
29
|
+
cd ..
|
|
30
|
+
|
|
31
|
+
#aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
|
|
35
32
|
cd ..
|
|
36
33
|
|
|
37
34
|
aws cloudfront create-invalidation --distribution-id E2V5O0YPR61V8P --paths "/*"
|
package/deploy_amazon_prod.sh
CHANGED
|
@@ -4,12 +4,6 @@ echo "version $version"
|
|
|
4
4
|
|
|
5
5
|
# --build-optimizer=false if localstorage is disabled (webview) appears https://github.com/firebase/angularfire/issues/970
|
|
6
6
|
ng build --configuration="prod" --aot=true --build-optimizer=true --vendor-chunk=true
|
|
7
|
-
##--base-href='./v5/' --output-hashing none
|
|
8
|
-
|
|
9
|
-
### SET HASHING : START ###
|
|
10
|
-
cp ./src/launch_template.js ./dist/launch.js
|
|
11
|
-
node ./src/build_launch.js
|
|
12
|
-
### SET HASHING : END ###
|
|
13
7
|
|
|
14
8
|
#### FIREBASE #####
|
|
15
9
|
# cd dist
|
|
@@ -21,12 +15,11 @@ node ./src/build_launch.js
|
|
|
21
15
|
# #### MQTT #####
|
|
22
16
|
cd dist
|
|
23
17
|
# aws s3 sync . s3://tiledesk-widget/v5/latest/
|
|
24
|
-
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=
|
|
25
|
-
aws s3 sync . s3://tiledesk-widget/v6
|
|
26
|
-
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=86400 --exclude='launch.js' #8days
|
|
27
|
-
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
|
|
18
|
+
aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=300
|
|
19
|
+
aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=300
|
|
28
20
|
cd ..
|
|
29
21
|
|
|
22
|
+
|
|
30
23
|
aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
|
|
31
24
|
echo new version deployed $version on s3://tiledesk-widget/v5
|
|
32
25
|
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v5/index.html
|
package/package.json
CHANGED
package/src/app/app.module.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { ConversationContentComponent } from './component/conversation-detail/co
|
|
|
15
15
|
import { ConversationFooterComponent } from './component/conversation-detail/conversation-footer/conversation-footer.component';
|
|
16
16
|
import { ConversationInternalFrameComponent } from './component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component';
|
|
17
17
|
import { ConversationPreviewComponent } from './component/conversation-detail/conversation-preview/conversation-preview.component';
|
|
18
|
-
import { ConversationAudioRecorderComponent } from './component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component';
|
|
19
18
|
/** CONVERSATION-DETAIL COMPONENTS */
|
|
20
19
|
import { BubbleMessageComponent } from './component/message/bubble-message/bubble-message.component';
|
|
21
20
|
import { AvatarComponent } from './component/message/avatar/avatar.component';
|
|
@@ -24,7 +23,7 @@ import { ImageComponent } from './component/message/image/image.component';
|
|
|
24
23
|
import { InfoMessageComponent } from './component/message/info-message/info-message.component';
|
|
25
24
|
import { HtmlComponent } from './component/message/html/html.component';
|
|
26
25
|
import { FrameComponent } from './component/message/frame/frame.component';
|
|
27
|
-
import {
|
|
26
|
+
import { AudioComponent } from './component/message/audio/audio.component';
|
|
28
27
|
import { UserTypingComponent } from './../chat21-core/utils/user-typing/user-typing.component';
|
|
29
28
|
/** MESSAGE ATTACHMENTS COMPONENTS */
|
|
30
29
|
import { MessageAttachmentComponent } from './component/message-attachment/message-attachment.component';
|
|
@@ -139,7 +138,6 @@ import { ConfirmCloseComponent } from './modals/confirm-close/confirm-close.comp
|
|
|
139
138
|
|
|
140
139
|
|
|
141
140
|
|
|
142
|
-
|
|
143
141
|
const appInitializerFn = (appConfig: AppConfigService, brandService: BrandService, logger: NGXLogger) => {
|
|
144
142
|
return async() => {
|
|
145
143
|
let customLogger = new CustomLogger(logger)
|
|
@@ -278,7 +276,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
278
276
|
ConversationFooterComponent,
|
|
279
277
|
ConversationPreviewComponent,
|
|
280
278
|
ConversationInternalFrameComponent,
|
|
281
|
-
ConversationAudioRecorderComponent,
|
|
282
279
|
BubbleMessageComponent,
|
|
283
280
|
AvatarComponent,
|
|
284
281
|
FrameComponent,
|
|
@@ -290,7 +287,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
290
287
|
ActionButtonComponent,
|
|
291
288
|
LinkButtonComponent,
|
|
292
289
|
TextButtonComponent,
|
|
293
|
-
AudioTrackComponent,
|
|
294
290
|
UserTypingComponent,
|
|
295
291
|
/**DIRECTIVES */
|
|
296
292
|
HtmlEntitiesEncodePipe,
|
|
@@ -299,6 +295,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
299
295
|
SafeHtmlPipe,
|
|
300
296
|
LikeUnlikeComponent,
|
|
301
297
|
TooltipDirective,
|
|
298
|
+
AudioComponent,
|
|
302
299
|
CarouselComponent,
|
|
303
300
|
NetworkOfflineComponent,
|
|
304
301
|
ConfirmCloseComponent
|
|
@@ -160,6 +160,17 @@
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
dialog:-internal-dialog-in-top-layer{
|
|
164
|
+
border: 0px;
|
|
165
|
+
border-radius: 16px;
|
|
166
|
+
padding: 15px 15px;
|
|
167
|
+
&::backdrop {
|
|
168
|
+
border-radius: 16px;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
163
174
|
/* ==================== MOBILE VERSION ==================== */
|
|
164
175
|
@media (max-width: 451px) {
|
|
165
176
|
#chat21-conversation-component {
|
|
@@ -138,6 +138,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
138
138
|
translationMapFooter: Map<string, string>;
|
|
139
139
|
translationMapContent: Map<string, string>;
|
|
140
140
|
translationMapPreview: Map<string, string>;
|
|
141
|
+
translationMapCloseChatDialog: Map<string, string>;
|
|
141
142
|
|
|
142
143
|
// ========== begin:: typying =======
|
|
143
144
|
public isTypings = false;
|
|
@@ -257,11 +258,18 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
257
258
|
'LABEL_PREVIEW'
|
|
258
259
|
];
|
|
259
260
|
|
|
261
|
+
const keysCloseChatDialog= [
|
|
262
|
+
'BACK',
|
|
263
|
+
'CLOSE',
|
|
264
|
+
'CLOSE_CHAT'
|
|
265
|
+
];
|
|
266
|
+
|
|
260
267
|
|
|
261
268
|
this.translationMapHeader = this.customTranslateService.translateLanguage(keysHeader);
|
|
262
269
|
this.translationMapFooter = this.customTranslateService.translateLanguage(keysFooter);
|
|
263
270
|
this.translationMapContent = this.customTranslateService.translateLanguage(keysContent);
|
|
264
271
|
this.translationMapPreview = this.customTranslateService.translateLanguage(keysPreview);
|
|
272
|
+
this.translationMapCloseChatDialog = this.customTranslateService.translateLanguage(keysCloseChatDialog)
|
|
265
273
|
}
|
|
266
274
|
|
|
267
275
|
ngAfterViewInit() {
|
|
@@ -980,22 +988,38 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
980
988
|
}
|
|
981
989
|
/** CALLED BY: conv-header component */
|
|
982
990
|
onCloseChat(){
|
|
983
|
-
// this.mydialog.nativeElement.showModal()
|
|
984
991
|
this.logger.debug('[CONV-COMP] close chat with uid ', this.conversation.uid, this.conversationId)
|
|
985
|
-
this.
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
992
|
+
this.mydialog.nativeElement.showModal();
|
|
993
|
+
this.isMenuShow = false
|
|
994
|
+
}
|
|
995
|
+
/** CALLED BY: confirm-close modal component */
|
|
996
|
+
onCloseDialog(event: {type: string, data: any}){
|
|
997
|
+
this.logger.debug('[CONV-COMP] onCloseDialog data returned ', event)
|
|
998
|
+
switch(event.type){
|
|
999
|
+
case 'back':
|
|
1000
|
+
this.mydialog.nativeElement.close()
|
|
1001
|
+
break;
|
|
1002
|
+
case 'confirm':
|
|
1003
|
+
this.tiledeskRequestService.closeSupportGroup(this.conversationId).then(data => {
|
|
1004
|
+
if(data === 'closed'){
|
|
1005
|
+
this.mydialog.nativeElement.close()
|
|
1006
|
+
this.logger.debug('[CONV-COMP] chat closed successfully with uid ', this.conversationId)
|
|
1007
|
+
}
|
|
1008
|
+
}).catch(error => {
|
|
1009
|
+
this.logger.error('[CONV-COMP] ERROR while closing chat with id: ', this.conversationId, error)
|
|
1010
|
+
})
|
|
1011
|
+
break;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
|
|
993
1015
|
}
|
|
1016
|
+
|
|
994
1017
|
/** CALLED BY: conv-header component */
|
|
995
1018
|
onRestartChat(){
|
|
996
1019
|
//restart SAME conversation calling /start againg
|
|
997
1020
|
let attributes = {
|
|
998
1021
|
subtype: 'info',
|
|
1022
|
+
action: 'start',
|
|
999
1023
|
... this.g.attributes
|
|
1000
1024
|
}
|
|
1001
1025
|
this.conversationFooter.sendMessage('/start', TYPE_MSG_TEXT, null, attributes)
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<!-- TEXTAREA + ICONS: conv active-->
|
|
8
8
|
<div class="textarea-container" *ngIf="!hideTextAreaContent && !hideTextReply">
|
|
9
9
|
|
|
10
|
-
<div
|
|
10
|
+
<div class="icons-container">
|
|
11
11
|
<!-- ICON ATTACHMENT -->
|
|
12
12
|
<label *ngIf="showAttachmentButton == true" tabindex="1502" aria-label="allegati" for="chat21-file" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-start-upload-doc">
|
|
13
13
|
<span class="v-align-center">
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
<div
|
|
47
|
+
<div class="visible-text-area" [class.disabled] = "( isConversationArchived || hideTextReply)? true : null">
|
|
48
48
|
<!-- isFilePendingToUpload || -->
|
|
49
49
|
<textarea
|
|
50
50
|
[attr.disabled] = "(hideTextReply)? true : null"
|
|
@@ -67,24 +67,13 @@
|
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
69
|
<!-- ICON SEND -->
|
|
70
|
-
<div
|
|
70
|
+
<div tabindex="-1" class="chat21-textarea-button" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
|
|
71
71
|
<span class="v-align-center">
|
|
72
72
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
|
73
73
|
<path d="M1.8,18.9V1.7L22,10.3L1.8,18.9z M3.9,15.6l12.6-5.4L3.9,4.9v3.7l6.4,1.6l-6.4,1.6V15.6z M3.9,15.6V4.9v7V15.6z"/>
|
|
74
74
|
</svg>
|
|
75
75
|
</span>
|
|
76
76
|
</div>
|
|
77
|
-
|
|
78
|
-
<!-- ICON REC -->
|
|
79
|
-
<div *ngIf="!textInputTextArea" tabindex="-1" class="chat21-audio-button" [class.active]="isStopRec" id="chat21-button-rec">
|
|
80
|
-
<chat-audio-recorder
|
|
81
|
-
(startRecordingEvent)="onStartRecording()"
|
|
82
|
-
(deleteRecordingEvent)="onDeleteRecording()"
|
|
83
|
-
(endRecordingEvent)="onEndRecording($event)"
|
|
84
|
-
(sendRecordingEvent)="onSendRecording($event)"
|
|
85
|
-
[stylesMap]="stylesMap">
|
|
86
|
-
</chat-audio-recorder>
|
|
87
|
-
</div>
|
|
88
77
|
</div>
|
|
89
78
|
|
|
90
79
|
|
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss
CHANGED
|
@@ -7,16 +7,14 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
width: 100%;
|
|
9
9
|
align-items: center;
|
|
10
|
-
gap:
|
|
10
|
+
gap: 10px;
|
|
11
11
|
justify-content: space-between;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.icons-container{
|
|
15
15
|
display: flex;
|
|
16
16
|
align-self: flex-end;
|
|
17
|
-
margin-left: 8px
|
|
18
|
-
gap: 2px;
|
|
19
|
-
margin-right: 8px;
|
|
17
|
+
margin-left: 8px
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
.visible-text-area {
|
|
@@ -33,6 +31,7 @@
|
|
|
33
31
|
.chat21-textarea-button {
|
|
34
32
|
fill: var(--icon-fill-color);
|
|
35
33
|
pointer-events: auto;
|
|
34
|
+
|
|
36
35
|
height: var(--chat-footer-height);
|
|
37
36
|
bottom: 22px;
|
|
38
37
|
opacity: 0.3;
|
|
@@ -186,29 +185,11 @@ textarea:active{
|
|
|
186
185
|
}
|
|
187
186
|
|
|
188
187
|
#chat21-button-send {
|
|
188
|
+
// right: 8px;
|
|
189
|
+
// bottom: 0;
|
|
189
190
|
display: flex;
|
|
190
191
|
align-self: flex-end;
|
|
191
|
-
margin: 0 8px
|
|
192
|
-
width: 34px;
|
|
193
|
-
text-align: center;
|
|
194
|
-
justify-content: center;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
#chat21-button-rec {
|
|
198
|
-
display: flex;
|
|
199
|
-
width: 34px;
|
|
200
|
-
text-align: center;
|
|
201
|
-
justify-content: center;
|
|
202
|
-
height: var(--chat-footer-height);
|
|
203
|
-
&.active{
|
|
204
|
-
width: 100%;
|
|
205
|
-
}
|
|
206
|
-
chat-audio-recorder {
|
|
207
|
-
width: 100%;
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
justify-content: center;
|
|
211
|
-
}
|
|
192
|
+
margin: 0 8px
|
|
212
193
|
}
|
|
213
194
|
|
|
214
195
|
#chat21-file{
|
|
@@ -356,4 +337,7 @@ textarea:active{
|
|
|
356
337
|
// left: 10px;
|
|
357
338
|
border: none;
|
|
358
339
|
margin: -2px -2px 0px;
|
|
359
|
-
|
|
340
|
+
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
|