@chat21/chat21-web-widget 5.0.89-rc.1 → 5.0.89-rc.2
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 +3 -0
- package/package.json +1 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.html +1 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +3 -1
- package/src/app/modals/confirm-close/confirm-close.component.html +6 -6
- package/src/app/modals/confirm-close/confirm-close.component.scss +14 -3
- package/src/app/modals/confirm-close/confirm-close.component.ts +19 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -262,7 +262,8 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
262
262
|
const keysCloseChatDialog= [
|
|
263
263
|
'BACK',
|
|
264
264
|
'CLOSE',
|
|
265
|
-
'CLOSE_CHAT'
|
|
265
|
+
'CLOSE_CHAT',
|
|
266
|
+
'CONFIRM_CLOSE_CHAT'
|
|
266
267
|
];
|
|
267
268
|
|
|
268
269
|
|
|
@@ -991,6 +992,7 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
991
992
|
onCloseChat(){
|
|
992
993
|
this.logger.debug('[CONV-COMP] close chat with uid ', this.conversation.uid, this.conversationId)
|
|
993
994
|
this.mydialog.nativeElement.showModal();
|
|
995
|
+
// this.isClosingConversation = false;
|
|
994
996
|
this.isMenuShow = false
|
|
995
997
|
}
|
|
996
998
|
/** CALLED BY: confirm-close modal component */
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
</button>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="content">
|
|
13
|
-
<div class="text">
|
|
13
|
+
<div class="text">{{ translationMap?.get('CONFIRM_CLOSE_CHAT') }}</div>
|
|
14
14
|
<div class="options">
|
|
15
15
|
|
|
16
16
|
<!-- BUTTON CANCEL-->
|
|
17
|
-
<span class="v-align-center c21-label-button back-button" (click)="onBack()">
|
|
17
|
+
<span class="v-align-center c21-label-button back-button" [class.disabled]="isLoadingActive" (click)="onBack()">
|
|
18
18
|
{{translationMap?.get('BACK')}}
|
|
19
19
|
</span>
|
|
20
20
|
|
|
21
21
|
<!-- BUTTON CLOSE-->
|
|
22
|
-
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="onConfirm()" [ngStyle]="{'background-color': stylesMap?.get('themeColor'), 'border-color': stylesMap?.get('themeColor'), 'color': stylesMap?.get('
|
|
23
|
-
<span *ngIf="isLoadingActive"
|
|
24
|
-
<svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
22
|
+
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="onConfirm()" [ngStyle]="{'background-color': stylesMap?.get('themeColor'), 'border-color': stylesMap?.get('themeColor'), 'color': stylesMap?.get('foregroundColor') }">
|
|
23
|
+
<span *ngIf="isLoadingActive" class="spinner-container">
|
|
24
|
+
<svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="25" height="25" [ngStyle]="{'fill': stylesMap?.get('foregroundColor') }"
|
|
25
25
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
|
|
26
|
-
<path fill="
|
|
26
|
+
<path fill="inherit" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
27
27
|
<animateTransform
|
|
28
28
|
attributeName="transform"
|
|
29
29
|
attributeType="XML"
|
|
@@ -28,12 +28,23 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.back-button{
|
|
31
|
-
color: #777777
|
|
31
|
+
color: #777777;
|
|
32
|
+
|
|
33
|
+
&.disabled{
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
opacity: 0.6
|
|
37
|
+
}
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
.spinner-container{
|
|
41
|
+
width: inherit;
|
|
42
|
+
height: inherit;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
}
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
.c21-header-button{
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChange, SimpleChanges, ViewChild, OnDestroy } from '@angular/core';
|
|
2
|
+
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
3
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
@Component({
|
|
@@ -7,20 +9,33 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild }
|
|
|
7
9
|
styleUrls: ['./confirm-close.component.scss']
|
|
8
10
|
})
|
|
9
11
|
export class ConfirmCloseComponent implements OnInit{
|
|
10
|
-
|
|
11
|
-
isLoadingActive: boolean
|
|
12
|
+
|
|
13
|
+
@Input() isLoadingActive: boolean;
|
|
14
|
+
@Input() conversationId: string;
|
|
12
15
|
|
|
13
16
|
@Input() translationMap: Map< string, string>;
|
|
14
17
|
@Input() stylesMap: Map<string, string>;
|
|
15
18
|
@Output() onDiaglogClosed = new EventEmitter<{type: string, data: any}>();
|
|
16
19
|
|
|
20
|
+
private logger: LoggerService = LoggerInstance.getInstance();
|
|
17
21
|
constructor() { }
|
|
18
22
|
|
|
19
23
|
ngOnInit(): void {
|
|
20
|
-
|
|
24
|
+
this.logger.log('[CONFIRM CLOSE MODAL] onInit', this.isLoadingActive, this.stylesMap);
|
|
21
25
|
// this.dialog.showModal();
|
|
22
26
|
}
|
|
23
27
|
|
|
28
|
+
ngOnChanges(changes: SimpleChanges){
|
|
29
|
+
if(changes &&
|
|
30
|
+
changes['conversationId'] &&
|
|
31
|
+
changes['conversationId'].previousValue !== undefined &&
|
|
32
|
+
(changes['conversationId'].previousValue !== changes['conversationId'].currentValue) &&
|
|
33
|
+
changes['conversationId'].currentValue
|
|
34
|
+
){
|
|
35
|
+
this.isLoadingActive = false;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
24
39
|
ngAfterViewInit(){
|
|
25
40
|
}
|
|
26
41
|
|