@vgroup/dialbox 0.6.3-0.12 → 0.6.3-0.14

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.
@@ -1845,7 +1845,7 @@ class CallProgressComponent {
1845
1845
  contact = this.contacts.find((resData) => { var _a; return ((_a = resData === null || resData === void 0 ? void 0 : resData.numbersList[0]) === null || _a === void 0 ? void 0 : _a.number) == ((res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to); });
1846
1846
  }
1847
1847
  if (((_b = this.currentCallList) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1848
- let index = this.currentCallList.findIndex((item) => item.id == res.id);
1848
+ let index = this.currentCallList.findIndex((item) => (item === null || item === void 0 ? void 0 : item.id) == (res === null || res === void 0 ? void 0 : res.id));
1849
1849
  if (index == -1 && !res.isLeft) {
1850
1850
  this.currentCallList.push(Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.toImage : (res === null || res === void 0 ? void 0 : res.fromImage) || (contact === null || contact === void 0 ? void 0 : contact.image) || 'assets/images/user.jpg', isIncomingCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call", isHold: res === null || res === void 0 ? void 0 : res.isHold, isMute: false, isConference: res === null || res === void 0 ? void 0 : res.isConference, isAcceptCall: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: (res === null || res === void 0 ? void 0 : res.direction) == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res === null || res === void 0 ? void 0 : res.id, conferenceSid: callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceSid, name: (res === null || res === void 0 ? void 0 : res.name) || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference((res === null || res === void 0 ? void 0 : res.joinedAt) || new Date().toUTCString()) }));
1851
1851
  if (this.showContactsPanel) {
@@ -3744,69 +3744,8 @@ class DialboxComponent {
3744
3744
  this.isLoadershow = false;
3745
3745
  this.isIncomingCallnotification = false;
3746
3746
  this.notificationCallList = [];
3747
- this.conferenceCallInfo = {
3748
- "createdAt": "Tue Dec 30 07:53:51 UTC 2025",
3749
- "conferenceName": "conf_6953850f1522800c4f3cc715",
3750
- "conferenceId": "6953850f1522800c4f3cc715",
3751
- "conferenceStatus": "completed",
3752
- "isActive": false,
3753
- "conferenceSid": "CFa38eab13863a6af9827b348120e369b8",
3754
- "participants": [
3755
- {
3756
- "callDuration": 88,
3757
- "callSid": "CA48abba51da47c32749ba568d7f4eccca",
3758
- "role": "callee",
3759
- "joinedAt": "Tue Dec 30 07:53:54 UTC 2025",
3760
- "isHold": false,
3761
- "isConference": true,
3762
- "userId": "69392c670665b958db876888",
3763
- "forwardedTo": "",
3764
- "leftAt": "Tue Dec 30 07:55:25 UTC 2025",
3765
- "duration": 2,
3766
- "isLeft": true,
3767
- "conferenceId": "6953850f1522800c4f3cc715",
3768
- "from": "+12252519886",
3769
- "to": "+916353645844",
3770
- "status": "completed",
3771
- "direction": "outgoing-call"
3772
- },
3773
- {
3774
- "callDuration": 65,
3775
- "callSid": "CAcbc286a9e6559f1a3f1b51f48ce3f73b",
3776
- "role": "callee",
3777
- "joinedAt": "Tue Dec 30 07:54:14 UTC 2025",
3778
- "isHold": false,
3779
- "isConference": true,
3780
- "userId": "69392c670665b958db876888",
3781
- "forwardedTo": "",
3782
- "leftAt": "Tue Dec 30 07:55:25 UTC 2025",
3783
- "duration": 2,
3784
- "isLeft": true,
3785
- "conferenceId": "6953850f1522800c4f3cc715",
3786
- "toName": "Test ",
3787
- "fromName": "Test ",
3788
- "from": "+12252519886",
3789
- "to": "+916354564733",
3790
- "status": "completed",
3791
- "direction": "outgoing-call"
3792
- },
3793
- {
3794
- "callDuration": 25,
3795
- "callSid": "CA2fb6b893cf406c033311e3b11d6e760f",
3796
- "joinedAt": "Tue Dec 30 07:55:06 UTC 2025",
3797
- "isHold": false,
3798
- "isConference": true,
3799
- "forwardedTo": "",
3800
- "duration": 1,
3801
- "isLeft": true,
3802
- "conferenceId": "6953850f1522800c4f3cc715",
3803
- "from": "+16098065088",
3804
- "to": "+12252302470",
3805
- "status": "no-answer",
3806
- "direction": "incoming-call"
3807
- }
3808
- ]
3809
- };
3747
+ this.deviceNumberList = [];
3748
+ this.conferenceCallInfo = {};
3810
3749
  this.closeDialpadEvent = new EventEmitter();
3811
3750
  this.callInitiated = new EventEmitter();
3812
3751
  this.endCallEvent = new EventEmitter();
@@ -3885,15 +3824,14 @@ class DialboxComponent {
3885
3824
  // so we can auto-open on incoming calls.
3886
3825
  this.initializeTwilio();
3887
3826
  this.incomeingCallSocketService.connect(this.deviceId);
3888
- let deviceNumberList = this.callerIdList.map((res) => res.number);
3889
3827
  try {
3890
3828
  this.incomeingCallSocketService.listen().subscribe((incomingCallData) => __awaiter(this, void 0, void 0, function* () {
3891
3829
  var _a, _b;
3892
3830
  this.twilioService.conferenceCallInfo = incomingCallData;
3893
3831
  incomingCallData = (incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) > 0 ? incomingCallData.filter((item) => { var _a; return ((_a = item.participants) === null || _a === void 0 ? void 0 : _a.length) > 0; }) : [];
3894
3832
  let ourNumber = {};
3895
- this.incomingCallData.forEach((callInfo, i) => {
3896
- ourNumber = callInfo.participants.find((resData) => ((deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.to) == 'c2c_softphone_client') || (deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call')) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
3833
+ incomingCallData.forEach((callInfo, i) => {
3834
+ ourNumber = callInfo.participants.find((resData) => ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.to) == 'c2c_softphone_client') || (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call')) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
3897
3835
  });
3898
3836
  if (!!(incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length) && (ourNumber === null || ourNumber === void 0 ? void 0 : ourNumber.id)) {
3899
3837
  // this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
@@ -4292,8 +4230,10 @@ class DialboxComponent {
4292
4230
  isIncomingCall: true,
4293
4231
  participantId: (_d = this.incomingCallnotification.data.data) === null || _d === void 0 ? void 0 : _d.participantId,
4294
4232
  participants: [
4295
- { direction: "incoming-call", businessNumber: ((_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.c2cBusiness) == 'true' ? true : false, img: ((_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.fromImage) || ((_g = this.incomingCallnotification.data.data) === null || _g === void 0 ? void 0 : _g.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_h = this.incomingCallnotification.data.data) === null || _h === void 0 ? void 0 : _h.fromNumber, to: (_j = this.incomingCallnotification.data.data) === null || _j === void 0 ? void 0 : _j.toNumber,
4296
- from: (_k = this.incomingCallnotification.data.data) === null || _k === void 0 ? void 0 : _k.fromNumber, fromName: (_l = this.incomingCallnotification.data.data) === null || _l === void 0 ? void 0 : _l.fromName, participantId: (_m = this.incomingCallnotification.data.data) === null || _m === void 0 ? void 0 : _m.participantId, name: (_o = this.incomingCallnotification.data.data) === null || _o === void 0 ? void 0 : _o.fromName, time: '', id: (_p = this.incomingCallnotification.data.data) === null || _p === void 0 ? void 0 : _p.participantId, conferenceId: (_s = (_r = (_q = this.incomingCallnotification) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.conferenceId }
4233
+ {
4234
+ direction: "incoming-call", businessNumber: ((_e = this.incomingCallnotification.data.data) === null || _e === void 0 ? void 0 : _e.c2cBusiness) == 'true' ? true : false, img: ((_f = this.incomingCallnotification.data.data) === null || _f === void 0 ? void 0 : _f.fromImage) || ((_g = this.incomingCallnotification.data.data) === null || _g === void 0 ? void 0 : _g.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (_h = this.incomingCallnotification.data.data) === null || _h === void 0 ? void 0 : _h.fromNumber, to: (_j = this.incomingCallnotification.data.data) === null || _j === void 0 ? void 0 : _j.toNumber,
4235
+ from: (_k = this.incomingCallnotification.data.data) === null || _k === void 0 ? void 0 : _k.fromNumber, fromName: (_l = this.incomingCallnotification.data.data) === null || _l === void 0 ? void 0 : _l.fromName, participantId: (_m = this.incomingCallnotification.data.data) === null || _m === void 0 ? void 0 : _m.participantId, name: (_o = this.incomingCallnotification.data.data) === null || _o === void 0 ? void 0 : _o.fromName, time: '', id: (_p = this.incomingCallnotification.data.data) === null || _p === void 0 ? void 0 : _p.participantId, conferenceId: (_s = (_r = (_q = this.incomingCallnotification) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.data) === null || _s === void 0 ? void 0 : _s.conferenceId
4236
+ }
4297
4237
  ],
4298
4238
  };
4299
4239
  this.notificationCallList = yield this.notificationCallList.filter((res) => (res === null || res === void 0 ? void 0 : res.endTime) > (new Date().getTime()));
@@ -4407,6 +4347,7 @@ class DialboxComponent {
4407
4347
  //this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
4408
4348
  this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
4409
4349
  // this.callerIdList = res.callerIdList;
4350
+ this.deviceNumberList = this.callerIdList.map((res) => res.number);
4410
4351
  if (this.callerIdList.length == 1) {
4411
4352
  this.selectedCallerId = this.callerIdList[0];
4412
4353
  }