@vgroup/dialbox 0.5.3 → 0.5.5

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.
@@ -3792,8 +3792,8 @@ class DialboxComponent {
3792
3792
  this.registerDragElement();
3793
3793
  }
3794
3794
  ngOnChanges(changes) {
3795
- var _a, _b;
3796
- if (changes['incomingCallnotification'].currentValue && this.incomingCallnotification) {
3795
+ var _a, _b, _c, _d, _e;
3796
+ if (((_a = changes['incomingCallnotification']) === null || _a === void 0 ? void 0 : _a.currentValue) && this.incomingCallnotification) {
3797
3797
  this.isIncomingCallnotification = true;
3798
3798
  // let payload = {
3799
3799
  // recordId: this.incomingCallnotification.data.data.participantId,
@@ -3806,8 +3806,8 @@ class DialboxComponent {
3806
3806
  console.log(',,,,,', this.incomingCallnotification);
3807
3807
  if (this.incomingCallnotification.data.content == "IncomingCall") {
3808
3808
  let callerInfo;
3809
- if (((_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.c2cBusiness) == 'false') {
3810
- this.extensionService.getUserInformation((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.participantId).subscribe((resInfo) => {
3809
+ if (((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.c2cBusiness) == 'false') {
3810
+ this.extensionService.getUserInformation((_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.participantId).subscribe((resInfo) => {
3811
3811
  console.log('uesrInfo', resInfo);
3812
3812
  callerInfo = resInfo.c2cInformation;
3813
3813
  this.incomingCallNotification(callerInfo);
@@ -3840,75 +3840,75 @@ class DialboxComponent {
3840
3840
  this.twilioService.deviceId = changes['deviceId'].currentValue;
3841
3841
  console.log('Set deviceId in localStorage:', changes['deviceId'].currentValue);
3842
3842
  }
3843
- if (changes['userId'].currentValue && this.userId) {
3843
+ if (((_d = changes['userId']) === null || _d === void 0 ? void 0 : _d.currentValue) && this.userId) {
3844
3844
  this.extensionService.userId = this.userId;
3845
3845
  }
3846
+ if (((_e = changes['contactInfo']) === null || _e === void 0 ? void 0 : _e.currentValue) && this.contactInfo) {
3847
+ let contact = this.contactInfo;
3848
+ console.log('contactInfo', contact);
3849
+ if (contact.number) {
3850
+ this.isSmartDialCall = false;
3851
+ this.dialedNumber = contact.number;
3852
+ if (contact.isDialFromHistory) {
3853
+ //handle dialing from history page
3854
+ if (contact.callerId == 'smartDialing') {
3855
+ this.selectedCallerId = { number: contact.from };
3856
+ this.isSmartDialCall = true;
3857
+ setTimeout(() => {
3858
+ this.isDialpadHidden = false;
3859
+ }, 2000);
3860
+ this.callData.phone = contact.number;
3861
+ this.callData.name = contact.name;
3862
+ this.callData.img = contact.img;
3863
+ this.callData.from = contact.from;
3864
+ this.sanitizedNum = contact.number;
3865
+ console.log('274', contact);
3866
+ this.getUserInformation(contact);
3867
+ console.log('454', contact);
3868
+ // this.incomingCallsList.push(contact)
3869
+ this.initiateCall();
3870
+ }
3871
+ else {
3872
+ this.getUserCallSetting();
3873
+ setTimeout(() => {
3874
+ this.isDialpadHidden = false;
3875
+ }, 1000);
3876
+ console.log('282', contact);
3877
+ this.getUserInformation(contact);
3878
+ console.log('464', contact);
3879
+ // this.incomingCallsList.push(contact)
3880
+ this.dialedNumber = contact.number;
3881
+ this.sanitizedNum = contact.number;
3882
+ }
3883
+ }
3884
+ else {
3885
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3886
+ this.getUserCallSetting();
3887
+ setTimeout(() => {
3888
+ this.isDialpadHidden = false;
3889
+ }, 1000);
3890
+ this.dialedNumber = contact.number;
3891
+ this.sanitizedNum = contact.number;
3892
+ }
3893
+ else {
3894
+ setTimeout(() => {
3895
+ this.isDialpadHidden = false;
3896
+ }, 2000);
3897
+ this.callData.phone = contact.number;
3898
+ this.callData.name = contact.name;
3899
+ this.callData.img = contact.img;
3900
+ this.sanitizedNum = contact.number;
3901
+ this.initiateCall();
3902
+ }
3903
+ }
3904
+ }
3905
+ }
3846
3906
  if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
3847
3907
  this.getContactList();
3848
3908
  this.getUserCallSetting();
3849
3909
  setTimeout(() => {
3850
3910
  this.dialInputElement.nativeElement.focus();
3851
3911
  }, 0);
3852
- if (changes['contactInfo'] && this.contactInfo) {
3853
- let contact = this.contactInfo;
3854
- console.log('contactInfo', contact);
3855
- if (contact.number) {
3856
- this.isSmartDialCall = false;
3857
- this.dialedNumber = contact.number;
3858
- if (contact.isDialFromHistory) {
3859
- //handle dialing from history page
3860
- if (contact.callerId == 'smartDialing') {
3861
- this.selectedCallerId = { number: contact.from };
3862
- this.isSmartDialCall = true;
3863
- setTimeout(() => {
3864
- this.isDialpadHidden = false;
3865
- }, 2000);
3866
- this.callData.phone = contact.number;
3867
- this.callData.name = contact.name;
3868
- this.callData.img = contact.img;
3869
- this.callData.from = contact.from;
3870
- this.sanitizedNum = contact.number;
3871
- console.log('274', contact);
3872
- this.getUserInformation(contact);
3873
- console.log('454', contact);
3874
- // this.incomingCallsList.push(contact)
3875
- this.initiateCall();
3876
- }
3877
- else {
3878
- this.getUserCallSetting();
3879
- setTimeout(() => {
3880
- this.isDialpadHidden = false;
3881
- }, 1000);
3882
- console.log('282', contact);
3883
- this.getUserInformation(contact);
3884
- console.log('464', contact);
3885
- // this.incomingCallsList.push(contact)
3886
- this.dialedNumber = contact.number;
3887
- this.sanitizedNum = contact.number;
3888
- }
3889
- }
3890
- else {
3891
- if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
3892
- this.getUserCallSetting();
3893
- setTimeout(() => {
3894
- this.isDialpadHidden = false;
3895
- }, 1000);
3896
- this.dialedNumber = contact.number;
3897
- this.sanitizedNum = contact.number;
3898
- }
3899
- else {
3900
- setTimeout(() => {
3901
- this.isDialpadHidden = false;
3902
- }, 2000);
3903
- this.callData.phone = contact.number;
3904
- this.callData.name = contact.name;
3905
- this.callData.img = contact.img;
3906
- this.sanitizedNum = contact.number;
3907
- this.initiateCall();
3908
- }
3909
- }
3910
- }
3911
- }
3912
3912
  if (this.incomingCallData) {
3913
3913
  if (this.isCallInProgress) {
3914
3914
  this.newIncomingCalls.push(this.incomingCallData);