@vgroup/dialbox 0.2.72 → 0.2.74
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/esm2020/lib/components/call-progress/call-progress.component.mjs +21 -10
- package/esm2020/lib/dialbox.component.mjs +2 -2
- package/fesm2015/vgroup-dialbox.mjs +21 -10
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +21 -10
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2028,14 +2028,15 @@ class CallProgressComponent {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
ngOnChanges(changes) {
|
|
2031
|
-
var _a;
|
|
2031
|
+
var _a, _b, _c;
|
|
2032
2032
|
console.log('Call Progress Component ngOnChanges');
|
|
2033
2033
|
if (changes['callData']) {
|
|
2034
2034
|
if ((_a = changes['callData'].currentValue) === null || _a === void 0 ? void 0 : _a.isIncomingCall) {
|
|
2035
2035
|
this.incomingCallDiv = true;
|
|
2036
2036
|
this.cdr.detectChanges();
|
|
2037
2037
|
}
|
|
2038
|
-
else {
|
|
2038
|
+
else if (((_b = changes['callData'].currentValue) === null || _b === void 0 ? void 0 : _b.displayNum) || ((_c = changes['callData'].currentValue) === null || _c === void 0 ? void 0 : _c.from)) {
|
|
2039
|
+
console.log('test-startCall123');
|
|
2039
2040
|
this.startCall(changes['callData'].currentValue);
|
|
2040
2041
|
}
|
|
2041
2042
|
}
|
|
@@ -2222,7 +2223,8 @@ class CallProgressComponent {
|
|
|
2222
2223
|
this.stopTimer();
|
|
2223
2224
|
});
|
|
2224
2225
|
(_c = this.call) === null || _c === void 0 ? void 0 : _c.on('disconnect', (item) => {
|
|
2225
|
-
|
|
2226
|
+
console.log('test-disconnect');
|
|
2227
|
+
this.endCall();
|
|
2226
2228
|
});
|
|
2227
2229
|
(_d = this.call) === null || _d === void 0 ? void 0 : _d.on('ringing', () => {
|
|
2228
2230
|
});
|
|
@@ -2319,13 +2321,18 @@ class CallProgressComponent {
|
|
|
2319
2321
|
console.log('Held call exists:', !!this.heldCall);
|
|
2320
2322
|
// Leaving conference state when ending current call action
|
|
2321
2323
|
this.isConference = false;
|
|
2322
|
-
if (this.call) {
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2324
|
+
// if (this.call) {
|
|
2325
|
+
// this.call.disconnect();
|
|
2326
|
+
// this.call.reject();
|
|
2327
|
+
// this.call = undefined;
|
|
2328
|
+
// }
|
|
2326
2329
|
this.showRingAnimation = false;
|
|
2327
2330
|
this.stopTimer();
|
|
2328
2331
|
if (this.heldCall) {
|
|
2332
|
+
if (this.call) {
|
|
2333
|
+
this.call.disconnect();
|
|
2334
|
+
this.call = undefined;
|
|
2335
|
+
}
|
|
2329
2336
|
console.log('Resuming held call:', this.heldCall.parameters['From']);
|
|
2330
2337
|
// Promote held call
|
|
2331
2338
|
this.call = this.heldCall;
|
|
@@ -2353,6 +2360,10 @@ class CallProgressComponent {
|
|
|
2353
2360
|
console.log('No held call, ending completely');
|
|
2354
2361
|
console.log('test6');
|
|
2355
2362
|
this.endCallEvent.emit();
|
|
2363
|
+
if (this.call) {
|
|
2364
|
+
this.call.disconnect();
|
|
2365
|
+
this.call = undefined;
|
|
2366
|
+
}
|
|
2356
2367
|
this.maximiseDialpad();
|
|
2357
2368
|
}
|
|
2358
2369
|
}
|
|
@@ -2497,7 +2508,7 @@ class CallProgressComponent {
|
|
|
2497
2508
|
this.cdr.detectChanges();
|
|
2498
2509
|
}
|
|
2499
2510
|
swapCalls() {
|
|
2500
|
-
var _a, _b, _c;
|
|
2511
|
+
var _a, _b, _c, _d, _e;
|
|
2501
2512
|
if (!this.heldCall || !this.call)
|
|
2502
2513
|
return;
|
|
2503
2514
|
console.log('Swapping calls...');
|
|
@@ -2515,7 +2526,7 @@ class CallProgressComponent {
|
|
|
2515
2526
|
const callerImg = ((_b = this.call.customParameters) === null || _b === void 0 ? void 0 : _b.get('image')) || 'assets/images/user.jpg';
|
|
2516
2527
|
const displayNumber = ((_c = this.call.customParameters) === null || _c === void 0 ? void 0 : _c.get('displayNumber')) || '-';
|
|
2517
2528
|
// Update callData to refresh the main UI
|
|
2518
|
-
this.callData = Object.assign(Object.assign({}, this.callData), { phone: fromNumber, displayNum: fromNumber, name: callerName, img: callerImg });
|
|
2529
|
+
this.callData = Object.assign(Object.assign({}, this.callData), { phone: fromNumber, displayNum: (displayNumber && displayNumber !== '-') ? displayNumber : fromNumber, name: (callerName && callerName !== '-') ? callerName : (((_d = this.callData) === null || _d === void 0 ? void 0 : _d.name) || fromNumber), img: callerImg || ((_e = this.callData) === null || _e === void 0 ? void 0 : _e.img) || 'assets/images/user.jpg' });
|
|
2519
2530
|
console.log('After swap - Active call:', this.call.parameters['From']);
|
|
2520
2531
|
console.log('After swap - Held call:', this.heldCall.parameters['From']);
|
|
2521
2532
|
console.log('Updated callData:', this.callData);
|
|
@@ -3404,7 +3415,7 @@ class DialboxComponent {
|
|
|
3404
3415
|
try {
|
|
3405
3416
|
console.log('Ending call');
|
|
3406
3417
|
console.log('dd8');
|
|
3407
|
-
|
|
3418
|
+
this.isCallInProgress = false;
|
|
3408
3419
|
this.filteredContactList = [];
|
|
3409
3420
|
// Reset call data
|
|
3410
3421
|
this.callData = {
|