@vgroup/dialbox 0.1.60 → 0.1.62
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/README.md +6 -6
- package/esm2020/keypad.mjs +45 -0
- package/esm2020/lib/components/call-progress/call-progress.component.mjs +37 -5
- package/esm2020/lib/components/call-progress/incoming-call/incoming-call.component.mjs +14 -6
- package/esm2020/lib/components/caller-id-dialog/caller-id-dialog.component.mjs +20 -13
- package/esm2020/lib/dialbox.component.mjs +1202 -31
- package/esm2020/lib/dialbox.module.mjs +16 -6
- package/esm2020/lib/environments/environments.mjs +1 -1
- package/esm2020/lib/service/{notification.service.mjs → Notification.service.mjs} +1 -1
- package/esm2020/lib/service/extension.service.mjs +1039 -37
- package/esm2020/lib/service/ip-address.service.mjs +1 -1
- package/esm2020/lib/service/twilio.service.mjs +2 -2
- package/esm2020/lib/shared/global-constant.mjs +1 -1
- package/esm2020/public-api.mjs +3 -9
- package/fesm2015/vgroup-dialbox.mjs +2622 -405
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +2408 -200
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +3 -3
- package/lib/components/call-progress/incoming-call/incoming-call.component.d.ts +8 -8
- package/lib/components/caller-id-dialog/caller-id-dialog.component.d.ts +4 -1
- package/lib/dialbox.component.d.ts +114 -6
- package/lib/dialbox.module.d.ts +3 -1
- package/lib/service/extension.service.d.ts +136 -15
- package/lib/service/twilio.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -8
- package/esm2020/lib/dialbox.service.mjs +0 -14
- package/esm2020/lib/keypad.mjs +0 -45
- package/lib/dialbox.service.d.ts +0 -6
- /package/{lib/keypad.d.ts → keypad.d.ts} +0 -0
- /package/lib/service/{notification.service.d.ts → Notification.service.d.ts} +0 -0
|
@@ -1,59 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import * as i4 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { Device } from '@twilio/voice-sdk';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Output, ViewChild, Inject, NgModule } from '@angular/core';
|
|
6
3
|
import swal from 'sweetalert2';
|
|
7
|
-
import {
|
|
4
|
+
import { AsYouType } from 'libphonenumber-js';
|
|
5
|
+
import { throwError, BehaviorSubject, of, interval, Subscription } from 'rxjs';
|
|
8
6
|
import * as i1 from '@angular/common/http';
|
|
9
7
|
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
10
8
|
import { catchError, switchMap, map, tap, shareReplay } from 'rxjs/operators';
|
|
9
|
+
import { Device } from '@twilio/voice-sdk';
|
|
10
|
+
import * as i3$1 from '@angular/material/dialog';
|
|
11
|
+
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
12
|
+
import * as i5 from '@angular/router';
|
|
13
|
+
import { RouterLink, RouterModule } from '@angular/router';
|
|
14
|
+
import * as i4 from '@angular/common';
|
|
15
|
+
import { CommonModule } from '@angular/common';
|
|
11
16
|
import * as i3 from '@angular/forms';
|
|
12
17
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
class DialboxService {
|
|
16
|
-
constructor() { }
|
|
17
|
-
}
|
|
18
|
-
DialboxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
-
DialboxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxService, providedIn: 'root' });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxService, decorators: [{
|
|
21
|
-
type: Injectable,
|
|
22
|
-
args: [{
|
|
23
|
-
providedIn: 'root'
|
|
24
|
-
}]
|
|
25
|
-
}], ctorParameters: function () { return []; } });
|
|
26
|
-
|
|
27
|
-
const environment = {
|
|
28
|
-
abb: "d",
|
|
29
|
-
production: false,
|
|
30
|
-
secureCookies: true,
|
|
31
|
-
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
32
|
-
apiUrl: 'https://apis.vgroupinc.com/test_softphone',
|
|
33
|
-
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
34
|
-
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
35
|
-
sessionTimeout: 15,
|
|
36
|
-
deviceType: "web",
|
|
37
|
-
appVersion: "2.3",
|
|
38
|
-
channelId: '61481b12e138eb7dc3007579',
|
|
39
|
-
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
40
|
-
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
41
|
-
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
42
|
-
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
43
|
-
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
44
|
-
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
45
|
-
firebase: {
|
|
46
|
-
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
47
|
-
authDomain: "softphone-d5777.firebaseapp.com",
|
|
48
|
-
projectId: "softphone-d5777",
|
|
49
|
-
storageBucket: "softphone-d5777.appspot.com",
|
|
50
|
-
messagingSenderId: "850812494538",
|
|
51
|
-
appId: "1:850812494538:web:74f8a30fc18e28ded78a33",
|
|
52
|
-
measurementId: "G-NGXTSV9SH3",
|
|
53
|
-
vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
|
|
54
|
-
},
|
|
55
|
-
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
|
|
56
|
-
};
|
|
18
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
57
19
|
|
|
58
20
|
const keypad = [
|
|
59
21
|
{
|
|
@@ -100,6 +62,37 @@ const keypad = [
|
|
|
100
62
|
}
|
|
101
63
|
];
|
|
102
64
|
|
|
65
|
+
const environment = {
|
|
66
|
+
abb: "d",
|
|
67
|
+
production: false,
|
|
68
|
+
secureCookies: true,
|
|
69
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
70
|
+
apiUrl: 'https://apis.vgroupinc.com/test_softphone',
|
|
71
|
+
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
72
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
73
|
+
sessionTimeout: 15,
|
|
74
|
+
deviceType: "web",
|
|
75
|
+
appVersion: "2.3",
|
|
76
|
+
channelId: '61481b12e138eb7dc3007579',
|
|
77
|
+
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
78
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
79
|
+
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
80
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
81
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
82
|
+
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
83
|
+
firebase: {
|
|
84
|
+
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
85
|
+
authDomain: "softphone-d5777.firebaseapp.com",
|
|
86
|
+
projectId: "softphone-d5777",
|
|
87
|
+
storageBucket: "softphone-d5777.appspot.com",
|
|
88
|
+
messagingSenderId: "850812494538",
|
|
89
|
+
appId: "1:850812494538:web:74f8a30fc18e28ded78a33",
|
|
90
|
+
measurementId: "G-NGXTSV9SH3",
|
|
91
|
+
vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
|
|
92
|
+
},
|
|
93
|
+
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
|
|
94
|
+
};
|
|
95
|
+
|
|
103
96
|
class IpAddressService {
|
|
104
97
|
constructor(http) {
|
|
105
98
|
this.http = http;
|
|
@@ -126,6 +119,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
126
119
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
127
120
|
|
|
128
121
|
class ExtensionService {
|
|
122
|
+
setCallSid(callSid, recordCall) {
|
|
123
|
+
this.callSid = callSid;
|
|
124
|
+
this.recordCall = recordCall;
|
|
125
|
+
}
|
|
126
|
+
getCallSid() {
|
|
127
|
+
return {
|
|
128
|
+
callSid: this.callSid,
|
|
129
|
+
recordCall: this.recordCall
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
setCallerId(callerId) {
|
|
133
|
+
this.callerIdSubject.next(callerId);
|
|
134
|
+
}
|
|
129
135
|
constructor(http, ipAddressService) {
|
|
130
136
|
this.http = http;
|
|
131
137
|
this.ipAddressService = ipAddressService;
|
|
@@ -149,130 +155,1009 @@ class ExtensionService {
|
|
|
149
155
|
this.callerIdSubject = new BehaviorSubject(null);
|
|
150
156
|
this.callerId$ = this.callerIdSubject.asObservable();
|
|
151
157
|
}
|
|
152
|
-
|
|
153
|
-
this.
|
|
154
|
-
|
|
158
|
+
changeMessage(message) {
|
|
159
|
+
this.messageSource.next(message);
|
|
160
|
+
}
|
|
161
|
+
GetUserUsage(token) {
|
|
162
|
+
const params = {
|
|
163
|
+
'Content-Type': 'application/json',
|
|
164
|
+
'Auth-Key': "Bearer " + token
|
|
165
|
+
};
|
|
166
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
167
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/usage', httpOptions);
|
|
168
|
+
}
|
|
169
|
+
GetUserProfile(token, data) {
|
|
170
|
+
const params = {
|
|
171
|
+
'Content-Type': 'application/json',
|
|
172
|
+
'Auth-Key': "Bearer " + token
|
|
173
|
+
};
|
|
174
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
175
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/user', data, httpOptions);
|
|
176
|
+
}
|
|
177
|
+
UpdateProfile(userProfile, token) {
|
|
178
|
+
const userProfileObj = {
|
|
179
|
+
"billingAddress1": userProfile.billingAddress1,
|
|
180
|
+
"billingAddress2": userProfile.billingAddress2,
|
|
181
|
+
"billingCityid": userProfile.billingCity,
|
|
182
|
+
"billingCountryid": userProfile.billingCountry,
|
|
183
|
+
"billingStateid": userProfile.billingState,
|
|
184
|
+
"billingZipid": userProfile.billingZip,
|
|
185
|
+
"email": userProfile.email,
|
|
186
|
+
"mobile": userProfile.mobile,
|
|
187
|
+
"countrycode": userProfile.countrycode,
|
|
188
|
+
"timezone": userProfile.timezone,
|
|
189
|
+
"firstname": userProfile.firstname,
|
|
190
|
+
"lastname": userProfile.lastname,
|
|
191
|
+
"shippingAddress1": (userProfile.shippingAddress1 !== null && userProfile.shippingAddress1 !== undefined && userProfile.shippingAddress1 !== "") ? userProfile.shippingAddress1 : userProfile.billingAddress1,
|
|
192
|
+
"shippingAddress2": (userProfile.shippingAddress2 !== null && userProfile.shippingAddress2 !== undefined && userProfile.shippingAddress2 !== "") ? userProfile.shippingAddress2 : userProfile.billingAddress2,
|
|
193
|
+
"shippingCityid": (userProfile.shippingCity !== null && userProfile.shippingCity !== undefined && userProfile.shippingCity !== "") ? userProfile.shippingCity : userProfile.billingCity,
|
|
194
|
+
"shippingCountryid": (userProfile.shippingCountry !== null && userProfile.shippingCountry !== undefined && userProfile.shippingCountry !== "") ? userProfile.shippingCountry : userProfile.billingCountry,
|
|
195
|
+
"shippingStateid": (userProfile.shippingState !== null && userProfile.shippingState !== undefined && userProfile.shippingState !== "") ? userProfile.shippingState : userProfile.billingState,
|
|
196
|
+
"shippingZipid": (userProfile.shippingZip !== null && userProfile.shippingZip !== undefined && userProfile.shippingZip !== "") ? userProfile.shippingZip : userProfile.billingZip,
|
|
197
|
+
"imageId": (userProfile.imageId),
|
|
198
|
+
"imageName": (userProfile.imageName),
|
|
199
|
+
"companyName": userProfile.companyName,
|
|
200
|
+
"companySize": userProfile.companySize,
|
|
201
|
+
"companyFirstName": userProfile.companyFirstName,
|
|
202
|
+
"companyLastName": userProfile.companyLastName,
|
|
203
|
+
"companyContactNumber": userProfile.companyContactNumber
|
|
204
|
+
};
|
|
205
|
+
const params = {
|
|
206
|
+
'Content-Type': 'application/json',
|
|
207
|
+
'Auth-Key': "Bearer " + token
|
|
208
|
+
};
|
|
209
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
210
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update', userProfileObj, httpOptions);
|
|
211
|
+
}
|
|
212
|
+
deleteProfilePhoto(token) {
|
|
213
|
+
const params = {
|
|
214
|
+
'Auth-Key': "Bearer " + token
|
|
215
|
+
};
|
|
216
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
217
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/delete/profile/photo', params, httpOptions);
|
|
218
|
+
}
|
|
219
|
+
getOtpCode(countryCode, number, mode, token) {
|
|
220
|
+
const params = {
|
|
221
|
+
'Content-Type': 'application/json',
|
|
222
|
+
'Auth-Key': "Bearer " + token
|
|
223
|
+
};
|
|
224
|
+
const numberObj = {
|
|
225
|
+
"countrycode": countryCode,
|
|
226
|
+
"number": number,
|
|
227
|
+
"mode": mode
|
|
228
|
+
};
|
|
229
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
230
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/sms/otp', numberObj, httpOptions);
|
|
231
|
+
}
|
|
232
|
+
getVerifyMobile(countryName, countrycode, number, otp, token) {
|
|
233
|
+
const params = {
|
|
234
|
+
'Content-Type': 'application/json',
|
|
235
|
+
'Auth-Key': "Bearer " + token
|
|
236
|
+
};
|
|
237
|
+
const verifyObj = {
|
|
238
|
+
"countryName": countryName,
|
|
239
|
+
"countrycode": countrycode,
|
|
240
|
+
"number": number,
|
|
241
|
+
"otp": otp
|
|
242
|
+
};
|
|
243
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
244
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/sms/verify/otp', verifyObj, httpOptions);
|
|
245
|
+
}
|
|
246
|
+
connectWithStripe(token) {
|
|
247
|
+
const params = {
|
|
248
|
+
'Auth-Key': "Bearer " + token
|
|
249
|
+
};
|
|
250
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
251
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/stripe/connect', params, httpOptions);
|
|
252
|
+
}
|
|
253
|
+
connectWithStripeRedirection(redirection, token) {
|
|
254
|
+
const params = {
|
|
255
|
+
'Auth-Key': "Bearer " + token,
|
|
256
|
+
"redirection": redirection
|
|
257
|
+
};
|
|
258
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
259
|
+
return this.http.post(environment.apiUrl + `/utilities/ext/stripe/connect/${redirection}`, params, httpOptions);
|
|
260
|
+
}
|
|
261
|
+
validateStripeSession(sessionId, token) {
|
|
262
|
+
const params = {
|
|
263
|
+
'Content-Type': 'application/json',
|
|
264
|
+
'Auth-Key': "Bearer " + token
|
|
265
|
+
};
|
|
266
|
+
const data = {
|
|
267
|
+
"sessionid": sessionId,
|
|
268
|
+
};
|
|
269
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
270
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/validate/session', data, httpOptions);
|
|
271
|
+
}
|
|
272
|
+
loadPaymentMethods(token) {
|
|
273
|
+
const params = {
|
|
274
|
+
'Content-Type': 'application/json',
|
|
275
|
+
'Auth-Key': "Bearer " + token
|
|
276
|
+
};
|
|
277
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
278
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/payment/methods', httpOptions);
|
|
279
|
+
}
|
|
280
|
+
setPaymentDefaultMethod(paymentMethodId, token) {
|
|
281
|
+
const params = {
|
|
282
|
+
'Content-Type': 'application/json',
|
|
283
|
+
'Auth-Key': "Bearer " + token
|
|
284
|
+
};
|
|
285
|
+
const data = {
|
|
286
|
+
"methodid": paymentMethodId,
|
|
287
|
+
};
|
|
288
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
289
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/default', data, httpOptions);
|
|
290
|
+
}
|
|
291
|
+
sendEmailVerifyLink(emailval, token) {
|
|
292
|
+
const params = {
|
|
293
|
+
'Auth-Key': "Bearer " + token,
|
|
294
|
+
"email": emailval
|
|
295
|
+
};
|
|
296
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
297
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/verify/email', params, httpOptions);
|
|
298
|
+
}
|
|
299
|
+
VerifyEmailLink(key) {
|
|
300
|
+
const keyobj = { "key": key };
|
|
301
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
302
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/verify/request', keyobj, httpOptions);
|
|
303
|
+
}
|
|
304
|
+
DeleteMethod(paymentMethodId, token) {
|
|
305
|
+
const params = {
|
|
306
|
+
'Content-Type': 'application/json',
|
|
307
|
+
'Auth-Key': "Bearer " + token
|
|
308
|
+
};
|
|
309
|
+
const data = {
|
|
310
|
+
"methodid": paymentMethodId,
|
|
311
|
+
};
|
|
312
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
313
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/detach/method', data, httpOptions);
|
|
314
|
+
}
|
|
315
|
+
VerifySession(token) {
|
|
316
|
+
const params = {
|
|
317
|
+
'Content-Type': 'application/json',
|
|
318
|
+
'Auth-Key': "Bearer " + token
|
|
319
|
+
};
|
|
320
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
321
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/verify/session', httpOptions);
|
|
322
|
+
}
|
|
323
|
+
GetAllCountryList() {
|
|
324
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
325
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
|
|
326
|
+
}
|
|
327
|
+
GetAllStateList(_countryId) {
|
|
328
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
329
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/statelist/' + _countryId, httpOptions);
|
|
330
|
+
}
|
|
331
|
+
LogoutUser(authKey) {
|
|
332
|
+
const auth = { "Auth-Key": authKey };
|
|
333
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': authKey }) };
|
|
334
|
+
return this.http.post(environment.apiUrl + '/client/user/logout', auth, httpOptions);
|
|
335
|
+
}
|
|
336
|
+
purchasedNumber(token) {
|
|
337
|
+
const params = {
|
|
338
|
+
'Content-Type': 'application/json',
|
|
339
|
+
'Auth-Key': "Bearer " + token
|
|
340
|
+
};
|
|
341
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
342
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/view/purchased/number', httpOptions);
|
|
343
|
+
}
|
|
344
|
+
availableNumber(token, dtModel) {
|
|
345
|
+
const params = {
|
|
346
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
347
|
+
'Auth-Key': "Bearer " + token
|
|
348
|
+
};
|
|
349
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
350
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/available/number', dtModel, httpOptions);
|
|
351
|
+
}
|
|
352
|
+
urAvailableNumber(token, dtModel) {
|
|
353
|
+
const params = {
|
|
354
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
355
|
+
};
|
|
356
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
357
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/ur/available/number', dtModel, httpOptions);
|
|
358
|
+
}
|
|
359
|
+
stagingNumber(token, dtModel) {
|
|
360
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
361
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/staging/number', dtModel, httpOptions);
|
|
362
|
+
}
|
|
363
|
+
saveCompanyDetail(dtModel) {
|
|
364
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
365
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/company/details', dtModel, httpOptions);
|
|
366
|
+
}
|
|
367
|
+
saveAddressInfo(dtModel) {
|
|
368
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
369
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/address', dtModel, httpOptions);
|
|
370
|
+
}
|
|
371
|
+
saveStripeInfo(userId) {
|
|
372
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
373
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/stripe/connect/' + userId, httpOptions);
|
|
374
|
+
}
|
|
375
|
+
saveCardInfo(dtModel) {
|
|
376
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
377
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/card/info', dtModel, httpOptions);
|
|
378
|
+
}
|
|
379
|
+
deleteCard(dtModel) {
|
|
380
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
381
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/delete/saved/card', dtModel, httpOptions);
|
|
382
|
+
}
|
|
383
|
+
purchasePlan(dtModel) {
|
|
384
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
385
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/ur/purchase/signup/number', dtModel, httpOptions);
|
|
386
|
+
}
|
|
387
|
+
getUserStagingInfo(data) {
|
|
388
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
389
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/staging', data, httpOptions);
|
|
390
|
+
}
|
|
391
|
+
costCheckOut(token, cost) {
|
|
392
|
+
const params = {
|
|
393
|
+
'Content-Type': 'application/json',
|
|
394
|
+
'Auth-Key': "Bearer " + token
|
|
395
|
+
};
|
|
396
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
397
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/number/checkout/' + cost, httpOptions);
|
|
398
|
+
}
|
|
399
|
+
buyNumber(token, dtModel) {
|
|
400
|
+
const params = {
|
|
401
|
+
'Content-Type': 'application/json',
|
|
402
|
+
'Auth-Key': "Bearer " + token
|
|
403
|
+
};
|
|
404
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
405
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/purchase/number', dtModel, httpOptions);
|
|
406
|
+
}
|
|
407
|
+
fetchCallerId(token) {
|
|
408
|
+
const params = {
|
|
409
|
+
'Content-Type': 'application/json',
|
|
410
|
+
'Auth-Key': "Bearer " + token
|
|
411
|
+
};
|
|
412
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
413
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/fetch/callerid', httpOptions);
|
|
414
|
+
}
|
|
415
|
+
updateNumberLabel(token, dtModel) {
|
|
416
|
+
const params = {
|
|
417
|
+
'Content-Type': 'application/json',
|
|
418
|
+
'Auth-Key': "Bearer " + token
|
|
419
|
+
};
|
|
420
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
421
|
+
return this.http.put(environment.apiUrl + '/utilities/softphone/update/number/label', dtModel, httpOptions);
|
|
422
|
+
}
|
|
423
|
+
releaseNumber(token, twilioNum) {
|
|
424
|
+
const params = {
|
|
425
|
+
'Content-Type': 'application/json',
|
|
426
|
+
'Auth-Key': "Bearer " + token
|
|
427
|
+
};
|
|
428
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
429
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/softphone/delete/twilio/number', httpOptions);
|
|
430
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/delete/twilio/number/' + twilioNum, httpOptions);
|
|
431
|
+
}
|
|
432
|
+
// Call forwarding api's
|
|
433
|
+
sendOTP(token, dtModel) {
|
|
434
|
+
const params = {
|
|
435
|
+
'Content-Type': 'application/json',
|
|
436
|
+
'Auth-Key': "Bearer " + token
|
|
437
|
+
};
|
|
438
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
439
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/send/otp', dtModel, httpOptions);
|
|
440
|
+
}
|
|
441
|
+
verifyOTP(token, dtModel) {
|
|
442
|
+
const params = {
|
|
443
|
+
'Content-Type': 'application/json',
|
|
444
|
+
'Auth-Key': "Bearer " + token
|
|
445
|
+
};
|
|
446
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
447
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/verify/otp', dtModel, httpOptions);
|
|
448
|
+
}
|
|
449
|
+
updateCallForwarding(token, dtModel) {
|
|
450
|
+
const params = {
|
|
451
|
+
'Content-Type': 'application/json',
|
|
452
|
+
'Auth-Key': "Bearer " + token
|
|
453
|
+
};
|
|
454
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
455
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/configure/call/forwarding', dtModel, httpOptions);
|
|
456
|
+
}
|
|
457
|
+
getSingleNumForwardingSetting(token, number) {
|
|
458
|
+
const params = {
|
|
459
|
+
'Content-Type': 'application/json',
|
|
460
|
+
'Auth-Key': "Bearer " + token
|
|
461
|
+
};
|
|
462
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
463
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/view/call/forwarding/' + number, httpOptions);
|
|
464
|
+
}
|
|
465
|
+
deleteCallForwarding(token, dtModel) {
|
|
466
|
+
const params = {
|
|
467
|
+
'Content-Type': 'application/json',
|
|
468
|
+
'Auth-Key': "Bearer " + token
|
|
469
|
+
};
|
|
470
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
471
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/call/forwarding/action', dtModel, httpOptions);
|
|
472
|
+
}
|
|
473
|
+
//calling prefernece api
|
|
474
|
+
displayID(token) {
|
|
475
|
+
const params = {
|
|
476
|
+
'Content-Type': 'application/json',
|
|
477
|
+
'Auth-Key': "Bearer " + token
|
|
478
|
+
};
|
|
479
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
480
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/display/callerids', httpOptions);
|
|
481
|
+
}
|
|
482
|
+
verifyNumber(token, dtModel) {
|
|
483
|
+
const params = {
|
|
484
|
+
'Content-Type': 'application/json',
|
|
485
|
+
'Auth-Key': "Bearer " + token
|
|
486
|
+
};
|
|
487
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
488
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/add/callerid', dtModel, httpOptions);
|
|
489
|
+
}
|
|
490
|
+
verifyStatus(token, dtModel) {
|
|
491
|
+
const params = {
|
|
492
|
+
'Content-Type': 'application/json',
|
|
493
|
+
'Auth-Key': "Bearer " + token
|
|
494
|
+
};
|
|
495
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
496
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/callerid/status/' + dtModel, httpOptions);
|
|
497
|
+
}
|
|
498
|
+
existingListmakeCallerID(token, dtModel) {
|
|
499
|
+
const params = {
|
|
500
|
+
'Content-Type': 'application/json',
|
|
501
|
+
'Auth-Key': "Bearer " + token
|
|
502
|
+
};
|
|
503
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
504
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/make/callerid', dtModel, httpOptions);
|
|
505
|
+
}
|
|
506
|
+
makeCallerID(token, dtModel, number) {
|
|
507
|
+
const params = {
|
|
508
|
+
'Content-Type': 'application/json',
|
|
509
|
+
'Auth-Key': "Bearer " + token
|
|
510
|
+
};
|
|
511
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
512
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/markas/callerid/${number}`, dtModel, httpOptions);
|
|
513
|
+
}
|
|
514
|
+
deleteCallerID(token, dtModel, id) {
|
|
515
|
+
const params = {
|
|
516
|
+
'Content-Type': 'application/json',
|
|
517
|
+
'Auth-Key': "Bearer " + token
|
|
518
|
+
};
|
|
519
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
520
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/delete/callerid/${id}`, dtModel, httpOptions);
|
|
521
|
+
}
|
|
522
|
+
deregisterCallerID(token, dtModel, id) {
|
|
523
|
+
const params = {
|
|
524
|
+
'Content-Type': 'application/json',
|
|
525
|
+
'Auth-Key': "Bearer " + token
|
|
526
|
+
};
|
|
527
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
528
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/deregister/callerid/${id}`, dtModel, httpOptions);
|
|
529
|
+
}
|
|
530
|
+
updateCallerIDLabel(token, dtModel) {
|
|
531
|
+
const params = {
|
|
532
|
+
'Content-Type': 'application/json',
|
|
533
|
+
'Auth-Key': "Bearer " + token
|
|
534
|
+
};
|
|
535
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
536
|
+
return this.http.put(environment.apiUrl + '/utilities/softphone/update/callerid/label', dtModel, httpOptions);
|
|
537
|
+
}
|
|
538
|
+
initiateCall(payload) {
|
|
539
|
+
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
540
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap(ipAddressInfo => {
|
|
541
|
+
const params = {
|
|
542
|
+
'Content-Type': 'application/json',
|
|
543
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
544
|
+
'ip-address': ipAddressInfo.ip,
|
|
545
|
+
'ip-country': ipAddressInfo.address.country,
|
|
546
|
+
};
|
|
547
|
+
payload = { ...payload, proxy: ipAddressInfo.proxy.toString() };
|
|
548
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
549
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(catchError(error => {
|
|
550
|
+
return throwError(error);
|
|
551
|
+
}));
|
|
552
|
+
}), catchError(error => {
|
|
553
|
+
// Catch error from getIpAddressInfo
|
|
554
|
+
return throwError(error);
|
|
555
|
+
}));
|
|
556
|
+
}));
|
|
557
|
+
}
|
|
558
|
+
fetchBlockedCountries() {
|
|
559
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/blacklisted/countrylist').pipe(map(response => {
|
|
560
|
+
if (response.response === 'Success' && Array.isArray(response.countries)) {
|
|
561
|
+
return response.countries.map((country) => country.isocode);
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
throw new Error('Unable to fetch blocked countries');
|
|
565
|
+
}
|
|
566
|
+
}));
|
|
567
|
+
}
|
|
568
|
+
// initiateCall(payload: any): Observable<any> {
|
|
569
|
+
// return this.ipAddressService.getIpAddressInfo().pipe(
|
|
570
|
+
// switchMap(ipAddressInfo => {
|
|
571
|
+
// const params = {
|
|
572
|
+
// 'Content-Type': 'application/json',
|
|
573
|
+
// 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
574
|
+
// 'ip-address': ipAddressInfo.ip,
|
|
575
|
+
// 'ip-country': ipAddressInfo.address.country
|
|
576
|
+
// };
|
|
577
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
578
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions);
|
|
579
|
+
// })
|
|
580
|
+
// );
|
|
581
|
+
// }
|
|
582
|
+
getIncomingCallToken(deviceId) {
|
|
583
|
+
const headers = {
|
|
584
|
+
'Content-Type': 'application/json',
|
|
585
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
586
|
+
};
|
|
587
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
588
|
+
const params = new HttpParams().set('deviceId', deviceId);
|
|
589
|
+
return this.http.get(environment.apiUrl + '/utilities/twilio/incomingcall/token/web', { headers, params });
|
|
590
|
+
}
|
|
591
|
+
getOutgoingCallToken(payload) {
|
|
592
|
+
const params = {
|
|
593
|
+
'Content-Type': 'application/json',
|
|
594
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token'),
|
|
595
|
+
'c2c-request': window.location.hostname
|
|
596
|
+
};
|
|
597
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
598
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/generate/token', payload, httpOptions);
|
|
599
|
+
}
|
|
600
|
+
getCallRecording(callSid) {
|
|
601
|
+
const headers = new HttpHeaders({
|
|
602
|
+
'Content-Type': 'application/json',
|
|
603
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
604
|
+
});
|
|
605
|
+
const httpOptions = { headers: headers };
|
|
606
|
+
return this.http.post(environment.apiUrl + '/utilities/twilio/call/callrecording?callSid=' + callSid, {}, httpOptions);
|
|
607
|
+
}
|
|
608
|
+
pauseOrResumeRecording(callSid, status) {
|
|
609
|
+
const headers = new HttpHeaders({
|
|
610
|
+
'Content-Type': 'application/json',
|
|
611
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
612
|
+
});
|
|
613
|
+
const httpOptions = { headers: headers };
|
|
614
|
+
return this.http.post(environment.apiUrl + `/utilities/twilio/update/recording/status?callSid=${callSid}&status=${status}`, {}, httpOptions);
|
|
615
|
+
}
|
|
616
|
+
getCallStatus(callAuthId) {
|
|
617
|
+
const headers = new HttpHeaders({
|
|
618
|
+
'Content-Type': 'application/json',
|
|
619
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
620
|
+
});
|
|
621
|
+
const httpOptions = { headers: headers };
|
|
622
|
+
return this.http.get(environment.apiUrl + `/utilities/twilio/call/status/${callAuthId}`, httpOptions);
|
|
623
|
+
}
|
|
624
|
+
//sms api
|
|
625
|
+
sendSms(c2c_latlong, c2c_request, dtModel) {
|
|
626
|
+
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
627
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
628
|
+
if (blockedCountries.includes(ipAddressInfo.address.countryCode)) {
|
|
629
|
+
return throwError({ message: ['User from blocked country'] });
|
|
630
|
+
}
|
|
631
|
+
else {
|
|
632
|
+
const params = {
|
|
633
|
+
'Content-Type': 'application/json',
|
|
634
|
+
'c2c-latlong': c2c_latlong,
|
|
635
|
+
'c2c-request': c2c_request,
|
|
636
|
+
'ip-address': ipAddressInfo.ip,
|
|
637
|
+
'ip-country': ipAddressInfo.address.country,
|
|
638
|
+
};
|
|
639
|
+
dtModel = { ...dtModel, proxy: ipAddressInfo.proxy.toString() };
|
|
640
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
641
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions).pipe(catchError(error => {
|
|
642
|
+
// Handle HTTP errors here if needed
|
|
643
|
+
return throwError(error);
|
|
644
|
+
}));
|
|
645
|
+
}
|
|
646
|
+
}), catchError(error => {
|
|
647
|
+
// Catch error from getIpAddressInfo
|
|
648
|
+
return throwError(error);
|
|
649
|
+
}));
|
|
650
|
+
}), catchError(error => {
|
|
651
|
+
// Catch error from fetchBlockedCountries
|
|
652
|
+
return throwError(error);
|
|
653
|
+
}));
|
|
654
|
+
}
|
|
655
|
+
// sendSms(c2c_latlong: string, c2c_request: string, dtModel: any): Observable<any> {
|
|
656
|
+
// return this.ipAddressService.getIpAddressInfo().pipe(
|
|
657
|
+
// switchMap(ipAddressInfo => {
|
|
658
|
+
// const params = {
|
|
659
|
+
// 'Content-Type': 'application/json',
|
|
660
|
+
// 'c2c-latlong': c2c_latlong,
|
|
661
|
+
// 'c2c-request': c2c_request,
|
|
662
|
+
// 'ip-address': ipAddressInfo.ip,
|
|
663
|
+
// 'ip-country': ipAddressInfo.address.country
|
|
664
|
+
// };
|
|
665
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
666
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions);
|
|
667
|
+
// })
|
|
668
|
+
// );
|
|
669
|
+
// }
|
|
670
|
+
readContacts(token) {
|
|
671
|
+
const params = {
|
|
672
|
+
'Content-Type': 'application/json',
|
|
673
|
+
'Auth-Key': "Bearer " + token
|
|
674
|
+
};
|
|
675
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
676
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
|
|
677
|
+
}
|
|
678
|
+
sentSMS(token, pageSize, pageIndex) {
|
|
679
|
+
const headers = {
|
|
680
|
+
'Content-Type': 'application/json',
|
|
681
|
+
'Auth-Key': "Bearer " + token,
|
|
682
|
+
};
|
|
683
|
+
let params = new HttpParams();
|
|
684
|
+
params = params.set('size', pageSize || '10');
|
|
685
|
+
params = params.set('page', pageIndex || '1');
|
|
686
|
+
const httpOptions = { headers, params };
|
|
687
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/sent/', httpOptions);
|
|
688
|
+
}
|
|
689
|
+
deleteSMS(token, recordIds, dtModel) {
|
|
690
|
+
const params = {
|
|
691
|
+
'Content-Type': 'application/json',
|
|
692
|
+
'Auth-Key': "Bearer " + token
|
|
693
|
+
};
|
|
694
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
695
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/delete/${recordIds}`, dtModel, httpOptions);
|
|
696
|
+
}
|
|
697
|
+
// inboxSMS(token: string) {
|
|
698
|
+
// const params = {
|
|
699
|
+
// 'Content-Type': 'application/json',
|
|
700
|
+
// 'Auth-Key': "Bearer " + token
|
|
701
|
+
// }
|
|
702
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
703
|
+
// return this.http.get<[]>(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
|
|
704
|
+
// }
|
|
705
|
+
inboxSMS(token, page, size) {
|
|
706
|
+
const params = new HttpParams()
|
|
707
|
+
.set('page', page.toString())
|
|
708
|
+
.set('size', size.toString());
|
|
709
|
+
const httpOptions = {
|
|
710
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
711
|
+
params: params
|
|
712
|
+
};
|
|
713
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
|
|
714
|
+
}
|
|
715
|
+
readInboxStatus(token, recordId, dtModel) {
|
|
716
|
+
const params = {
|
|
717
|
+
'Content-Type': 'application/json',
|
|
718
|
+
'Auth-Key': "Bearer " + token
|
|
719
|
+
};
|
|
720
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
721
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/markas/read/${recordId}`, dtModel, httpOptions);
|
|
722
|
+
}
|
|
723
|
+
markAsFavourite(token, recordIds, dtModel) {
|
|
724
|
+
const params = {
|
|
725
|
+
'Content-Type': 'application/json',
|
|
726
|
+
'Auth-Key': "Bearer " + token
|
|
727
|
+
};
|
|
728
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
729
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/mark/favourite/${recordIds}`, dtModel, httpOptions);
|
|
730
|
+
}
|
|
731
|
+
markAsUnFavourite(token, recordIds, dtModel) {
|
|
732
|
+
const params = {
|
|
733
|
+
'Content-Type': 'application/json',
|
|
734
|
+
'Auth-Key': "Bearer " + token
|
|
735
|
+
};
|
|
736
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
737
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/mark/unfavourite/${recordIds}`, dtModel, httpOptions);
|
|
738
|
+
}
|
|
739
|
+
viewfavouriteSMS(token, page, size) {
|
|
740
|
+
const params = new HttpParams()
|
|
741
|
+
.set('page', page.toString())
|
|
742
|
+
.set('size', size.toString());
|
|
743
|
+
const httpOptions = {
|
|
744
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
745
|
+
params: params
|
|
746
|
+
};
|
|
747
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/view/favourite', httpOptions);
|
|
748
|
+
}
|
|
749
|
+
saveDraft(token, dtModel) {
|
|
750
|
+
const params = {
|
|
751
|
+
'Content-Type': 'application/json',
|
|
752
|
+
'Auth-Key': "Bearer " + token
|
|
753
|
+
};
|
|
754
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
755
|
+
return this.http.post(environment.apiUrl + '/utilities/sms/save/draft', dtModel, httpOptions);
|
|
756
|
+
}
|
|
757
|
+
viewDraft(token, page, size) {
|
|
758
|
+
const params = new HttpParams()
|
|
759
|
+
.set('page', page.toString())
|
|
760
|
+
.set('size', size.toString());
|
|
761
|
+
const httpOptions = {
|
|
762
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
763
|
+
params: params
|
|
764
|
+
};
|
|
765
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/view/draft', httpOptions);
|
|
766
|
+
}
|
|
767
|
+
deleteDraftSMS(token, draftIds, dtModel) {
|
|
768
|
+
const params = {
|
|
769
|
+
'Content-Type': 'application/json',
|
|
770
|
+
'Auth-Key': "Bearer " + token
|
|
771
|
+
};
|
|
772
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
773
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/delete/draft/${draftIds}`, dtModel, httpOptions);
|
|
774
|
+
}
|
|
775
|
+
//Address Book
|
|
776
|
+
viewContactLists(token) {
|
|
777
|
+
const params = {
|
|
778
|
+
'Content-Type': 'application/json',
|
|
779
|
+
'Auth-Key': "Bearer " + token
|
|
780
|
+
};
|
|
781
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
782
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
|
|
783
|
+
}
|
|
784
|
+
deleteContact(token, phonebookid, dtModel) {
|
|
785
|
+
const params = {
|
|
786
|
+
'Content-Type': 'application/json',
|
|
787
|
+
'Auth-Key': "Bearer " + token
|
|
788
|
+
};
|
|
789
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
790
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/contact/${phonebookid}`, dtModel, httpOptions);
|
|
791
|
+
}
|
|
792
|
+
updateFavContacts(token, dtModel) {
|
|
793
|
+
const params = {
|
|
794
|
+
'Content-Type': 'application/json',
|
|
795
|
+
'Auth-Key': "Bearer " + token
|
|
796
|
+
};
|
|
797
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
798
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/favourite', dtModel, httpOptions);
|
|
799
|
+
}
|
|
800
|
+
// saveContacts(token: string, dtModel: any){
|
|
801
|
+
// const params = {
|
|
802
|
+
// 'Content-Type': 'application/json',
|
|
803
|
+
// 'Auth-Key': "Bearer " + token
|
|
804
|
+
// }
|
|
805
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
806
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/phonebook/add/contacts/manually',dtModel, httpOptions);
|
|
807
|
+
// }
|
|
808
|
+
uploadImage(token, dtModel) {
|
|
809
|
+
const params = {
|
|
810
|
+
//'Content-Type': 'multipart/form-data',
|
|
811
|
+
'Auth-Key': "Bearer " + token
|
|
812
|
+
};
|
|
813
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
814
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', dtModel, httpOptions);
|
|
815
|
+
}
|
|
816
|
+
//Call Histroy
|
|
817
|
+
recentCallHistory(token, page, size) {
|
|
818
|
+
const params = new HttpParams()
|
|
819
|
+
.set('page', page.toString())
|
|
820
|
+
.set('size', size.toString());
|
|
821
|
+
const httpOptions = {
|
|
822
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
823
|
+
params: params
|
|
824
|
+
};
|
|
825
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/recent/calls', httpOptions);
|
|
826
|
+
}
|
|
827
|
+
deleteCalls(token, recordId, dtModel) {
|
|
828
|
+
const params = {
|
|
829
|
+
'Content-Type': 'application/json',
|
|
830
|
+
'Auth-Key': "Bearer " + token
|
|
831
|
+
};
|
|
832
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
833
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/calls/${recordId}`, dtModel, httpOptions);
|
|
834
|
+
}
|
|
835
|
+
//SMS History
|
|
836
|
+
recentSMSHistory(token, page, size) {
|
|
837
|
+
const params = new HttpParams()
|
|
838
|
+
.set('page', page.toString())
|
|
839
|
+
.set('size', size.toString());
|
|
840
|
+
const httpOptions = {
|
|
841
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
842
|
+
params: params
|
|
843
|
+
};
|
|
844
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/history', httpOptions);
|
|
845
|
+
}
|
|
846
|
+
getRecentVoiceRecordingData(token, filterData, page, size) {
|
|
847
|
+
const params = new HttpParams()
|
|
848
|
+
.set('page', page.toString())
|
|
849
|
+
.set('size', size.toString());
|
|
850
|
+
const httpOptions = {
|
|
851
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
852
|
+
params: params
|
|
853
|
+
};
|
|
854
|
+
const filterObj = {};
|
|
855
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/recent/voicerecording', filterData, httpOptions);
|
|
856
|
+
}
|
|
857
|
+
// save voice mail recording
|
|
858
|
+
saveVoiceMailReocrding(token, recordingData) {
|
|
859
|
+
const httpOptions = {
|
|
860
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
861
|
+
// params: params
|
|
862
|
+
};
|
|
863
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/recording', recordingData, httpOptions);
|
|
864
|
+
}
|
|
865
|
+
deleteVoiceRecording(token, recordingId) {
|
|
866
|
+
const httpOptions = {
|
|
867
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
868
|
+
// params: params
|
|
869
|
+
};
|
|
870
|
+
return this.http.delete(environment.apiUrl + `/utilities/phonebook/delete/voicerecordings/${recordingId}`, httpOptions);
|
|
871
|
+
}
|
|
872
|
+
markAsVoiceRecording(token, recordingId, dtModel) {
|
|
873
|
+
const httpOptions = {
|
|
874
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
875
|
+
};
|
|
876
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/markas/voicemail/read/${recordingId}`, dtModel, httpOptions);
|
|
877
|
+
}
|
|
878
|
+
editContactById(token, id) {
|
|
879
|
+
const params = {
|
|
880
|
+
'Content-Type': 'application/json',
|
|
881
|
+
'Auth-Key': "Bearer " + token
|
|
882
|
+
};
|
|
883
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
884
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/search/contactid/' + id, httpOptions);
|
|
885
|
+
}
|
|
886
|
+
updateContacts(token, dtModel) {
|
|
887
|
+
const params = {
|
|
888
|
+
'Content-Type': 'application/json',
|
|
889
|
+
'Auth-Key': "Bearer " + token
|
|
890
|
+
};
|
|
891
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
892
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/contact', dtModel, httpOptions);
|
|
893
|
+
}
|
|
894
|
+
uploadPhoto(payload) {
|
|
895
|
+
let httpOptions = {
|
|
896
|
+
headers: new HttpHeaders({
|
|
897
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
898
|
+
})
|
|
899
|
+
};
|
|
900
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', payload, httpOptions);
|
|
155
901
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
902
|
+
saveContacts(token, payload) {
|
|
903
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
904
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts/manually', payload, httpOptions);
|
|
905
|
+
}
|
|
906
|
+
//Dowload csv template
|
|
907
|
+
downloadCsvTemplate(token) {
|
|
908
|
+
const params = {
|
|
909
|
+
'Content-Type': 'application/json',
|
|
910
|
+
'Auth-Key': "Bearer " + token
|
|
160
911
|
};
|
|
912
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
913
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/download/csv', httpOptions);
|
|
161
914
|
}
|
|
162
|
-
|
|
163
|
-
|
|
915
|
+
//Upload csv contacts
|
|
916
|
+
updateCSVContacts(token, dtModel) {
|
|
917
|
+
const params = {
|
|
918
|
+
'Content-Type': 'application/json',
|
|
919
|
+
'Auth-Key': "Bearer " + token
|
|
920
|
+
};
|
|
921
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
922
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts', dtModel, httpOptions);
|
|
164
923
|
}
|
|
165
|
-
|
|
166
|
-
|
|
924
|
+
//City list
|
|
925
|
+
GetAllCityList(_countryId, _stateName) {
|
|
926
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
927
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/citylist/' + _countryId + '/' + _stateName, httpOptions);
|
|
167
928
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
'Content-Type': 'application/json',
|
|
173
|
-
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
174
|
-
'ip-address': ipAddressInfo.ip,
|
|
175
|
-
'ip-country': ipAddressInfo.address.country,
|
|
176
|
-
};
|
|
177
|
-
payload = { ...payload, proxy: ipAddressInfo.proxy.toString() };
|
|
178
|
-
const httpOptions = { headers: new HttpHeaders(params) };
|
|
179
|
-
return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(catchError(error => {
|
|
180
|
-
return throwError(error);
|
|
181
|
-
}));
|
|
182
|
-
}), catchError(error => {
|
|
183
|
-
return throwError(error);
|
|
184
|
-
}));
|
|
185
|
-
}));
|
|
929
|
+
//zip list
|
|
930
|
+
GetAllZipList(dataModel) {
|
|
931
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
932
|
+
return this.http.post(environment.apiUrl + '/global/master/ur/postalcodes', dataModel, httpOptions);
|
|
186
933
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}));
|
|
934
|
+
//Get all invoices
|
|
935
|
+
GetInvoices(viewType, token) {
|
|
936
|
+
const params = {
|
|
937
|
+
'Content-Type': 'application/json',
|
|
938
|
+
'Auth-Key': "Bearer " + token
|
|
939
|
+
};
|
|
940
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
941
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoices/' + viewType, httpOptions);
|
|
196
942
|
}
|
|
197
|
-
|
|
198
|
-
const
|
|
943
|
+
DownloadInvoice(invoiceId, token) {
|
|
944
|
+
const httpOptions = {
|
|
945
|
+
responseType: 'blob',
|
|
946
|
+
headers: new HttpHeaders({
|
|
947
|
+
'Content-Type': 'application/json',
|
|
948
|
+
'Auth-Key': "Bearer " + token
|
|
949
|
+
})
|
|
950
|
+
};
|
|
951
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoice/file/' + invoiceId, httpOptions);
|
|
952
|
+
}
|
|
953
|
+
GetInvoice(invoiceId) {
|
|
954
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
955
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoice/' + invoiceId, httpOptions);
|
|
956
|
+
}
|
|
957
|
+
//Billing summary
|
|
958
|
+
GetBillingSummary(token) {
|
|
959
|
+
const params = {
|
|
199
960
|
'Content-Type': 'application/json',
|
|
200
|
-
'Auth-Key': "Bearer " +
|
|
961
|
+
'Auth-Key': "Bearer " + token
|
|
201
962
|
};
|
|
202
|
-
const
|
|
203
|
-
return this.http.get(environment.apiUrl + '/utilities/
|
|
963
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
964
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/summary', httpOptions);
|
|
204
965
|
}
|
|
205
|
-
|
|
966
|
+
//Billing Plan & Pricing
|
|
967
|
+
GetAllPlans(token) {
|
|
206
968
|
const params = {
|
|
207
969
|
'Content-Type': 'application/json',
|
|
208
|
-
'Auth-Key': "Bearer " +
|
|
209
|
-
'c2c-request': window.location.hostname
|
|
970
|
+
'Auth-Key': "Bearer " + token
|
|
210
971
|
};
|
|
211
972
|
const httpOptions = { headers: new HttpHeaders(params) };
|
|
212
|
-
return this.http.
|
|
973
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/tiers', httpOptions);
|
|
213
974
|
}
|
|
214
|
-
|
|
215
|
-
|
|
975
|
+
//Pay Now
|
|
976
|
+
payNow(invoiceId, cardId, token) {
|
|
977
|
+
const params = {
|
|
216
978
|
'Content-Type': 'application/json',
|
|
217
|
-
'Auth-Key':
|
|
218
|
-
}
|
|
219
|
-
const
|
|
220
|
-
|
|
979
|
+
'Auth-Key': "Bearer " + token
|
|
980
|
+
};
|
|
981
|
+
const data = {
|
|
982
|
+
"invoiceId": invoiceId,
|
|
983
|
+
"cardId": cardId
|
|
984
|
+
};
|
|
985
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
986
|
+
return this.http.post(environment.apiUrl + `/utilities/billing/pay/invoice/${invoiceId}/${cardId}`, data, httpOptions);
|
|
221
987
|
}
|
|
222
|
-
|
|
223
|
-
const
|
|
988
|
+
confirmInvoicePayment(customerId, token) {
|
|
989
|
+
const params = {
|
|
224
990
|
'Content-Type': 'application/json',
|
|
225
|
-
'Auth-Key':
|
|
226
|
-
}
|
|
227
|
-
const httpOptions = { headers:
|
|
228
|
-
return this.http.post(environment.apiUrl + `/utilities/
|
|
991
|
+
'Auth-Key': "Bearer " + token
|
|
992
|
+
};
|
|
993
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
994
|
+
return this.http.post(environment.apiUrl + `/utilities/billing/invoice/confirmation/${customerId}`, {}, httpOptions);
|
|
229
995
|
}
|
|
230
|
-
|
|
231
|
-
const
|
|
996
|
+
loadStripeMethods(sessionid, token) {
|
|
997
|
+
const params = {
|
|
232
998
|
'Content-Type': 'application/json',
|
|
233
|
-
'Auth-Key':
|
|
234
|
-
}
|
|
235
|
-
const httpOptions = { headers:
|
|
236
|
-
return this.http.get(environment.apiUrl +
|
|
999
|
+
'Auth-Key': "Bearer " + token
|
|
1000
|
+
};
|
|
1001
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1002
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/duplicate/card/' + sessionid, httpOptions);
|
|
237
1003
|
}
|
|
238
|
-
|
|
239
|
-
|
|
1004
|
+
logOut(authKey) {
|
|
1005
|
+
const auth = { "Auth-Key": authKey };
|
|
1006
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + authKey }) };
|
|
1007
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/logout', {}, httpOptions);
|
|
1008
|
+
}
|
|
1009
|
+
registerFCMToken(payload) {
|
|
1010
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1011
|
+
return this.http.post(environment.apiUrl + '/firebase/register/device', payload, httpOptions);
|
|
1012
|
+
}
|
|
1013
|
+
getNotificationList(pageIndex, pageSize) {
|
|
1014
|
+
let params = new HttpParams();
|
|
1015
|
+
params = params.set('size', pageSize || '10');
|
|
1016
|
+
params = params.set('page', pageIndex || '1');
|
|
1017
|
+
const headers = { 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') };
|
|
1018
|
+
const httpOptions = { headers, params };
|
|
1019
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/stored/notification', httpOptions);
|
|
1020
|
+
}
|
|
1021
|
+
getTotalUnreadCount() {
|
|
1022
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1023
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/notification/count', httpOptions);
|
|
1024
|
+
}
|
|
1025
|
+
markNotification(payload) {
|
|
1026
|
+
//const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1027
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1028
|
+
return this.http.post(environment.apiUrl + '/firebase/ur/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
|
|
1029
|
+
}
|
|
1030
|
+
deleteNotification(payload) {
|
|
1031
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1032
|
+
return this.http.post(environment.apiUrl + '/firebase/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
|
|
1033
|
+
}
|
|
1034
|
+
getVoicemailDetails(recordId, token) {
|
|
240
1035
|
const params = {
|
|
241
1036
|
'Content-Type': 'application/json',
|
|
242
1037
|
'Auth-Key': "Bearer " + token
|
|
243
1038
|
};
|
|
244
1039
|
const httpOptions = { headers: new HttpHeaders(params) };
|
|
245
|
-
return this.http.get(environment.apiUrl +
|
|
1040
|
+
return this.http.get(environment.apiUrl + `/utilities/phonebook/play/voicerecordings/${recordId}`, httpOptions);
|
|
246
1041
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
1042
|
+
deleteNotifications(token, notificationIds) {
|
|
1043
|
+
const params = {
|
|
1044
|
+
'Content-Type': 'application/json',
|
|
1045
|
+
'Auth-Key': "Bearer " + token
|
|
1046
|
+
};
|
|
1047
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1048
|
+
return this.http.get(environment.apiUrl + `/utilities/sms/delete/notification/${notificationIds}`, httpOptions);
|
|
1049
|
+
}
|
|
1050
|
+
getReports(filterData, pageIndex, pageSize) {
|
|
1051
|
+
const filterObj = {
|
|
1052
|
+
accountStatus: filterData.accountStatus || "",
|
|
1053
|
+
dateType: filterData.dateType || "",
|
|
1054
|
+
fieldType: filterData.fieldType || "",
|
|
1055
|
+
fieldValue: filterData.fieldValue || "",
|
|
1056
|
+
fromDate: filterData.fromDate || "",
|
|
1057
|
+
pendingDues: filterData.pendingDues,
|
|
1058
|
+
toDate: filterData.toDate || "",
|
|
1059
|
+
};
|
|
1060
|
+
const params = new HttpParams()
|
|
1061
|
+
.set('page', pageIndex?.toString() || '1')
|
|
1062
|
+
.set('size', pageSize?.toString() || '10');
|
|
1063
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
|
|
1064
|
+
params: params };
|
|
1065
|
+
return this.http.post(environment.apiUrl + '/utilities/report/user/details', filterObj, httpOptions);
|
|
1066
|
+
}
|
|
1067
|
+
getReportsFilter() {
|
|
1068
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1069
|
+
return this.http.get(environment.apiUrl + '/utilities/report/dropdown', httpOptions);
|
|
1070
|
+
}
|
|
1071
|
+
getSyncReportData() {
|
|
1072
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1073
|
+
return this.http.post(environment.apiUrl + '/utilities/report/update/cache', {}, httpOptions);
|
|
1074
|
+
}
|
|
1075
|
+
getDownloadCSV(filterData, pageIndex, pageSize) {
|
|
1076
|
+
const filterObj = {
|
|
1077
|
+
accountStatus: filterData.accountStatus || "",
|
|
1078
|
+
dateType: filterData.dateType || "",
|
|
1079
|
+
fieldType: filterData.fieldType || "",
|
|
1080
|
+
fieldValue: filterData.fieldValue || "",
|
|
1081
|
+
fromDate: filterData.fromDate || "",
|
|
1082
|
+
pendingDues: filterData.pendingDues,
|
|
1083
|
+
toDate: filterData.toDate || "",
|
|
1084
|
+
};
|
|
1085
|
+
const params = new HttpParams()
|
|
1086
|
+
.set('page', pageIndex > 0 ? pageIndex.toString() : '1')
|
|
1087
|
+
.set('size', pageSize.toString());
|
|
1088
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
|
|
1089
|
+
return this.http.post(environment.apiUrl + '/utilities/report/csv/download', filterObj, httpOptions);
|
|
267
1090
|
}
|
|
268
|
-
|
|
1091
|
+
getDeleteFile(filePathValue) {
|
|
269
1092
|
const httpOptions = {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
'Auth-Key': 'Bearer ' + this.token
|
|
273
|
-
})
|
|
1093
|
+
body: { filePath: filePathValue },
|
|
1094
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
274
1095
|
};
|
|
275
|
-
return this.http.
|
|
1096
|
+
return this.http.post(environment.apiUrl + '/utilities/report/download/complete', httpOptions);
|
|
1097
|
+
}
|
|
1098
|
+
getDownloadPDF(filterData, pageIndex, pageSize) {
|
|
1099
|
+
const filterObj = {
|
|
1100
|
+
accountStatus: filterData.accountStatus || "",
|
|
1101
|
+
dateType: filterData.dateType || "",
|
|
1102
|
+
fieldType: filterData.fieldType || "",
|
|
1103
|
+
fieldValue: filterData.fieldValue || "",
|
|
1104
|
+
fromDate: filterData.fromDate || "",
|
|
1105
|
+
pendingDues: filterData.pendingDues,
|
|
1106
|
+
toDate: filterData.toDate || "",
|
|
1107
|
+
};
|
|
1108
|
+
const params = new HttpParams()
|
|
1109
|
+
.set('page', pageIndex > 0 ? pageIndex.toString() : '1')
|
|
1110
|
+
.set('size', pageSize.toString());
|
|
1111
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
|
|
1112
|
+
return this.http.post(environment.apiUrl + '/utilities/report/pdf/download', filterObj, httpOptions);
|
|
1113
|
+
}
|
|
1114
|
+
getSuspendCategoriesData() {
|
|
1115
|
+
const httpOptions = {
|
|
1116
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1117
|
+
};
|
|
1118
|
+
return this.http.get(environment.apiUrl + '/utilities/report/suspend/category/dropdown', httpOptions);
|
|
1119
|
+
}
|
|
1120
|
+
getUserDetailsForSuspend(userIds) {
|
|
1121
|
+
const httpOptions = {
|
|
1122
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1123
|
+
};
|
|
1124
|
+
return this.http.post(`${environment.apiUrl}/admin/suspension/data/${encodeURIComponent(userIds)}`, null, httpOptions);
|
|
1125
|
+
}
|
|
1126
|
+
suspendUsers(userData) {
|
|
1127
|
+
const httpOptions = {
|
|
1128
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1129
|
+
};
|
|
1130
|
+
return this.http.post(`${environment.apiUrl}/admin/suspend/user`, userData, httpOptions);
|
|
1131
|
+
}
|
|
1132
|
+
resumeUser(userData) {
|
|
1133
|
+
const httpOptions = {
|
|
1134
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1135
|
+
};
|
|
1136
|
+
return this.http.post(`${environment.apiUrl}/admin/resume/user`, userData, httpOptions);
|
|
1137
|
+
}
|
|
1138
|
+
resumeUnpaidUsers(userData) {
|
|
1139
|
+
const httpOptions = {
|
|
1140
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1141
|
+
};
|
|
1142
|
+
return this.http.post(`${environment.apiUrl}/admin/resume/unpaid/user`, userData, httpOptions);
|
|
1143
|
+
}
|
|
1144
|
+
deleteUser(userData) {
|
|
1145
|
+
const httpOptions = {
|
|
1146
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1147
|
+
};
|
|
1148
|
+
return this.http.post(`${environment.apiUrl}/admin/delete/user`, userData, httpOptions);
|
|
1149
|
+
}
|
|
1150
|
+
deleteUserAccount() {
|
|
1151
|
+
const httpOptions = {
|
|
1152
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1153
|
+
};
|
|
1154
|
+
// return this.http.post<any[]>(`${environment.apiUrl}/utilities/ext/delete/user/`, userData, httpOptions);
|
|
1155
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
1156
|
+
return this.http.post(`${environment.apiUrl}/utilities/ext/delete/user/${this.platform}/${ipAddressInfo.ip}`, null, httpOptions);
|
|
1157
|
+
}), catchError((error) => {
|
|
1158
|
+
// Properly catch errors
|
|
1159
|
+
return throwError(error);
|
|
1160
|
+
}));
|
|
276
1161
|
}
|
|
277
1162
|
getIPDetailsForCall(recordId, callStatus, deviceId) {
|
|
278
1163
|
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
@@ -281,8 +1166,9 @@ class ExtensionService {
|
|
|
281
1166
|
'ipCountry': ipAddressInfo.address.country,
|
|
282
1167
|
'recordId': recordId,
|
|
283
1168
|
'callStatus': callStatus,
|
|
1169
|
+
'deviceId': deviceId
|
|
284
1170
|
};
|
|
285
|
-
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
1171
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
286
1172
|
return this.http.post(environment.apiUrl + '/utilities/twilio/incoming/call/ip', IpObj, httpOptions).pipe(catchError(postError => {
|
|
287
1173
|
// console.log('Error during HTTP POST request:', postError);
|
|
288
1174
|
return throwError(postError);
|
|
@@ -292,6 +1178,114 @@ class ExtensionService {
|
|
|
292
1178
|
return throwError(ipError);
|
|
293
1179
|
}));
|
|
294
1180
|
}
|
|
1181
|
+
getIPDetailsForSMS(recordId) {
|
|
1182
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
1183
|
+
const IpObj = {
|
|
1184
|
+
'ipAddress': ipAddressInfo.ip,
|
|
1185
|
+
'ipCountry': ipAddressInfo.address.country,
|
|
1186
|
+
'recordId': recordId,
|
|
1187
|
+
};
|
|
1188
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1189
|
+
return this.http.post(environment.apiUrl + '/utilities/twilio/inbound/sms/ip', IpObj, httpOptions);
|
|
1190
|
+
}, catchError(error => {
|
|
1191
|
+
// Catch error from getIpAddressInfo
|
|
1192
|
+
return throwError(error);
|
|
1193
|
+
})));
|
|
1194
|
+
}
|
|
1195
|
+
GetAllAvailableCountryList() {
|
|
1196
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1197
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/dedicated/countrylist');
|
|
1198
|
+
// return this.http.get<string>(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
|
|
1199
|
+
}
|
|
1200
|
+
getUserSettings() {
|
|
1201
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1202
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/settings', httpOptions);
|
|
1203
|
+
}
|
|
1204
|
+
updateDialCodePreference(settings) {
|
|
1205
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1206
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update/settings', settings, httpOptions);
|
|
1207
|
+
}
|
|
1208
|
+
updateLongPressTime(time) {
|
|
1209
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1210
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update/longpress/' + time, {}, httpOptions);
|
|
1211
|
+
}
|
|
1212
|
+
exportToCSV() {
|
|
1213
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }), responseType: 'blob' };
|
|
1214
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/download/contacts', httpOptions);
|
|
1215
|
+
}
|
|
1216
|
+
getDialPreferenceNums() {
|
|
1217
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1218
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/dial/preference/dropdown', httpOptions);
|
|
1219
|
+
}
|
|
1220
|
+
updateVASSettings(token, dtModel) {
|
|
1221
|
+
const params = {
|
|
1222
|
+
'Content-Type': 'application/json',
|
|
1223
|
+
'Auth-Key': "Bearer " + token
|
|
1224
|
+
};
|
|
1225
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1226
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/value/added/service', dtModel, httpOptions);
|
|
1227
|
+
}
|
|
1228
|
+
updateVoiceMailSettings(token, dtModel) {
|
|
1229
|
+
const params = {
|
|
1230
|
+
'Content-Type': 'application/json',
|
|
1231
|
+
'Auth-Key': "Bearer " + token
|
|
1232
|
+
};
|
|
1233
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1234
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/voicemail/setting', dtModel, httpOptions);
|
|
1235
|
+
}
|
|
1236
|
+
updateVoiceRecordSettings(token, dtModel) {
|
|
1237
|
+
const params = {
|
|
1238
|
+
'Content-Type': 'application/json',
|
|
1239
|
+
'Auth-Key': "Bearer " + token
|
|
1240
|
+
};
|
|
1241
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1242
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/call/recording/setting', dtModel, httpOptions);
|
|
1243
|
+
}
|
|
1244
|
+
getManualLinks(deviceType) {
|
|
1245
|
+
return `${environment.apiUrl}/landing/support/ur/user/manual/${deviceType}`;
|
|
1246
|
+
}
|
|
1247
|
+
updateSignupProfile(body) {
|
|
1248
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1249
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/ur/update/signup/profile', body, httpOptions);
|
|
1250
|
+
}
|
|
1251
|
+
getAdminSettings() {
|
|
1252
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1253
|
+
return this.http.get(environment.apiUrl + '/admin/settings', httpOptions);
|
|
1254
|
+
}
|
|
1255
|
+
updateActions(token, dtModel) {
|
|
1256
|
+
const params = {
|
|
1257
|
+
'Content-Type': 'application/json',
|
|
1258
|
+
'Auth-Key': "Bearer " + token
|
|
1259
|
+
};
|
|
1260
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1261
|
+
return this.http.post(environment.apiUrl + '/admin/change/settings', dtModel, httpOptions);
|
|
1262
|
+
}
|
|
1263
|
+
updateValueAddedServices(token, dtModel) {
|
|
1264
|
+
const params = {
|
|
1265
|
+
'Content-Type': 'application/json',
|
|
1266
|
+
'Auth-Key': "Bearer " + token
|
|
1267
|
+
};
|
|
1268
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1269
|
+
return this.http.post(environment.apiUrl + '/admin/value/added/service', dtModel, httpOptions);
|
|
1270
|
+
}
|
|
1271
|
+
deleteAdminUsers(token, userIds) {
|
|
1272
|
+
const httpOptions = {
|
|
1273
|
+
headers: new HttpHeaders({
|
|
1274
|
+
'Content-Type': 'application/json',
|
|
1275
|
+
'Auth-Key': 'Bearer ' + token
|
|
1276
|
+
})
|
|
1277
|
+
};
|
|
1278
|
+
return this.http.delete(environment.apiUrl + `/admin/delete/value/usage/${userIds}`, httpOptions);
|
|
1279
|
+
}
|
|
1280
|
+
getUserInformation(twilioAuthId) {
|
|
1281
|
+
const httpOptions = {
|
|
1282
|
+
headers: new HttpHeaders({
|
|
1283
|
+
'Content-Type': 'application/json',
|
|
1284
|
+
'Auth-Key': 'Bearer ' + this.token
|
|
1285
|
+
})
|
|
1286
|
+
};
|
|
1287
|
+
return this.http.get(environment.apiUrl + '/utilities/twilio/c2c/information/' + twilioAuthId, httpOptions);
|
|
1288
|
+
}
|
|
295
1289
|
}
|
|
296
1290
|
ExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, deps: [{ token: i1.HttpClient }, { token: IpAddressService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
297
1291
|
ExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, providedIn: 'root' });
|
|
@@ -302,12 +1296,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
302
1296
|
}]
|
|
303
1297
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: IpAddressService }]; } });
|
|
304
1298
|
|
|
305
|
-
const GlobalConstant = {
|
|
306
|
-
ErrorMsg500: "Unable to process request. Please try again later.",
|
|
307
|
-
isSMSVisible: true,
|
|
308
|
-
dedicatedNumText: 'C2C Number'
|
|
309
|
-
};
|
|
310
|
-
|
|
311
1299
|
class NotificationService {
|
|
312
1300
|
constructor(twilioService) {
|
|
313
1301
|
this.twilioService = twilioService;
|
|
@@ -566,6 +1554,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
566
1554
|
}]
|
|
567
1555
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ExtensionService }, { type: NotificationService }]; } });
|
|
568
1556
|
|
|
1557
|
+
const GlobalConstant = {
|
|
1558
|
+
ErrorMsg500: "Unable to process request. Please try again later.",
|
|
1559
|
+
isSMSVisible: true,
|
|
1560
|
+
dedicatedNumText: 'C2C Number'
|
|
1561
|
+
};
|
|
1562
|
+
|
|
569
1563
|
class IncomingCallComponent {
|
|
570
1564
|
constructor(extensionService, twilioService, notificationSerivce) {
|
|
571
1565
|
this.extensionService = extensionService;
|
|
@@ -589,9 +1583,16 @@ class IncomingCallComponent {
|
|
|
589
1583
|
console.log('IncomingCallComponent');
|
|
590
1584
|
}
|
|
591
1585
|
ngOnInit() {
|
|
1586
|
+
// this.twilioService.currentCall.subscribe((call: any) => {
|
|
1587
|
+
// if (call) {
|
|
1588
|
+
// this.twilioCallData = call;
|
|
1589
|
+
// this.notificationSerivce.showNotification(call);
|
|
1590
|
+
// // Handle the call UI
|
|
1591
|
+
// }
|
|
1592
|
+
// });
|
|
592
1593
|
console.log('IncomingCallComponent ngOnInit');
|
|
593
1594
|
try {
|
|
594
|
-
this.twilioService.currentCall.subscribe(
|
|
1595
|
+
this.twilioService.currentCall.subscribe(call => {
|
|
595
1596
|
if (call) {
|
|
596
1597
|
this.twilioCallData = call;
|
|
597
1598
|
this.twilioAuthId = call.customParameters.get('twilioAuthId');
|
|
@@ -638,8 +1639,8 @@ class IncomingCallComponent {
|
|
|
638
1639
|
data.accept();
|
|
639
1640
|
data.isCallConnected = true;
|
|
640
1641
|
data.isFirstCall = true;
|
|
1642
|
+
this.extensionService.setCallSid(this.CallSid, this.recordCall);
|
|
641
1643
|
this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
|
|
642
|
-
this.extensionService.setCallSid(this.CallSid, this.recordCall);
|
|
643
1644
|
this.closeIncomingCallWrapper(1);
|
|
644
1645
|
});
|
|
645
1646
|
}
|
|
@@ -801,6 +1802,7 @@ class IncomingCallComponent {
|
|
|
801
1802
|
});
|
|
802
1803
|
}
|
|
803
1804
|
resumeRecording(sid) {
|
|
1805
|
+
// let sid;
|
|
804
1806
|
const details = this.extensionService.getCallSid();
|
|
805
1807
|
this.incomingCallSid = details.callSid;
|
|
806
1808
|
this.incomingRecordCall = details.recordCall;
|
|
@@ -828,10 +1830,10 @@ class IncomingCallComponent {
|
|
|
828
1830
|
}
|
|
829
1831
|
}
|
|
830
1832
|
IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
831
|
-
IncomingCallComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: { incomingCallData: "incomingCallData", newIncomingCallsList: "newIncomingCallsList", deviceId: "deviceId" }, outputs: { closeIncomingCallDiv: "closeIncomingCallDiv", incomingCallsNewList: "incomingCallsNewList", selectedIncomingCallInfo: "selectedIncomingCallInfo" }, ngImport: i0, template: "<div class=\"call-container\" style=\"width: 100%; left: 116px;\" *ngIf=\"newIncomingCallsList?.length > 0\">\r\n <div class=\"collops\">\r\n <div class=\"d-flex w-100\">\r\n <div class=\"d-flex flex-column container-fluid\" >\r\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\r\n <ng-container *ngFor=\"let data of newIncomingCallsList\"> \r\n <div class=\"p-2 \">\r\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\r\n <div class=\"img\">\r\n <img class=\"avatar-img-wrapper\" [src]=\"data?.img\" alt=\"\" width=\"45\" />\r\n </div>\r\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\r\n <div class=\"callerDetails-wrapper\">\r\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\r\n <p class=\"break-word\">{{data?.userInfo?.displayNum ? data?.userInfo?.c2cInformation?.number : data?.userInfo?.c2cInformation?.number }}</p>\r\n </div> \r\n <div class=\"d-flex align-items-center\">\r\n <button class=\"call-btn-wrapper receive-btn\" *ngIf=\"!data?.isCallConnected\">\r\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\r\n </button>\r\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.isCallConnected\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic</span>\r\n </button>\r\n <div class=\"record-btn-container\">\r\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording('')\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"recording-icon\"></span>\r\n </button> \r\n <div class=\"pause-resume-btns\">\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\r\n <span class=\"material-symbols-outlined\"> pause </span>\r\n </button>\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording('')\">\r\n <span class=\"material-symbols-outlined\"> play_arrow </span>\r\n </button>\r\n </div>\r\n </div>\r\n <button class=\"call-btn-wrapper reject-btn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\r\n </button>\r\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand \"> \r\n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\r\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\r\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\r\n </div>\r\n <div class=\"text-center\">\r\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\r\n </div>\r\n <div class=\"f-13\">\r\n <div class=\"row mb-3\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Subject:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\r\n </div> \r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Email:</div>\r\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\r\n </div> \r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Number:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\r\n </div>\r\n <div class=\"col-6\">\r\n <div class=\"\">Language:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\r\n </div>\r\n </div>\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Extension:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Image:</div>\r\n <div class=\"text-ellipsis\">\r\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\r\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\r\n </ng-container>\r\n <ng-template #noImage>\r\n <span class=\"ml-2\">No Image Available</span>\r\n </ng-template>\r\n </div>\r\n </div> \r\n </div>\r\n\r\n <div class=\" mb-4\">\r\n <div class=\"\">\r\n <div class=\"\">Message:</div>\r\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Point Name:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\r\n </div>\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Source Name:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"call-action-btns mt-0\">\r\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.isCallConnected\">\r\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\r\n </button>\r\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.isCallConnected\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n </button>\r\n <button class=\"call-btn reject-btn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wave-container\">\r\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\r\n <defs>\r\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n</div>\r\n\r\n\r\n", styles: [".call-container{width:752px!important;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:400px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:395px!important}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1833
|
+
IncomingCallComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: { incomingCallData: "incomingCallData", newIncomingCallsList: "newIncomingCallsList", deviceId: "deviceId" }, outputs: { closeIncomingCallDiv: "closeIncomingCallDiv", incomingCallsNewList: "incomingCallsNewList", selectedIncomingCallInfo: "selectedIncomingCallInfo" }, ngImport: i0, template: "<div class=\"call-container\" style=\"width: 100%; left: 116px;\" *ngIf=\"newIncomingCallsList?.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\" >\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\"> \n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"data?.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data?.userInfo?.displayNum ? data?.userInfo?.c2cInformation?.number : data?.userInfo?.c2cInformation?.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" *ngIf=\"!data?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.isCallConnected\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic</span>\n </button>\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording('')\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button> \n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording('')\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand \"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.isCallConnected\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:752px!important;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:400px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:395px!important}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
832
1834
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, decorators: [{
|
|
833
1835
|
type: Component,
|
|
834
|
-
args: [{ selector: 'lib-incoming-call', template: "<div class=\"call-container\" style=\"width: 100%; left: 116px;\" *ngIf=\"newIncomingCallsList?.length > 0\">\r\n <div class=\"collops\">\r\n <div class=\"d-flex w-100\">\r\n <div class=\"d-flex flex-column container-fluid\" >\r\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\r\n <ng-container *ngFor=\"let data of newIncomingCallsList\"> \r\n <div class=\"p-2 \">\r\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\r\n <div class=\"img\">\r\n <img class=\"avatar-img-wrapper\" [src]=\"data?.img\" alt=\"\" width=\"45\" />\r\n </div>\r\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\r\n <div class=\"callerDetails-wrapper\">\r\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\r\n <p class=\"break-word\">{{data?.userInfo?.displayNum ? data?.userInfo?.c2cInformation?.number : data?.userInfo?.c2cInformation?.number }}</p>\r\n </div> \r\n <div class=\"d-flex align-items-center\">\r\n <button class=\"call-btn-wrapper receive-btn\" *ngIf=\"!data?.isCallConnected\">\r\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\r\n </button>\r\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.isCallConnected\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic</span>\r\n </button>\r\n <div class=\"record-btn-container\">\r\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording('')\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"recording-icon\"></span>\r\n </button> \r\n <div class=\"pause-resume-btns\">\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\r\n <span class=\"material-symbols-outlined\"> pause </span>\r\n </button>\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording('')\">\r\n <span class=\"material-symbols-outlined\"> play_arrow </span>\r\n </button>\r\n </div>\r\n </div>\r\n <button class=\"call-btn-wrapper reject-btn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\r\n </button>\r\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand \"> \r\n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\r\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\r\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\r\n </div>\r\n <div class=\"text-center\">\r\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\r\n </div>\r\n <div class=\"f-13\">\r\n <div class=\"row mb-3\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Subject:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\r\n </div> \r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Email:</div>\r\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\r\n </div> \r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Number:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\r\n </div>\r\n <div class=\"col-6\">\r\n <div class=\"\">Language:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\r\n </div>\r\n </div>\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Extension:</div>\r\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-3\">\r\n <div class=\"col-12 d-flex align-items-center mb-2\">\r\n <div class=\"me-2\">Image:</div>\r\n <div class=\"text-ellipsis\">\r\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\r\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\r\n </ng-container>\r\n <ng-template #noImage>\r\n <span class=\"ml-2\">No Image Available</span>\r\n </ng-template>\r\n </div>\r\n </div> \r\n </div>\r\n\r\n <div class=\" mb-4\">\r\n <div class=\"\">\r\n <div class=\"\">Message:</div>\r\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"row mb-2\">\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Point Name:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\r\n </div>\r\n <div class=\"col-6 mb-2\">\r\n <div class=\"\">Source Name:</div>\r\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"call-action-btns mt-0\">\r\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.isCallConnected\">\r\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\r\n </button>\r\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.isCallConnected\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n </button>\r\n <button class=\"call-btn reject-btn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wave-container\">\r\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\r\n <defs>\r\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n</div>\r\n\r\n\r\n", styles: [".call-container{width:752px!important;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:400px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:395px!important}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"] }]
|
|
1836
|
+
args: [{ selector: 'lib-incoming-call', template: "<div class=\"call-container\" style=\"width: 100%; left: 116px;\" *ngIf=\"newIncomingCallsList?.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\" >\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\"> \n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"data?.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data?.userInfo?.displayNum ? data?.userInfo?.c2cInformation?.number : data?.userInfo?.c2cInformation?.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" *ngIf=\"!data?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.isCallConnected\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic</span>\n </button>\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording('')\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button> \n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording('')\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand \"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.isCallConnected\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:752px!important;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:400px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:395px!important}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
|
|
835
1837
|
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: TwilioService }, { type: NotificationService }]; }, propDecorators: { incomingCallData: [{
|
|
836
1838
|
type: Input
|
|
837
1839
|
}], newIncomingCallsList: [{
|
|
@@ -865,6 +1867,7 @@ class CallProgressComponent {
|
|
|
865
1867
|
this.isCollops = false;
|
|
866
1868
|
// Incoming call variables
|
|
867
1869
|
this.incomingCallDiv = false;
|
|
1870
|
+
//@Output() showCallProgressEvent: EventEmitter<void> = new EventEmitter<void>();
|
|
868
1871
|
this.incomingCallInitiated = new EventEmitter();
|
|
869
1872
|
this.isRecording = false;
|
|
870
1873
|
this.isPaused = false;
|
|
@@ -909,7 +1912,10 @@ class CallProgressComponent {
|
|
|
909
1912
|
}
|
|
910
1913
|
}
|
|
911
1914
|
ngAfterViewInit() {
|
|
912
|
-
//
|
|
1915
|
+
// this.isRecording = false;
|
|
1916
|
+
// setTimeout(() => {
|
|
1917
|
+
// this.isRecording = false;
|
|
1918
|
+
// }, 3000);
|
|
913
1919
|
}
|
|
914
1920
|
async startCall(callData) {
|
|
915
1921
|
try {
|
|
@@ -994,6 +2000,15 @@ class CallProgressComponent {
|
|
|
994
2000
|
this.call?.on('accept', () => {
|
|
995
2001
|
this.showRingAnimation = false;
|
|
996
2002
|
this.disbaleEndCallBtn = false;
|
|
2003
|
+
// Start recording if recordCall is true and call is accepted for 30 seconds
|
|
2004
|
+
// if (this.recordCall) {
|
|
2005
|
+
// setTimeout(() => {
|
|
2006
|
+
// if (this.isRecording) return; // If already recording, skip
|
|
2007
|
+
// this.startRecording();
|
|
2008
|
+
// }, 30000);
|
|
2009
|
+
// } else {
|
|
2010
|
+
// this.stopRecording();
|
|
2011
|
+
// }
|
|
997
2012
|
});
|
|
998
2013
|
this.call?.on('messageReceived', (message) => {
|
|
999
2014
|
});
|
|
@@ -1068,12 +2083,16 @@ class CallProgressComponent {
|
|
|
1068
2083
|
}
|
|
1069
2084
|
}
|
|
1070
2085
|
closeIncomingCall(data) {
|
|
2086
|
+
// this.incomingCallDiv = false;
|
|
1071
2087
|
if (data.show) {
|
|
2088
|
+
//this.showCallProgressEvent.emit()
|
|
2089
|
+
// handle incoming call accepted
|
|
1072
2090
|
this.startTimer();
|
|
1073
2091
|
this.disbaleEndCallBtn = false;
|
|
1074
2092
|
this.call = data.call;
|
|
1075
2093
|
const incomingDetail = this.extensionService.getCallSid();
|
|
1076
2094
|
this.incomingRecordCall = incomingDetail.recordCall;
|
|
2095
|
+
// Start recording if the call is answered and recording is enabled
|
|
1077
2096
|
if (this.incomingRecordCall) {
|
|
1078
2097
|
this.startRecording();
|
|
1079
2098
|
}
|
|
@@ -1083,6 +2102,7 @@ class CallProgressComponent {
|
|
|
1083
2102
|
this.cdr.detectChanges();
|
|
1084
2103
|
}
|
|
1085
2104
|
else {
|
|
2105
|
+
// incoming call rejected
|
|
1086
2106
|
this.endCallEvent.emit();
|
|
1087
2107
|
}
|
|
1088
2108
|
}
|
|
@@ -1111,6 +2131,9 @@ class CallProgressComponent {
|
|
|
1111
2131
|
this.incomingCallSid = details.callSid;
|
|
1112
2132
|
this.incomingRecordCall = details.recordCall;
|
|
1113
2133
|
sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
|
|
2134
|
+
// if (!this.incomingRecordCall && !this.recordCall) {
|
|
2135
|
+
// return;
|
|
2136
|
+
// }
|
|
1114
2137
|
this.extensionService.getCallRecording(sid).subscribe(response => {
|
|
1115
2138
|
this.isRecording = true;
|
|
1116
2139
|
this.isPaused = false;
|
|
@@ -1121,6 +2144,9 @@ class CallProgressComponent {
|
|
|
1121
2144
|
});
|
|
1122
2145
|
}
|
|
1123
2146
|
stopRecording() {
|
|
2147
|
+
// if (!this.incomingRecordCall && !this.recordCall) {
|
|
2148
|
+
// return;
|
|
2149
|
+
// }
|
|
1124
2150
|
this.isRecording = false;
|
|
1125
2151
|
this.isPaused = false;
|
|
1126
2152
|
if (this.timerSubscription) {
|
|
@@ -1132,11 +2158,15 @@ class CallProgressComponent {
|
|
|
1132
2158
|
this.incomingCallSid = details.callSid;
|
|
1133
2159
|
this.incomingRecordCall = details.recordCall;
|
|
1134
2160
|
const sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
|
|
2161
|
+
// if (!this.incomingRecordCall && !this.recordCall) {
|
|
2162
|
+
// return;
|
|
2163
|
+
// }
|
|
1135
2164
|
this.extensionService.pauseOrResumeRecording(sid, 'pause').subscribe(response => {
|
|
1136
2165
|
this.stopRecordingTimer();
|
|
1137
2166
|
this.isPaused = true;
|
|
1138
2167
|
}, error => {
|
|
1139
2168
|
console.error('Error pausing recording:', error);
|
|
2169
|
+
// Consider updating the UI to show the error state
|
|
1140
2170
|
});
|
|
1141
2171
|
}
|
|
1142
2172
|
resumeRecording() {
|
|
@@ -1145,6 +2175,9 @@ class CallProgressComponent {
|
|
|
1145
2175
|
this.incomingCallSid = details.callSid;
|
|
1146
2176
|
this.incomingRecordCall = details.recordCall;
|
|
1147
2177
|
sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
|
|
2178
|
+
// if (!this.incomingRecordCall && !this.recordCall) {
|
|
2179
|
+
// return; // Skip if recording is not enabled
|
|
2180
|
+
// }
|
|
1148
2181
|
this.extensionService.pauseOrResumeRecording(sid, 'resume').subscribe(response => {
|
|
1149
2182
|
this.isPaused = false;
|
|
1150
2183
|
this.startTimer1();
|
|
@@ -1199,6 +2232,7 @@ class CallProgressComponent {
|
|
|
1199
2232
|
clearInterval(intervalId);
|
|
1200
2233
|
}
|
|
1201
2234
|
if (elapsedTime >= maxTime) {
|
|
2235
|
+
// console.log('Max polling time reached. Stopping poll.');
|
|
1202
2236
|
clearInterval(intervalId);
|
|
1203
2237
|
}
|
|
1204
2238
|
}, pollInterval);
|
|
@@ -1225,10 +2259,10 @@ class CallProgressComponent {
|
|
|
1225
2259
|
}
|
|
1226
2260
|
}
|
|
1227
2261
|
CallProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, deps: [{ token: ExtensionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1228
|
-
CallProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallProgressComponent, selector: "lib-call-progress", inputs: { callData: "callData", newIncomingCallData: "newIncomingCallData", newIncomingCallsList: "newIncomingCallsList", deviceId: "deviceId" }, outputs: { endCallEvent: "endCallEvent", incomingCallsNewInfo: "incomingCallsNewInfo", minimiseEvent: "minimiseEvent", incomingCallInitiated: "incomingCallInitiated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand }\">\r\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [deviceId]=\"deviceId\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \r\n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\r\n <div [ngStyle]=\"{'display': 'flex', 'flex-direction': 'column', 'position': 'relative', 'width': '100%', 'left': callData?.isIncomingCall ? '100px' : '0'}\">\r\n \r\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\r\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\r\n </div>\r\n <div class=\"callerDetails\">\r\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\r\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\r\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\r\n </div>\r\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\r\n <div class=\"record-btn-container\">\r\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"recording-icon\"></span>\r\n </button> \r\n <div class=\"pause-resume-btns\">\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\r\n <span class=\"material-symbols-outlined\"> pause </span>\r\n </button>\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\r\n <span class=\"material-symbols-outlined\"> play_arrow </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isRecording\" class=\"timer-display\">\r\n {{ getFormattedTime() }}\r\n </div>\r\n </div>\r\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\r\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\r\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\r\n </div>\r\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\r\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\r\n {{key.num}}\r\n <span class=\"btn-albhabets\">{{key.text ? key.text : ' '}}</span>\r\n </div>\r\n </div>\r\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\r\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n\r\n </button>\r\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\r\n <span class=\"material-symbols-outlined\"> call_end </span>\r\n </button>\r\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wave-container\">\r\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\r\n <defs>\r\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n</div>\r\n\r\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\r\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\r\n <div style=\"display: flex; width: 100%\">\r\n <div>\r\n <div class=\"min-call-animation\" id=\"call-avatar\">\r\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\r\n </div>\r\n </div>\r\n <div>\r\n <div class=\"min-callerDetails\">\r\n <div class=\"name\">\r\n {{callData.name}}\r\n </div>\r\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"min-btn-container\">\r\n <div class=\"min-timer\">{{timer}}</div>\r\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n </button>\r\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\r\n <span class=\"material-symbols-outlined\"> call_end </span>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n\r\n", styles: [".call-container{width:385px;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: ["incomingCallData", "newIncomingCallsList", "deviceId"], outputs: ["closeIncomingCallDiv", "incomingCallsNewList", "selectedIncomingCallInfo"] }] });
|
|
2262
|
+
CallProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallProgressComponent, selector: "lib-call-progress", inputs: { callData: "callData", newIncomingCallData: "newIncomingCallData", newIncomingCallsList: "newIncomingCallsList", deviceId: "deviceId" }, outputs: { endCallEvent: "endCallEvent", incomingCallsNewInfo: "incomingCallsNewInfo", minimiseEvent: "minimiseEvent", incomingCallInitiated: "incomingCallInitiated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand }\">\n <!-- <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div> -->\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [deviceId]=\"deviceId\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div [ngStyle]=\"{'display': 'flex', 'flex-direction': 'column', 'position': 'relative', 'width': '100%', 'left': callData?.isIncomingCall ? '100px' : '0'}\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button> \n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : ' '}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: ["incomingCallData", "newIncomingCallsList", "deviceId"], outputs: ["closeIncomingCallDiv", "incomingCallsNewList", "selectedIncomingCallInfo"] }] });
|
|
1229
2263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, decorators: [{
|
|
1230
2264
|
type: Component,
|
|
1231
|
-
args: [{ selector: 'lib-call-progress', template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand }\">\r\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [deviceId]=\"deviceId\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \r\n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\r\n <div [ngStyle]=\"{'display': 'flex', 'flex-direction': 'column', 'position': 'relative', 'width': '100%', 'left': callData?.isIncomingCall ? '100px' : '0'}\">\r\n \r\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\r\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\r\n </div>\r\n <div class=\"callerDetails\">\r\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\r\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\r\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\r\n </div>\r\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\r\n <div class=\"record-btn-container\">\r\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"recording-icon\"></span>\r\n </button> \r\n <div class=\"pause-resume-btns\">\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\r\n <span class=\"material-symbols-outlined\"> pause </span>\r\n </button>\r\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\r\n <span class=\"material-symbols-outlined\"> play_arrow </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"isRecording\" class=\"timer-display\">\r\n {{ getFormattedTime() }}\r\n </div>\r\n </div>\r\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\r\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\r\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\r\n </div>\r\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\r\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\r\n {{key.num}}\r\n <span class=\"btn-albhabets\">{{key.text ? key.text : ' '}}</span>\r\n </div>\r\n </div>\r\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\r\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n\r\n </button>\r\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\r\n <span class=\"material-symbols-outlined\"> call_end </span>\r\n </button>\r\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"wave-container\">\r\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\r\n <defs>\r\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n</div>\r\n\r\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\r\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\r\n <div style=\"display: flex; width: 100%\">\r\n <div>\r\n <div class=\"min-call-animation\" id=\"call-avatar\">\r\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\r\n </div>\r\n </div>\r\n <div>\r\n <div class=\"min-callerDetails\">\r\n <div class=\"name\">\r\n {{callData.name}}\r\n </div>\r\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"min-btn-container\">\r\n <div class=\"min-timer\">{{timer}}</div>\r\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\r\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\r\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\r\n </button>\r\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\r\n <span class=\"material-symbols-outlined\"> call_end </span>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n\r\n", styles: [".call-container{width:385px;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
|
|
2265
|
+
args: [{ selector: 'lib-call-progress', template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand }\">\n <!-- <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div> -->\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [deviceId]=\"deviceId\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div [ngStyle]=\"{'display': 'flex', 'flex-direction': 'column', 'position': 'relative', 'width': '100%', 'left': callData?.isIncomingCall ? '100px' : '0'}\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button> \n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : ' '}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px!important;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
|
|
1232
2266
|
}], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { callData: [{
|
|
1233
2267
|
type: Input
|
|
1234
2268
|
}], newIncomingCallData: [{
|
|
@@ -1248,57 +2282,1220 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1248
2282
|
}] } });
|
|
1249
2283
|
|
|
1250
2284
|
class DialboxComponent {
|
|
1251
|
-
|
|
1252
|
-
this.
|
|
2285
|
+
set isDialpadHidden(value) {
|
|
2286
|
+
this._isDialpadHidden = value;
|
|
2287
|
+
if (!value) {
|
|
2288
|
+
// When dialpad becomes visible, ensure Twilio is initialized
|
|
2289
|
+
this.initializeTwilio();
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
get isDialpadHidden() {
|
|
2293
|
+
return this._isDialpadHidden;
|
|
2294
|
+
}
|
|
2295
|
+
constructor(twilioService, extService, dialog, ipService, extensionService, cdk, router) {
|
|
2296
|
+
this.twilioService = twilioService;
|
|
2297
|
+
this.extService = extService;
|
|
2298
|
+
this.dialog = dialog;
|
|
2299
|
+
this.ipService = ipService;
|
|
2300
|
+
this.extensionService = extensionService;
|
|
2301
|
+
this.cdk = cdk;
|
|
2302
|
+
this.router = router;
|
|
2303
|
+
this._isDialpadHidden = true;
|
|
2304
|
+
// Let the library decide to auto-open on incoming call without host wiring
|
|
2305
|
+
this.autoOpenOnIncoming = true;
|
|
1253
2306
|
this.closeDialpadEvent = new EventEmitter();
|
|
2307
|
+
this.callInitiated = new EventEmitter();
|
|
2308
|
+
this.endCallEvent = new EventEmitter();
|
|
1254
2309
|
this.minimiseEvent = new EventEmitter();
|
|
2310
|
+
this.incomingCallsNewInfoEvent = new EventEmitter();
|
|
2311
|
+
this.incomingCallInitiated = new EventEmitter();
|
|
2312
|
+
this.numberDialed = new EventEmitter();
|
|
2313
|
+
this.isCallInProgress = false;
|
|
2314
|
+
this.keypadVal = keypad;
|
|
2315
|
+
this.showInputClearBtn = false;
|
|
2316
|
+
this.dialedNumber = '';
|
|
2317
|
+
this.contactList = [];
|
|
2318
|
+
this.filteredContactList = [];
|
|
2319
|
+
this.callerIdList = [];
|
|
2320
|
+
this.isCallerIdHidden = true;
|
|
2321
|
+
this.isTrialPeriodOver = false;
|
|
2322
|
+
this.isPaymentDue = false;
|
|
2323
|
+
this.terminateCall = false;
|
|
2324
|
+
this.toastTimeout = 7000;
|
|
2325
|
+
this.callNumberToast = {
|
|
2326
|
+
show: false,
|
|
2327
|
+
type: 'alert-success',
|
|
2328
|
+
number: '',
|
|
2329
|
+
displayNum: ''
|
|
2330
|
+
};
|
|
2331
|
+
this.callData = {
|
|
2332
|
+
phone: '',
|
|
2333
|
+
displayNum: '',
|
|
2334
|
+
dial: false,
|
|
2335
|
+
name: '',
|
|
2336
|
+
img: 'assets/images/user.jpg',
|
|
2337
|
+
isIncomingCall: false,
|
|
2338
|
+
extNum: ''
|
|
2339
|
+
};
|
|
2340
|
+
this.lastDialed = null;
|
|
2341
|
+
this.dialAlert = {
|
|
2342
|
+
msg: '',
|
|
2343
|
+
show: false
|
|
2344
|
+
};
|
|
2345
|
+
this.showDedicatedPopup = false;
|
|
2346
|
+
this.newIncomingCalls = [];
|
|
2347
|
+
this.incomingCallsList = [];
|
|
2348
|
+
this.subscriptions = new Subscription();
|
|
2349
|
+
this.shakeDedicatedBtn = false;
|
|
2350
|
+
this.isSmartDialCall = false;
|
|
2351
|
+
this.isInitialized = false;
|
|
2352
|
+
this.isMinimised = false;
|
|
2353
|
+
// Initialize if dialpad is visible by default
|
|
2354
|
+
if (!this.isDialpadHidden) {
|
|
2355
|
+
console.log('sfsdfdsf');
|
|
2356
|
+
this.initializeTwilio();
|
|
2357
|
+
}
|
|
2358
|
+
console.log('DialboxComponent constructor');
|
|
2359
|
+
}
|
|
2360
|
+
initializeTwilio() {
|
|
2361
|
+
console.log('initializeTwilio');
|
|
2362
|
+
if (!this.isInitialized) {
|
|
2363
|
+
this.token = localStorage.getItem('ext_token') || '';
|
|
2364
|
+
if (!this.token) {
|
|
2365
|
+
console.error('No authentication token found');
|
|
2366
|
+
return;
|
|
2367
|
+
}
|
|
2368
|
+
this.isInitialized = true;
|
|
2369
|
+
// Initialize Twilio service
|
|
2370
|
+
this.twilioService.initializeTwilioDevice(this.deviceId);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
// ngOnChange() {
|
|
2374
|
+
// this.initializeTwilio();
|
|
2375
|
+
// }
|
|
2376
|
+
// ngOnInit() {
|
|
2377
|
+
// try {
|
|
2378
|
+
// this.getContactList();
|
|
2379
|
+
// this.getUserCallSetting();
|
|
2380
|
+
// // Subscribe to dial number events
|
|
2381
|
+
// const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact: any) => {
|
|
2382
|
+
// if (contact.number) {
|
|
2383
|
+
// this.isSmartDialCall = false;
|
|
2384
|
+
// if (contact.isDialFromHistory) {
|
|
2385
|
+
// //handle dialing from history page
|
|
2386
|
+
// if(contact.callerId == 'smartDialing'){
|
|
2387
|
+
// this.selectedCallerId = { number: contact.from };
|
|
2388
|
+
// this.isSmartDialCall = true;
|
|
2389
|
+
// setTimeout(() => {
|
|
2390
|
+
// this.isDialpadHidden = false;
|
|
2391
|
+
// }, 2000);
|
|
2392
|
+
// this.callData.phone = contact.number;
|
|
2393
|
+
// this.callData.name = contact.name;
|
|
2394
|
+
// this.callData.img = contact.img;
|
|
2395
|
+
// this.callData.from = contact.from;
|
|
2396
|
+
// this.sanitizedNum = contact.number;
|
|
2397
|
+
// this.getUserInformation(contact);
|
|
2398
|
+
// // this.incomingCallsList.push(contact)
|
|
2399
|
+
// this.initiateCall();
|
|
2400
|
+
// }else{
|
|
2401
|
+
// this.getUserCallSetting();
|
|
2402
|
+
// setTimeout(() => {
|
|
2403
|
+
// this.isDialpadHidden = false;
|
|
2404
|
+
// }, 1000);
|
|
2405
|
+
// this.getUserInformation(contact);
|
|
2406
|
+
// // this.incomingCallsList.push(contact)
|
|
2407
|
+
// this.dialedNumber = contact.number;
|
|
2408
|
+
// this.sanitizedNum = contact.number;
|
|
2409
|
+
// }
|
|
2410
|
+
// } else {
|
|
2411
|
+
// if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
|
|
2412
|
+
// this.getUserCallSetting();
|
|
2413
|
+
// setTimeout(() => {
|
|
2414
|
+
// this.isDialpadHidden = false;
|
|
2415
|
+
// }, 1000);
|
|
2416
|
+
// this.dialedNumber = contact.number;
|
|
2417
|
+
// this.sanitizedNum = contact.number;
|
|
2418
|
+
// } else {
|
|
2419
|
+
// setTimeout(() => {
|
|
2420
|
+
// this.isDialpadHidden = false;
|
|
2421
|
+
// }, 2000);
|
|
2422
|
+
// this.callData.phone = contact.number;
|
|
2423
|
+
// this.callData.name = contact.name;
|
|
2424
|
+
// this.callData.img = contact.img;
|
|
2425
|
+
// this.sanitizedNum = contact.number;
|
|
2426
|
+
// this.initiateCall();
|
|
2427
|
+
// }
|
|
2428
|
+
// }
|
|
2429
|
+
// }
|
|
2430
|
+
// })
|
|
2431
|
+
// // handle incoming call
|
|
2432
|
+
// const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
|
|
2433
|
+
// // if (incomingCallData) {
|
|
2434
|
+
// // this.isCallInProgress = true;
|
|
2435
|
+
// // this.isDialpadHidden = false;
|
|
2436
|
+
// // this.callData.phone = incomingCallData.parameters.From;
|
|
2437
|
+
// // this.callData.name = incomingCallData.customParameters.get('name');
|
|
2438
|
+
// // this.callData.img = incomingCallData.customParameters.get('image');
|
|
2439
|
+
// // this.callData.isIncomingCall = true;
|
|
2440
|
+
// // }
|
|
2441
|
+
// if (incomingCallData) {
|
|
2442
|
+
// if (this.isCallInProgress) {
|
|
2443
|
+
// this.newIncomingCalls.push(incomingCallData);
|
|
2444
|
+
// this.getUserInformation(incomingCallData);
|
|
2445
|
+
// } else {
|
|
2446
|
+
// this.isCallInProgress = true;
|
|
2447
|
+
// this.isDialpadHidden = false;
|
|
2448
|
+
// this.callData.phone = incomingCallData.parameters['From'];
|
|
2449
|
+
// this.getUserInformation(incomingCallData);
|
|
2450
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
2451
|
+
// this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
2452
|
+
// this.callData.isIncomingCall = true;
|
|
2453
|
+
// }
|
|
2454
|
+
// incomingCallData.on('cancel', () => {
|
|
2455
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters.CallSid !== incomingCallData.parameters['CallSid']);
|
|
2456
|
+
// if(this.incomingCallsList.length == 0){
|
|
2457
|
+
// this.isCallInProgress = false;
|
|
2458
|
+
// }
|
|
2459
|
+
// });
|
|
2460
|
+
// incomingCallData.on('disconnect', () => {
|
|
2461
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item: any) => item.parameters.CallSid !== incomingCallData.parameters['CallSid']);
|
|
2462
|
+
// if(this.incomingCallsList.length == 0){
|
|
2463
|
+
// this.isCallInProgress = false;
|
|
2464
|
+
// }
|
|
2465
|
+
// });
|
|
2466
|
+
// }
|
|
2467
|
+
// });
|
|
2468
|
+
// this.subscriptions.add(sub1);
|
|
2469
|
+
// this.subscriptions.add(sub2);
|
|
2470
|
+
// }catch(e){
|
|
2471
|
+
// console.log(e)
|
|
2472
|
+
// }
|
|
2473
|
+
// }
|
|
2474
|
+
ngOnInit() {
|
|
2475
|
+
console.log('ngOnInit');
|
|
2476
|
+
// Ensure Twilio is initialized even when dialpad starts hidden,
|
|
2477
|
+
// so we can auto-open on incoming calls.
|
|
2478
|
+
this.initializeTwilio();
|
|
2479
|
+
try {
|
|
2480
|
+
this.token = localStorage.getItem('ext_token') || '';
|
|
2481
|
+
//this.isCallInProgress = true;
|
|
2482
|
+
this.getContactList();
|
|
2483
|
+
this.getUserCallSetting();
|
|
2484
|
+
const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact) => {
|
|
2485
|
+
if (contact.number) {
|
|
2486
|
+
this.isSmartDialCall = false;
|
|
2487
|
+
if (contact.isDialFromHistory) {
|
|
2488
|
+
//handle dialing from history page
|
|
2489
|
+
if (contact.callerId == 'smartDialing') {
|
|
2490
|
+
this.selectedCallerId = { number: contact.from };
|
|
2491
|
+
this.isSmartDialCall = true;
|
|
2492
|
+
setTimeout(() => {
|
|
2493
|
+
this.isDialpadHidden = false;
|
|
2494
|
+
}, 2000);
|
|
2495
|
+
this.callData.phone = contact.number;
|
|
2496
|
+
this.callData.name = contact.name;
|
|
2497
|
+
this.callData.img = contact.img;
|
|
2498
|
+
this.callData.from = contact.from;
|
|
2499
|
+
this.sanitizedNum = contact.number;
|
|
2500
|
+
console.log('274', contact);
|
|
2501
|
+
this.getUserInformation(contact);
|
|
2502
|
+
// this.incomingCallsList.push(contact)
|
|
2503
|
+
this.initiateCall();
|
|
2504
|
+
}
|
|
2505
|
+
else {
|
|
2506
|
+
this.getUserCallSetting();
|
|
2507
|
+
setTimeout(() => {
|
|
2508
|
+
this.isDialpadHidden = false;
|
|
2509
|
+
}, 1000);
|
|
2510
|
+
console.log('282', contact);
|
|
2511
|
+
this.getUserInformation(contact);
|
|
2512
|
+
// this.incomingCallsList.push(contact)
|
|
2513
|
+
this.dialedNumber = contact.number;
|
|
2514
|
+
this.sanitizedNum = contact.number;
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
else {
|
|
2518
|
+
if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
|
|
2519
|
+
this.getUserCallSetting();
|
|
2520
|
+
setTimeout(() => {
|
|
2521
|
+
this.isDialpadHidden = false;
|
|
2522
|
+
}, 1000);
|
|
2523
|
+
this.dialedNumber = contact.number;
|
|
2524
|
+
this.sanitizedNum = contact.number;
|
|
2525
|
+
}
|
|
2526
|
+
else {
|
|
2527
|
+
setTimeout(() => {
|
|
2528
|
+
this.isDialpadHidden = false;
|
|
2529
|
+
}, 2000);
|
|
2530
|
+
this.callData.phone = contact.number;
|
|
2531
|
+
this.callData.name = contact.name;
|
|
2532
|
+
this.callData.img = contact.img;
|
|
2533
|
+
this.sanitizedNum = contact.number;
|
|
2534
|
+
this.initiateCall();
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
});
|
|
2539
|
+
// handle incoming call (managed internally; host need not pass incomingCallData)
|
|
2540
|
+
const sub2 = this.twilioService.currentCall.subscribe((incomingCallData) => {
|
|
2541
|
+
// if (incomingCallData) {
|
|
2542
|
+
// this.isCallInProgress = true;
|
|
2543
|
+
// this.isDialpadHidden = false;
|
|
2544
|
+
// this.callData.phone = incomingCallData.parameters.From;
|
|
2545
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
2546
|
+
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
2547
|
+
// this.callData.isIncomingCall = true;
|
|
2548
|
+
// }
|
|
2549
|
+
if (incomingCallData) {
|
|
2550
|
+
if (this.autoOpenOnIncoming && this._isDialpadHidden) {
|
|
2551
|
+
this._isDialpadHidden = false;
|
|
2552
|
+
}
|
|
2553
|
+
if (this.isCallInProgress) {
|
|
2554
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
2555
|
+
console.log('325', incomingCallData);
|
|
2556
|
+
this.getUserInformation(incomingCallData);
|
|
2557
|
+
}
|
|
2558
|
+
else {
|
|
2559
|
+
incomingCallData['isFirstCall'] = true;
|
|
2560
|
+
this.isCallInProgress = true;
|
|
2561
|
+
this.isDialpadHidden = false;
|
|
2562
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
2563
|
+
console.log('332', incomingCallData);
|
|
2564
|
+
this.getUserInformation(incomingCallData);
|
|
2565
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
2566
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
2567
|
+
this.callData.isIncomingCall = true;
|
|
2568
|
+
}
|
|
2569
|
+
incomingCallData.on('cancel', () => {
|
|
2570
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
2571
|
+
if (this.incomingCallsList.length == 0) {
|
|
2572
|
+
this.isCallInProgress = false;
|
|
2573
|
+
}
|
|
2574
|
+
});
|
|
2575
|
+
incomingCallData.on('disconnect', () => {
|
|
2576
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== incomingCallData.parameters['CallSid']);
|
|
2577
|
+
if (this.incomingCallsList.length == 0) {
|
|
2578
|
+
this.isCallInProgress = false;
|
|
2579
|
+
}
|
|
2580
|
+
});
|
|
2581
|
+
}
|
|
2582
|
+
});
|
|
2583
|
+
this.subscriptions.add(sub1);
|
|
2584
|
+
this.subscriptions.add(sub2);
|
|
2585
|
+
}
|
|
2586
|
+
catch (e) {
|
|
2587
|
+
console.log(e);
|
|
2588
|
+
}
|
|
2589
|
+
}
|
|
2590
|
+
getUserInformation(incomingCallData) {
|
|
2591
|
+
// console.log('getUserInformation', incomingCallData);
|
|
2592
|
+
let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
|
|
2593
|
+
console.log('366---', data);
|
|
2594
|
+
this.extensionService.getUserInformation(data['twilioAuthId']).subscribe(response => {
|
|
2595
|
+
incomingCallData['userInfo'] = response;
|
|
2596
|
+
const alreadyExists = this.incomingCallsList.some((call) => call.parameters?.CallSid === incomingCallData.parameters?.CallSid);
|
|
2597
|
+
if (!alreadyExists) {
|
|
2598
|
+
this.incomingCallsList.push(incomingCallData);
|
|
2599
|
+
}
|
|
2600
|
+
this.cdk.detectChanges();
|
|
2601
|
+
}, error => {
|
|
2602
|
+
console.error('Error starting recording', error);
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
fromEntries(entries) {
|
|
2606
|
+
return entries.reduce((acc, [key, value]) => {
|
|
2607
|
+
acc[key] = value;
|
|
2608
|
+
return acc;
|
|
2609
|
+
}, {});
|
|
1255
2610
|
}
|
|
1256
|
-
|
|
2611
|
+
ngAfterViewInit() {
|
|
2612
|
+
this.registerDragElement();
|
|
2613
|
+
}
|
|
2614
|
+
ngOnChanges(changes) {
|
|
2615
|
+
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
2616
|
+
this.getContactList();
|
|
2617
|
+
this.getUserCallSetting();
|
|
2618
|
+
setTimeout(() => {
|
|
2619
|
+
this.dialInputElement.nativeElement.focus();
|
|
2620
|
+
}, 0);
|
|
2621
|
+
if (this.incomingCallData) {
|
|
2622
|
+
if (this.isCallInProgress) {
|
|
2623
|
+
this.newIncomingCalls.push(this.incomingCallData);
|
|
2624
|
+
console.log('404', this.incomingCallData);
|
|
2625
|
+
this.getUserInformation(this.incomingCallData);
|
|
2626
|
+
}
|
|
2627
|
+
else {
|
|
2628
|
+
this.isCallInProgress = true;
|
|
2629
|
+
this.isDialpadHidden = false;
|
|
2630
|
+
this.callData.phone = this.incomingCallData.parameters['From'];
|
|
2631
|
+
console.log('411', this.incomingCallData);
|
|
2632
|
+
this.getUserInformation(this.incomingCallData);
|
|
2633
|
+
this.callData.name = this.incomingCallData.customParameters.get('name');
|
|
2634
|
+
this.callData.img = this.incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
2635
|
+
this.callData.isIncomingCall = true;
|
|
2636
|
+
}
|
|
2637
|
+
this.incomingCallData.on('cancel', () => {
|
|
2638
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2639
|
+
if (this.incomingCallsList.length == 0) {
|
|
2640
|
+
this.isCallInProgress = false;
|
|
2641
|
+
}
|
|
2642
|
+
this.incomingCallData.disconnect();
|
|
2643
|
+
});
|
|
2644
|
+
this.incomingCallData.on('disconnect', () => {
|
|
2645
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== this.incomingCallData.parameters['CallSid']);
|
|
2646
|
+
this.incomingCallData.disconnect();
|
|
2647
|
+
if (this.incomingCallsList.length == 0) {
|
|
2648
|
+
this.isCallInProgress = false;
|
|
2649
|
+
}
|
|
2650
|
+
});
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
if (changes['contactInfo'] && this.contactInfo) {
|
|
2654
|
+
let contact = this.contactInfo;
|
|
2655
|
+
if (contact.number) {
|
|
2656
|
+
this.isSmartDialCall = false;
|
|
2657
|
+
if (contact.isDialFromHistory) {
|
|
2658
|
+
//handle dialing from history page
|
|
2659
|
+
if (contact.callerId == 'smartDialing') {
|
|
2660
|
+
this.selectedCallerId = { number: contact.from };
|
|
2661
|
+
this.isSmartDialCall = true;
|
|
2662
|
+
setTimeout(() => {
|
|
2663
|
+
this.isDialpadHidden = false;
|
|
2664
|
+
}, 2000);
|
|
2665
|
+
this.callData.phone = contact.number;
|
|
2666
|
+
this.callData.name = contact.name;
|
|
2667
|
+
this.callData.img = contact.img;
|
|
2668
|
+
this.callData.from = contact.from;
|
|
2669
|
+
this.sanitizedNum = contact.number;
|
|
2670
|
+
console.log('274', contact);
|
|
2671
|
+
this.getUserInformation(contact);
|
|
2672
|
+
// this.incomingCallsList.push(contact)
|
|
2673
|
+
this.initiateCall();
|
|
2674
|
+
}
|
|
2675
|
+
else {
|
|
2676
|
+
this.getUserCallSetting();
|
|
2677
|
+
setTimeout(() => {
|
|
2678
|
+
this.isDialpadHidden = false;
|
|
2679
|
+
}, 1000);
|
|
2680
|
+
console.log('282', contact);
|
|
2681
|
+
this.getUserInformation(contact);
|
|
2682
|
+
// this.incomingCallsList.push(contact)
|
|
2683
|
+
this.dialedNumber = contact.number;
|
|
2684
|
+
this.sanitizedNum = contact.number;
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
else {
|
|
2688
|
+
if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
|
|
2689
|
+
this.getUserCallSetting();
|
|
2690
|
+
setTimeout(() => {
|
|
2691
|
+
this.isDialpadHidden = false;
|
|
2692
|
+
}, 1000);
|
|
2693
|
+
this.dialedNumber = contact.number;
|
|
2694
|
+
this.sanitizedNum = contact.number;
|
|
2695
|
+
}
|
|
2696
|
+
else {
|
|
2697
|
+
setTimeout(() => {
|
|
2698
|
+
this.isDialpadHidden = false;
|
|
2699
|
+
}, 2000);
|
|
2700
|
+
this.callData.phone = contact.number;
|
|
2701
|
+
this.callData.name = contact.name;
|
|
2702
|
+
this.callData.img = contact.img;
|
|
2703
|
+
this.sanitizedNum = contact.number;
|
|
2704
|
+
this.initiateCall();
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
registerDragElement() {
|
|
2711
|
+
try {
|
|
2712
|
+
const elmnt = document.getElementById('dragparent1');
|
|
2713
|
+
if (!elmnt) {
|
|
2714
|
+
console.error('Drag element not found');
|
|
2715
|
+
return;
|
|
2716
|
+
}
|
|
2717
|
+
let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
|
2718
|
+
const dragMouseDown = (e) => {
|
|
2719
|
+
const target = e.target;
|
|
2720
|
+
if (target.tagName.toLowerCase() === 'input') {
|
|
2721
|
+
return;
|
|
2722
|
+
}
|
|
2723
|
+
e.preventDefault();
|
|
2724
|
+
pos3 = e.clientX;
|
|
2725
|
+
pos4 = e.clientY;
|
|
2726
|
+
const onMouseMove = (moveEvent) => elementDrag(moveEvent);
|
|
2727
|
+
const onMouseUp = () => {
|
|
2728
|
+
document.removeEventListener('mouseup', onMouseUp);
|
|
2729
|
+
document.removeEventListener('mousemove', onMouseMove);
|
|
2730
|
+
};
|
|
2731
|
+
document.addEventListener('mousemove', onMouseMove);
|
|
2732
|
+
document.addEventListener('mouseup', onMouseUp);
|
|
2733
|
+
};
|
|
2734
|
+
const elementDrag = (e) => {
|
|
2735
|
+
e.preventDefault();
|
|
2736
|
+
pos1 = pos3 - e.clientX;
|
|
2737
|
+
pos2 = pos4 - e.clientY;
|
|
2738
|
+
pos3 = e.clientX;
|
|
2739
|
+
pos4 = e.clientY;
|
|
2740
|
+
elmnt.style.top = (elmnt.offsetTop - pos2) + 'px';
|
|
2741
|
+
elmnt.style.left = (elmnt.offsetLeft - pos1) + 'px';
|
|
2742
|
+
};
|
|
2743
|
+
// Check for header element
|
|
2744
|
+
const header = document.getElementById(elmnt.id + 'header');
|
|
2745
|
+
if (header) {
|
|
2746
|
+
header.onmousedown = dragMouseDown;
|
|
2747
|
+
}
|
|
2748
|
+
else {
|
|
2749
|
+
elmnt.onmousedown = dragMouseDown;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
catch (e) {
|
|
2753
|
+
console.log(e);
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
addNumber(num) {
|
|
2757
|
+
if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
|
|
2758
|
+
if (num == '#') {
|
|
2759
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
|
|
2760
|
+
}
|
|
2761
|
+
else if (num == '*') {
|
|
2762
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
|
|
2763
|
+
}
|
|
2764
|
+
else {
|
|
2765
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
|
|
2766
|
+
}
|
|
2767
|
+
this.dialedNumber += num;
|
|
2768
|
+
this.showInputClearBtn = true;
|
|
2769
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
2770
|
+
this.onDialInputChange(this.dialedNumber);
|
|
2771
|
+
// this.dialInputRef.nativeElement.focus();
|
|
2772
|
+
}
|
|
2773
|
+
else if (num === 'voicemail') {
|
|
2774
|
+
// this.showDedicatedPopup = true;
|
|
2775
|
+
this.router.navigate(['extension/voicemail/' + this.token]);
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
hideDialpad() {
|
|
2779
|
+
this.isDialpadHidden = true;
|
|
1257
2780
|
this.closeDialpadEvent.emit();
|
|
2781
|
+
this.clearAllDialed();
|
|
2782
|
+
this.filteredContactList = [];
|
|
2783
|
+
}
|
|
2784
|
+
onDialInputChange(inputVal) {
|
|
2785
|
+
try {
|
|
2786
|
+
// Updated regex to include x, X, ext., Ext., and ,
|
|
2787
|
+
const isNumericInput = /^[\d\s+\-]+$/.test(inputVal);
|
|
2788
|
+
let mainNumber = inputVal;
|
|
2789
|
+
// Check for extension indicators and split the input
|
|
2790
|
+
const extMatch = inputVal.match(/(x|X|ext\.|Ext\.|,)(.*)/);
|
|
2791
|
+
if (extMatch) {
|
|
2792
|
+
mainNumber = inputVal.substring(0, extMatch.index).trim();
|
|
2793
|
+
this.callData.extNum = extMatch[2].trim();
|
|
2794
|
+
}
|
|
2795
|
+
this.sanitizedNum = isNumericInput ? mainNumber.replace(/[\s\-]+/g, '') : mainNumber;
|
|
2796
|
+
this.callData.phone = isNumericInput ? this.sanitizedNum : '';
|
|
2797
|
+
this.showInputClearBtn = inputVal.length > 0;
|
|
2798
|
+
if (isNumericInput) {
|
|
2799
|
+
this.dialedNumber = new AsYouType().input(this.sanitizedNum);
|
|
2800
|
+
}
|
|
2801
|
+
// emit current number whenever input changes
|
|
2802
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
2803
|
+
if (inputVal.length > 2) {
|
|
2804
|
+
this.filteredContactList = this.contactList.filter(contact => {
|
|
2805
|
+
const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
|
|
2806
|
+
return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some((num) => num.number.includes(this.sanitizedNum));
|
|
2807
|
+
}).slice(0, 2);
|
|
2808
|
+
}
|
|
2809
|
+
else {
|
|
2810
|
+
this.filteredContactList = [];
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
catch (e) {
|
|
2814
|
+
console.log(e);
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
getFirstLetter(name) {
|
|
2818
|
+
return name ? name.charAt(0).toUpperCase() : '';
|
|
2819
|
+
}
|
|
2820
|
+
clearInput() {
|
|
2821
|
+
if (this.dialedNumber.length > 0) {
|
|
2822
|
+
this.dialedNumber = this.dialedNumber.slice(0, -1);
|
|
2823
|
+
this.showInputClearBtn = this.dialedNumber.length !== 0;
|
|
2824
|
+
this.onDialInputChange(this.dialedNumber);
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
clearAllDialed() {
|
|
2828
|
+
this.dialedNumber = '';
|
|
2829
|
+
this.sanitizedNum = '';
|
|
2830
|
+
this.showInputClearBtn = false;
|
|
2831
|
+
}
|
|
2832
|
+
getCallerIdList() {
|
|
2833
|
+
this.extService.displayID(this.token || '').subscribe((res) => {
|
|
2834
|
+
//this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
|
|
2835
|
+
this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
|
|
2836
|
+
// this.callerIdList = res.callerIdList;
|
|
2837
|
+
if (this.callerIdList.length == 1) {
|
|
2838
|
+
this.selectedCallerId = this.callerIdList[0];
|
|
2839
|
+
}
|
|
2840
|
+
else {
|
|
2841
|
+
if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
|
|
2842
|
+
this.selectedCallerId = null;
|
|
2843
|
+
}
|
|
2844
|
+
else {
|
|
2845
|
+
this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
});
|
|
2849
|
+
}
|
|
2850
|
+
getContactList() {
|
|
2851
|
+
this.twilioService.getContactList().subscribe((resp) => {
|
|
2852
|
+
if (resp.response == 'Success') {
|
|
2853
|
+
this.contactList = resp.phoneBook;
|
|
2854
|
+
}
|
|
2855
|
+
}, err => {
|
|
2856
|
+
console.log(err);
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2859
|
+
getFullName(contact) {
|
|
2860
|
+
let fullName = contact.firstName || '';
|
|
2861
|
+
if (contact.middleName) {
|
|
2862
|
+
fullName += ` ${contact.middleName}`;
|
|
2863
|
+
}
|
|
2864
|
+
if (contact.lastName) {
|
|
2865
|
+
fullName += ` ${contact.lastName}`;
|
|
2866
|
+
}
|
|
2867
|
+
return fullName.trim();
|
|
2868
|
+
}
|
|
2869
|
+
toggleCallerIdDiv() {
|
|
2870
|
+
this.isCallerIdHidden = !this.isCallerIdHidden;
|
|
2871
|
+
}
|
|
2872
|
+
onContactSelect(contact) {
|
|
2873
|
+
this.dialedNumber = contact.numbersList[0].number;
|
|
2874
|
+
this.callData.name = this.getFullName(contact);
|
|
2875
|
+
this.callData.img = contact.image || 'assets/images/user.jpg';
|
|
2876
|
+
this.onDialInputChange(this.dialedNumber);
|
|
2877
|
+
this.filteredContactList = [];
|
|
2878
|
+
}
|
|
2879
|
+
endCall() {
|
|
2880
|
+
try {
|
|
2881
|
+
console.log('Ending call');
|
|
2882
|
+
this.isCallInProgress = false;
|
|
2883
|
+
this.filteredContactList = [];
|
|
2884
|
+
// Reset call data
|
|
2885
|
+
this.callData = {
|
|
2886
|
+
phone: '',
|
|
2887
|
+
name: '',
|
|
2888
|
+
img: 'assets/images/user.jpg',
|
|
2889
|
+
isIncomingCall: false,
|
|
2890
|
+
dial: false,
|
|
2891
|
+
displayNum: '',
|
|
2892
|
+
extNum: ''
|
|
2893
|
+
};
|
|
2894
|
+
// Reset dialed number
|
|
2895
|
+
this.dialedNumber = '';
|
|
2896
|
+
this.sanitizedNum = '';
|
|
2897
|
+
// Emit end call event
|
|
2898
|
+
this.endCallEvent.emit();
|
|
2899
|
+
console.log('Call ended successfully');
|
|
2900
|
+
}
|
|
2901
|
+
catch (error) {
|
|
2902
|
+
console.error('Error in endCall:', error);
|
|
2903
|
+
// Even if there's an error, try to reset the state
|
|
2904
|
+
this.isCallInProgress = false;
|
|
2905
|
+
this.callData = {
|
|
2906
|
+
phone: '',
|
|
2907
|
+
name: '',
|
|
2908
|
+
img: 'assets/images/user.jpg',
|
|
2909
|
+
isIncomingCall: false,
|
|
2910
|
+
dial: false,
|
|
2911
|
+
displayNum: '',
|
|
2912
|
+
extNum: ''
|
|
2913
|
+
};
|
|
2914
|
+
this.endCallEvent.emit();
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
// async initiateCall() {
|
|
2918
|
+
// try {
|
|
2919
|
+
// console.log('Initiating call with number:', this.dialedNumber);
|
|
2920
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
2921
|
+
// console.log('Using last dialed number:', this.lastDialed.number);
|
|
2922
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
2923
|
+
// }
|
|
2924
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
2925
|
+
// if (isInvalid) {
|
|
2926
|
+
// console.error('Invalid number format');
|
|
2927
|
+
// return false;
|
|
2928
|
+
// }
|
|
2929
|
+
// this.saveLastDialed();
|
|
2930
|
+
// this.isSavedContactDialled();
|
|
2931
|
+
// // Check payment status
|
|
2932
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') === 'true';
|
|
2933
|
+
// if (this.isPaymentDue) {
|
|
2934
|
+
// console.warn('Payment is due');
|
|
2935
|
+
// swal('Warning', 'Please note that your payment is due. To continue using our services, kindly subscribe to avoid interruptions.');
|
|
2936
|
+
// return false;
|
|
2937
|
+
// }
|
|
2938
|
+
// // Check if dialing own number
|
|
2939
|
+
// if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
|
|
2940
|
+
// console.error('Attempted to dial own number');
|
|
2941
|
+
// swal('Error', 'You cannot dial your own number');
|
|
2942
|
+
// return false;
|
|
2943
|
+
// }
|
|
2944
|
+
// // Check microphone permissions
|
|
2945
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
2946
|
+
// if (!hasPermission) {
|
|
2947
|
+
// console.warn('Microphone permission not granted');
|
|
2948
|
+
// await this.askForMicrophonePermission();
|
|
2949
|
+
// return false;
|
|
2950
|
+
// }
|
|
2951
|
+
// if (!this.selectedCallerId) {
|
|
2952
|
+
// console.error('No caller ID selected');
|
|
2953
|
+
// this.shakeDedicatedBtn = true;
|
|
2954
|
+
// this.showDialAlert('Please select a C2C number to call from');
|
|
2955
|
+
// setTimeout(() => {
|
|
2956
|
+
// this.shakeDedicatedBtn = false;
|
|
2957
|
+
// }, 3000);
|
|
2958
|
+
// return false;
|
|
2959
|
+
// }
|
|
2960
|
+
// console.log('Getting number with country code...');
|
|
2961
|
+
// this.callData.displayNum = '';
|
|
2962
|
+
// try {
|
|
2963
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
2964
|
+
// } catch (error) {
|
|
2965
|
+
// console.error('Error getting number with country code:', error);
|
|
2966
|
+
// this.showDialAlert('Error processing number. Please try again.');
|
|
2967
|
+
// return false;
|
|
2968
|
+
// }
|
|
2969
|
+
// if (this.terminateCall) {
|
|
2970
|
+
// console.log('Call terminated by user');
|
|
2971
|
+
// this.terminateCall = false;
|
|
2972
|
+
// return false;
|
|
2973
|
+
// }
|
|
2974
|
+
// // Prepare call data
|
|
2975
|
+
// this.callData = {
|
|
2976
|
+
// ...this.callData,
|
|
2977
|
+
// phone: this.sanitizedNum,
|
|
2978
|
+
// isIncomingCall: false,
|
|
2979
|
+
// dial: true,
|
|
2980
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
2981
|
+
// timestamp: new Date().toISOString()
|
|
2982
|
+
// };
|
|
2983
|
+
// console.log('Initiating call with data:', this.callData);
|
|
2984
|
+
// this.isCallInProgress = true;
|
|
2985
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
2986
|
+
// return true;
|
|
2987
|
+
// } catch (error) {
|
|
2988
|
+
// console.error('Error in initiateCall:', error);
|
|
2989
|
+
// this.showDialAlert('Failed to initiate call. Please try again.');
|
|
2990
|
+
// this.isCallInProgress = false;
|
|
2991
|
+
// return false;
|
|
2992
|
+
// }
|
|
2993
|
+
// //this.clearAllDialed();
|
|
2994
|
+
// // } else {
|
|
2995
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
2996
|
+
// // }
|
|
2997
|
+
// }
|
|
2998
|
+
// async initiateCall() {
|
|
2999
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
3000
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
3001
|
+
// }
|
|
3002
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
3003
|
+
// if (isInvalid) {
|
|
3004
|
+
// return false;
|
|
3005
|
+
// }
|
|
3006
|
+
// this.saveLastDialed();
|
|
3007
|
+
// this.isSavedContactDialled();
|
|
3008
|
+
// //let isCallerIdSet = await this.isCallerIdSet();
|
|
3009
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
|
|
3010
|
+
// if (this.isPaymentDue) {
|
|
3011
|
+
// swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
3012
|
+
// return;
|
|
3013
|
+
// }
|
|
3014
|
+
// this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
|
|
3015
|
+
// // if (!this.isTrialPeriodOver) {
|
|
3016
|
+
// if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
|
|
3017
|
+
// swal('Error', 'You can not dial this number');
|
|
3018
|
+
// return;
|
|
3019
|
+
// }
|
|
3020
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
3021
|
+
// if (hasPermission) {
|
|
3022
|
+
// if (this.selectedCallerId) {
|
|
3023
|
+
// //clear displayNum if value is binded from previous call
|
|
3024
|
+
// this.callData.displayNum = '';
|
|
3025
|
+
// // get number to be dialled from backend
|
|
3026
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
3027
|
+
// if (this.terminateCall) {
|
|
3028
|
+
// this.terminateCall = false;
|
|
3029
|
+
// return;
|
|
3030
|
+
// }
|
|
3031
|
+
// this.callData.phone = this.sanitizedNum;
|
|
3032
|
+
// this.callData.isIncomingCall = false;
|
|
3033
|
+
// this.callData.dial = true;
|
|
3034
|
+
// if (!this.isSmartDialCall) {
|
|
3035
|
+
// this.callData.from = this.selectedCallerId.number;
|
|
3036
|
+
// }
|
|
3037
|
+
// this.isCallInProgress = true;
|
|
3038
|
+
// this.callData = {
|
|
3039
|
+
// ...this.callData,
|
|
3040
|
+
// phone: this.sanitizedNum,
|
|
3041
|
+
// isIncomingCall: false,
|
|
3042
|
+
// dial: true,
|
|
3043
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
3044
|
+
// timestamp: new Date().toISOString()
|
|
3045
|
+
// };
|
|
3046
|
+
// console.log('Initiating call with data:', this.callData);
|
|
3047
|
+
// this.isCallInProgress = true;
|
|
3048
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
3049
|
+
// return true;
|
|
3050
|
+
// } else {
|
|
3051
|
+
// this.shakeDedicatedBtn = true;
|
|
3052
|
+
// this.showDialAlert('Select a C2C number to call');
|
|
3053
|
+
// setTimeout(() => {
|
|
3054
|
+
// this.shakeDedicatedBtn = false;
|
|
3055
|
+
// }, 3000);
|
|
3056
|
+
// return false;
|
|
3057
|
+
// }
|
|
3058
|
+
// //this.callingOpenEvent.emit({ phone: this.dialedNumber });
|
|
3059
|
+
// } else {
|
|
3060
|
+
// await this.askForMicrophonePermission();
|
|
3061
|
+
// }
|
|
3062
|
+
// //this.clearAllDialed();
|
|
3063
|
+
// // } else {
|
|
3064
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
3065
|
+
// // }
|
|
3066
|
+
// }
|
|
3067
|
+
// async initiateCall() {
|
|
3068
|
+
// try{
|
|
3069
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
3070
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
3071
|
+
// }
|
|
3072
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
3073
|
+
// if (isInvalid) {
|
|
3074
|
+
// return false;
|
|
3075
|
+
// }
|
|
3076
|
+
// this.saveLastDialed();
|
|
3077
|
+
// this.isSavedContactDialled();
|
|
3078
|
+
// //let isCallerIdSet = await this.isCallerIdSet();
|
|
3079
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
|
|
3080
|
+
// if (this.isPaymentDue) {
|
|
3081
|
+
// swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
3082
|
+
// return false;
|
|
3083
|
+
// }
|
|
3084
|
+
// this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
|
|
3085
|
+
// // if (!this.isTrialPeriodOver) {
|
|
3086
|
+
// if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
|
|
3087
|
+
// swal('Error', 'You can not dial this number');
|
|
3088
|
+
// return false;
|
|
3089
|
+
// }
|
|
3090
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
3091
|
+
// if (hasPermission) {
|
|
3092
|
+
// if (this.selectedCallerId) {
|
|
3093
|
+
// //clear displayNum if value is binded from previous call
|
|
3094
|
+
// this.callData.displayNum = '';
|
|
3095
|
+
// // get number to be dialled from backend
|
|
3096
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
3097
|
+
// if (this.terminateCall) {
|
|
3098
|
+
// this.terminateCall = false;
|
|
3099
|
+
// return;
|
|
3100
|
+
// }
|
|
3101
|
+
// this.callData.phone = this.sanitizedNum;
|
|
3102
|
+
// this.callData.isIncomingCall = false;
|
|
3103
|
+
// this.callData.dial = true;
|
|
3104
|
+
// if (!this.isSmartDialCall) {
|
|
3105
|
+
// this.callData.from = this.selectedCallerId.number;
|
|
3106
|
+
// }
|
|
3107
|
+
// this.isCallInProgress = true;
|
|
3108
|
+
// this.callData = {
|
|
3109
|
+
// ...this.callData,
|
|
3110
|
+
// phone: this.sanitizedNum,
|
|
3111
|
+
// isIncomingCall: false,
|
|
3112
|
+
// dial: true,
|
|
3113
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
3114
|
+
// timestamp: new Date().toISOString()
|
|
3115
|
+
// };
|
|
3116
|
+
// console.log('Initiating call with data:', this.callData);
|
|
3117
|
+
// this.isCallInProgress = true;
|
|
3118
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
3119
|
+
// return true;
|
|
3120
|
+
// } else {
|
|
3121
|
+
// this.shakeDedicatedBtn = true;
|
|
3122
|
+
// this.showDialAlert('Select a C2C number to call');
|
|
3123
|
+
// setTimeout(() => {
|
|
3124
|
+
// this.shakeDedicatedBtn = false;
|
|
3125
|
+
// }, 3000);
|
|
3126
|
+
// return false;
|
|
3127
|
+
// }
|
|
3128
|
+
// //this.callingOpenEvent.emit({ phone: this.dialedNumber });
|
|
3129
|
+
// } else {
|
|
3130
|
+
// await this.askForMicrophonePermission();
|
|
3131
|
+
// }
|
|
3132
|
+
// //this.clearAllDialed();
|
|
3133
|
+
// // } else {
|
|
3134
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
3135
|
+
// // }
|
|
3136
|
+
// }catch(e){
|
|
3137
|
+
// console.error('Error in initiateCall:', e);
|
|
3138
|
+
// this.showDialAlert('Failed to initiate call. Please try again.');
|
|
3139
|
+
// this.isCallInProgress = false;
|
|
3140
|
+
// return false;
|
|
3141
|
+
// }
|
|
3142
|
+
// }
|
|
3143
|
+
async initiateCall() {
|
|
3144
|
+
try {
|
|
3145
|
+
if (!this.dialedNumber && this.lastDialed) {
|
|
3146
|
+
this.sanitizedNum = this.lastDialed.number;
|
|
3147
|
+
}
|
|
3148
|
+
const isInvalid = await this.isInvalidNumber();
|
|
3149
|
+
if (isInvalid) {
|
|
3150
|
+
return false;
|
|
3151
|
+
}
|
|
3152
|
+
this.saveLastDialed();
|
|
3153
|
+
this.isSavedContactDialled();
|
|
3154
|
+
this.isPaymentDue = localStorage.getItem('paymentDue') === 'false' ? false : true;
|
|
3155
|
+
if (this.isPaymentDue) {
|
|
3156
|
+
swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
3157
|
+
return false;
|
|
3158
|
+
}
|
|
3159
|
+
this.isTrialPeriodOver = localStorage.getItem('trialOver') === 'false' ? false : true;
|
|
3160
|
+
if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
|
|
3161
|
+
swal('Error', 'You can not dial this number');
|
|
3162
|
+
return false;
|
|
3163
|
+
}
|
|
3164
|
+
const hasPermission = await this.checkMicrophonePermission();
|
|
3165
|
+
if (!hasPermission) {
|
|
3166
|
+
await this.askForMicrophonePermission();
|
|
3167
|
+
return false;
|
|
3168
|
+
}
|
|
3169
|
+
if (!this.selectedCallerId) {
|
|
3170
|
+
this.shakeDedicatedBtn = true;
|
|
3171
|
+
this.showDialAlert('Select a C2C number to call');
|
|
3172
|
+
setTimeout(() => {
|
|
3173
|
+
this.shakeDedicatedBtn = false;
|
|
3174
|
+
}, 3000);
|
|
3175
|
+
return false;
|
|
3176
|
+
}
|
|
3177
|
+
// Clear displayNum if value is bound from previous call
|
|
3178
|
+
this.callData.displayNum = '';
|
|
3179
|
+
// Get number to be dialed from backend
|
|
3180
|
+
await this.getToNumber(this.sanitizedNum);
|
|
3181
|
+
if (this.terminateCall) {
|
|
3182
|
+
this.terminateCall = false;
|
|
3183
|
+
return;
|
|
3184
|
+
}
|
|
3185
|
+
// Update call data in a single operation
|
|
3186
|
+
this.callData = {
|
|
3187
|
+
...this.callData,
|
|
3188
|
+
phone: this.sanitizedNum,
|
|
3189
|
+
isIncomingCall: false,
|
|
3190
|
+
dial: true,
|
|
3191
|
+
from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
3192
|
+
timestamp: new Date().toISOString()
|
|
3193
|
+
};
|
|
3194
|
+
// console.log('Initiating call with data:', this.callData);
|
|
3195
|
+
this.isCallInProgress = true;
|
|
3196
|
+
this.callInitiated.emit({ ...this.callData });
|
|
3197
|
+
return true;
|
|
3198
|
+
}
|
|
3199
|
+
catch (e) {
|
|
3200
|
+
// console.error('Error in initiateCall:', e);
|
|
3201
|
+
this.showDialAlert('Failed to initiate call. Please try again.');
|
|
3202
|
+
this.isCallInProgress = false;
|
|
3203
|
+
return false;
|
|
3204
|
+
}
|
|
3205
|
+
}
|
|
3206
|
+
async isInvalidNumber() {
|
|
3207
|
+
try {
|
|
3208
|
+
if (this.sanitizedNum == '') {
|
|
3209
|
+
this.showDialAlert('Invalid Number');
|
|
3210
|
+
return true;
|
|
3211
|
+
}
|
|
3212
|
+
const validNumberPattern = /^[+\d\s()-]*$/; // Regular expression to match valid characters
|
|
3213
|
+
const phoneNumber = this.sanitizedNum;
|
|
3214
|
+
if (!validNumberPattern.test(phoneNumber)) {
|
|
3215
|
+
this.showDialAlert('Invalid Number');
|
|
3216
|
+
return true;
|
|
3217
|
+
}
|
|
3218
|
+
return false;
|
|
3219
|
+
}
|
|
3220
|
+
catch (error) {
|
|
3221
|
+
this.showDialAlert('Invalid Number');
|
|
3222
|
+
return true; // Return true if an error occurred, meaning the number is invalid
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
saveLastDialed() {
|
|
3226
|
+
const contact = this.filteredContactList.find((c) => c.numbersList.some((n) => n.number === this.dialedNumber));
|
|
3227
|
+
if (contact) {
|
|
3228
|
+
this.lastDialed = {
|
|
3229
|
+
name: contact.name,
|
|
3230
|
+
image: contact.image,
|
|
3231
|
+
number: this.dialedNumber
|
|
3232
|
+
};
|
|
3233
|
+
}
|
|
3234
|
+
else {
|
|
3235
|
+
if (this.dialedNumber) {
|
|
3236
|
+
this.lastDialed = { number: this.dialedNumber };
|
|
3237
|
+
}
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
isSavedContactDialled() {
|
|
3241
|
+
let phoneNum = this.sanitizedNum.replace(/\s+/g, '');
|
|
3242
|
+
let contact = this.contactList.filter((contact) => {
|
|
3243
|
+
return contact.numbersList.some((num) => num.number === phoneNum);
|
|
3244
|
+
});
|
|
3245
|
+
if (contact.length) {
|
|
3246
|
+
this.callData.name = `${contact[0].firstName} ${contact[0].middleName} ${contact[0].lastName}`.toLowerCase();
|
|
3247
|
+
this.callData.img = contact[0].image || 'assets/images/user.jpg';
|
|
3248
|
+
this.callData.phone = this.sanitizedNum;
|
|
3249
|
+
return true;
|
|
3250
|
+
}
|
|
3251
|
+
return false;
|
|
3252
|
+
}
|
|
3253
|
+
showDialAlert(message) {
|
|
3254
|
+
this.dialAlert = {
|
|
3255
|
+
msg: message,
|
|
3256
|
+
show: true
|
|
3257
|
+
};
|
|
3258
|
+
setTimeout(() => {
|
|
3259
|
+
this.dialAlert.show = false;
|
|
3260
|
+
}, 3000);
|
|
3261
|
+
}
|
|
3262
|
+
async isCallerIdSet() {
|
|
3263
|
+
try {
|
|
3264
|
+
const tkn = localStorage.getItem('ext_token');
|
|
3265
|
+
const res = await this.extService.fetchCallerId(tkn || '').toPromise();
|
|
3266
|
+
if (res.status == 200) {
|
|
3267
|
+
localStorage.setItem('trialOver', res.trialOver);
|
|
3268
|
+
this.twilioService.isTrialOver.next(res.trialOver);
|
|
3269
|
+
localStorage.setItem('paymentDue', res.paymentDue);
|
|
3270
|
+
this.twilioService.isPaymentDue.next(res.paymentDue);
|
|
3271
|
+
}
|
|
3272
|
+
if (res.callerid) {
|
|
3273
|
+
localStorage.setItem('callerID', res.callerid);
|
|
3274
|
+
this.extService.changeMessage(res.callerid);
|
|
3275
|
+
}
|
|
3276
|
+
else {
|
|
3277
|
+
localStorage.setItem('callerID', 'Not set');
|
|
3278
|
+
this.extService.changeMessage('Not set');
|
|
3279
|
+
}
|
|
3280
|
+
return (localStorage.getItem('callerID') !== 'Not set');
|
|
3281
|
+
}
|
|
3282
|
+
catch (e) {
|
|
3283
|
+
console.log(e);
|
|
3284
|
+
return false;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
async checkMicrophonePermission() {
|
|
3288
|
+
try {
|
|
3289
|
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
3290
|
+
stream.getTracks().forEach(track => track.stop());
|
|
3291
|
+
return true;
|
|
3292
|
+
}
|
|
3293
|
+
catch (error) {
|
|
3294
|
+
if (error.name === 'NotAllowedError') {
|
|
3295
|
+
return false;
|
|
3296
|
+
}
|
|
3297
|
+
else {
|
|
3298
|
+
return false;
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
async askForMicrophonePermission() {
|
|
3303
|
+
try {
|
|
3304
|
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
3305
|
+
stream.getTracks().forEach(track => track.stop());
|
|
3306
|
+
}
|
|
3307
|
+
catch (error) {
|
|
3308
|
+
console.error('User denied microphone permission:', error);
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
// below function is to get the country code with number from server
|
|
3312
|
+
async getToNumber(dialedNumber) {
|
|
3313
|
+
if (dialedNumber[0] !== '+') {
|
|
3314
|
+
// this is case when user geolocation dial code is on
|
|
3315
|
+
let ipAddress = await this.ipService.getIpAddressInfo().toPromise();
|
|
3316
|
+
const res = await this.twilioService.getToNumber(dialedNumber, ipAddress.address.countryCode).toPromise();
|
|
3317
|
+
if (res.status == 200) {
|
|
3318
|
+
this.toastTimeout = res.timeInterval * 1000;
|
|
3319
|
+
await this.showNumberToast(res);
|
|
3320
|
+
}
|
|
3321
|
+
}
|
|
3322
|
+
}
|
|
3323
|
+
isAlertEnable() {
|
|
3324
|
+
return localStorage.getItem('isAlertEnable');
|
|
3325
|
+
}
|
|
3326
|
+
async showNumberToast(data) {
|
|
3327
|
+
const isAlertOn = (localStorage.getItem('isCountryCodeToastOn'));
|
|
3328
|
+
if (isAlertOn == 'true') {
|
|
3329
|
+
this.callNumberToast.show = true;
|
|
3330
|
+
this.callNumberToast.number = data.toNumber;
|
|
3331
|
+
this.callNumberToast.displayNum = data.displayNumber;
|
|
3332
|
+
}
|
|
3333
|
+
this.callData.displayNum = data.displayNumber;
|
|
3334
|
+
//this.callData.phone = data.toNumber;
|
|
3335
|
+
await this.delay(this.toastTimeout);
|
|
3336
|
+
this.dialedNumber = data.toNumber;
|
|
3337
|
+
this.sanitizedNum = data.toNumber;
|
|
3338
|
+
this.callNumberToast.show = false;
|
|
3339
|
+
this.callNumberToast.number = '';
|
|
3340
|
+
this.callNumberToast.displayNum = '';
|
|
3341
|
+
}
|
|
3342
|
+
delay(ms) {
|
|
3343
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
3344
|
+
}
|
|
3345
|
+
onMinimise(isMinimised) {
|
|
3346
|
+
this.isMinimised = isMinimised;
|
|
3347
|
+
this.minimiseEvent.emit(isMinimised);
|
|
3348
|
+
}
|
|
3349
|
+
handleNumberPaste(event) {
|
|
3350
|
+
event.preventDefault();
|
|
3351
|
+
const clipboardData = event.clipboardData || window.clipboardData;
|
|
3352
|
+
const pastedData = clipboardData.getData('text');
|
|
3353
|
+
// Log the pasted content to the console
|
|
3354
|
+
if (pastedData) {
|
|
3355
|
+
this.dialedNumber = pastedData;
|
|
3356
|
+
this.sanitizedNum = pastedData;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
onEnter(num) {
|
|
3360
|
+
// console.log(num, 'number fn')
|
|
3361
|
+
this.dialedNumber = this.dialedNumber + num;
|
|
3362
|
+
this.sanitizedNum = this.dialedNumber;
|
|
3363
|
+
this.showInputClearBtn = true;
|
|
3364
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
3365
|
+
}
|
|
3366
|
+
getUserCallSetting() {
|
|
3367
|
+
const tkn = localStorage.getItem('ext_token');
|
|
3368
|
+
this.extService.fetchCallerId(tkn || '').subscribe((resp) => {
|
|
3369
|
+
if (resp.status == 200) {
|
|
3370
|
+
//this.callPrefernce = resp.userSetting;
|
|
3371
|
+
this.callPreference = resp.callerid;
|
|
3372
|
+
this.getCallerIdList();
|
|
3373
|
+
}
|
|
3374
|
+
});
|
|
3375
|
+
}
|
|
3376
|
+
onDedicatedNumSelect(id) {
|
|
3377
|
+
this.selectedCallerId = id;
|
|
3378
|
+
this.isCallerIdHidden = true;
|
|
3379
|
+
this.extService.setCallerId(id);
|
|
3380
|
+
}
|
|
3381
|
+
cancelDialNumber() {
|
|
3382
|
+
this.terminateCall = true;
|
|
3383
|
+
this.callNumberToast.show = false;
|
|
3384
|
+
}
|
|
3385
|
+
handleDivKeydown(ev) {
|
|
3386
|
+
if (this.dialedNumber.length == 0) {
|
|
3387
|
+
this.dialInputElement.nativeElement.focus();
|
|
3388
|
+
}
|
|
3389
|
+
if (ev.key === 'Enter') {
|
|
3390
|
+
// Check if the dialpad is open
|
|
3391
|
+
if (!this.isDialpadHidden) {
|
|
3392
|
+
if (this.dialedNumber.length > 2 && this.selectedCallerId) {
|
|
3393
|
+
this.initiateCall();
|
|
3394
|
+
}
|
|
3395
|
+
if (!this.selectedCallerId) {
|
|
3396
|
+
this.shakeDedicatedBtn = true;
|
|
3397
|
+
setTimeout(() => {
|
|
3398
|
+
this.shakeDedicatedBtn = false;
|
|
3399
|
+
}, 10000);
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
onCallBtnMouseEnter(ev) {
|
|
3405
|
+
if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
|
|
3406
|
+
this.shakeDedicatedBtn = true;
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
onCallBtnMouseLeave(ev) {
|
|
3410
|
+
if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
|
|
3411
|
+
this.shakeDedicatedBtn = false;
|
|
3412
|
+
}
|
|
3413
|
+
}
|
|
3414
|
+
acceptNewIncomingCall(call) {
|
|
3415
|
+
//first cut the current call
|
|
3416
|
+
//this.callData = call;
|
|
3417
|
+
this.newIncomingCallData = call;
|
|
1258
3418
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
3419
|
+
rejectNewIncomingCall(call) {
|
|
3420
|
+
call.reject();
|
|
3421
|
+
this.newIncomingCalls = this.newIncomingCalls.filter((item) => item.parameters.CallSid !== call.parameters['CallSid']);
|
|
3422
|
+
this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters.CallSid !== call.parameters['CallSid']);
|
|
3423
|
+
}
|
|
3424
|
+
newIncomingCallInitiated() {
|
|
3425
|
+
this.isCallInProgress = true;
|
|
3426
|
+
this.newIncomingCalls = [];
|
|
3427
|
+
this.incomingCallInitiated.emit();
|
|
3428
|
+
}
|
|
3429
|
+
incomingCallsNewInfo(data) {
|
|
3430
|
+
this.incomingCallsList = data;
|
|
3431
|
+
this.incomingCallsNewInfoEvent.emit(data);
|
|
3432
|
+
}
|
|
3433
|
+
ngOnDestroy() {
|
|
3434
|
+
try {
|
|
3435
|
+
console.log('Cleaning up C2cDialpadComponent');
|
|
3436
|
+
// Unsubscribe from all subscriptions
|
|
3437
|
+
if (this.subscriptions) {
|
|
3438
|
+
this.subscriptions.unsubscribe();
|
|
3439
|
+
}
|
|
3440
|
+
// Clean up Twilio device when component is destroyed
|
|
3441
|
+
if (this.twilioService['device']) {
|
|
3442
|
+
this.twilioService['device'].destroy();
|
|
3443
|
+
}
|
|
3444
|
+
// End any active call
|
|
3445
|
+
if (this.isCallInProgress) {
|
|
3446
|
+
this.endCall();
|
|
3447
|
+
}
|
|
3448
|
+
// Clear any timeouts or intervals if they exist
|
|
3449
|
+
if (this.toastTimeout) {
|
|
3450
|
+
clearTimeout(this.toastTimeout);
|
|
3451
|
+
}
|
|
3452
|
+
console.log('C2cDialpadComponent cleanup complete');
|
|
3453
|
+
}
|
|
3454
|
+
catch (error) {
|
|
3455
|
+
console.error('Error during component cleanup:', error);
|
|
3456
|
+
}
|
|
1261
3457
|
}
|
|
1262
3458
|
}
|
|
1263
|
-
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1264
|
-
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { isDialpadHidden: "isDialpadHidden", contactInfo: "contactInfo", deviceId: "deviceId" }, outputs: { closeDialpadEvent: "closeDialpadEvent", minimiseEvent: "minimiseEvent" }, ngImport: i0, template: `
|
|
1265
|
-
<div *ngIf="!isDialpadHidden">
|
|
1266
|
-
<lib-call-progress
|
|
1267
|
-
[callData]="contactInfo"
|
|
1268
|
-
[deviceId]="deviceId"
|
|
1269
|
-
(endCallEvent)="onEndCall()"
|
|
1270
|
-
(minimiseEvent)="onMinimise($event)">
|
|
1271
|
-
</lib-call-progress>
|
|
1272
|
-
</div>
|
|
1273
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CallProgressComponent, selector: "lib-call-progress", inputs: ["callData", "newIncomingCallData", "newIncomingCallsList", "deviceId"], outputs: ["endCallEvent", "incomingCallsNewInfo", "minimiseEvent", "incomingCallInitiated"] }] });
|
|
3459
|
+
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [{ token: TwilioService }, { token: ExtensionService }, { token: i3$1.MatDialog }, { token: IpAddressService }, { token: ExtensionService }, { token: i0.ChangeDetectorRef }, { token: i5.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
3460
|
+
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { autoOpenOnIncoming: "autoOpenOnIncoming", contactInfo: "contactInfo", deviceId: "deviceId", isDialpadHidden: "isDialpadHidden", incomingCallData: "incomingCallData" }, outputs: { closeDialpadEvent: "closeDialpadEvent", callInitiated: "callInitiated", endCallEvent: "endCallEvent", minimiseEvent: "minimiseEvent", incomingCallsNewInfoEvent: "incomingCallsNewInfoEvent", incomingCallInitiated: "incomingCallInitiated", numberDialed: "numberDialed" }, viewQueries: [{ propertyName: "dialInputElement", first: true, predicate: ["dialInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <lib-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent)=\"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [deviceId]=\"deviceId\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\">\r\n </lib-call-progress>\r\n <div class=\"dialpad-container\" *ngIf=\"!isCallInProgress\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : ' '}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button>\r\n </div>\r\n \r\n </div> -->\r\n </div>\r\n</div>\r\n", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px!important;height:600px!important;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: CallProgressComponent, selector: "lib-call-progress", inputs: ["callData", "newIncomingCallData", "newIncomingCallsList", "deviceId"], outputs: ["endCallEvent", "incomingCallsNewInfo", "minimiseEvent", "incomingCallInitiated"] }] });
|
|
1274
3461
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
|
|
1275
3462
|
type: Component,
|
|
1276
|
-
args: [{ selector: 'lib-dialbox', template: `
|
|
1277
|
-
|
|
1278
|
-
<lib-call-progress
|
|
1279
|
-
[callData]="contactInfo"
|
|
1280
|
-
[deviceId]="deviceId"
|
|
1281
|
-
(endCallEvent)="onEndCall()"
|
|
1282
|
-
(minimiseEvent)="onMinimise($event)">
|
|
1283
|
-
</lib-call-progress>
|
|
1284
|
-
</div>
|
|
1285
|
-
` }]
|
|
1286
|
-
}], propDecorators: { isDialpadHidden: [{
|
|
3463
|
+
args: [{ selector: 'lib-dialbox', template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <lib-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent)=\"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [deviceId]=\"deviceId\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\">\r\n </lib-call-progress>\r\n <div class=\"dialpad-container\" *ngIf=\"!isCallInProgress\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : ' '}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button>\r\n </div>\r\n \r\n </div> -->\r\n </div>\r\n</div>\r\n", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px!important;height:600px!important;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"] }]
|
|
3464
|
+
}], ctorParameters: function () { return [{ type: TwilioService }, { type: ExtensionService }, { type: i3$1.MatDialog }, { type: IpAddressService }, { type: ExtensionService }, { type: i0.ChangeDetectorRef }, { type: i5.Router }]; }, propDecorators: { autoOpenOnIncoming: [{
|
|
1287
3465
|
type: Input
|
|
1288
3466
|
}], contactInfo: [{
|
|
1289
3467
|
type: Input
|
|
1290
3468
|
}], deviceId: [{
|
|
1291
3469
|
type: Input
|
|
3470
|
+
}], isDialpadHidden: [{
|
|
3471
|
+
type: Input
|
|
3472
|
+
}], incomingCallData: [{
|
|
3473
|
+
type: Input
|
|
1292
3474
|
}], closeDialpadEvent: [{
|
|
1293
3475
|
type: Output
|
|
3476
|
+
}], callInitiated: [{
|
|
3477
|
+
type: Output
|
|
3478
|
+
}], endCallEvent: [{
|
|
3479
|
+
type: Output
|
|
1294
3480
|
}], minimiseEvent: [{
|
|
1295
3481
|
type: Output
|
|
3482
|
+
}], incomingCallsNewInfoEvent: [{
|
|
3483
|
+
type: Output
|
|
3484
|
+
}], incomingCallInitiated: [{
|
|
3485
|
+
type: Output
|
|
3486
|
+
}], dialInputElement: [{
|
|
3487
|
+
type: ViewChild,
|
|
3488
|
+
args: ['dialInput']
|
|
3489
|
+
}], numberDialed: [{
|
|
3490
|
+
type: Output
|
|
1296
3491
|
}] } });
|
|
1297
3492
|
|
|
1298
3493
|
class CallerIdDialogComponent {
|
|
1299
|
-
constructor(router, twilServ) {
|
|
3494
|
+
constructor(router, twilServ, dialogRef, data) {
|
|
1300
3495
|
this.router = router;
|
|
1301
3496
|
this.twilServ = twilServ;
|
|
3497
|
+
this.dialogRef = dialogRef;
|
|
3498
|
+
this.data = data;
|
|
1302
3499
|
this.storedTheme = localStorage.getItem('theme-color') || 'blue';
|
|
1303
3500
|
this.alertToggle = true;
|
|
1304
3501
|
this.token = '';
|
|
@@ -1308,20 +3505,20 @@ class CallerIdDialogComponent {
|
|
|
1308
3505
|
this.token = localStorage.getItem('ext_token') || '';
|
|
1309
3506
|
}
|
|
1310
3507
|
onConfirm() {
|
|
1311
|
-
|
|
3508
|
+
this.dialogRef.close(true);
|
|
1312
3509
|
}
|
|
1313
3510
|
onCancel() {
|
|
1314
|
-
|
|
3511
|
+
this.dialogRef.close(false);
|
|
1315
3512
|
}
|
|
1316
3513
|
redirectToCallingPreference() {
|
|
1317
3514
|
this.router.navigateByUrl('/extension/caller-id/' + this.token);
|
|
1318
|
-
|
|
3515
|
+
this.dialogRef.close({ event: 'redirect', alertToggle: this.alertToggle });
|
|
1319
3516
|
}
|
|
1320
3517
|
proceed() {
|
|
1321
|
-
|
|
3518
|
+
this.dialogRef.close({ event: 'proceed', alertToggle: this.alertToggle });
|
|
1322
3519
|
}
|
|
1323
3520
|
closeModal() {
|
|
1324
|
-
|
|
3521
|
+
this.dialogRef.close();
|
|
1325
3522
|
}
|
|
1326
3523
|
hideMessage(ev) {
|
|
1327
3524
|
this.twilServ.toggleCallerIdAlert.next(ev.target.checked);
|
|
@@ -1332,12 +3529,15 @@ class CallerIdDialogComponent {
|
|
|
1332
3529
|
console.log('doNotShowAgain');
|
|
1333
3530
|
}
|
|
1334
3531
|
}
|
|
1335
|
-
CallerIdDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, deps: [{ token:
|
|
1336
|
-
CallerIdDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallerIdDialogComponent, selector: "lib-caller-id-dialog", ngImport: i0, template: "<div class=\"main-theme {{storedTheme}}\">\
|
|
3532
|
+
CallerIdDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, deps: [{ token: i5.Router }, { token: TwilioService }, { token: i3$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
3533
|
+
CallerIdDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallerIdDialogComponent, selector: "lib-caller-id-dialog", ngImport: i0, template: "<div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div>", styles: ["::ng-deep .mat-dialog-container{padding:0!important;border-radius:8px;box-shadow:0 4px 10px #0003;text-align:center}::ng-deep .cus-dialog{z-index:111111!important}.btn-black-outline{border:1px solid #000000;border-radius:10px}.btn-blue{background-color:#234de8;color:#fff!important;margin-left:8px}::ng-deep .cdk-overlay-container{z-index:111111}\n"], dependencies: [{ kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1337
3534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, decorators: [{
|
|
1338
3535
|
type: Component,
|
|
1339
|
-
args: [{ selector: 'lib-caller-id-dialog', template: "<div class=\"main-theme {{storedTheme}}\">\
|
|
1340
|
-
}], ctorParameters: function () { return [{ type:
|
|
3536
|
+
args: [{ selector: 'lib-caller-id-dialog', template: "<div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div>", styles: ["::ng-deep .mat-dialog-container{padding:0!important;border-radius:8px;box-shadow:0 4px 10px #0003;text-align:center}::ng-deep .cus-dialog{z-index:111111!important}.btn-black-outline{border:1px solid #000000;border-radius:10px}.btn-blue{background-color:#234de8;color:#fff!important;margin-left:8px}::ng-deep .cdk-overlay-container{z-index:111111}\n"] }]
|
|
3537
|
+
}], ctorParameters: function () { return [{ type: i5.Router }, { type: TwilioService }, { type: i3$1.MatDialogRef }, { type: undefined, decorators: [{
|
|
3538
|
+
type: Inject,
|
|
3539
|
+
args: [MAT_DIALOG_DATA]
|
|
3540
|
+
}] }]; } });
|
|
1341
3541
|
|
|
1342
3542
|
class DialboxModule {
|
|
1343
3543
|
}
|
|
@@ -1348,14 +3548,19 @@ DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
1348
3548
|
IncomingCallComponent], imports: [CommonModule,
|
|
1349
3549
|
FormsModule,
|
|
1350
3550
|
ReactiveFormsModule,
|
|
1351
|
-
HttpClientModule
|
|
3551
|
+
HttpClientModule,
|
|
3552
|
+
RouterLink,
|
|
3553
|
+
RouterModule,
|
|
3554
|
+
BrowserModule], exports: [DialboxComponent,
|
|
1352
3555
|
IncomingCallComponent,
|
|
1353
3556
|
CallProgressComponent,
|
|
1354
3557
|
CallerIdDialogComponent] });
|
|
1355
3558
|
DialboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, imports: [CommonModule,
|
|
1356
3559
|
FormsModule,
|
|
1357
3560
|
ReactiveFormsModule,
|
|
1358
|
-
HttpClientModule
|
|
3561
|
+
HttpClientModule,
|
|
3562
|
+
RouterModule,
|
|
3563
|
+
BrowserModule] });
|
|
1359
3564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, decorators: [{
|
|
1360
3565
|
type: NgModule,
|
|
1361
3566
|
args: [{
|
|
@@ -1363,19 +3568,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1363
3568
|
DialboxComponent,
|
|
1364
3569
|
CallProgressComponent,
|
|
1365
3570
|
CallerIdDialogComponent,
|
|
1366
|
-
IncomingCallComponent
|
|
3571
|
+
IncomingCallComponent,
|
|
1367
3572
|
],
|
|
1368
3573
|
imports: [
|
|
1369
3574
|
CommonModule,
|
|
1370
3575
|
FormsModule,
|
|
1371
3576
|
ReactiveFormsModule,
|
|
1372
|
-
HttpClientModule
|
|
3577
|
+
HttpClientModule,
|
|
3578
|
+
RouterLink,
|
|
3579
|
+
RouterModule,
|
|
3580
|
+
BrowserModule
|
|
1373
3581
|
],
|
|
1374
3582
|
exports: [
|
|
1375
3583
|
DialboxComponent,
|
|
1376
3584
|
IncomingCallComponent,
|
|
1377
3585
|
CallProgressComponent,
|
|
1378
|
-
CallerIdDialogComponent
|
|
3586
|
+
CallerIdDialogComponent,
|
|
1379
3587
|
]
|
|
1380
3588
|
}]
|
|
1381
3589
|
}] });
|
|
@@ -1388,5 +3596,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1388
3596
|
* Generated bundle index. Do not edit.
|
|
1389
3597
|
*/
|
|
1390
3598
|
|
|
1391
|
-
export { CallProgressComponent, CallerIdDialogComponent, DialboxComponent, DialboxModule,
|
|
3599
|
+
export { CallProgressComponent, CallerIdDialogComponent, DialboxComponent, DialboxModule, IncomingCallComponent };
|
|
1392
3600
|
//# sourceMappingURL=vgroup-dialbox.mjs.map
|