@vgroup/dialbox 0.7.54 → 0.7.55
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 +11 -1
- package/esm2020/lib/dialbox.component.mjs +1 -4
- package/fesm2015/vgroup-dialbox.mjs +27 -20
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +10 -3
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3720,7 +3720,7 @@ class CallProgressComponent {
|
|
|
3720
3720
|
return false;
|
|
3721
3721
|
}
|
|
3722
3722
|
onCallInputs(num) {
|
|
3723
|
-
var _a;
|
|
3723
|
+
var _a, _b;
|
|
3724
3724
|
try {
|
|
3725
3725
|
if (Number.isInteger(num) || num == '+' || num == '*' || num == '#') {
|
|
3726
3726
|
if (num == '#') {
|
|
@@ -3736,16 +3736,26 @@ class CallProgressComponent {
|
|
|
3736
3736
|
this.showClearBtn = true;
|
|
3737
3737
|
}
|
|
3738
3738
|
let str = String(num);
|
|
3739
|
-
(_a = this.
|
|
3739
|
+
let selfCall = (_a = this.newIncomingCallsList.find((res) => { var _a; return (res === null || res === void 0 ? void 0 : res.conferenceId) == ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _a === void 0 ? void 0 : _a.participants.find((resData) => ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.client)) || (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call' && (resData === null || resData === void 0 ? void 0 : resData.host))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
|
|
3740
|
+
let device = this.twilioService.getIncomingCallById((selfCall === null || selfCall === void 0 ? void 0 : selfCall.callSid) || (selfCall === null || selfCall === void 0 ? void 0 : selfCall.clientSid));
|
|
3741
|
+
if (device && (device === null || device === void 0 ? void 0 : device._status) == 'open') {
|
|
3742
|
+
device.sendDigits(str);
|
|
3743
|
+
}
|
|
3744
|
+
(_b = this.call) === null || _b === void 0 ? void 0 : _b.sendDigits(str);
|
|
3740
3745
|
}
|
|
3741
3746
|
catch (e) {
|
|
3742
3747
|
console.log(e);
|
|
3743
3748
|
}
|
|
3744
3749
|
}
|
|
3745
3750
|
onCallInputEnter(ev) {
|
|
3746
|
-
var _a;
|
|
3751
|
+
var _a, _b;
|
|
3747
3752
|
try {
|
|
3748
|
-
(_a = this.
|
|
3753
|
+
let selfCall = (_a = this.newIncomingCallsList.find((res) => { var _a; return (res === null || res === void 0 ? void 0 : res.conferenceId) == ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.conferenceId); })) === null || _a === void 0 ? void 0 : _a.participants.find((resData) => ((this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.from) && (resData === null || resData === void 0 ? void 0 : resData.client)) || (this.deviceNumberList.includes(resData === null || resData === void 0 ? void 0 : resData.to) && (resData === null || resData === void 0 ? void 0 : resData.direction) == 'incoming-call' && (resData === null || resData === void 0 ? void 0 : resData.host))) && !(resData === null || resData === void 0 ? void 0 : resData.isLeft));
|
|
3754
|
+
let device = this.twilioService.getIncomingCallById((selfCall === null || selfCall === void 0 ? void 0 : selfCall.callSid) || (selfCall === null || selfCall === void 0 ? void 0 : selfCall.clientSid));
|
|
3755
|
+
if (device && (device === null || device === void 0 ? void 0 : device._status) == 'open') {
|
|
3756
|
+
device.sendDigits(String(ev.key));
|
|
3757
|
+
}
|
|
3758
|
+
(_b = this.call) === null || _b === void 0 ? void 0 : _b.sendDigits(String(ev.key));
|
|
3749
3759
|
}
|
|
3750
3760
|
catch (e) {
|
|
3751
3761
|
console.log(e);
|
|
@@ -4783,7 +4793,7 @@ class DialboxComponent {
|
|
|
4783
4793
|
this.registerDragElement();
|
|
4784
4794
|
}
|
|
4785
4795
|
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
|
|
4796
|
+
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;
|
|
4787
4797
|
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
4798
|
// Capture snapshot immediately so async callbacks always use this call's data,
|
|
4789
4799
|
// not whatever this.incomingCallnotification points to when they eventually run.
|
|
@@ -4806,13 +4816,10 @@ class DialboxComponent {
|
|
|
4806
4816
|
}
|
|
4807
4817
|
this.incomingFromImage = '';
|
|
4808
4818
|
if ((_p = snapshot.data.data) === null || _p === void 0 ? void 0 : _p.fromImage) {
|
|
4809
|
-
|
|
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;
|
|
4819
|
+
this.incomingFromImage = (_q = snapshot.data.data) === null || _q === void 0 ? void 0 : _q.fromImage;
|
|
4812
4820
|
}
|
|
4813
|
-
console.log('after assign incomingFromImage:', this.incomingFromImage);
|
|
4814
4821
|
}
|
|
4815
|
-
else if (((
|
|
4822
|
+
else if (((_r = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _r === void 0 ? void 0 : _r.content) == "Missed Call" || ((_t = (_s = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _s === void 0 ? void 0 : _s.data) === null || _t === void 0 ? void 0 : _t.status) == "rejected" || ((_v = (_u = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _u === void 0 ? void 0 : _u.data) === null || _v === void 0 ? void 0 : _v.status) == "accepted") {
|
|
4816
4823
|
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); });
|
|
4817
4824
|
if (index > -1) {
|
|
4818
4825
|
this.notificationCallList.splice(index, 1);
|
|
@@ -4823,12 +4830,12 @@ class DialboxComponent {
|
|
|
4823
4830
|
this.incomingCallsList.splice(incomingCallIndex, 1);
|
|
4824
4831
|
this.incomeingCallSocketService.pause();
|
|
4825
4832
|
this.cdk.detectChanges();
|
|
4826
|
-
if (!((
|
|
4833
|
+
if (!((_w = this.incomingCallsList) === null || _w === void 0 ? void 0 : _w.length)) {
|
|
4827
4834
|
console.log('407');
|
|
4828
4835
|
this.isCallInProgress = false;
|
|
4829
4836
|
}
|
|
4830
4837
|
}
|
|
4831
|
-
if (this.connectingIncomingCallId == ((
|
|
4838
|
+
if (this.connectingIncomingCallId == ((_y = (_x = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _x === void 0 ? void 0 : _x.data) === null || _y === void 0 ? void 0 : _y.recordId) || this.connectingIncomingCallId == ((_0 = (_z = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.participantId) && ((_2 = (_1 = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _1 === void 0 ? void 0 : _1.data) === null || _2 === void 0 ? void 0 : _2.status) != "accepted") {
|
|
4832
4839
|
// swal("Error", 'Internal Server Error', "error");
|
|
4833
4840
|
this.twilioService.isConnectingIncomingCallId.next('');
|
|
4834
4841
|
}
|
|
@@ -4840,7 +4847,7 @@ class DialboxComponent {
|
|
|
4840
4847
|
}
|
|
4841
4848
|
console.log('notificationCallList', this.notificationCallList);
|
|
4842
4849
|
let parentCall = [];
|
|
4843
|
-
if ((
|
|
4850
|
+
if ((_3 = this.notificationCallList) === null || _3 === void 0 ? void 0 : _3.length) {
|
|
4844
4851
|
this.notificationCallList = this.notificationCallList.filter((res) => res.endTime >= (new Date().getTime()));
|
|
4845
4852
|
this.notificationCallList.forEach((call) => {
|
|
4846
4853
|
this.incomingCallsList.forEach((item) => {
|
|
@@ -4867,15 +4874,15 @@ class DialboxComponent {
|
|
|
4867
4874
|
this.twilioService.deviceId = changes['deviceId'].currentValue;
|
|
4868
4875
|
this.extService.getIpInfo();
|
|
4869
4876
|
}
|
|
4870
|
-
if (((
|
|
4877
|
+
if (((_4 = changes['updatedTwilioToken']) === null || _4 === void 0 ? void 0 : _4.currentValue) && this.updatedTwilioToken) {
|
|
4871
4878
|
this.twilioService.incomingCallToken = this.updatedTwilioToken;
|
|
4872
4879
|
this.twilioService.tokenInitialized = true;
|
|
4873
4880
|
this.twilioService.initializeTwilioDevice(this.deviceId || localStorage.getItem('deviceId'));
|
|
4874
4881
|
}
|
|
4875
|
-
if (((
|
|
4882
|
+
if (((_5 = changes['userId']) === null || _5 === void 0 ? void 0 : _5.currentValue) && this.userId) {
|
|
4876
4883
|
this.extensionService.userId = this.userId;
|
|
4877
4884
|
}
|
|
4878
|
-
if (((
|
|
4885
|
+
if (((_6 = changes['contactInfo']) === null || _6 === void 0 ? void 0 : _6.currentValue) && this.contactInfo) {
|
|
4879
4886
|
let contact = this.contactInfo;
|
|
4880
4887
|
this.isValidationMessageShow = true;
|
|
4881
4888
|
if (contact.number && !this.incomingCallsList.length) {
|
|
@@ -4966,13 +4973,13 @@ class DialboxComponent {
|
|
|
4966
4973
|
});
|
|
4967
4974
|
}
|
|
4968
4975
|
}
|
|
4969
|
-
if ((
|
|
4970
|
-
if (((
|
|
4976
|
+
if ((_7 = changes['callAction']) === null || _7 === void 0 ? void 0 : _7.currentValue) {
|
|
4977
|
+
if (((_8 = this.callAction) === null || _8 === void 0 ? void 0 : _8.type) == 'reJoin') {
|
|
4971
4978
|
this.extService.getIpInfo();
|
|
4972
4979
|
this.isCallInProgress = true;
|
|
4973
4980
|
}
|
|
4974
|
-
else if ((
|
|
4975
|
-
this.extensionService.getRemoveParticipants('all', (
|
|
4981
|
+
else if ((_9 = this.callAction) === null || _9 === void 0 ? void 0 : _9.conferenceId) {
|
|
4982
|
+
this.extensionService.getRemoveParticipants('all', (_10 = this.callAction) === null || _10 === void 0 ? void 0 : _10.conferenceId).subscribe((res) => { });
|
|
4976
4983
|
}
|
|
4977
4984
|
}
|
|
4978
4985
|
}
|