@vgroup/dialbox 0.3.76 → 0.3.78
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 +35 -2
- package/esm2020/lib/dialbox.component.mjs +13 -11
- package/fesm2015/vgroup-dialbox.mjs +34 -11
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +46 -11
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1807,7 +1807,7 @@ class CallProgressComponent {
|
|
|
1807
1807
|
// Check if there's an active ongoing call
|
|
1808
1808
|
this.newIncomingCallsList.forEach((res) => {
|
|
1809
1809
|
if (this.currentCallList.findIndex((item) => item.id == res.id) == -1) {
|
|
1810
|
-
this.currentCallList.push(Object.assign(Object.assign({}, res), { img: 'assets/images/user.jpg', isIncomingCall:
|
|
1810
|
+
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: this.getStatus(res), 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, name: res.name }));
|
|
1811
1811
|
}
|
|
1812
1812
|
});
|
|
1813
1813
|
}
|
|
@@ -1828,6 +1828,27 @@ class CallProgressComponent {
|
|
|
1828
1828
|
}
|
|
1829
1829
|
console.log('currentCallList', this.currentCallList);
|
|
1830
1830
|
}
|
|
1831
|
+
getStatus(res) {
|
|
1832
|
+
if (res.direction == "incoming-call") {
|
|
1833
|
+
if (res.status == "participant-join" || res.status == "participant-hold" || res.status == "participant-mute") {
|
|
1834
|
+
return true;
|
|
1835
|
+
}
|
|
1836
|
+
else {
|
|
1837
|
+
return false;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
else if (res.direction == "outgoing-call") {
|
|
1841
|
+
if (res.status == "participant-join" || res.status == "participant-hold" || res.status == "participant-mute") {
|
|
1842
|
+
return true;
|
|
1843
|
+
}
|
|
1844
|
+
else {
|
|
1845
|
+
return false;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
else {
|
|
1849
|
+
return false;
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1831
1852
|
ngAfterViewInit() {
|
|
1832
1853
|
// this.isRecording = false;
|
|
1833
1854
|
// setTimeout(() => {
|
|
@@ -3018,20 +3039,22 @@ class DialboxComponent {
|
|
|
3018
3039
|
// console.log("WS Event Received:", incomingCallData.data);
|
|
3019
3040
|
this.twilioService.conferenceCallInfo = incomingCallData;
|
|
3020
3041
|
if (!!incomingCallData.participants) {
|
|
3021
|
-
this.incomingCallsList = incomingCallData.participants.filter((item) => !item.isLeft) || [];
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
else {
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
}
|
|
3042
|
+
// this.incomingCallsList = incomingCallData.participants.filter((item: any) => !item.isLeft) || [];
|
|
3043
|
+
this.incomingCallsList = incomingCallData.participants || [];
|
|
3044
|
+
// if (this.incomingCallsList.length) {
|
|
3045
|
+
this.isCallInProgress = true;
|
|
3046
|
+
this.isDialpadHidden = false;
|
|
3047
|
+
// } else {
|
|
3048
|
+
// this.callData = [];
|
|
3049
|
+
// this.incomingCallsList = [];
|
|
3050
|
+
// this.isDialpadHidden = true;
|
|
3051
|
+
// }
|
|
3031
3052
|
}
|
|
3032
3053
|
else {
|
|
3033
3054
|
this.callData = [];
|
|
3034
3055
|
this.incomingCallsList = [];
|
|
3056
|
+
this.isCallInProgress = false;
|
|
3057
|
+
this.isDialpadHidden = false;
|
|
3035
3058
|
}
|
|
3036
3059
|
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3037
3060
|
// this.initializeTwilio();
|