@vgroup/dialbox 0.7.52 → 0.7.53
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.
|
@@ -4783,7 +4783,7 @@ class DialboxComponent {
|
|
|
4783
4783
|
this.registerDragElement();
|
|
4784
4784
|
}
|
|
4785
4785
|
ngOnChanges(changes) {
|
|
4786
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
|
|
4786
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
|
|
4787
4787
|
if (((_a = changes['incomingCallnotification']) === null || _a === void 0 ? void 0 : _a.currentValue) && this.incomingCallnotification && ((_c = (_b = this.incomingCallnotification) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.content) != "Voicemail") {
|
|
4788
4788
|
// Capture snapshot immediately so async callbacks always use this call's data,
|
|
4789
4789
|
// not whatever this.incomingCallnotification points to when they eventually run.
|
|
@@ -4804,11 +4804,15 @@ class DialboxComponent {
|
|
|
4804
4804
|
this.incomingCallNotification({}, snapshot);
|
|
4805
4805
|
}
|
|
4806
4806
|
}
|
|
4807
|
+
this.incomingFromImage = '';
|
|
4807
4808
|
if ((_p = snapshot.data.data) === null || _p === void 0 ? void 0 : _p.fromImage) {
|
|
4808
|
-
|
|
4809
|
+
console.log('Incoming Notification:', snapshot.data.data);
|
|
4810
|
+
console.log('fromImage:', (_q = snapshot.data.data) === null || _q === void 0 ? void 0 : _q.fromImage);
|
|
4811
|
+
this.incomingFromImage = (_r = snapshot.data.data) === null || _r === void 0 ? void 0 : _r.fromImage;
|
|
4809
4812
|
}
|
|
4813
|
+
console.log('after assign incomingFromImage:', this.incomingFromImage);
|
|
4810
4814
|
}
|
|
4811
|
-
else if (((
|
|
4815
|
+
else if (((_s = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _s === void 0 ? void 0 : _s.content) == "Missed Call" || ((_u = (_t = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.status) == "rejected" || ((_w = (_v = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.status) == "accepted") {
|
|
4812
4816
|
let index = this.notificationCallList.findIndex((call) => { var _a, _b, _c, _d; return (call === null || call === void 0 ? void 0 : call.participantId) === ((_b = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.recordId) || (call === null || call === void 0 ? void 0 : call.participantId) === ((_d = (_c = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.participantId); });
|
|
4813
4817
|
if (index > -1) {
|
|
4814
4818
|
this.notificationCallList.splice(index, 1);
|
|
@@ -4819,12 +4823,12 @@ class DialboxComponent {
|
|
|
4819
4823
|
this.incomingCallsList.splice(incomingCallIndex, 1);
|
|
4820
4824
|
this.incomeingCallSocketService.pause();
|
|
4821
4825
|
this.cdk.detectChanges();
|
|
4822
|
-
if (!((
|
|
4826
|
+
if (!((_x = this.incomingCallsList) === null || _x === void 0 ? void 0 : _x.length)) {
|
|
4823
4827
|
console.log('407');
|
|
4824
4828
|
this.isCallInProgress = false;
|
|
4825
4829
|
}
|
|
4826
4830
|
}
|
|
4827
|
-
if (this.connectingIncomingCallId == ((
|
|
4831
|
+
if (this.connectingIncomingCallId == ((_z = (_y = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _y === void 0 ? void 0 : _y.data) === null || _z === void 0 ? void 0 : _z.recordId) || this.connectingIncomingCallId == ((_1 = (_0 = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _0 === void 0 ? void 0 : _0.data) === null || _1 === void 0 ? void 0 : _1.participantId) && ((_3 = (_2 = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _2 === void 0 ? void 0 : _2.data) === null || _3 === void 0 ? void 0 : _3.status) != "accepted") {
|
|
4828
4832
|
// swal("Error", 'Internal Server Error', "error");
|
|
4829
4833
|
this.twilioService.isConnectingIncomingCallId.next('');
|
|
4830
4834
|
}
|
|
@@ -4836,7 +4840,7 @@ class DialboxComponent {
|
|
|
4836
4840
|
}
|
|
4837
4841
|
console.log('notificationCallList', this.notificationCallList);
|
|
4838
4842
|
let parentCall = [];
|
|
4839
|
-
if ((
|
|
4843
|
+
if ((_4 = this.notificationCallList) === null || _4 === void 0 ? void 0 : _4.length) {
|
|
4840
4844
|
this.notificationCallList = this.notificationCallList.filter((res) => res.endTime >= (new Date().getTime()));
|
|
4841
4845
|
this.notificationCallList.forEach((call) => {
|
|
4842
4846
|
this.incomingCallsList.forEach((item) => {
|
|
@@ -4863,15 +4867,15 @@ class DialboxComponent {
|
|
|
4863
4867
|
this.twilioService.deviceId = changes['deviceId'].currentValue;
|
|
4864
4868
|
this.extService.getIpInfo();
|
|
4865
4869
|
}
|
|
4866
|
-
if (((
|
|
4870
|
+
if (((_5 = changes['updatedTwilioToken']) === null || _5 === void 0 ? void 0 : _5.currentValue) && this.updatedTwilioToken) {
|
|
4867
4871
|
this.twilioService.incomingCallToken = this.updatedTwilioToken;
|
|
4868
4872
|
this.twilioService.tokenInitialized = true;
|
|
4869
4873
|
this.twilioService.initializeTwilioDevice(this.deviceId || localStorage.getItem('deviceId'));
|
|
4870
4874
|
}
|
|
4871
|
-
if (((
|
|
4875
|
+
if (((_6 = changes['userId']) === null || _6 === void 0 ? void 0 : _6.currentValue) && this.userId) {
|
|
4872
4876
|
this.extensionService.userId = this.userId;
|
|
4873
4877
|
}
|
|
4874
|
-
if (((
|
|
4878
|
+
if (((_7 = changes['contactInfo']) === null || _7 === void 0 ? void 0 : _7.currentValue) && this.contactInfo) {
|
|
4875
4879
|
let contact = this.contactInfo;
|
|
4876
4880
|
this.isValidationMessageShow = true;
|
|
4877
4881
|
if (contact.number && !this.incomingCallsList.length) {
|
|
@@ -4962,13 +4966,13 @@ class DialboxComponent {
|
|
|
4962
4966
|
});
|
|
4963
4967
|
}
|
|
4964
4968
|
}
|
|
4965
|
-
if ((
|
|
4966
|
-
if (((
|
|
4969
|
+
if ((_8 = changes['callAction']) === null || _8 === void 0 ? void 0 : _8.currentValue) {
|
|
4970
|
+
if (((_9 = this.callAction) === null || _9 === void 0 ? void 0 : _9.type) == 'reJoin') {
|
|
4967
4971
|
this.extService.getIpInfo();
|
|
4968
4972
|
this.isCallInProgress = true;
|
|
4969
4973
|
}
|
|
4970
|
-
else if ((
|
|
4971
|
-
this.extensionService.getRemoveParticipants('all', (
|
|
4974
|
+
else if ((_10 = this.callAction) === null || _10 === void 0 ? void 0 : _10.conferenceId) {
|
|
4975
|
+
this.extensionService.getRemoveParticipants('all', (_11 = this.callAction) === null || _11 === void 0 ? void 0 : _11.conferenceId).subscribe((res) => { });
|
|
4972
4976
|
}
|
|
4973
4977
|
}
|
|
4974
4978
|
}
|