@vgroup/dialbox 0.5.2 → 0.5.4
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 +9 -7
- package/esm2020/lib/dialbox.component.mjs +44 -43
- package/fesm2015/vgroup-dialbox.mjs +51 -48
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +51 -48
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1833,7 +1833,7 @@ class CallProgressComponent {
|
|
|
1833
1833
|
if (index == -1 && !res.isLeft) {
|
|
1834
1834
|
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: '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()) }));
|
|
1835
1835
|
if (this.showContactsPanel) {
|
|
1836
|
-
this.getAllParticipants(this.
|
|
1836
|
+
this.getAllParticipants(this.currentCall.conferenceSid);
|
|
1837
1837
|
this.applyFilter();
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
@@ -1869,7 +1869,7 @@ class CallProgressComponent {
|
|
|
1869
1869
|
this.currentCallList.splice(index, 1);
|
|
1870
1870
|
}
|
|
1871
1871
|
if (this.showContactsPanel) {
|
|
1872
|
-
this.getAllParticipants(this.
|
|
1872
|
+
this.getAllParticipants(this.currentCall.conferenceSid);
|
|
1873
1873
|
this.applyFilter();
|
|
1874
1874
|
}
|
|
1875
1875
|
}
|
|
@@ -2156,7 +2156,7 @@ class CallProgressComponent {
|
|
|
2156
2156
|
// this.currentCall = this.currentCallList.length > 0 ? this.currentCallList[0] : null;
|
|
2157
2157
|
this.cdr.detectChanges();
|
|
2158
2158
|
}
|
|
2159
|
-
yield this.getAllParticipants(this.
|
|
2159
|
+
yield this.getAllParticipants(this.currentCall.conferenceSid);
|
|
2160
2160
|
return false;
|
|
2161
2161
|
});
|
|
2162
2162
|
}
|
|
@@ -2434,7 +2434,7 @@ class CallProgressComponent {
|
|
|
2434
2434
|
this.isAddRemoveParticipant = false;
|
|
2435
2435
|
this.showContactsPanel = !this.showContactsPanel;
|
|
2436
2436
|
// this.GetContactsList();
|
|
2437
|
-
this.getAllParticipants(this.
|
|
2437
|
+
this.getAllParticipants(this.currentCall.conferenceSid);
|
|
2438
2438
|
this.filteredList = this.contacts;
|
|
2439
2439
|
this.filteredParticipentList = this.allParticipentList;
|
|
2440
2440
|
// }
|
|
@@ -2445,7 +2445,7 @@ class CallProgressComponent {
|
|
|
2445
2445
|
addRemoveParticipant() {
|
|
2446
2446
|
// const conferenceSId = this.addRes?.conferenceSid;
|
|
2447
2447
|
this.isAddRemoveParticipant = !this.isAddRemoveParticipant;
|
|
2448
|
-
this.allParticipentList = this.getAllParticipants(this.
|
|
2448
|
+
this.allParticipentList = this.getAllParticipants(this.currentCall.conferenceSid);
|
|
2449
2449
|
this.filteredParticipentList = this.allParticipentList;
|
|
2450
2450
|
}
|
|
2451
2451
|
add(data) {
|
|
@@ -2843,7 +2843,9 @@ class CallProgressComponent {
|
|
|
2843
2843
|
});
|
|
2844
2844
|
}
|
|
2845
2845
|
isMergeCallAllowed() {
|
|
2846
|
-
|
|
2846
|
+
let mergeCallList = this.currentCallList.filter((res) => res.conferenceId == this.currentCall.conferenceId);
|
|
2847
|
+
console.log('mergeCallList', mergeCallList);
|
|
2848
|
+
return mergeCallList.length > 1;
|
|
2847
2849
|
}
|
|
2848
2850
|
mergeCalls() {
|
|
2849
2851
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3838,52 +3840,12 @@ class DialboxComponent {
|
|
|
3838
3840
|
this.twilioService.deviceId = changes['deviceId'].currentValue;
|
|
3839
3841
|
console.log('Set deviceId in localStorage:', changes['deviceId'].currentValue);
|
|
3840
3842
|
}
|
|
3841
|
-
if (this.userId) {
|
|
3843
|
+
if (changes['userId'].currentValue && this.userId) {
|
|
3842
3844
|
this.extensionService.userId = this.userId;
|
|
3843
3845
|
}
|
|
3844
|
-
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
3845
|
-
this.getContactList();
|
|
3846
|
-
this.getUserCallSetting();
|
|
3847
|
-
setTimeout(() => {
|
|
3848
|
-
this.dialInputElement.nativeElement.focus();
|
|
3849
|
-
}, 0);
|
|
3850
|
-
if (this.incomingCallData) {
|
|
3851
|
-
if (this.isCallInProgress) {
|
|
3852
|
-
this.newIncomingCalls.push(this.incomingCallData);
|
|
3853
|
-
console.log('404', this.incomingCallData);
|
|
3854
|
-
this.getUserInformation(this.incomingCallData);
|
|
3855
|
-
}
|
|
3856
|
-
else {
|
|
3857
|
-
console.log('dd5');
|
|
3858
|
-
this.isCallInProgress = true;
|
|
3859
|
-
this.isDialpadHidden = false;
|
|
3860
|
-
this.callData.phone = this.incomingCallData.parameters['From'];
|
|
3861
|
-
console.log('411', this.incomingCallData);
|
|
3862
|
-
this.getUserInformation(this.incomingCallData);
|
|
3863
|
-
this.callData.name = this.incomingCallData.customParameters.get('name');
|
|
3864
|
-
this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3865
|
-
this.callData.isIncomingCall = true;
|
|
3866
|
-
}
|
|
3867
|
-
this.incomingCallData.on('cancel', () => {
|
|
3868
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
3869
|
-
// if(this.incomingCallsList.length == 0){
|
|
3870
|
-
// console.log('dd6')
|
|
3871
|
-
// this.isCallInProgress = false;
|
|
3872
|
-
// }
|
|
3873
|
-
this.incomingCallData.disconnect();
|
|
3874
|
-
});
|
|
3875
|
-
this.incomingCallData.on('disconnect', () => {
|
|
3876
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
3877
|
-
this.incomingCallData.disconnect();
|
|
3878
|
-
// if(this.incomingCallsList.length == 0){
|
|
3879
|
-
// console.log('dd7')
|
|
3880
|
-
// this.isCallInProgress = false;
|
|
3881
|
-
// }
|
|
3882
|
-
});
|
|
3883
|
-
}
|
|
3884
|
-
}
|
|
3885
3846
|
if (changes['contactInfo'] && this.contactInfo) {
|
|
3886
3847
|
let contact = this.contactInfo;
|
|
3848
|
+
console.log('contactInfo', contact);
|
|
3887
3849
|
if (contact.number) {
|
|
3888
3850
|
this.isSmartDialCall = false;
|
|
3889
3851
|
this.dialedNumber = contact.number;
|
|
@@ -3941,6 +3903,47 @@ class DialboxComponent {
|
|
|
3941
3903
|
}
|
|
3942
3904
|
}
|
|
3943
3905
|
}
|
|
3906
|
+
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
3907
|
+
this.getContactList();
|
|
3908
|
+
this.getUserCallSetting();
|
|
3909
|
+
setTimeout(() => {
|
|
3910
|
+
this.dialInputElement.nativeElement.focus();
|
|
3911
|
+
}, 0);
|
|
3912
|
+
if (this.incomingCallData) {
|
|
3913
|
+
if (this.isCallInProgress) {
|
|
3914
|
+
this.newIncomingCalls.push(this.incomingCallData);
|
|
3915
|
+
console.log('404', this.incomingCallData);
|
|
3916
|
+
this.getUserInformation(this.incomingCallData);
|
|
3917
|
+
}
|
|
3918
|
+
else {
|
|
3919
|
+
console.log('dd5');
|
|
3920
|
+
this.isCallInProgress = true;
|
|
3921
|
+
this.isDialpadHidden = false;
|
|
3922
|
+
this.callData.phone = this.incomingCallData.parameters['From'];
|
|
3923
|
+
console.log('411', this.incomingCallData);
|
|
3924
|
+
this.getUserInformation(this.incomingCallData);
|
|
3925
|
+
this.callData.name = this.incomingCallData.customParameters.get('name');
|
|
3926
|
+
this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3927
|
+
this.callData.isIncomingCall = true;
|
|
3928
|
+
}
|
|
3929
|
+
this.incomingCallData.on('cancel', () => {
|
|
3930
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
3931
|
+
// if(this.incomingCallsList.length == 0){
|
|
3932
|
+
// console.log('dd6')
|
|
3933
|
+
// this.isCallInProgress = false;
|
|
3934
|
+
// }
|
|
3935
|
+
this.incomingCallData.disconnect();
|
|
3936
|
+
});
|
|
3937
|
+
this.incomingCallData.on('disconnect', () => {
|
|
3938
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
3939
|
+
this.incomingCallData.disconnect();
|
|
3940
|
+
// if(this.incomingCallsList.length == 0){
|
|
3941
|
+
// console.log('dd7')
|
|
3942
|
+
// this.isCallInProgress = false;
|
|
3943
|
+
// }
|
|
3944
|
+
});
|
|
3945
|
+
}
|
|
3946
|
+
}
|
|
3944
3947
|
}
|
|
3945
3948
|
registerDragElement() {
|
|
3946
3949
|
try {
|