@vgroup/dialbox 0.4.79 → 0.4.91

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.
@@ -1993,6 +1993,11 @@ class CallProgressComponent {
1993
1993
  }
1994
1994
  }
1995
1995
  this.cdr.detectChanges();
1996
+ if (this.currentCallList && this.currentCallList[0].isIncomingCall && this.currentCallList[0].isAcceptCall) {
1997
+ let incomingAudio = new Audio('assets/sample-file-4.mp3');
1998
+ incomingAudio.loop = false;
1999
+ incomingAudio.play();
2000
+ }
1996
2001
  console.log('currentCallList', this.currentCallList);
1997
2002
  }
1998
2003
  else if (!this.newIncomingCallsList?.length) {
@@ -3740,6 +3745,7 @@ class DialboxComponent {
3740
3745
  let contact = this.contactInfo;
3741
3746
  if (contact.number) {
3742
3747
  this.isSmartDialCall = false;
3748
+ this.dialedNumber = contact.number;
3743
3749
  if (contact.isDialFromHistory) {
3744
3750
  //handle dialing from history page
3745
3751
  if (contact.callerId == 'smartDialing') {
@@ -3889,10 +3895,14 @@ class DialboxComponent {
3889
3895
  // emit current number whenever input changes
3890
3896
  this.numberDialed.emit(this.dialedNumber);
3891
3897
  if (inputVal.length > 2) {
3892
- this.filteredContactList = this.contactList.filter(contact => {
3898
+ this.filteredContactList = [];
3899
+ this.contactList.forEach(contact => {
3893
3900
  const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
3894
- return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some((num) => num.number.includes(this.sanitizedNum));
3895
- }).slice(0, 2);
3901
+ if (fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some((num) => num.number.includes(this.sanitizedNum))) {
3902
+ this.filteredContactList.push(contact);
3903
+ }
3904
+ });
3905
+ this.filteredContactList = this.filteredContactList.slice(0, 2);
3896
3906
  }
3897
3907
  else {
3898
3908
  this.filteredContactList = [];