@vgroup/dialbox 0.3.83 → 0.3.84

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,7 @@ 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.currentCallList = this.currentCallList.find((item) => item.id == this.currentCall.id);
1859
1860
  }
1860
1861
  else if (!this.newIncomingCallsList.length) {
1861
1862
  this.isConcurrentIncoming = false;
@@ -2190,10 +2191,10 @@ class CallProgressComponent {
2190
2191
  // }
2191
2192
  // }
2192
2193
  endCall(isAllCallEnd) {
2193
- var _a, _b;
2194
+ var _a;
2194
2195
  return __awaiter(this, void 0, void 0, function* () {
2195
2196
  console.log('endCall() called');
2196
- console.log('Current call:', (_a = this.call) === null || _a === void 0 ? void 0 : _a.parameters['From']);
2197
+ // console.log('Current call:', this.call?.parameters['From']);
2197
2198
  console.log('Held call exists:', !!this.heldCall);
2198
2199
  // Leaving conference state when ending current call action
2199
2200
  this.isConference = false;
@@ -2216,7 +2217,7 @@ class CallProgressComponent {
2216
2217
  this.currentCallList[0].isHold = false;
2217
2218
  this.currentCall = this.currentCallList[0];
2218
2219
  yield this.onholdOrUnholdParticipant({
2219
- participantId: [(_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.participantId],
2220
+ participantId: [(_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.participantId],
2220
2221
  conferenceId: this.conferenceId,
2221
2222
  hold: false
2222
2223
  });
@@ -2468,7 +2469,6 @@ class CallProgressComponent {
2468
2469
  // this.cdr.detectChanges();
2469
2470
  }
2470
2471
  swapCalls(callInfo) {
2471
- var _a, _b, _c;
2472
2472
  return __awaiter(this, void 0, void 0, function* () {
2473
2473
  // if (!this.heldCall || !this.call) return;
2474
2474
  console.log(this.call, 'this.call');
@@ -2505,8 +2505,8 @@ class CallProgressComponent {
2505
2505
  // hold: false
2506
2506
  // });
2507
2507
  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']);
2508
+ // console.log('Before swap - Active call:', this.call.parameters['From']);
2509
+ // console.log('Before swap - Held call:', this.heldCall.parameters['From']);
2510
2510
  // Swap the calls
2511
2511
  // const temp = this.call;
2512
2512
  // this.call = this.heldCall;
@@ -2514,10 +2514,10 @@ class CallProgressComponent {
2514
2514
  // this.call.mute(false);
2515
2515
  // this.heldCall.mute(true);
2516
2516
  // 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')) || '-';
2517
+ // const fromNumber = this.call.parameters['From'];
2518
+ // const callerName = this.call.customParameters?.get('name') || '-';
2519
+ // const callerImg = this.call.customParameters?.get('image') || 'assets/images/user.jpg';
2520
+ // const displayNumber = this.call.customParameters?.get('displayNumber') || '-';
2521
2521
  // Update callData to refresh the main UI
2522
2522
  // this.callData = {
2523
2523
  // ...this.callData,