@vgroup/dialbox 0.1.11 → 0.1.12
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.
|
@@ -2468,7 +2468,7 @@ class DialboxComponent {
|
|
|
2468
2468
|
this.callData.isIncomingCall = true;
|
|
2469
2469
|
}
|
|
2470
2470
|
incomingCallData.on('cancel', () => {
|
|
2471
|
-
|
|
2471
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
2472
2472
|
if (this.incomingCallsList.length == 0) {
|
|
2473
2473
|
this.isCallInProgress = false;
|
|
2474
2474
|
}
|
|
@@ -2513,37 +2513,42 @@ class DialboxComponent {
|
|
|
2513
2513
|
this.registerDragElement();
|
|
2514
2514
|
}
|
|
2515
2515
|
ngOnChanges(changes) {
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2516
|
+
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
2517
|
+
this.getContactList();
|
|
2518
|
+
this.getUserCallSetting();
|
|
2519
|
+
setTimeout(() => {
|
|
2520
|
+
this.dialInputElement.nativeElement.focus();
|
|
2521
|
+
}, 0);
|
|
2522
|
+
if (this.incomingCallData) {
|
|
2523
|
+
if (this.isCallInProgress) {
|
|
2524
|
+
this.newIncomingCalls.push(this.incomingCallData);
|
|
2525
|
+
console.log('404', this.incomingCallData);
|
|
2526
|
+
this.getUserInformation(this.incomingCallData);
|
|
2527
|
+
}
|
|
2528
|
+
else {
|
|
2529
|
+
this.isCallInProgress = true;
|
|
2530
|
+
this.isDialpadHidden = false;
|
|
2531
|
+
this.callData.phone = this.incomingCallData.parameters['From'];
|
|
2532
|
+
console.log('411', this.incomingCallData);
|
|
2533
|
+
this.getUserInformation(this.incomingCallData);
|
|
2534
|
+
this.callData.name = this.incomingCallData.customParameters.get('name');
|
|
2535
|
+
this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
2536
|
+
this.callData.isIncomingCall = true;
|
|
2537
|
+
}
|
|
2538
|
+
this.incomingCallData.on('cancel', () => {
|
|
2539
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2540
|
+
if (this.incomingCallsList.length == 0) {
|
|
2541
|
+
this.isCallInProgress = false;
|
|
2542
|
+
}
|
|
2543
|
+
});
|
|
2544
|
+
this.incomingCallData.on('disconnect', () => {
|
|
2545
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2546
|
+
if (this.incomingCallsList.length == 0) {
|
|
2547
|
+
this.isCallInProgress = false;
|
|
2548
|
+
}
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2547
2552
|
}
|
|
2548
2553
|
registerDragElement() {
|
|
2549
2554
|
try {
|