@vgroup/dialbox 0.5.2 → 0.5.4

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,52 +3872,12 @@ 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
- if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
3877
- this.getContactList();
3878
- this.getUserCallSetting();
3879
- setTimeout(() => {
3880
- this.dialInputElement.nativeElement.focus();
3881
- }, 0);
3882
- if (this.incomingCallData) {
3883
- if (this.isCallInProgress) {
3884
- this.newIncomingCalls.push(this.incomingCallData);
3885
- console.log('404', this.incomingCallData);
3886
- this.getUserInformation(this.incomingCallData);
3887
- }
3888
- else {
3889
- console.log('dd5');
3890
- this.isCallInProgress = true;
3891
- this.isDialpadHidden = false;
3892
- this.callData.phone = this.incomingCallData.parameters['From'];
3893
- console.log('411', this.incomingCallData);
3894
- this.getUserInformation(this.incomingCallData);
3895
- this.callData.name = this.incomingCallData.customParameters.get('name');
3896
- this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
3897
- this.callData.isIncomingCall = true;
3898
- }
3899
- this.incomingCallData.on('cancel', () => {
3900
- this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
3901
- // if(this.incomingCallsList.length == 0){
3902
- // console.log('dd6')
3903
- // this.isCallInProgress = false;
3904
- // }
3905
- this.incomingCallData.disconnect();
3906
- });
3907
- this.incomingCallData.on('disconnect', () => {
3908
- this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
3909
- this.incomingCallData.disconnect();
3910
- // if(this.incomingCallsList.length == 0){
3911
- // console.log('dd7')
3912
- // this.isCallInProgress = false;
3913
- // }
3914
- });
3915
- }
3916
- }
3917
3878
  if (changes['contactInfo'] && this.contactInfo) {
3918
3879
  let contact = this.contactInfo;
3880
+ console.log('contactInfo', contact);
3919
3881
  if (contact.number) {
3920
3882
  this.isSmartDialCall = false;
3921
3883
  this.dialedNumber = contact.number;
@@ -3973,6 +3935,47 @@ class DialboxComponent {
3973
3935
  }
3974
3936
  }
3975
3937
  }
3938
+ if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
3939
+ this.getContactList();
3940
+ this.getUserCallSetting();
3941
+ setTimeout(() => {
3942
+ this.dialInputElement.nativeElement.focus();
3943
+ }, 0);
3944
+ if (this.incomingCallData) {
3945
+ if (this.isCallInProgress) {
3946
+ this.newIncomingCalls.push(this.incomingCallData);
3947
+ console.log('404', this.incomingCallData);
3948
+ this.getUserInformation(this.incomingCallData);
3949
+ }
3950
+ else {
3951
+ console.log('dd5');
3952
+ this.isCallInProgress = true;
3953
+ this.isDialpadHidden = false;
3954
+ this.callData.phone = this.incomingCallData.parameters['From'];
3955
+ console.log('411', this.incomingCallData);
3956
+ this.getUserInformation(this.incomingCallData);
3957
+ this.callData.name = this.incomingCallData.customParameters.get('name');
3958
+ this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
3959
+ this.callData.isIncomingCall = true;
3960
+ }
3961
+ this.incomingCallData.on('cancel', () => {
3962
+ this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
3963
+ // if(this.incomingCallsList.length == 0){
3964
+ // console.log('dd6')
3965
+ // this.isCallInProgress = false;
3966
+ // }
3967
+ this.incomingCallData.disconnect();
3968
+ });
3969
+ this.incomingCallData.on('disconnect', () => {
3970
+ this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
3971
+ this.incomingCallData.disconnect();
3972
+ // if(this.incomingCallsList.length == 0){
3973
+ // console.log('dd7')
3974
+ // this.isCallInProgress = false;
3975
+ // }
3976
+ });
3977
+ }
3978
+ }
3976
3979
  }
3977
3980
  registerDragElement() {
3978
3981
  try {