@vgroup/dialbox 0.6.3-0.20 → 0.6.3-0.21
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.
|
@@ -1832,45 +1832,46 @@ class CallProgressComponent {
|
|
|
1832
1832
|
if ((res === null || res === void 0 ? void 0 : res.to) == 'c2c_softphone_client') {
|
|
1833
1833
|
this.hostnumber = res;
|
|
1834
1834
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
if (((_b = this.currentCallList) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
1840
|
-
let index = this.currentCallList.findIndex((item) => (item === null || item === void 0 ? void 0 : item.id) == (res === null || res === void 0 ? void 0 : res.id));
|
|
1841
|
-
if (index == -1 && !res.isLeft) {
|
|
1842
|
-
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, isConferenceHold: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold) || false, 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()) }));
|
|
1843
|
-
if (this.showContactsPanel) {
|
|
1844
|
-
this.getAllParticipants((_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.conferenceSid);
|
|
1845
|
-
this.applyFilter();
|
|
1846
|
-
}
|
|
1835
|
+
else {
|
|
1836
|
+
let contact = {};
|
|
1837
|
+
if ((_a = this.contacts) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1838
|
+
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); });
|
|
1847
1839
|
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
this.
|
|
1840
|
+
if (((_b = this.currentCallList) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
1841
|
+
let index = this.currentCallList.findIndex((item) => (item === null || item === void 0 ? void 0 : item.id) == (res === null || res === void 0 ? void 0 : res.id));
|
|
1842
|
+
if (index == -1 && !res.isLeft) {
|
|
1843
|
+
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, isConferenceHold: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold) || false, 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()) }));
|
|
1844
|
+
if (this.showContactsPanel) {
|
|
1845
|
+
this.getAllParticipants((_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.conferenceSid);
|
|
1846
|
+
this.applyFilter();
|
|
1847
|
+
}
|
|
1852
1848
|
}
|
|
1853
|
-
else {
|
|
1854
|
-
this.currentCallList.
|
|
1849
|
+
else if (index != -1 && (res === null || res === void 0 ? void 0 : res.isLeft)) {
|
|
1850
|
+
if (((_d = this.currentCallList[index]) === null || _d === void 0 ? void 0 : _d.id) == ((_e = this.currentCall) === null || _e === void 0 ? void 0 : _e.id)) {
|
|
1851
|
+
this.currentCallList.splice(index, 1);
|
|
1852
|
+
this.currentCall = ((_f = this.currentCallList) === null || _f === void 0 ? void 0 : _f.length) > 0 ? this.currentCallList[0] : {};
|
|
1853
|
+
}
|
|
1854
|
+
else {
|
|
1855
|
+
this.currentCallList.splice(index, 1);
|
|
1856
|
+
}
|
|
1857
|
+
if (this.showContactsPanel) {
|
|
1858
|
+
this.getAllParticipants((_g = this.currentCall) === null || _g === void 0 ? void 0 : _g.conferenceSid);
|
|
1859
|
+
this.applyFilter();
|
|
1860
|
+
}
|
|
1855
1861
|
}
|
|
1856
|
-
if (
|
|
1857
|
-
this.
|
|
1858
|
-
this.applyFilter();
|
|
1862
|
+
else if (index != -1) {
|
|
1863
|
+
this.currentCallList[index] = 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, isConferenceHold: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold) || false, isMute: res === null || res === void 0 ? void 0 : res.isMute, isConference: res === null || res === void 0 ? void 0 : res.isConference, isAcceptCall: 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()) });
|
|
1859
1864
|
}
|
|
1860
1865
|
}
|
|
1861
|
-
else if (
|
|
1862
|
-
this.currentCallList
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
this.currentCall = this.currentCallList[0];
|
|
1866
|
+
else if (!res.isLeft) {
|
|
1867
|
+
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 === null || res === void 0 ? void 0 : res.isHold, isConferenceHold: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isHold) || false, isMute: res === null || res === void 0 ? void 0 : res.isMute, 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 === 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()) }));
|
|
1868
|
+
if (((_h = this.currentCallList) === null || _h === void 0 ? void 0 : _h.length) == 1) {
|
|
1869
|
+
this.currentCall = this.currentCallList[0];
|
|
1870
|
+
}
|
|
1871
|
+
this.timer = '00:00';
|
|
1872
|
+
this.startTimer();
|
|
1869
1873
|
}
|
|
1870
|
-
this.timer = '00:00';
|
|
1871
|
-
this.startTimer();
|
|
1872
1874
|
}
|
|
1873
|
-
// }
|
|
1874
1875
|
}));
|
|
1875
1876
|
this.leftParticipent[callInfo === null || callInfo === void 0 ? void 0 : callInfo.conferenceId] = [...new Map(callInfo === null || callInfo === void 0 ? void 0 : callInfo.participants.filter((item) => (item === null || item === void 0 ? void 0 : item.isLeft) === true).map((item) => [(item === null || item === void 0 ? void 0 : item.direction) == 'outgoing-call' ? (item === null || item === void 0 ? void 0 : item.to) || 'Unknown' : item === null || item === void 0 ? void 0 : item.from, item])).values()
|
|
1876
1877
|
];
|
|
@@ -2597,7 +2598,6 @@ class CallProgressComponent {
|
|
|
2597
2598
|
});
|
|
2598
2599
|
}
|
|
2599
2600
|
CallToUnsavedNumber(number, isNewConference) {
|
|
2600
|
-
var _a, _b, _c, _d;
|
|
2601
2601
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2602
2602
|
try {
|
|
2603
2603
|
const isInvalid = yield this.isInvalidNumber(number);
|
|
@@ -2637,52 +2637,32 @@ class CallProgressComponent {
|
|
|
2637
2637
|
if (callInfo) {
|
|
2638
2638
|
ourNumberInfo = 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.isLeft));
|
|
2639
2639
|
}
|
|
2640
|
-
let selfInfo = this.allParticipentList.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)));
|
|
2641
|
-
console.log(selfInfo, 'selfInfo');
|
|
2642
|
-
yield this.onholdOrUnholdParticipant({
|
|
2643
|
-
participantId: [selfInfo === null || selfInfo === void 0 ? void 0 : selfInfo.participantId],
|
|
2644
|
-
conferenceId: (_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.conferenceId,
|
|
2645
|
-
hold: true,
|
|
2646
|
-
mute: ((_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.mute) || false,
|
|
2647
|
-
conference: ((_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.isConference) || false
|
|
2648
|
-
});
|
|
2649
2640
|
if (participentList === null || participentList === void 0 ? void 0 : participentList.length) {
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
this.newIncomingCallsList.forEach((resData) => {
|
|
2658
|
-
if (resData === null || resData === void 0 ? void 0 : resData.participantId) {
|
|
2659
|
-
participentList.push(resData === null || resData === void 0 ? void 0 : resData.participantId);
|
|
2660
|
-
}
|
|
2641
|
+
console.log(ourNumberInfo, 'selfInfo');
|
|
2642
|
+
yield this.onholdOrUnholdParticipant({
|
|
2643
|
+
participantId: [ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.participantId],
|
|
2644
|
+
conferenceId: ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.conferenceId,
|
|
2645
|
+
hold: true,
|
|
2646
|
+
mute: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.mute) || false,
|
|
2647
|
+
conference: (ourNumberInfo === null || ourNumberInfo === void 0 ? void 0 : ourNumberInfo.isConference) || false
|
|
2661
2648
|
});
|
|
2662
|
-
|
|
2663
|
-
this.isConferenceCallHold = true;
|
|
2664
|
-
}
|
|
2649
|
+
this.isConferenceCallHold = true;
|
|
2665
2650
|
this.startCall(callData, isNewConference);
|
|
2666
2651
|
}
|
|
2667
2652
|
else {
|
|
2668
2653
|
this.startCall(callData, isNewConference);
|
|
2669
2654
|
}
|
|
2670
2655
|
this.searchText = '';
|
|
2671
|
-
// }
|
|
2672
2656
|
}
|
|
2673
2657
|
else {
|
|
2674
2658
|
this.searchText = '';
|
|
2659
|
+
this.isConference = true;
|
|
2675
2660
|
this.callContact(number, true);
|
|
2676
2661
|
}
|
|
2677
|
-
// this.callInitiated.emit({ ...this.callData });
|
|
2678
2662
|
return true;
|
|
2679
2663
|
}
|
|
2680
2664
|
catch (e) {
|
|
2681
|
-
// console.error('Error in initiateCall:', e);
|
|
2682
|
-
// this.isLoadershow = false;
|
|
2683
2665
|
this.showDialAlert('Failed to initiate call. Please try again.');
|
|
2684
|
-
// console.log('dd11')
|
|
2685
|
-
// this.isCallInProgress = false;
|
|
2686
2666
|
return false;
|
|
2687
2667
|
}
|
|
2688
2668
|
});
|
|
@@ -3159,11 +3139,6 @@ class CallProgressComponent {
|
|
|
3159
3139
|
((c === null || c === void 0 ? void 0 : c.middleName) || '').toLowerCase().includes(text) || ((c === null || c === void 0 ? void 0 : c.fullName) || '').toLowerCase().includes(text) ||
|
|
3160
3140
|
(((_a = c === null || c === void 0 ? void 0 : c.numbersList[0]) === null || _a === void 0 ? void 0 : _a.number) || '').toLowerCase().includes(text) || (((_b = c === null || c === void 0 ? void 0 : c.numbersList[1]) === null || _b === void 0 ? void 0 : _b.number) || '').toLowerCase().includes(text);
|
|
3161
3141
|
});
|
|
3162
|
-
// this.filteredParticipentList = this.allParticipentList.filter((c: any) => {
|
|
3163
|
-
// const name = (c.direction == 'outgoing-call' ? (c?.toName || '') : (c?.fromName || '')).toLowerCase();
|
|
3164
|
-
// const number = (c.direction == 'outgoing-call' ? ( c?.to || '') : (c?.from || '')).toLowerCase();
|
|
3165
|
-
// return name.includes(text) || number.includes(text);
|
|
3166
|
-
// });
|
|
3167
3142
|
this.filteredList.forEach((c) => {
|
|
3168
3143
|
let index = this.currentCallList.findIndex((cc) => { var _a, _b; return (cc === null || cc === void 0 ? void 0 : cc.phone) == ((_a = c === null || c === void 0 ? void 0 : c.numbersList[0]) === null || _a === void 0 ? void 0 : _a.number) || (cc === null || cc === void 0 ? void 0 : cc.phone) == ((_b = c === null || c === void 0 ? void 0 : c.numbersList[1]) === null || _b === void 0 ? void 0 : _b.number); });
|
|
3169
3144
|
if (index > -1) {
|