@vgroup/dialbox 0.3.93 → 0.3.95
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.
|
@@ -1763,6 +1763,7 @@ class CallProgressComponent {
|
|
|
1763
1763
|
this.contacts = [];
|
|
1764
1764
|
this.currentCallList = [];
|
|
1765
1765
|
this.isClickExpand = false;
|
|
1766
|
+
this.isCurrentIncomingCallList = [];
|
|
1766
1767
|
this.isMinimised = false;
|
|
1767
1768
|
console.log('Call Progress Component');
|
|
1768
1769
|
this.call = this.twilioService.device;
|
|
@@ -1819,7 +1820,7 @@ class CallProgressComponent {
|
|
|
1819
1820
|
if (this.currentCallList.length > 0) {
|
|
1820
1821
|
let index = this.currentCallList.findIndex((item) => item.id == res.id);
|
|
1821
1822
|
if (index == -1 && !res.isLeft) {
|
|
1822
|
-
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 || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) }));
|
|
1823
|
+
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, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) }));
|
|
1823
1824
|
}
|
|
1824
1825
|
else if (index != -1 && res.isLeft) {
|
|
1825
1826
|
if (((_d = this.currentCallList[index]) === null || _d === void 0 ? void 0 : _d.id) == ((_e = this.currentCall) === null || _e === void 0 ? void 0 : _e.id)) {
|
|
@@ -1859,11 +1860,11 @@ class CallProgressComponent {
|
|
|
1859
1860
|
}
|
|
1860
1861
|
}
|
|
1861
1862
|
else if (index != -1) {
|
|
1862
|
-
this.currentCallList[index] = 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 || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) });
|
|
1863
|
+
this.currentCallList[index] = 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, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) });
|
|
1863
1864
|
}
|
|
1864
1865
|
}
|
|
1865
1866
|
else {
|
|
1866
|
-
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 || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) }));
|
|
1867
|
+
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, name: res.name || (res === null || res === void 0 ? void 0 : res.fromName) || (res === null || res === void 0 ? void 0 : res.toName) }));
|
|
1867
1868
|
this.timer = '00:00';
|
|
1868
1869
|
this.startTimer();
|
|
1869
1870
|
}
|
|
@@ -1890,11 +1891,11 @@ class CallProgressComponent {
|
|
|
1890
1891
|
}
|
|
1891
1892
|
}
|
|
1892
1893
|
getStatus(res) {
|
|
1893
|
-
const statusList = ["answered", "participant-hold", "participant-mute", "participant-join", "queued", "in-progress", "initiated", 'ringing'];
|
|
1894
|
-
if (statusList.includes(res.status) &&
|
|
1894
|
+
const statusList = ["answered", "participant-hold", "participant-mute", "participant-join", "queued", "in-progress", "initiated", 'ringing', '"connected"'];
|
|
1895
|
+
if (statusList.includes(res.status) && res.direction != "incoming-call") {
|
|
1895
1896
|
return true;
|
|
1896
1897
|
}
|
|
1897
|
-
else if (res.
|
|
1898
|
+
else if (res.direction == "incoming-call") {
|
|
1898
1899
|
return this.isCurrentIncomingCallList.includes(res.participantId);
|
|
1899
1900
|
}
|
|
1900
1901
|
else {
|
|
@@ -2248,12 +2249,12 @@ class CallProgressComponent {
|
|
|
2248
2249
|
});
|
|
2249
2250
|
}
|
|
2250
2251
|
toggleMute(isConference) {
|
|
2251
|
-
var _a
|
|
2252
|
+
var _a;
|
|
2252
2253
|
this.isMute = !this.isMute;
|
|
2253
|
-
|
|
2254
|
+
// this.call?.mute(this.isMute);
|
|
2254
2255
|
if (isConference) {
|
|
2255
2256
|
this.onMuteParticipant({
|
|
2256
|
-
participantId: (
|
|
2257
|
+
participantId: (_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.participantId,
|
|
2257
2258
|
conferenceId: this.conferenceId,
|
|
2258
2259
|
mute: this.isMute,
|
|
2259
2260
|
});
|