@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.
|
@@ -2452,7 +2452,7 @@ class DialboxComponent {
|
|
|
2452
2452
|
this.callData.isIncomingCall = true;
|
|
2453
2453
|
}
|
|
2454
2454
|
incomingCallData.on('cancel', () => {
|
|
2455
|
-
|
|
2455
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
2456
2456
|
if (this.incomingCallsList.length == 0) {
|
|
2457
2457
|
this.isCallInProgress = false;
|
|
2458
2458
|
}
|
|
@@ -2497,37 +2497,42 @@ class DialboxComponent {
|
|
|
2497
2497
|
this.registerDragElement();
|
|
2498
2498
|
}
|
|
2499
2499
|
ngOnChanges(changes) {
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2500
|
+
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
2501
|
+
this.getContactList();
|
|
2502
|
+
this.getUserCallSetting();
|
|
2503
|
+
setTimeout(() => {
|
|
2504
|
+
this.dialInputElement.nativeElement.focus();
|
|
2505
|
+
}, 0);
|
|
2506
|
+
if (this.incomingCallData) {
|
|
2507
|
+
if (this.isCallInProgress) {
|
|
2508
|
+
this.newIncomingCalls.push(this.incomingCallData);
|
|
2509
|
+
console.log('404', this.incomingCallData);
|
|
2510
|
+
this.getUserInformation(this.incomingCallData);
|
|
2511
|
+
}
|
|
2512
|
+
else {
|
|
2513
|
+
this.isCallInProgress = true;
|
|
2514
|
+
this.isDialpadHidden = false;
|
|
2515
|
+
this.callData.phone = this.incomingCallData.parameters['From'];
|
|
2516
|
+
console.log('411', this.incomingCallData);
|
|
2517
|
+
this.getUserInformation(this.incomingCallData);
|
|
2518
|
+
this.callData.name = this.incomingCallData.customParameters.get('name');
|
|
2519
|
+
this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
2520
|
+
this.callData.isIncomingCall = true;
|
|
2521
|
+
}
|
|
2522
|
+
this.incomingCallData.on('cancel', () => {
|
|
2523
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2524
|
+
if (this.incomingCallsList.length == 0) {
|
|
2525
|
+
this.isCallInProgress = false;
|
|
2526
|
+
}
|
|
2527
|
+
});
|
|
2528
|
+
this.incomingCallData.on('disconnect', () => {
|
|
2529
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2530
|
+
if (this.incomingCallsList.length == 0) {
|
|
2531
|
+
this.isCallInProgress = false;
|
|
2532
|
+
}
|
|
2533
|
+
});
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2531
2536
|
}
|
|
2532
2537
|
registerDragElement() {
|
|
2533
2538
|
try {
|