@vgroup/dialbox 0.5.1 → 0.5.3

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.
@@ -1853,7 +1853,7 @@ class CallProgressComponent {
1853
1853
  time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()),
1854
1854
  });
1855
1855
  if (this.showContactsPanel) {
1856
- this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
1856
+ this.getAllParticipants(this.currentCall.conferenceSid);
1857
1857
  this.applyFilter();
1858
1858
  }
1859
1859
  }
@@ -1889,7 +1889,7 @@ class CallProgressComponent {
1889
1889
  this.currentCallList.splice(index, 1);
1890
1890
  }
1891
1891
  if (this.showContactsPanel) {
1892
- this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
1892
+ this.getAllParticipants(this.currentCall.conferenceSid);
1893
1893
  this.applyFilter();
1894
1894
  }
1895
1895
  }
@@ -2197,7 +2197,7 @@ class CallProgressComponent {
2197
2197
  // this.currentCall = this.currentCallList.length > 0 ? this.currentCallList[0] : null;
2198
2198
  this.cdr.detectChanges();
2199
2199
  }
2200
- await this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
2200
+ await this.getAllParticipants(this.currentCall.conferenceSid);
2201
2201
  return false;
2202
2202
  }
2203
2203
  async initiateCall(payload) {
@@ -2486,7 +2486,7 @@ class CallProgressComponent {
2486
2486
  this.isAddRemoveParticipant = false;
2487
2487
  this.showContactsPanel = !this.showContactsPanel;
2488
2488
  // this.GetContactsList();
2489
- this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
2489
+ this.getAllParticipants(this.currentCall.conferenceSid);
2490
2490
  this.filteredList = this.contacts;
2491
2491
  this.filteredParticipentList = this.allParticipentList;
2492
2492
  // }
@@ -2497,7 +2497,7 @@ class CallProgressComponent {
2497
2497
  addRemoveParticipant() {
2498
2498
  // const conferenceSId = this.addRes?.conferenceSid;
2499
2499
  this.isAddRemoveParticipant = !this.isAddRemoveParticipant;
2500
- this.allParticipentList = this.getAllParticipants(this.twilioService.conferenceCallInfo.conferenceSid);
2500
+ this.allParticipentList = this.getAllParticipants(this.currentCall.conferenceSid);
2501
2501
  this.filteredParticipentList = this.allParticipentList;
2502
2502
  }
2503
2503
  async add(data) {
@@ -2886,7 +2886,9 @@ class CallProgressComponent {
2886
2886
  this.cdr.detectChanges();
2887
2887
  }
2888
2888
  isMergeCallAllowed() {
2889
- return this.currentCallList.filter((res) => res.conferenceId == this.currentCall.conferenceId);
2889
+ let mergeCallList = this.currentCallList.filter((res) => res.conferenceId == this.currentCall.conferenceId);
2890
+ console.log('mergeCallList', mergeCallList);
2891
+ return mergeCallList.length > 1;
2890
2892
  }
2891
2893
  async mergeCalls() {
2892
2894
  // Merge functionality - unmute both calls for conference
@@ -3870,7 +3872,7 @@ class DialboxComponent {
3870
3872
  this.twilioService.deviceId = changes['deviceId'].currentValue;
3871
3873
  console.log('Set deviceId in localStorage:', changes['deviceId'].currentValue);
3872
3874
  }
3873
- if (this.userId) {
3875
+ if (changes['userId'].currentValue && this.userId) {
3874
3876
  this.extensionService.userId = this.userId;
3875
3877
  }
3876
3878
  if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
@@ -3879,6 +3881,66 @@ class DialboxComponent {
3879
3881
  setTimeout(() => {
3880
3882
  this.dialInputElement.nativeElement.focus();
3881
3883
  }, 0);
3884
+ if (changes['contactInfo'] && this.contactInfo) {
3885
+ let contact = this.contactInfo;
3886
+ console.log('contactInfo', contact);
3887
+ if (contact.number) {
3888
+ this.isSmartDialCall = false;
3889
+ this.dialedNumber = contact.number;
3890
+ if (contact.isDialFromHistory) {
3891
+ //handle dialing from history page
3892
+ if (contact.callerId == 'smartDialing') {
3893
+ this.selectedCallerId = { number: contact.from };
3894
+ this.isSmartDialCall = true;
3895
+ setTimeout(() => {
3896
+ this.isDialpadHidden = false;
3897
+ }, 2000);
3898
+ this.callData.phone = contact.number;
3899
+ this.callData.name = contact.name;
3900
+ this.callData.img = contact.img;
3901
+ this.callData.from = contact.from;
3902
+ this.sanitizedNum = contact.number;
3903
+ console.log('274', contact);
3904
+ this.getUserInformation(contact);
3905
+ console.log('454', contact);
3906
+ // this.incomingCallsList.push(contact)
3907
+ this.initiateCall();
3908
+ }
3909
+ else {
3910
+ this.getUserCallSetting();
3911
+ setTimeout(() => {
3912
+ this.isDialpadHidden = false;
3913
+ }, 1000);
3914
+ console.log('282', contact);
3915
+ this.getUserInformation(contact);
3916
+ console.log('464', contact);
3917
+ // this.incomingCallsList.push(contact)
3918
+ this.dialedNumber = contact.number;
3919
+ this.sanitizedNum = contact.number;
3920
+ }
3921
+ }
3922
+ else {
3923
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3924
+ this.getUserCallSetting();
3925
+ setTimeout(() => {
3926
+ this.isDialpadHidden = false;
3927
+ }, 1000);
3928
+ this.dialedNumber = contact.number;
3929
+ this.sanitizedNum = contact.number;
3930
+ }
3931
+ else {
3932
+ setTimeout(() => {
3933
+ this.isDialpadHidden = false;
3934
+ }, 2000);
3935
+ this.callData.phone = contact.number;
3936
+ this.callData.name = contact.name;
3937
+ this.callData.img = contact.img;
3938
+ this.sanitizedNum = contact.number;
3939
+ this.initiateCall();
3940
+ }
3941
+ }
3942
+ }
3943
+ }
3882
3944
  if (this.incomingCallData) {
3883
3945
  if (this.isCallInProgress) {
3884
3946
  this.newIncomingCalls.push(this.incomingCallData);
@@ -3914,65 +3976,6 @@ class DialboxComponent {
3914
3976
  });
3915
3977
  }
3916
3978
  }
3917
- if (changes['contactInfo'] && this.contactInfo) {
3918
- let contact = this.contactInfo;
3919
- if (contact.number) {
3920
- this.isSmartDialCall = false;
3921
- this.dialedNumber = contact.number;
3922
- if (contact.isDialFromHistory) {
3923
- //handle dialing from history page
3924
- if (contact.callerId == 'smartDialing') {
3925
- this.selectedCallerId = { number: contact.from };
3926
- this.isSmartDialCall = true;
3927
- setTimeout(() => {
3928
- this.isDialpadHidden = false;
3929
- }, 2000);
3930
- this.callData.phone = contact.number;
3931
- this.callData.name = contact.name;
3932
- this.callData.img = contact.img;
3933
- this.callData.from = contact.from;
3934
- this.sanitizedNum = contact.number;
3935
- console.log('274', contact);
3936
- this.getUserInformation(contact);
3937
- console.log('454', contact);
3938
- // this.incomingCallsList.push(contact)
3939
- this.initiateCall();
3940
- }
3941
- else {
3942
- this.getUserCallSetting();
3943
- setTimeout(() => {
3944
- this.isDialpadHidden = false;
3945
- }, 1000);
3946
- console.log('282', contact);
3947
- this.getUserInformation(contact);
3948
- console.log('464', contact);
3949
- // this.incomingCallsList.push(contact)
3950
- this.dialedNumber = contact.number;
3951
- this.sanitizedNum = contact.number;
3952
- }
3953
- }
3954
- else {
3955
- if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3956
- this.getUserCallSetting();
3957
- setTimeout(() => {
3958
- this.isDialpadHidden = false;
3959
- }, 1000);
3960
- this.dialedNumber = contact.number;
3961
- this.sanitizedNum = contact.number;
3962
- }
3963
- else {
3964
- setTimeout(() => {
3965
- this.isDialpadHidden = false;
3966
- }, 2000);
3967
- this.callData.phone = contact.number;
3968
- this.callData.name = contact.name;
3969
- this.callData.img = contact.img;
3970
- this.sanitizedNum = contact.number;
3971
- this.initiateCall();
3972
- }
3973
- }
3974
- }
3975
- }
3976
3979
  }
3977
3980
  registerDragElement() {
3978
3981
  try {
@@ -4048,6 +4051,7 @@ class DialboxComponent {
4048
4051
  this.notificationCallList.push(incomingCall);
4049
4052
  if (this.incomingCallnotification.data.data?.participantId) {
4050
4053
  this.isCallInProgress = true;
4054
+ this.isDialpadHidden = false;
4051
4055
  }
4052
4056
  }
4053
4057
  addNumber(num) {