@vgroup/dialbox 0.3.83 → 0.3.85

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.
@@ -1764,12 +1764,11 @@ class CallProgressComponent {
1764
1764
  // Subscribe to incoming calls from TwilioService
1765
1765
  try {
1766
1766
  this.twilioService.currentCall.subscribe((incoming) => {
1767
- var _a;
1768
1767
  if (!incoming) {
1769
1768
  return;
1770
1769
  }
1771
1770
  console.log('TwilioService.currentCall emitted:', incoming);
1772
- console.log('Current call status:', (_a = this.call) === null || _a === void 0 ? void 0 : _a.status());
1771
+ // console.log('Current call status:', this.call?.status());
1773
1772
  // If there is an ongoing call, show concurrent incoming banner
1774
1773
  console.log('Concurrent incoming detected - showing banner');
1775
1774
  this.isConcurrentIncoming = true;
@@ -1798,7 +1797,7 @@ class CallProgressComponent {
1798
1797
  }
1799
1798
  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)) {
1800
1799
  console.log('test-startCall123', changes['callData'].currentValue);
1801
- // this.currentCall = { ...changes['callData'].currentValue, img: 'assets/images/user.jpg' };
1800
+ this.currentCall = Object.assign(Object.assign({}, changes['callData'].currentValue), { img: 'assets/images/user.jpg' });
1802
1801
  this.startCall(changes['callData'].currentValue);
1803
1802
  }
1804
1803
  }
@@ -1806,6 +1805,7 @@ class CallProgressComponent {
1806
1805
  try {
1807
1806
  if (this.newIncomingCallsList.length) {
1808
1807
  // Check if there's an active ongoing call
1808
+ this.conferenceId = this.newIncomingCallsList[0].conferenceId;
1809
1809
  this.newIncomingCallsList.forEach((res) => __awaiter(this, void 0, void 0, function* () {
1810
1810
  var _d, _e, _f, _g, _h;
1811
1811
  if (this.currentCallList.length > 0) {
@@ -1856,6 +1856,8 @@ class CallProgressComponent {
1856
1856
  this.currentCallList.push(Object.assign(Object.assign({}, res), { img: 'assets/images/user.jpg', isIncomingCall: res.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: this.getStatus(res), dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, name: res.name }));
1857
1857
  }
1858
1858
  }));
1859
+ this.currentCall = this.currentCallList.find((item) => item.id == this.currentCall.id);
1860
+ this.cdr.detectChanges();
1859
1861
  }
1860
1862
  else if (!this.newIncomingCallsList.length) {
1861
1863
  this.isConcurrentIncoming = false;
@@ -2190,10 +2192,10 @@ class CallProgressComponent {
2190
2192
  // }
2191
2193
  // }
2192
2194
  endCall(isAllCallEnd) {
2193
- var _a, _b;
2195
+ var _a;
2194
2196
  return __awaiter(this, void 0, void 0, function* () {
2195
2197
  console.log('endCall() called');
2196
- console.log('Current call:', (_a = this.call) === null || _a === void 0 ? void 0 : _a.parameters['From']);
2198
+ // console.log('Current call:', this.call?.parameters['From']);
2197
2199
  console.log('Held call exists:', !!this.heldCall);
2198
2200
  // Leaving conference state when ending current call action
2199
2201
  this.isConference = false;
@@ -2216,7 +2218,7 @@ class CallProgressComponent {
2216
2218
  this.currentCallList[0].isHold = false;
2217
2219
  this.currentCall = this.currentCallList[0];
2218
2220
  yield this.onholdOrUnholdParticipant({
2219
- participantId: [(_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.participantId],
2221
+ participantId: [(_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.participantId],
2220
2222
  conferenceId: this.conferenceId,
2221
2223
  hold: false
2222
2224
  });
@@ -2468,7 +2470,6 @@ class CallProgressComponent {
2468
2470
  // this.cdr.detectChanges();
2469
2471
  }
2470
2472
  swapCalls(callInfo) {
2471
- var _a, _b, _c;
2472
2473
  return __awaiter(this, void 0, void 0, function* () {
2473
2474
  // if (!this.heldCall || !this.call) return;
2474
2475
  console.log(this.call, 'this.call');
@@ -2505,8 +2506,8 @@ class CallProgressComponent {
2505
2506
  // hold: false
2506
2507
  // });
2507
2508
  console.log('Swapping calls...');
2508
- console.log('Before swap - Active call:', this.call.parameters['From']);
2509
- console.log('Before swap - Held call:', this.heldCall.parameters['From']);
2509
+ // console.log('Before swap - Active call:', this.call.parameters['From']);
2510
+ // console.log('Before swap - Held call:', this.heldCall.parameters['From']);
2510
2511
  // Swap the calls
2511
2512
  // const temp = this.call;
2512
2513
  // this.call = this.heldCall;
@@ -2514,10 +2515,10 @@ class CallProgressComponent {
2514
2515
  // this.call.mute(false);
2515
2516
  // this.heldCall.mute(true);
2516
2517
  // Update UI with active call info - extract from call parameters
2517
- const fromNumber = this.call.parameters['From'];
2518
- const callerName = ((_a = this.call.customParameters) === null || _a === void 0 ? void 0 : _a.get('name')) || '-';
2519
- const callerImg = ((_b = this.call.customParameters) === null || _b === void 0 ? void 0 : _b.get('image')) || 'assets/images/user.jpg';
2520
- const displayNumber = ((_c = this.call.customParameters) === null || _c === void 0 ? void 0 : _c.get('displayNumber')) || '-';
2518
+ // const fromNumber = this.call.parameters['From'];
2519
+ // const callerName = this.call.customParameters?.get('name') || '-';
2520
+ // const callerImg = this.call.customParameters?.get('image') || 'assets/images/user.jpg';
2521
+ // const displayNumber = this.call.customParameters?.get('displayNumber') || '-';
2521
2522
  // Update callData to refresh the main UI
2522
2523
  // this.callData = {
2523
2524
  // ...this.callData,