@vgroup/dialbox 0.5.44 → 0.5.46
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.
- package/esm2020/lib/components/call-progress/call-progress.component.mjs +4 -4
- package/esm2020/lib/dialbox.component.mjs +2 -52
- package/fesm2015/vgroup-dialbox.mjs +7 -57
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +4 -54
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1834,7 +1834,7 @@ class CallProgressComponent {
|
|
|
1834
1834
|
if (this.currentCallList.length > 0) {
|
|
1835
1835
|
let index = this.currentCallList.findIndex((item) => item.id == res.id);
|
|
1836
1836
|
if (index == -1 && !res.isLeft) {
|
|
1837
|
-
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.
|
|
1837
|
+
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: 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.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) }));
|
|
1838
1838
|
if (this.showContactsPanel) {
|
|
1839
1839
|
this.getAllParticipants(this.currentCall.conferenceSid);
|
|
1840
1840
|
this.applyFilter();
|
|
@@ -1876,11 +1876,11 @@ class CallProgressComponent {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
else if (index != -1) {
|
|
1879
|
-
this.currentCallList[index] = Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.
|
|
1879
|
+
this.currentCallList[index] = Object.assign(Object.assign({}, res), { img: 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.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) });
|
|
1880
1880
|
}
|
|
1881
1881
|
}
|
|
1882
1882
|
else if (!res.isLeft) {
|
|
1883
|
-
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: (res === null || res === void 0 ? void 0 : res.
|
|
1883
|
+
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: 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.direction == "incoming-call", isHold: res.isHold, isMute: false, isConference: res.isConference, isAcceptCall: res.direction == "incoming-call" ? this.getStatus(res) : true, dial: true, phone: res.direction == "incoming-call" ? res === null || res === void 0 ? void 0 : res.from : res === null || res === void 0 ? void 0 : res.to, participantId: res.id, conferenceSid: callInfo.conferenceSid, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName), time: this.getTimeDifference(res.joinedAt || new Date().toUTCString()) }));
|
|
1884
1884
|
this.timer = '00:00';
|
|
1885
1885
|
this.startTimer();
|
|
1886
1886
|
}
|
|
@@ -3553,9 +3553,6 @@ class DialboxComponent {
|
|
|
3553
3553
|
try {
|
|
3554
3554
|
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => __awaiter(this, void 0, void 0, function* () {
|
|
3555
3555
|
var _a, _b;
|
|
3556
|
-
// const data = JSON.parse(incomingCallData.data);
|
|
3557
|
-
// console.log("WS Event Received:", incomingCallData);
|
|
3558
|
-
// console.log("WS Event Received:", incomingCallData.data);
|
|
3559
3556
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3560
3557
|
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; }) : [];
|
|
3561
3558
|
if (!!(incomingCallData === null || incomingCallData === void 0 ? void 0 : incomingCallData.length)) {
|
|
@@ -3594,45 +3591,6 @@ class DialboxComponent {
|
|
|
3594
3591
|
(_b = this.twilioService.device) === null || _b === void 0 ? void 0 : _b.disconnectAll();
|
|
3595
3592
|
}
|
|
3596
3593
|
}
|
|
3597
|
-
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3598
|
-
// this.initializeTwilio();
|
|
3599
|
-
// if (incomingCallData.type === "/incoming/call") {
|
|
3600
|
-
// if (incomingCallData) {
|
|
3601
|
-
// if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3602
|
-
// this._isDialpadHidden = false;
|
|
3603
|
-
// }
|
|
3604
|
-
// if (this.isCallInProgress) {
|
|
3605
|
-
// this.newIncomingCalls.push(incomingCallData);
|
|
3606
|
-
// console.log('325', incomingCallData)
|
|
3607
|
-
// this.getUserInformation(incomingCallData);
|
|
3608
|
-
// } else {
|
|
3609
|
-
// incomingCallData['isFirstCall'] = true;
|
|
3610
|
-
// console.log('dd1')
|
|
3611
|
-
// this.isCallInProgress = true;
|
|
3612
|
-
// this.isDialpadHidden = false;
|
|
3613
|
-
// this.callData.phone = incomingCallData.parameters['From'];
|
|
3614
|
-
// console.log('dd2')
|
|
3615
|
-
// this.getUserInformation(incomingCallData);
|
|
3616
|
-
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3617
|
-
// this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3618
|
-
// this.callData.isIncomingCall = true;
|
|
3619
|
-
// }
|
|
3620
|
-
// incomingCallData.on('cancel', () => {
|
|
3621
|
-
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3622
|
-
// // if(this.incomingCallsList.length == 0){
|
|
3623
|
-
// // console.log('dd3')
|
|
3624
|
-
// // this.isCallInProgress = false;
|
|
3625
|
-
// // }
|
|
3626
|
-
// });
|
|
3627
|
-
// incomingCallData.on('disconnect', () => {
|
|
3628
|
-
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3629
|
-
// // if(this.incomingCallsList.length == 0){
|
|
3630
|
-
// // console.log('dd4')
|
|
3631
|
-
// // this.isCallInProgress = false;
|
|
3632
|
-
// // }
|
|
3633
|
-
// });
|
|
3634
|
-
// }
|
|
3635
|
-
// }
|
|
3636
3594
|
}));
|
|
3637
3595
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3638
3596
|
//this.isCallInProgress = true;
|
|
@@ -3695,14 +3653,6 @@ class DialboxComponent {
|
|
|
3695
3653
|
});
|
|
3696
3654
|
// handle incoming call (managed internally; host need not pass incomingCallData)
|
|
3697
3655
|
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
3698
|
-
// if (incomingCallData) {
|
|
3699
|
-
// this.isCallInProgress = true;
|
|
3700
|
-
// this.isDialpadHidden = false;
|
|
3701
|
-
// this.callData.phone = incomingCallData.parameters.From;
|
|
3702
|
-
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
3703
|
-
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
3704
|
-
// this.callData.isIncomingCall = true;
|
|
3705
|
-
// }
|
|
3706
3656
|
if (incomingCallData) {
|
|
3707
3657
|
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3708
3658
|
this._isDialpadHidden = false;
|
|
@@ -3971,15 +3921,15 @@ class DialboxComponent {
|
|
|
3971
3921
|
}
|
|
3972
3922
|
}
|
|
3973
3923
|
incomingCallNotification(callerInfo) {
|
|
3974
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
3924
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
3975
3925
|
let incomingCall = {
|
|
3976
3926
|
conferenceId: 'no',
|
|
3977
3927
|
isActive: true,
|
|
3978
3928
|
isIncomingCall: true,
|
|
3979
3929
|
participantId: (_a = this.incomingCallnotification.data.data) === null || _a === void 0 ? void 0 : _a.participantId,
|
|
3980
3930
|
participants: [
|
|
3981
|
-
{ direction: "incoming-call", img: ((_b = this.incomingCallnotification.data.data) === null || _b === void 0 ? void 0 : _b.image) || 'assets/images/user.jpg', isIncomingCall: true, isHold: false, isConference: false, isAcceptCall: false, dial: true, phone: (
|
|
3982
|
-
from: (
|
|
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 }
|
|
3983
3933
|
],
|
|
3984
3934
|
};
|
|
3985
3935
|
if (callerInfo) {
|
|
@@ -4002,7 +3952,7 @@ class DialboxComponent {
|
|
|
4002
3952
|
this.notificationCallList = this.notificationCallList.filter((res) => (res === null || res === void 0 ? void 0 : res.endTime) >= now);
|
|
4003
3953
|
this.incomingCallsList = [...this.incomingCallsList, ...this.notificationCallList];
|
|
4004
3954
|
this.cdk.detectChanges();
|
|
4005
|
-
if ((
|
|
3955
|
+
if ((_l = this.incomingCallnotification.data.data) === null || _l === void 0 ? void 0 : _l.participantId) {
|
|
4006
3956
|
this.isCallInProgress = true;
|
|
4007
3957
|
this.cdk.detectChanges();
|
|
4008
3958
|
this.isDialpadHidden = false;
|