@vgroup/dialbox 0.2.80 → 0.2.81
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 +5 -3
- package/esm2020/lib/dialbox.component.mjs +43 -43
- package/fesm2015/vgroup-dialbox.mjs +46 -44
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +46 -44
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2084,6 +2084,7 @@ class CallProgressComponent {
|
|
|
2084
2084
|
if (changes['callData']) {
|
|
2085
2085
|
if ((_a = changes['callData'].currentValue) === null || _a === void 0 ? void 0 : _a.isIncomingCall) {
|
|
2086
2086
|
this.incomingCallDiv = true;
|
|
2087
|
+
this.call['callInfo'] = Object.assign({}, this.callData);
|
|
2087
2088
|
this.cdr.detectChanges();
|
|
2088
2089
|
}
|
|
2089
2090
|
else if (((_b = changes['callData'].currentValue) === null || _b === void 0 ? void 0 : _b.displayNum) || ((_c = changes['callData'].currentValue) === null || _c === void 0 ? void 0 : _c.from)) {
|
|
@@ -2186,7 +2187,7 @@ class CallProgressComponent {
|
|
|
2186
2187
|
conferenceId: this.conferenceId
|
|
2187
2188
|
});
|
|
2188
2189
|
this.callData = Object.assign(Object.assign({}, this.callData), { participantId: (_b = this.addRes) === null || _b === void 0 ? void 0 : _b.participantId });
|
|
2189
|
-
this.call['callInfo'] = this.callData;
|
|
2190
|
+
this.call['callInfo'] = Object.assign({}, this.callData);
|
|
2190
2191
|
console.log('Initial participantId:', (_c = this.addRes) === null || _c === void 0 ? void 0 : _c.participantId);
|
|
2191
2192
|
}
|
|
2192
2193
|
catch (e) {
|
|
@@ -2481,7 +2482,7 @@ class CallProgressComponent {
|
|
|
2481
2482
|
hold: true
|
|
2482
2483
|
});
|
|
2483
2484
|
// Put current call on hold
|
|
2484
|
-
this.heldCall = this.call;
|
|
2485
|
+
this.heldCall = Object.assign({}, this.call);
|
|
2485
2486
|
this.isCallOnHold = true;
|
|
2486
2487
|
this.heldCall.mute(true);
|
|
2487
2488
|
// Close contacts panel and show ring animation
|
|
@@ -2492,6 +2493,7 @@ class CallProgressComponent {
|
|
|
2492
2493
|
.filter(Boolean)
|
|
2493
2494
|
.join(' ');
|
|
2494
2495
|
this.callData = Object.assign(Object.assign({}, this.callData), { phone: phoneNumber, displayNum: phoneNumber, name: contactName || phoneNumber, img: (contact === null || contact === void 0 ? void 0 : contact.img) || 'assets/images/user.jpg' });
|
|
2496
|
+
this.call['callInfo'] = Object.assign({}, this.callData);
|
|
2495
2497
|
this.cdr.detectChanges();
|
|
2496
2498
|
// Get the conference ID from the current call or use the stored one
|
|
2497
2499
|
const conferenceId = this.conferenceId;
|
|
@@ -3099,50 +3101,50 @@ class DialboxComponent {
|
|
|
3099
3101
|
// Ensure Twilio is initialized even when dialpad starts hidden,
|
|
3100
3102
|
// so we can auto-open on incoming calls.
|
|
3101
3103
|
this.initializeTwilio();
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
if (incomingCallData) {
|
|
3108
|
-
if (
|
|
3109
|
-
this._isDialpadHidden
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
this.
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3104
|
+
try {
|
|
3105
|
+
this.incomeingCallSocketService.connect();
|
|
3106
|
+
this.incomeingCallSocketService.listen().subscribe((incomingCallData) => {
|
|
3107
|
+
console.log("WS Event Received:", incomingCallData);
|
|
3108
|
+
console.log("WS Event Received:", incomingCallData.data);
|
|
3109
|
+
if (incomingCallData.type === "/incoming/call") {
|
|
3110
|
+
if (incomingCallData) {
|
|
3111
|
+
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
3112
|
+
this._isDialpadHidden = false;
|
|
3113
|
+
}
|
|
3114
|
+
if (this.isCallInProgress) {
|
|
3115
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
3116
|
+
console.log('325', incomingCallData);
|
|
3117
|
+
this.getUserInformation(incomingCallData);
|
|
3118
|
+
}
|
|
3119
|
+
else {
|
|
3120
|
+
incomingCallData['isFirstCall'] = true;
|
|
3121
|
+
console.log('dd1');
|
|
3122
|
+
this.isCallInProgress = true;
|
|
3123
|
+
this.isDialpadHidden = false;
|
|
3124
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
3125
|
+
console.log('dd2');
|
|
3126
|
+
this.getUserInformation(incomingCallData);
|
|
3127
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
3128
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
3129
|
+
this.callData.isIncomingCall = true;
|
|
3130
|
+
}
|
|
3131
|
+
incomingCallData.on('cancel', () => {
|
|
3132
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3133
|
+
// if(this.incomingCallsList.length == 0){
|
|
3134
|
+
// console.log('dd3')
|
|
3135
|
+
// this.isCallInProgress = false;
|
|
3136
|
+
// }
|
|
3137
|
+
});
|
|
3138
|
+
incomingCallData.on('disconnect', () => {
|
|
3139
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3140
|
+
// if(this.incomingCallsList.length == 0){
|
|
3141
|
+
// console.log('dd4')
|
|
3142
|
+
// this.isCallInProgress = false;
|
|
3143
|
+
// }
|
|
3144
|
+
});
|
|
3127
3145
|
}
|
|
3128
|
-
incomingCallData.on('cancel', () => {
|
|
3129
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3130
|
-
// if(this.incomingCallsList.length == 0){
|
|
3131
|
-
// console.log('dd3')
|
|
3132
|
-
// this.isCallInProgress = false;
|
|
3133
|
-
// }
|
|
3134
|
-
});
|
|
3135
|
-
incomingCallData.on('disconnect', () => {
|
|
3136
|
-
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
3137
|
-
// if(this.incomingCallsList.length == 0){
|
|
3138
|
-
// console.log('dd4')
|
|
3139
|
-
// this.isCallInProgress = false;
|
|
3140
|
-
// }
|
|
3141
|
-
});
|
|
3142
3146
|
}
|
|
3143
|
-
}
|
|
3144
|
-
});
|
|
3145
|
-
try {
|
|
3147
|
+
});
|
|
3146
3148
|
this.token = localStorage.getItem('ext_token') || '';
|
|
3147
3149
|
//this.isCallInProgress = true;
|
|
3148
3150
|
this.getContactList();
|