@vgroup/dialbox 0.5.46 → 0.5.48

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.
@@ -2481,7 +2481,7 @@ class CallProgressComponent {
2481
2481
  else {
2482
2482
  let index = this.currentCallList.findIndex((res) => res.participantId == data.participantId);
2483
2483
  this.currentCallList.splice(index, 1);
2484
- swal("Error", res === null || res === void 0 ? void 0 : res.message, "error");
2484
+ swal("Error", res === null || res === void 0 ? void 0 : res.message.join("<br/>"), "error");
2485
2485
  this.incomeingCallSocketService.pause();
2486
2486
  this.endCallEvent.emit(data);
2487
2487
  }
@@ -3751,6 +3751,7 @@ class DialboxComponent {
3751
3751
  this.cdk.detectChanges();
3752
3752
  }
3753
3753
  console.log('test', this.incomingCallsList);
3754
+ this.incomeingCallSocketService.pause();
3754
3755
  this.isIncomingCallnotification = false;
3755
3756
  if (!((_e = this.incomingCallsList) === null || _e === void 0 ? void 0 : _e.length)) {
3756
3757
  this.isCallInProgress = false;
@@ -3922,41 +3923,42 @@ class DialboxComponent {
3922
3923
  }
3923
3924
  incomingCallNotification(callerInfo) {
3924
3925
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
3925
- let incomingCall = {
3926
- conferenceId: 'no',
3927
- isActive: true,
3928
- isIncomingCall: true,
3929
- participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
3930
- participants: [
3931
- { direction: "incoming-call", img: ((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.toImage) || ((_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.fromNumber, to: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.toNumber,
3932
- from: (_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.fromNumber, fromName: (_g = this.incomingCallnotification.data.data) === null || _g === void 0 ? void 0 : _g.fromName, participantId: (_h = this.incomingCallnotification.data.data) === null || _h === void 0 ? void 0 : _h.participantId, name: (_j = this.incomingCallnotification.data.data) === null || _j === void 0 ? void 0 : _j.fromName, time: '', id: (_k = this.incomingCallnotification.data.data) === null || _k === void 0 ? void 0 : _k.participantId }
3933
- ],
3934
- };
3935
- if (callerInfo) {
3936
- incomingCall.participants[0]['email'] = callerInfo.email;
3937
- incomingCall.participants[0]['name'] = callerInfo.name;
3938
- incomingCall.participants[0]['image'] = callerInfo.image;
3939
- incomingCall.participants[0]['extension'] = callerInfo.extension;
3940
- incomingCall.participants[0]['userInfoId'] = callerInfo.id;
3941
- incomingCall.participants[0]['message'] = callerInfo.message;
3942
- incomingCall.participants[0]['note'] = callerInfo.note;
3943
- incomingCall.participants[0]['number'] = callerInfo.number;
3944
- incomingCall.participants[0]['pointName'] = callerInfo.pointName;
3945
- incomingCall.participants[0]['softphoneTwilioAuthId'] = callerInfo.softphoneTwilioAuthId;
3946
- incomingCall.participants[0]['sourceName'] = callerInfo.sourceName;
3947
- incomingCall.participants[0]['subject'] = callerInfo.subject;
3948
- }
3949
- const now = new Date().getTime();
3950
- incomingCall['endTime'] = (new Date().getTime() + 45 * 1000);
3951
- this.notificationCallList.push(incomingCall);
3952
- this.notificationCallList = this.notificationCallList.filter((res) => (res === null || res === void 0 ? void 0 : res.endTime) >= now);
3953
- this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
3954
- this.cdk.detectChanges();
3955
- if ((_l = this.incomingCallnotification.data.data) === null || _l === void 0 ? void 0 : _l.participantId) {
3956
- this.isCallInProgress = true;
3926
+ return __awaiter(this, void 0, void 0, function* () {
3927
+ let incomingCall = {
3928
+ conferenceId: 'no',
3929
+ isActive: true,
3930
+ isIncomingCall: true,
3931
+ participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
3932
+ participants: [
3933
+ { direction: "incoming-call", img: ((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.fromImage) || ((_c = this.incomingCallnotification.data.data) === null || _c === void 0 ? void 0 : _c.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.fromNumber, to: (_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.toNumber,
3934
+ from: (_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.fromNumber, fromName: (_g = this.incomingCallnotification.data.data) === null || _g === void 0 ? void 0 : _g.fromName, participantId: (_h = this.incomingCallnotification.data.data) === null || _h === void 0 ? void 0 : _h.participantId, name: (_j = this.incomingCallnotification.data.data) === null || _j === void 0 ? void 0 : _j.fromName, time: '', id: (_k = this.incomingCallnotification.data.data) === null || _k === void 0 ? void 0 : _k.participantId }
3935
+ ],
3936
+ };
3937
+ this.notificationCallList = yield this.notificationCallList.filter((res) => (res === null || res === void 0 ? void 0 : res.endTime) > (new Date().getTime()));
3938
+ if (callerInfo) {
3939
+ incomingCall.participants[0]['email'] = callerInfo.email;
3940
+ incomingCall.participants[0]['name'] = callerInfo.name;
3941
+ incomingCall.participants[0]['image'] = callerInfo.image;
3942
+ incomingCall.participants[0]['extension'] = callerInfo.extension;
3943
+ incomingCall.participants[0]['userInfoId'] = callerInfo.id;
3944
+ incomingCall.participants[0]['message'] = callerInfo.message;
3945
+ incomingCall.participants[0]['note'] = callerInfo.note;
3946
+ incomingCall.participants[0]['number'] = callerInfo.number;
3947
+ incomingCall.participants[0]['pointName'] = callerInfo.pointName;
3948
+ incomingCall.participants[0]['softphoneTwilioAuthId'] = callerInfo.softphoneTwilioAuthId;
3949
+ incomingCall.participants[0]['sourceName'] = callerInfo.sourceName;
3950
+ incomingCall.participants[0]['subject'] = callerInfo.subject;
3951
+ }
3952
+ incomingCall['endTime'] = (new Date().getTime() + 45 * 1000);
3953
+ this.notificationCallList.push(incomingCall);
3954
+ this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
3957
3955
  this.cdk.detectChanges();
3958
- this.isDialpadHidden = false;
3959
- }
3956
+ if ((_l = this.incomingCallnotification.data.data) === null || _l === void 0 ? void 0 : _l.participantId) {
3957
+ this.isCallInProgress = true;
3958
+ this.cdk.detectChanges();
3959
+ this.isDialpadHidden = false;
3960
+ }
3961
+ });
3960
3962
  }
3961
3963
  addNumber(num) {
3962
3964
  if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {