@vgroup/dialbox 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/dialbox.component.mjs +98 -96
- package/esm2020/lib/service/extension.service.mjs +1185 -0
- package/esm2020/lib/service/ip-address.service.mjs +32 -0
- package/fesm2015/vgroup-dialbox.mjs +1304 -91
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +1298 -91
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/dialbox.component.d.ts +12 -1
- package/lib/service/extension.service.d.ts +170 -0
- package/lib/service/ip-address.service.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { AsYouType } from 'libphonenumber-js';
|
|
4
|
-
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
4
|
+
import { BehaviorSubject, throwError, Subscription } from 'rxjs';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
6
6
|
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
7
|
-
import
|
|
7
|
+
import { catchError, switchMap, map } from 'rxjs/operators';
|
|
8
|
+
import * as i4 from '@angular/router';
|
|
8
9
|
import { RouterLink } from '@angular/router';
|
|
9
|
-
import * as
|
|
10
|
+
import * as i5 from '@angular/common';
|
|
10
11
|
import { CommonModule } from '@angular/common';
|
|
11
|
-
import * as
|
|
12
|
+
import * as i6 from '@angular/forms';
|
|
12
13
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
14
|
|
|
14
15
|
const keypad = [
|
|
@@ -211,14 +212,1215 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
211
212
|
}]
|
|
212
213
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
213
214
|
|
|
215
|
+
class IpAddressService {
|
|
216
|
+
constructor(http) {
|
|
217
|
+
this.http = http;
|
|
218
|
+
this.apiUrl = 'https://api.radar.io/v1/geocode/ip';
|
|
219
|
+
}
|
|
220
|
+
getIpAddressInfo() {
|
|
221
|
+
const authKey = environment.radarAPIKey;
|
|
222
|
+
const httpOptions = {
|
|
223
|
+
headers: new HttpHeaders({ 'Authorization': authKey }),
|
|
224
|
+
fraud: true
|
|
225
|
+
};
|
|
226
|
+
return this.http.get(this.apiUrl, httpOptions).pipe(catchError((error) => {
|
|
227
|
+
return throwError(new Error("Network is blocking the server, please check the proxy or your network."));
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
IpAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
232
|
+
IpAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, providedIn: 'root' });
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, decorators: [{
|
|
234
|
+
type: Injectable,
|
|
235
|
+
args: [{
|
|
236
|
+
providedIn: 'root'
|
|
237
|
+
}]
|
|
238
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
239
|
+
|
|
240
|
+
class ExtensionService {
|
|
241
|
+
setCallSid(callSid, recordCall) {
|
|
242
|
+
this.callSid = callSid;
|
|
243
|
+
this.recordCall = recordCall;
|
|
244
|
+
}
|
|
245
|
+
getCallSid() {
|
|
246
|
+
return {
|
|
247
|
+
callSid: this.callSid,
|
|
248
|
+
recordCall: this.recordCall
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
setCallerId(callerId) {
|
|
252
|
+
this.callerIdSubject.next(callerId);
|
|
253
|
+
}
|
|
254
|
+
constructor(http, ipAddressService) {
|
|
255
|
+
this.http = http;
|
|
256
|
+
this.ipAddressService = ipAddressService;
|
|
257
|
+
this.callSid = '';
|
|
258
|
+
this.messageSource = new BehaviorSubject('');
|
|
259
|
+
this.channelId = environment.channelId;
|
|
260
|
+
this.currentMessage = this.messageSource.asObservable();
|
|
261
|
+
this.platform = 'web';
|
|
262
|
+
this.dedicatedStateSource = new BehaviorSubject('');
|
|
263
|
+
this.dedicatedState = this.dedicatedStateSource.asObservable();
|
|
264
|
+
this.callerIdStateSource = new BehaviorSubject('');
|
|
265
|
+
this.callerIdState = this.callerIdStateSource.asObservable();
|
|
266
|
+
this.sendSmsSource = new BehaviorSubject('');
|
|
267
|
+
this.sendMessage = this.sendSmsSource.asObservable();
|
|
268
|
+
this.draftSmsSource = new BehaviorSubject('');
|
|
269
|
+
this.draftMessage = this.draftSmsSource.asObservable();
|
|
270
|
+
this.isInputFocus$ = new BehaviorSubject(false);
|
|
271
|
+
this.token = localStorage.getItem('ext_token') || '';
|
|
272
|
+
this.isNewContactAdded = new BehaviorSubject(false);
|
|
273
|
+
this.isProfileUpdated = new BehaviorSubject(false);
|
|
274
|
+
this.callerIdSubject = new BehaviorSubject(null);
|
|
275
|
+
this.callerId$ = this.callerIdSubject.asObservable();
|
|
276
|
+
}
|
|
277
|
+
changeMessage(message) {
|
|
278
|
+
this.messageSource.next(message);
|
|
279
|
+
}
|
|
280
|
+
GetUserUsage(token) {
|
|
281
|
+
const params = {
|
|
282
|
+
'Content-Type': 'application/json',
|
|
283
|
+
'Auth-Key': "Bearer " + token
|
|
284
|
+
};
|
|
285
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
286
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/usage', httpOptions);
|
|
287
|
+
}
|
|
288
|
+
GetUserProfile(token, data) {
|
|
289
|
+
const params = {
|
|
290
|
+
'Content-Type': 'application/json',
|
|
291
|
+
'Auth-Key': "Bearer " + token
|
|
292
|
+
};
|
|
293
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
294
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/user', data, httpOptions);
|
|
295
|
+
}
|
|
296
|
+
UpdateProfile(userProfile, token) {
|
|
297
|
+
const userProfileObj = {
|
|
298
|
+
"billingAddress1": userProfile.billingAddress1,
|
|
299
|
+
"billingAddress2": userProfile.billingAddress2,
|
|
300
|
+
"billingCityid": userProfile.billingCity,
|
|
301
|
+
"billingCountryid": userProfile.billingCountry,
|
|
302
|
+
"billingStateid": userProfile.billingState,
|
|
303
|
+
"billingZipid": userProfile.billingZip,
|
|
304
|
+
"email": userProfile.email,
|
|
305
|
+
"mobile": userProfile.mobile,
|
|
306
|
+
"countrycode": userProfile.countrycode,
|
|
307
|
+
"timezone": userProfile.timezone,
|
|
308
|
+
"firstname": userProfile.firstname,
|
|
309
|
+
"lastname": userProfile.lastname,
|
|
310
|
+
"shippingAddress1": (userProfile.shippingAddress1 !== null && userProfile.shippingAddress1 !== undefined && userProfile.shippingAddress1 !== "") ? userProfile.shippingAddress1 : userProfile.billingAddress1,
|
|
311
|
+
"shippingAddress2": (userProfile.shippingAddress2 !== null && userProfile.shippingAddress2 !== undefined && userProfile.shippingAddress2 !== "") ? userProfile.shippingAddress2 : userProfile.billingAddress2,
|
|
312
|
+
"shippingCityid": (userProfile.shippingCity !== null && userProfile.shippingCity !== undefined && userProfile.shippingCity !== "") ? userProfile.shippingCity : userProfile.billingCity,
|
|
313
|
+
"shippingCountryid": (userProfile.shippingCountry !== null && userProfile.shippingCountry !== undefined && userProfile.shippingCountry !== "") ? userProfile.shippingCountry : userProfile.billingCountry,
|
|
314
|
+
"shippingStateid": (userProfile.shippingState !== null && userProfile.shippingState !== undefined && userProfile.shippingState !== "") ? userProfile.shippingState : userProfile.billingState,
|
|
315
|
+
"shippingZipid": (userProfile.shippingZip !== null && userProfile.shippingZip !== undefined && userProfile.shippingZip !== "") ? userProfile.shippingZip : userProfile.billingZip,
|
|
316
|
+
"imageId": (userProfile.imageId),
|
|
317
|
+
"imageName": (userProfile.imageName),
|
|
318
|
+
"companyName": userProfile.companyName,
|
|
319
|
+
"companySize": userProfile.companySize,
|
|
320
|
+
"companyFirstName": userProfile.companyFirstName,
|
|
321
|
+
"companyLastName": userProfile.companyLastName,
|
|
322
|
+
"companyContactNumber": userProfile.companyContactNumber
|
|
323
|
+
};
|
|
324
|
+
const params = {
|
|
325
|
+
'Content-Type': 'application/json',
|
|
326
|
+
'Auth-Key': "Bearer " + token
|
|
327
|
+
};
|
|
328
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
329
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update', userProfileObj, httpOptions);
|
|
330
|
+
}
|
|
331
|
+
deleteProfilePhoto(token) {
|
|
332
|
+
const params = {
|
|
333
|
+
'Auth-Key': "Bearer " + token
|
|
334
|
+
};
|
|
335
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
336
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/delete/profile/photo', params, httpOptions);
|
|
337
|
+
}
|
|
338
|
+
getOtpCode(countryCode, number, mode, token) {
|
|
339
|
+
const params = {
|
|
340
|
+
'Content-Type': 'application/json',
|
|
341
|
+
'Auth-Key': "Bearer " + token
|
|
342
|
+
};
|
|
343
|
+
const numberObj = {
|
|
344
|
+
"countrycode": countryCode,
|
|
345
|
+
"number": number,
|
|
346
|
+
"mode": mode
|
|
347
|
+
};
|
|
348
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
349
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/sms/otp', numberObj, httpOptions);
|
|
350
|
+
}
|
|
351
|
+
getVerifyMobile(countryName, countrycode, number, otp, token) {
|
|
352
|
+
const params = {
|
|
353
|
+
'Content-Type': 'application/json',
|
|
354
|
+
'Auth-Key': "Bearer " + token
|
|
355
|
+
};
|
|
356
|
+
const verifyObj = {
|
|
357
|
+
"countryName": countryName,
|
|
358
|
+
"countrycode": countrycode,
|
|
359
|
+
"number": number,
|
|
360
|
+
"otp": otp
|
|
361
|
+
};
|
|
362
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
363
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/sms/verify/otp', verifyObj, httpOptions);
|
|
364
|
+
}
|
|
365
|
+
connectWithStripe(token) {
|
|
366
|
+
const params = {
|
|
367
|
+
'Auth-Key': "Bearer " + token
|
|
368
|
+
};
|
|
369
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
370
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/stripe/connect', params, httpOptions);
|
|
371
|
+
}
|
|
372
|
+
connectWithStripeRedirection(redirection, token) {
|
|
373
|
+
const params = {
|
|
374
|
+
'Auth-Key': "Bearer " + token,
|
|
375
|
+
"redirection": redirection
|
|
376
|
+
};
|
|
377
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
378
|
+
return this.http.post(environment.apiUrl + `/utilities/ext/stripe/connect/${redirection}`, params, httpOptions);
|
|
379
|
+
}
|
|
380
|
+
validateStripeSession(sessionId, token) {
|
|
381
|
+
const params = {
|
|
382
|
+
'Content-Type': 'application/json',
|
|
383
|
+
'Auth-Key': "Bearer " + token
|
|
384
|
+
};
|
|
385
|
+
const data = {
|
|
386
|
+
"sessionid": sessionId,
|
|
387
|
+
};
|
|
388
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
389
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/validate/session', data, httpOptions);
|
|
390
|
+
}
|
|
391
|
+
loadPaymentMethods(token) {
|
|
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/ext/payment/methods', httpOptions);
|
|
398
|
+
}
|
|
399
|
+
setPaymentDefaultMethod(paymentMethodId, token) {
|
|
400
|
+
const params = {
|
|
401
|
+
'Content-Type': 'application/json',
|
|
402
|
+
'Auth-Key': "Bearer " + token
|
|
403
|
+
};
|
|
404
|
+
const data = {
|
|
405
|
+
"methodid": paymentMethodId,
|
|
406
|
+
};
|
|
407
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
408
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/default', data, httpOptions);
|
|
409
|
+
}
|
|
410
|
+
sendEmailVerifyLink(emailval, token) {
|
|
411
|
+
const params = {
|
|
412
|
+
'Auth-Key': "Bearer " + token,
|
|
413
|
+
"email": emailval
|
|
414
|
+
};
|
|
415
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
416
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/verify/email', params, httpOptions);
|
|
417
|
+
}
|
|
418
|
+
VerifyEmailLink(key) {
|
|
419
|
+
const keyobj = { "key": key };
|
|
420
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
421
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/verify/request', keyobj, httpOptions);
|
|
422
|
+
}
|
|
423
|
+
DeleteMethod(paymentMethodId, token) {
|
|
424
|
+
const params = {
|
|
425
|
+
'Content-Type': 'application/json',
|
|
426
|
+
'Auth-Key': "Bearer " + token
|
|
427
|
+
};
|
|
428
|
+
const data = {
|
|
429
|
+
"methodid": paymentMethodId,
|
|
430
|
+
};
|
|
431
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
432
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/detach/method', data, httpOptions);
|
|
433
|
+
}
|
|
434
|
+
VerifySession(token) {
|
|
435
|
+
const params = {
|
|
436
|
+
'Content-Type': 'application/json',
|
|
437
|
+
'Auth-Key': "Bearer " + token
|
|
438
|
+
};
|
|
439
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
440
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/verify/session', httpOptions);
|
|
441
|
+
}
|
|
442
|
+
GetAllCountryList() {
|
|
443
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
444
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
|
|
445
|
+
}
|
|
446
|
+
GetAllStateList(_countryId) {
|
|
447
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
448
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/statelist/' + _countryId, httpOptions);
|
|
449
|
+
}
|
|
450
|
+
LogoutUser(authKey) {
|
|
451
|
+
const auth = { "Auth-Key": authKey };
|
|
452
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': authKey }) };
|
|
453
|
+
return this.http.post(environment.apiUrl + '/client/user/logout', auth, httpOptions);
|
|
454
|
+
}
|
|
455
|
+
purchasedNumber(token) {
|
|
456
|
+
const params = {
|
|
457
|
+
'Content-Type': 'application/json',
|
|
458
|
+
'Auth-Key': "Bearer " + token
|
|
459
|
+
};
|
|
460
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
461
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/view/purchased/number', httpOptions);
|
|
462
|
+
}
|
|
463
|
+
availableNumber(token, dtModel) {
|
|
464
|
+
const params = {
|
|
465
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
466
|
+
'Auth-Key': "Bearer " + token
|
|
467
|
+
};
|
|
468
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
469
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/available/number', dtModel, httpOptions);
|
|
470
|
+
}
|
|
471
|
+
urAvailableNumber(token, dtModel) {
|
|
472
|
+
const params = {
|
|
473
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
474
|
+
};
|
|
475
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
476
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/ur/available/number', dtModel, httpOptions);
|
|
477
|
+
}
|
|
478
|
+
stagingNumber(token, dtModel) {
|
|
479
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
480
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/staging/number', dtModel, httpOptions);
|
|
481
|
+
}
|
|
482
|
+
saveCompanyDetail(dtModel) {
|
|
483
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
484
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/company/details', dtModel, httpOptions);
|
|
485
|
+
}
|
|
486
|
+
saveAddressInfo(dtModel) {
|
|
487
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
488
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/address', dtModel, httpOptions);
|
|
489
|
+
}
|
|
490
|
+
saveStripeInfo(userId) {
|
|
491
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
492
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/stripe/connect/' + userId, httpOptions);
|
|
493
|
+
}
|
|
494
|
+
saveCardInfo(dtModel) {
|
|
495
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
496
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/card/info', dtModel, httpOptions);
|
|
497
|
+
}
|
|
498
|
+
deleteCard(dtModel) {
|
|
499
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
500
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/delete/saved/card', dtModel, httpOptions);
|
|
501
|
+
}
|
|
502
|
+
purchasePlan(dtModel) {
|
|
503
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
504
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/ur/purchase/signup/number', dtModel, httpOptions);
|
|
505
|
+
}
|
|
506
|
+
getUserStagingInfo(data) {
|
|
507
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
508
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/staging', data, httpOptions);
|
|
509
|
+
}
|
|
510
|
+
costCheckOut(token, cost) {
|
|
511
|
+
const params = {
|
|
512
|
+
'Content-Type': 'application/json',
|
|
513
|
+
'Auth-Key': "Bearer " + token
|
|
514
|
+
};
|
|
515
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
516
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/number/checkout/' + cost, httpOptions);
|
|
517
|
+
}
|
|
518
|
+
buyNumber(token, dtModel) {
|
|
519
|
+
const params = {
|
|
520
|
+
'Content-Type': 'application/json',
|
|
521
|
+
'Auth-Key': "Bearer " + token
|
|
522
|
+
};
|
|
523
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
524
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/purchase/number', dtModel, httpOptions);
|
|
525
|
+
}
|
|
526
|
+
fetchCallerId(token) {
|
|
527
|
+
const params = {
|
|
528
|
+
'Content-Type': 'application/json',
|
|
529
|
+
'Auth-Key': "Bearer " + token
|
|
530
|
+
};
|
|
531
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
532
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/fetch/callerid', httpOptions);
|
|
533
|
+
}
|
|
534
|
+
updateNumberLabel(token, dtModel) {
|
|
535
|
+
const params = {
|
|
536
|
+
'Content-Type': 'application/json',
|
|
537
|
+
'Auth-Key': "Bearer " + token
|
|
538
|
+
};
|
|
539
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
540
|
+
return this.http.put(environment.apiUrl + '/utilities/softphone/update/number/label', dtModel, httpOptions);
|
|
541
|
+
}
|
|
542
|
+
releaseNumber(token, twilioNum) {
|
|
543
|
+
const params = {
|
|
544
|
+
'Content-Type': 'application/json',
|
|
545
|
+
'Auth-Key': "Bearer " + token
|
|
546
|
+
};
|
|
547
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
548
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/softphone/delete/twilio/number', httpOptions);
|
|
549
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/delete/twilio/number/' + twilioNum, httpOptions);
|
|
550
|
+
}
|
|
551
|
+
// Call forwarding api's
|
|
552
|
+
sendOTP(token, dtModel) {
|
|
553
|
+
const params = {
|
|
554
|
+
'Content-Type': 'application/json',
|
|
555
|
+
'Auth-Key': "Bearer " + token
|
|
556
|
+
};
|
|
557
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
558
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/send/otp', dtModel, httpOptions);
|
|
559
|
+
}
|
|
560
|
+
verifyOTP(token, dtModel) {
|
|
561
|
+
const params = {
|
|
562
|
+
'Content-Type': 'application/json',
|
|
563
|
+
'Auth-Key': "Bearer " + token
|
|
564
|
+
};
|
|
565
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
566
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/verify/otp', dtModel, httpOptions);
|
|
567
|
+
}
|
|
568
|
+
updateCallForwarding(token, dtModel) {
|
|
569
|
+
const params = {
|
|
570
|
+
'Content-Type': 'application/json',
|
|
571
|
+
'Auth-Key': "Bearer " + token
|
|
572
|
+
};
|
|
573
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
574
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/configure/call/forwarding', dtModel, httpOptions);
|
|
575
|
+
}
|
|
576
|
+
getSingleNumForwardingSetting(token, number) {
|
|
577
|
+
const params = {
|
|
578
|
+
'Content-Type': 'application/json',
|
|
579
|
+
'Auth-Key': "Bearer " + token
|
|
580
|
+
};
|
|
581
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
582
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/view/call/forwarding/' + number, httpOptions);
|
|
583
|
+
}
|
|
584
|
+
deleteCallForwarding(token, dtModel) {
|
|
585
|
+
const params = {
|
|
586
|
+
'Content-Type': 'application/json',
|
|
587
|
+
'Auth-Key': "Bearer " + token
|
|
588
|
+
};
|
|
589
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
590
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/call/forwarding/action', dtModel, httpOptions);
|
|
591
|
+
}
|
|
592
|
+
//calling prefernece api
|
|
593
|
+
displayID(token) {
|
|
594
|
+
const params = {
|
|
595
|
+
'Content-Type': 'application/json',
|
|
596
|
+
'Auth-Key': "Bearer " + token
|
|
597
|
+
};
|
|
598
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
599
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/display/callerids', httpOptions);
|
|
600
|
+
}
|
|
601
|
+
verifyNumber(token, dtModel) {
|
|
602
|
+
const params = {
|
|
603
|
+
'Content-Type': 'application/json',
|
|
604
|
+
'Auth-Key': "Bearer " + token
|
|
605
|
+
};
|
|
606
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
607
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/add/callerid', dtModel, httpOptions);
|
|
608
|
+
}
|
|
609
|
+
verifyStatus(token, dtModel) {
|
|
610
|
+
const params = {
|
|
611
|
+
'Content-Type': 'application/json',
|
|
612
|
+
'Auth-Key': "Bearer " + token
|
|
613
|
+
};
|
|
614
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
615
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/callerid/status/' + dtModel, httpOptions);
|
|
616
|
+
}
|
|
617
|
+
existingListmakeCallerID(token, dtModel) {
|
|
618
|
+
const params = {
|
|
619
|
+
'Content-Type': 'application/json',
|
|
620
|
+
'Auth-Key': "Bearer " + token
|
|
621
|
+
};
|
|
622
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
623
|
+
return this.http.post(environment.apiUrl + '/utilities/softphone/make/callerid', dtModel, httpOptions);
|
|
624
|
+
}
|
|
625
|
+
makeCallerID(token, dtModel, number) {
|
|
626
|
+
const params = {
|
|
627
|
+
'Content-Type': 'application/json',
|
|
628
|
+
'Auth-Key': "Bearer " + token
|
|
629
|
+
};
|
|
630
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
631
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/markas/callerid/${number}`, dtModel, httpOptions);
|
|
632
|
+
}
|
|
633
|
+
deleteCallerID(token, dtModel, id) {
|
|
634
|
+
const params = {
|
|
635
|
+
'Content-Type': 'application/json',
|
|
636
|
+
'Auth-Key': "Bearer " + token
|
|
637
|
+
};
|
|
638
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
639
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/delete/callerid/${id}`, dtModel, httpOptions);
|
|
640
|
+
}
|
|
641
|
+
deregisterCallerID(token, dtModel, id) {
|
|
642
|
+
const params = {
|
|
643
|
+
'Content-Type': 'application/json',
|
|
644
|
+
'Auth-Key': "Bearer " + token
|
|
645
|
+
};
|
|
646
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
647
|
+
return this.http.post(environment.apiUrl + `/utilities/softphone/deregister/callerid/${id}`, dtModel, httpOptions);
|
|
648
|
+
}
|
|
649
|
+
updateCallerIDLabel(token, dtModel) {
|
|
650
|
+
const params = {
|
|
651
|
+
'Content-Type': 'application/json',
|
|
652
|
+
'Auth-Key': "Bearer " + token
|
|
653
|
+
};
|
|
654
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
655
|
+
return this.http.put(environment.apiUrl + '/utilities/softphone/update/callerid/label', dtModel, httpOptions);
|
|
656
|
+
}
|
|
657
|
+
initiateCall(payload) {
|
|
658
|
+
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
659
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap(ipAddressInfo => {
|
|
660
|
+
const params = {
|
|
661
|
+
'Content-Type': 'application/json',
|
|
662
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
663
|
+
'ip-address': ipAddressInfo.ip,
|
|
664
|
+
'ip-country': ipAddressInfo.address.country,
|
|
665
|
+
};
|
|
666
|
+
payload = { ...payload, proxy: ipAddressInfo.proxy.toString() };
|
|
667
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
668
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(catchError(error => {
|
|
669
|
+
return throwError(error);
|
|
670
|
+
}));
|
|
671
|
+
}), catchError(error => {
|
|
672
|
+
// Catch error from getIpAddressInfo
|
|
673
|
+
return throwError(error);
|
|
674
|
+
}));
|
|
675
|
+
}));
|
|
676
|
+
}
|
|
677
|
+
fetchBlockedCountries() {
|
|
678
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/blacklisted/countrylist').pipe(map(response => {
|
|
679
|
+
if (response.response === 'Success' && Array.isArray(response.countries)) {
|
|
680
|
+
return response.countries.map((country) => country.isocode);
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
throw new Error('Unable to fetch blocked countries');
|
|
684
|
+
}
|
|
685
|
+
}));
|
|
686
|
+
}
|
|
687
|
+
// initiateCall(payload: any): Observable<any> {
|
|
688
|
+
// return this.ipAddressService.getIpAddressInfo().pipe(
|
|
689
|
+
// switchMap(ipAddressInfo => {
|
|
690
|
+
// const params = {
|
|
691
|
+
// 'Content-Type': 'application/json',
|
|
692
|
+
// 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
|
|
693
|
+
// 'ip-address': ipAddressInfo.ip,
|
|
694
|
+
// 'ip-country': ipAddressInfo.address.country
|
|
695
|
+
// };
|
|
696
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
697
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions);
|
|
698
|
+
// })
|
|
699
|
+
// );
|
|
700
|
+
// }
|
|
701
|
+
getIncomingCallToken() {
|
|
702
|
+
const params = {
|
|
703
|
+
'Content-Type': 'application/json',
|
|
704
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
705
|
+
};
|
|
706
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
707
|
+
return this.http.get(environment.apiUrl + '/utilities/twilio/incomingcall/token/web', httpOptions);
|
|
708
|
+
}
|
|
709
|
+
getOutgoingCallToken(payload) {
|
|
710
|
+
const params = {
|
|
711
|
+
'Content-Type': 'application/json',
|
|
712
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token'),
|
|
713
|
+
'c2c-request': window.location.hostname
|
|
714
|
+
};
|
|
715
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
716
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/generate/token', payload, httpOptions);
|
|
717
|
+
}
|
|
718
|
+
getCallRecording(callSid) {
|
|
719
|
+
const headers = new HttpHeaders({
|
|
720
|
+
'Content-Type': 'application/json',
|
|
721
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
722
|
+
});
|
|
723
|
+
const httpOptions = { headers: headers };
|
|
724
|
+
return this.http.post(environment.apiUrl + '/utilities/twilio/call/callrecording?callSid=' + callSid, {}, httpOptions);
|
|
725
|
+
}
|
|
726
|
+
pauseOrResumeRecording(callSid, status) {
|
|
727
|
+
const headers = new HttpHeaders({
|
|
728
|
+
'Content-Type': 'application/json',
|
|
729
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
730
|
+
});
|
|
731
|
+
const httpOptions = { headers: headers };
|
|
732
|
+
return this.http.post(environment.apiUrl + `/utilities/twilio/update/recording/status?callSid=${callSid}&status=${status}`, {}, httpOptions);
|
|
733
|
+
}
|
|
734
|
+
getCallStatus(callAuthId) {
|
|
735
|
+
const headers = new HttpHeaders({
|
|
736
|
+
'Content-Type': 'application/json',
|
|
737
|
+
'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
|
|
738
|
+
});
|
|
739
|
+
const httpOptions = { headers: headers };
|
|
740
|
+
return this.http.get(environment.apiUrl + `/utilities/twilio/call/status/${callAuthId}`, httpOptions);
|
|
741
|
+
}
|
|
742
|
+
//sms api
|
|
743
|
+
sendSms(c2c_latlong, c2c_request, dtModel) {
|
|
744
|
+
return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
|
|
745
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
746
|
+
if (blockedCountries.includes(ipAddressInfo.address.countryCode)) {
|
|
747
|
+
return throwError({ message: ['User from blocked country'] });
|
|
748
|
+
}
|
|
749
|
+
else {
|
|
750
|
+
const params = {
|
|
751
|
+
'Content-Type': 'application/json',
|
|
752
|
+
'c2c-latlong': c2c_latlong,
|
|
753
|
+
'c2c-request': c2c_request,
|
|
754
|
+
'ip-address': ipAddressInfo.ip,
|
|
755
|
+
'ip-country': ipAddressInfo.address.country,
|
|
756
|
+
};
|
|
757
|
+
dtModel = { ...dtModel, proxy: ipAddressInfo.proxy.toString() };
|
|
758
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
759
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions).pipe(catchError(error => {
|
|
760
|
+
// Handle HTTP errors here if needed
|
|
761
|
+
return throwError(error);
|
|
762
|
+
}));
|
|
763
|
+
}
|
|
764
|
+
}), catchError(error => {
|
|
765
|
+
// Catch error from getIpAddressInfo
|
|
766
|
+
return throwError(error);
|
|
767
|
+
}));
|
|
768
|
+
}), catchError(error => {
|
|
769
|
+
// Catch error from fetchBlockedCountries
|
|
770
|
+
return throwError(error);
|
|
771
|
+
}));
|
|
772
|
+
}
|
|
773
|
+
// sendSms(c2c_latlong: string, c2c_request: string, dtModel: any): Observable<any> {
|
|
774
|
+
// return this.ipAddressService.getIpAddressInfo().pipe(
|
|
775
|
+
// switchMap(ipAddressInfo => {
|
|
776
|
+
// const params = {
|
|
777
|
+
// 'Content-Type': 'application/json',
|
|
778
|
+
// 'c2c-latlong': c2c_latlong,
|
|
779
|
+
// 'c2c-request': c2c_request,
|
|
780
|
+
// 'ip-address': ipAddressInfo.ip,
|
|
781
|
+
// 'ip-country': ipAddressInfo.address.country
|
|
782
|
+
// };
|
|
783
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
784
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions);
|
|
785
|
+
// })
|
|
786
|
+
// );
|
|
787
|
+
// }
|
|
788
|
+
readContacts(token) {
|
|
789
|
+
const params = {
|
|
790
|
+
'Content-Type': 'application/json',
|
|
791
|
+
'Auth-Key': "Bearer " + token
|
|
792
|
+
};
|
|
793
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
794
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
|
|
795
|
+
}
|
|
796
|
+
sentSMS(token, pageSize, pageIndex) {
|
|
797
|
+
const headers = {
|
|
798
|
+
'Content-Type': 'application/json',
|
|
799
|
+
'Auth-Key': "Bearer " + token,
|
|
800
|
+
};
|
|
801
|
+
let params = new HttpParams();
|
|
802
|
+
params = params.set('size', pageSize || '10');
|
|
803
|
+
params = params.set('page', pageIndex || '1');
|
|
804
|
+
const httpOptions = { headers, params };
|
|
805
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/sent/', httpOptions);
|
|
806
|
+
}
|
|
807
|
+
deleteSMS(token, recordIds, dtModel) {
|
|
808
|
+
const params = {
|
|
809
|
+
'Content-Type': 'application/json',
|
|
810
|
+
'Auth-Key': "Bearer " + token
|
|
811
|
+
};
|
|
812
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
813
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/delete/${recordIds}`, dtModel, httpOptions);
|
|
814
|
+
}
|
|
815
|
+
// inboxSMS(token: string) {
|
|
816
|
+
// const params = {
|
|
817
|
+
// 'Content-Type': 'application/json',
|
|
818
|
+
// 'Auth-Key': "Bearer " + token
|
|
819
|
+
// }
|
|
820
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
821
|
+
// return this.http.get<[]>(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
|
|
822
|
+
// }
|
|
823
|
+
inboxSMS(token, page, size) {
|
|
824
|
+
const params = new HttpParams()
|
|
825
|
+
.set('page', page.toString())
|
|
826
|
+
.set('size', size.toString());
|
|
827
|
+
const httpOptions = {
|
|
828
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
829
|
+
params: params
|
|
830
|
+
};
|
|
831
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
|
|
832
|
+
}
|
|
833
|
+
readInboxStatus(token, recordId, dtModel) {
|
|
834
|
+
const params = {
|
|
835
|
+
'Content-Type': 'application/json',
|
|
836
|
+
'Auth-Key': "Bearer " + token
|
|
837
|
+
};
|
|
838
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
839
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/markas/read/${recordId}`, dtModel, httpOptions);
|
|
840
|
+
}
|
|
841
|
+
markAsFavourite(token, recordIds, dtModel) {
|
|
842
|
+
const params = {
|
|
843
|
+
'Content-Type': 'application/json',
|
|
844
|
+
'Auth-Key': "Bearer " + token
|
|
845
|
+
};
|
|
846
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
847
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/mark/favourite/${recordIds}`, dtModel, httpOptions);
|
|
848
|
+
}
|
|
849
|
+
markAsUnFavourite(token, recordIds, dtModel) {
|
|
850
|
+
const params = {
|
|
851
|
+
'Content-Type': 'application/json',
|
|
852
|
+
'Auth-Key': "Bearer " + token
|
|
853
|
+
};
|
|
854
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
855
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/mark/unfavourite/${recordIds}`, dtModel, httpOptions);
|
|
856
|
+
}
|
|
857
|
+
viewfavouriteSMS(token, page, size) {
|
|
858
|
+
const params = new HttpParams()
|
|
859
|
+
.set('page', page.toString())
|
|
860
|
+
.set('size', size.toString());
|
|
861
|
+
const httpOptions = {
|
|
862
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
863
|
+
params: params
|
|
864
|
+
};
|
|
865
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/view/favourite', httpOptions);
|
|
866
|
+
}
|
|
867
|
+
saveDraft(token, dtModel) {
|
|
868
|
+
const params = {
|
|
869
|
+
'Content-Type': 'application/json',
|
|
870
|
+
'Auth-Key': "Bearer " + token
|
|
871
|
+
};
|
|
872
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
873
|
+
return this.http.post(environment.apiUrl + '/utilities/sms/save/draft', dtModel, httpOptions);
|
|
874
|
+
}
|
|
875
|
+
viewDraft(token, page, size) {
|
|
876
|
+
const params = new HttpParams()
|
|
877
|
+
.set('page', page.toString())
|
|
878
|
+
.set('size', size.toString());
|
|
879
|
+
const httpOptions = {
|
|
880
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
881
|
+
params: params
|
|
882
|
+
};
|
|
883
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/view/draft', httpOptions);
|
|
884
|
+
}
|
|
885
|
+
deleteDraftSMS(token, draftIds, dtModel) {
|
|
886
|
+
const params = {
|
|
887
|
+
'Content-Type': 'application/json',
|
|
888
|
+
'Auth-Key': "Bearer " + token
|
|
889
|
+
};
|
|
890
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
891
|
+
return this.http.post(environment.apiUrl + `/utilities/sms/delete/draft/${draftIds}`, dtModel, httpOptions);
|
|
892
|
+
}
|
|
893
|
+
//Address Book
|
|
894
|
+
viewContactLists(token) {
|
|
895
|
+
const params = {
|
|
896
|
+
'Content-Type': 'application/json',
|
|
897
|
+
'Auth-Key': "Bearer " + token
|
|
898
|
+
};
|
|
899
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
900
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
|
|
901
|
+
}
|
|
902
|
+
deleteContact(token, phonebookid, dtModel) {
|
|
903
|
+
const params = {
|
|
904
|
+
'Content-Type': 'application/json',
|
|
905
|
+
'Auth-Key': "Bearer " + token
|
|
906
|
+
};
|
|
907
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
908
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/contact/${phonebookid}`, dtModel, httpOptions);
|
|
909
|
+
}
|
|
910
|
+
updateFavContacts(token, dtModel) {
|
|
911
|
+
const params = {
|
|
912
|
+
'Content-Type': 'application/json',
|
|
913
|
+
'Auth-Key': "Bearer " + token
|
|
914
|
+
};
|
|
915
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
916
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/favourite', dtModel, httpOptions);
|
|
917
|
+
}
|
|
918
|
+
// saveContacts(token: string, dtModel: any){
|
|
919
|
+
// const params = {
|
|
920
|
+
// 'Content-Type': 'application/json',
|
|
921
|
+
// 'Auth-Key': "Bearer " + token
|
|
922
|
+
// }
|
|
923
|
+
// const httpOptions = { headers: new HttpHeaders(params) };
|
|
924
|
+
// return this.http.post<[]>(environment.apiUrl + '/utilities/phonebook/add/contacts/manually',dtModel, httpOptions);
|
|
925
|
+
// }
|
|
926
|
+
uploadImage(token, dtModel) {
|
|
927
|
+
const params = {
|
|
928
|
+
//'Content-Type': 'multipart/form-data',
|
|
929
|
+
'Auth-Key': "Bearer " + token
|
|
930
|
+
};
|
|
931
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
932
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', dtModel, httpOptions);
|
|
933
|
+
}
|
|
934
|
+
//Call Histroy
|
|
935
|
+
recentCallHistory(token, page, size) {
|
|
936
|
+
const params = new HttpParams()
|
|
937
|
+
.set('page', page.toString())
|
|
938
|
+
.set('size', size.toString());
|
|
939
|
+
const httpOptions = {
|
|
940
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
941
|
+
params: params
|
|
942
|
+
};
|
|
943
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/recent/calls', httpOptions);
|
|
944
|
+
}
|
|
945
|
+
deleteCalls(token, recordId, dtModel) {
|
|
946
|
+
const params = {
|
|
947
|
+
'Content-Type': 'application/json',
|
|
948
|
+
'Auth-Key': "Bearer " + token
|
|
949
|
+
};
|
|
950
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
951
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/calls/${recordId}`, dtModel, httpOptions);
|
|
952
|
+
}
|
|
953
|
+
//SMS History
|
|
954
|
+
recentSMSHistory(token, page, size) {
|
|
955
|
+
const params = new HttpParams()
|
|
956
|
+
.set('page', page.toString())
|
|
957
|
+
.set('size', size.toString());
|
|
958
|
+
const httpOptions = {
|
|
959
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
960
|
+
params: params
|
|
961
|
+
};
|
|
962
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/history', httpOptions);
|
|
963
|
+
}
|
|
964
|
+
getRecentVoiceRecordingData(token, filterData, page, size) {
|
|
965
|
+
const params = new HttpParams()
|
|
966
|
+
.set('page', page.toString())
|
|
967
|
+
.set('size', size.toString());
|
|
968
|
+
const httpOptions = {
|
|
969
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
970
|
+
params: params
|
|
971
|
+
};
|
|
972
|
+
const filterObj = {};
|
|
973
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/recent/voicerecording', filterData, httpOptions);
|
|
974
|
+
}
|
|
975
|
+
// save voice mail recording
|
|
976
|
+
saveVoiceMailReocrding(token, recordingData) {
|
|
977
|
+
const httpOptions = {
|
|
978
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
979
|
+
// params: params
|
|
980
|
+
};
|
|
981
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/recording', recordingData, httpOptions);
|
|
982
|
+
}
|
|
983
|
+
deleteVoiceRecording(token, recordingId) {
|
|
984
|
+
const httpOptions = {
|
|
985
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
986
|
+
// params: params
|
|
987
|
+
};
|
|
988
|
+
return this.http.delete(environment.apiUrl + `/utilities/phonebook/delete/voicerecordings/${recordingId}`, httpOptions);
|
|
989
|
+
}
|
|
990
|
+
markAsVoiceRecording(token, recordingId, dtModel) {
|
|
991
|
+
const httpOptions = {
|
|
992
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
|
|
993
|
+
};
|
|
994
|
+
return this.http.post(environment.apiUrl + `/utilities/phonebook/markas/voicemail/read/${recordingId}`, dtModel, httpOptions);
|
|
995
|
+
}
|
|
996
|
+
editContactById(token, id) {
|
|
997
|
+
const params = {
|
|
998
|
+
'Content-Type': 'application/json',
|
|
999
|
+
'Auth-Key': "Bearer " + token
|
|
1000
|
+
};
|
|
1001
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1002
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/search/contactid/' + id, httpOptions);
|
|
1003
|
+
}
|
|
1004
|
+
updateContacts(token, dtModel) {
|
|
1005
|
+
const params = {
|
|
1006
|
+
'Content-Type': 'application/json',
|
|
1007
|
+
'Auth-Key': "Bearer " + token
|
|
1008
|
+
};
|
|
1009
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1010
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/contact', dtModel, httpOptions);
|
|
1011
|
+
}
|
|
1012
|
+
uploadPhoto(payload) {
|
|
1013
|
+
let httpOptions = {
|
|
1014
|
+
headers: new HttpHeaders({
|
|
1015
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
1016
|
+
})
|
|
1017
|
+
};
|
|
1018
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', payload, httpOptions);
|
|
1019
|
+
}
|
|
1020
|
+
saveContacts(token, payload) {
|
|
1021
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
|
|
1022
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts/manually', payload, httpOptions);
|
|
1023
|
+
}
|
|
1024
|
+
//Dowload csv template
|
|
1025
|
+
downloadCsvTemplate(token) {
|
|
1026
|
+
const params = {
|
|
1027
|
+
'Content-Type': 'application/json',
|
|
1028
|
+
'Auth-Key': "Bearer " + token
|
|
1029
|
+
};
|
|
1030
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1031
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/download/csv', httpOptions);
|
|
1032
|
+
}
|
|
1033
|
+
//Upload csv contacts
|
|
1034
|
+
updateCSVContacts(token, dtModel) {
|
|
1035
|
+
const params = {
|
|
1036
|
+
'Content-Type': 'application/json',
|
|
1037
|
+
'Auth-Key': "Bearer " + token
|
|
1038
|
+
};
|
|
1039
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1040
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts', dtModel, httpOptions);
|
|
1041
|
+
}
|
|
1042
|
+
//City list
|
|
1043
|
+
GetAllCityList(_countryId, _stateName) {
|
|
1044
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1045
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/citylist/' + _countryId + '/' + _stateName, httpOptions);
|
|
1046
|
+
}
|
|
1047
|
+
//zip list
|
|
1048
|
+
GetAllZipList(dataModel) {
|
|
1049
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1050
|
+
return this.http.post(environment.apiUrl + '/global/master/ur/postalcodes', dataModel, httpOptions);
|
|
1051
|
+
}
|
|
1052
|
+
//Get all invoices
|
|
1053
|
+
GetInvoices(viewType, token) {
|
|
1054
|
+
const params = {
|
|
1055
|
+
'Content-Type': 'application/json',
|
|
1056
|
+
'Auth-Key': "Bearer " + token
|
|
1057
|
+
};
|
|
1058
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1059
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoices/' + viewType, httpOptions);
|
|
1060
|
+
}
|
|
1061
|
+
DownloadInvoice(invoiceId, token) {
|
|
1062
|
+
const httpOptions = {
|
|
1063
|
+
responseType: 'blob',
|
|
1064
|
+
headers: new HttpHeaders({
|
|
1065
|
+
'Content-Type': 'application/json',
|
|
1066
|
+
'Auth-Key': "Bearer " + token
|
|
1067
|
+
})
|
|
1068
|
+
};
|
|
1069
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoice/file/' + invoiceId, httpOptions);
|
|
1070
|
+
}
|
|
1071
|
+
GetInvoice(invoiceId) {
|
|
1072
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1073
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/invoice/' + invoiceId, httpOptions);
|
|
1074
|
+
}
|
|
1075
|
+
//Billing summary
|
|
1076
|
+
GetBillingSummary(token) {
|
|
1077
|
+
const params = {
|
|
1078
|
+
'Content-Type': 'application/json',
|
|
1079
|
+
'Auth-Key': "Bearer " + token
|
|
1080
|
+
};
|
|
1081
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1082
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/summary', httpOptions);
|
|
1083
|
+
}
|
|
1084
|
+
//Billing Plan & Pricing
|
|
1085
|
+
GetAllPlans(token) {
|
|
1086
|
+
const params = {
|
|
1087
|
+
'Content-Type': 'application/json',
|
|
1088
|
+
'Auth-Key': "Bearer " + token
|
|
1089
|
+
};
|
|
1090
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1091
|
+
return this.http.get(environment.apiUrl + '/utilities/billing/tiers', httpOptions);
|
|
1092
|
+
}
|
|
1093
|
+
//Pay Now
|
|
1094
|
+
payNow(invoiceId, cardId, token) {
|
|
1095
|
+
const params = {
|
|
1096
|
+
'Content-Type': 'application/json',
|
|
1097
|
+
'Auth-Key': "Bearer " + token
|
|
1098
|
+
};
|
|
1099
|
+
const data = {
|
|
1100
|
+
"invoiceId": invoiceId,
|
|
1101
|
+
"cardId": cardId
|
|
1102
|
+
};
|
|
1103
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1104
|
+
return this.http.post(environment.apiUrl + `/utilities/billing/pay/invoice/${invoiceId}/${cardId}`, data, httpOptions);
|
|
1105
|
+
}
|
|
1106
|
+
confirmInvoicePayment(customerId, token) {
|
|
1107
|
+
const params = {
|
|
1108
|
+
'Content-Type': 'application/json',
|
|
1109
|
+
'Auth-Key': "Bearer " + token
|
|
1110
|
+
};
|
|
1111
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1112
|
+
return this.http.post(environment.apiUrl + `/utilities/billing/invoice/confirmation/${customerId}`, {}, httpOptions);
|
|
1113
|
+
}
|
|
1114
|
+
loadStripeMethods(sessionid, token) {
|
|
1115
|
+
const params = {
|
|
1116
|
+
'Content-Type': 'application/json',
|
|
1117
|
+
'Auth-Key': "Bearer " + token
|
|
1118
|
+
};
|
|
1119
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1120
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/duplicate/card/' + sessionid, httpOptions);
|
|
1121
|
+
}
|
|
1122
|
+
logOut(authKey) {
|
|
1123
|
+
const auth = { "Auth-Key": authKey };
|
|
1124
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + authKey }) };
|
|
1125
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/logout', {}, httpOptions);
|
|
1126
|
+
}
|
|
1127
|
+
registerFCMToken(payload) {
|
|
1128
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1129
|
+
return this.http.post(environment.apiUrl + '/firebase/register/device', payload, httpOptions);
|
|
1130
|
+
}
|
|
1131
|
+
getNotificationList(pageIndex, pageSize) {
|
|
1132
|
+
let params = new HttpParams();
|
|
1133
|
+
params = params.set('size', pageSize || '10');
|
|
1134
|
+
params = params.set('page', pageIndex || '1');
|
|
1135
|
+
const headers = { 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') };
|
|
1136
|
+
const httpOptions = { headers, params };
|
|
1137
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/stored/notification', httpOptions);
|
|
1138
|
+
}
|
|
1139
|
+
getTotalUnreadCount() {
|
|
1140
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1141
|
+
return this.http.get(environment.apiUrl + '/utilities/sms/notification/count', httpOptions);
|
|
1142
|
+
}
|
|
1143
|
+
markNotification(payload) {
|
|
1144
|
+
//const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1145
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1146
|
+
return this.http.post(environment.apiUrl + '/firebase/ur/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
|
|
1147
|
+
}
|
|
1148
|
+
deleteNotification(payload) {
|
|
1149
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1150
|
+
return this.http.post(environment.apiUrl + '/firebase/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
|
|
1151
|
+
}
|
|
1152
|
+
getVoicemailDetails(recordId, token) {
|
|
1153
|
+
const params = {
|
|
1154
|
+
'Content-Type': 'application/json',
|
|
1155
|
+
'Auth-Key': "Bearer " + token
|
|
1156
|
+
};
|
|
1157
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1158
|
+
return this.http.get(environment.apiUrl + `/utilities/phonebook/play/voicerecordings/${recordId}`, httpOptions);
|
|
1159
|
+
}
|
|
1160
|
+
deleteNotifications(token, notificationIds) {
|
|
1161
|
+
const params = {
|
|
1162
|
+
'Content-Type': 'application/json',
|
|
1163
|
+
'Auth-Key': "Bearer " + token
|
|
1164
|
+
};
|
|
1165
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1166
|
+
return this.http.get(environment.apiUrl + `/utilities/sms/delete/notification/${notificationIds}`, httpOptions);
|
|
1167
|
+
}
|
|
1168
|
+
getReports(filterData, pageIndex, pageSize) {
|
|
1169
|
+
const filterObj = {
|
|
1170
|
+
accountStatus: filterData.accountStatus || "",
|
|
1171
|
+
dateType: filterData.dateType || "",
|
|
1172
|
+
fieldType: filterData.fieldType || "",
|
|
1173
|
+
fieldValue: filterData.fieldValue || "",
|
|
1174
|
+
fromDate: filterData.fromDate || "",
|
|
1175
|
+
pendingDues: filterData.pendingDues,
|
|
1176
|
+
toDate: filterData.toDate || "",
|
|
1177
|
+
};
|
|
1178
|
+
const params = new HttpParams()
|
|
1179
|
+
.set('page', pageIndex?.toString() || '1')
|
|
1180
|
+
.set('size', pageSize?.toString() || '10');
|
|
1181
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
|
|
1182
|
+
params: params };
|
|
1183
|
+
return this.http.post(environment.apiUrl + '/utilities/report/user/details', filterObj, httpOptions);
|
|
1184
|
+
}
|
|
1185
|
+
getReportsFilter() {
|
|
1186
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1187
|
+
return this.http.get(environment.apiUrl + '/utilities/report/dropdown', httpOptions);
|
|
1188
|
+
}
|
|
1189
|
+
getSyncReportData() {
|
|
1190
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1191
|
+
return this.http.post(environment.apiUrl + '/utilities/report/update/cache', {}, httpOptions);
|
|
1192
|
+
}
|
|
1193
|
+
getDownloadCSV(filterData, pageIndex, pageSize) {
|
|
1194
|
+
const filterObj = {
|
|
1195
|
+
accountStatus: filterData.accountStatus || "",
|
|
1196
|
+
dateType: filterData.dateType || "",
|
|
1197
|
+
fieldType: filterData.fieldType || "",
|
|
1198
|
+
fieldValue: filterData.fieldValue || "",
|
|
1199
|
+
fromDate: filterData.fromDate || "",
|
|
1200
|
+
pendingDues: filterData.pendingDues,
|
|
1201
|
+
toDate: filterData.toDate || "",
|
|
1202
|
+
};
|
|
1203
|
+
const params = new HttpParams()
|
|
1204
|
+
.set('page', pageIndex > 0 ? pageIndex.toString() : '1')
|
|
1205
|
+
.set('size', pageSize.toString());
|
|
1206
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
|
|
1207
|
+
return this.http.post(environment.apiUrl + '/utilities/report/csv/download', filterObj, httpOptions);
|
|
1208
|
+
}
|
|
1209
|
+
getDeleteFile(filePathValue) {
|
|
1210
|
+
const httpOptions = {
|
|
1211
|
+
body: { filePath: filePathValue },
|
|
1212
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1213
|
+
};
|
|
1214
|
+
return this.http.post(environment.apiUrl + '/utilities/report/download/complete', httpOptions);
|
|
1215
|
+
}
|
|
1216
|
+
getDownloadPDF(filterData, pageIndex, pageSize) {
|
|
1217
|
+
const filterObj = {
|
|
1218
|
+
accountStatus: filterData.accountStatus || "",
|
|
1219
|
+
dateType: filterData.dateType || "",
|
|
1220
|
+
fieldType: filterData.fieldType || "",
|
|
1221
|
+
fieldValue: filterData.fieldValue || "",
|
|
1222
|
+
fromDate: filterData.fromDate || "",
|
|
1223
|
+
pendingDues: filterData.pendingDues,
|
|
1224
|
+
toDate: filterData.toDate || "",
|
|
1225
|
+
};
|
|
1226
|
+
const params = new HttpParams()
|
|
1227
|
+
.set('page', pageIndex > 0 ? pageIndex.toString() : '1')
|
|
1228
|
+
.set('size', pageSize.toString());
|
|
1229
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
|
|
1230
|
+
return this.http.post(environment.apiUrl + '/utilities/report/pdf/download', filterObj, httpOptions);
|
|
1231
|
+
}
|
|
1232
|
+
getSuspendCategoriesData() {
|
|
1233
|
+
const httpOptions = {
|
|
1234
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1235
|
+
};
|
|
1236
|
+
return this.http.get(environment.apiUrl + '/utilities/report/suspend/category/dropdown', httpOptions);
|
|
1237
|
+
}
|
|
1238
|
+
getUserDetailsForSuspend(userIds) {
|
|
1239
|
+
const httpOptions = {
|
|
1240
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1241
|
+
};
|
|
1242
|
+
return this.http.post(`${environment.apiUrl}/admin/suspension/data/${encodeURIComponent(userIds)}`, null, httpOptions);
|
|
1243
|
+
}
|
|
1244
|
+
suspendUsers(userData) {
|
|
1245
|
+
const httpOptions = {
|
|
1246
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1247
|
+
};
|
|
1248
|
+
return this.http.post(`${environment.apiUrl}/admin/suspend/user`, userData, httpOptions);
|
|
1249
|
+
}
|
|
1250
|
+
resumeUser(userData) {
|
|
1251
|
+
const httpOptions = {
|
|
1252
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1253
|
+
};
|
|
1254
|
+
return this.http.post(`${environment.apiUrl}/admin/resume/user`, userData, httpOptions);
|
|
1255
|
+
}
|
|
1256
|
+
resumeUnpaidUsers(userData) {
|
|
1257
|
+
const httpOptions = {
|
|
1258
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1259
|
+
};
|
|
1260
|
+
return this.http.post(`${environment.apiUrl}/admin/resume/unpaid/user`, userData, httpOptions);
|
|
1261
|
+
}
|
|
1262
|
+
deleteUser(userData) {
|
|
1263
|
+
const httpOptions = {
|
|
1264
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1265
|
+
};
|
|
1266
|
+
return this.http.post(`${environment.apiUrl}/admin/delete/user`, userData, httpOptions);
|
|
1267
|
+
}
|
|
1268
|
+
deleteUserAccount() {
|
|
1269
|
+
const httpOptions = {
|
|
1270
|
+
headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
|
|
1271
|
+
};
|
|
1272
|
+
// return this.http.post<any[]>(`${environment.apiUrl}/utilities/ext/delete/user/`, userData, httpOptions);
|
|
1273
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
1274
|
+
return this.http.post(`${environment.apiUrl}/utilities/ext/delete/user/${this.platform}/${ipAddressInfo.ip}`, null, httpOptions);
|
|
1275
|
+
}), catchError((error) => {
|
|
1276
|
+
// Properly catch errors
|
|
1277
|
+
return throwError(error);
|
|
1278
|
+
}));
|
|
1279
|
+
}
|
|
1280
|
+
getIPDetailsForCall(recordId, callStatus) {
|
|
1281
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
1282
|
+
const IpObj = {
|
|
1283
|
+
'ipAddress': ipAddressInfo.ip,
|
|
1284
|
+
'ipCountry': ipAddressInfo.address.country,
|
|
1285
|
+
'recordId': recordId,
|
|
1286
|
+
'callStatus': callStatus,
|
|
1287
|
+
};
|
|
1288
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1289
|
+
return this.http.post(environment.apiUrl + '/utilities/twilio/incoming/call/ip', IpObj, httpOptions).pipe(catchError(postError => {
|
|
1290
|
+
// console.log('Error during HTTP POST request:', postError);
|
|
1291
|
+
return throwError(postError);
|
|
1292
|
+
}));
|
|
1293
|
+
}), catchError(ipError => {
|
|
1294
|
+
// console.log('Error fetching IP address info:', ipError);
|
|
1295
|
+
return throwError(ipError);
|
|
1296
|
+
}));
|
|
1297
|
+
}
|
|
1298
|
+
getIPDetailsForSMS(recordId) {
|
|
1299
|
+
return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
|
|
1300
|
+
const IpObj = {
|
|
1301
|
+
'ipAddress': ipAddressInfo.ip,
|
|
1302
|
+
'ipCountry': ipAddressInfo.address.country,
|
|
1303
|
+
'recordId': recordId,
|
|
1304
|
+
};
|
|
1305
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1306
|
+
return this.http.post(environment.apiUrl + '/utilities/twilio/inbound/sms/ip', IpObj, httpOptions);
|
|
1307
|
+
}, catchError(error => {
|
|
1308
|
+
// Catch error from getIpAddressInfo
|
|
1309
|
+
return throwError(error);
|
|
1310
|
+
})));
|
|
1311
|
+
}
|
|
1312
|
+
GetAllAvailableCountryList() {
|
|
1313
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
|
|
1314
|
+
return this.http.get(environment.apiUrl + '/global/master/ur/dedicated/countrylist');
|
|
1315
|
+
// return this.http.get<string>(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
|
|
1316
|
+
}
|
|
1317
|
+
getUserSettings() {
|
|
1318
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1319
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/settings', httpOptions);
|
|
1320
|
+
}
|
|
1321
|
+
updateDialCodePreference(settings) {
|
|
1322
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1323
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update/settings', settings, httpOptions);
|
|
1324
|
+
}
|
|
1325
|
+
updateLongPressTime(time) {
|
|
1326
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1327
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/update/longpress/' + time, {}, httpOptions);
|
|
1328
|
+
}
|
|
1329
|
+
exportToCSV() {
|
|
1330
|
+
const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }), responseType: 'blob' };
|
|
1331
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/download/contacts', httpOptions);
|
|
1332
|
+
}
|
|
1333
|
+
getDialPreferenceNums() {
|
|
1334
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1335
|
+
return this.http.get(environment.apiUrl + '/utilities/ext/dial/preference/dropdown', httpOptions);
|
|
1336
|
+
}
|
|
1337
|
+
updateVASSettings(token, dtModel) {
|
|
1338
|
+
const params = {
|
|
1339
|
+
'Content-Type': 'application/json',
|
|
1340
|
+
'Auth-Key': "Bearer " + token
|
|
1341
|
+
};
|
|
1342
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1343
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/value/added/service', dtModel, httpOptions);
|
|
1344
|
+
}
|
|
1345
|
+
updateVoiceMailSettings(token, dtModel) {
|
|
1346
|
+
const params = {
|
|
1347
|
+
'Content-Type': 'application/json',
|
|
1348
|
+
'Auth-Key': "Bearer " + token
|
|
1349
|
+
};
|
|
1350
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1351
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/voicemail/setting', dtModel, httpOptions);
|
|
1352
|
+
}
|
|
1353
|
+
updateVoiceRecordSettings(token, dtModel) {
|
|
1354
|
+
const params = {
|
|
1355
|
+
'Content-Type': 'application/json',
|
|
1356
|
+
'Auth-Key': "Bearer " + token
|
|
1357
|
+
};
|
|
1358
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1359
|
+
return this.http.post(environment.apiUrl + '/utilities/ext/update/call/recording/setting', dtModel, httpOptions);
|
|
1360
|
+
}
|
|
1361
|
+
getManualLinks(deviceType) {
|
|
1362
|
+
return `${environment.apiUrl}/landing/support/ur/user/manual/${deviceType}`;
|
|
1363
|
+
}
|
|
1364
|
+
updateSignupProfile(body) {
|
|
1365
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
|
|
1366
|
+
return this.http.put(environment.apiUrl + '/utilities/ext/ur/update/signup/profile', body, httpOptions);
|
|
1367
|
+
}
|
|
1368
|
+
getAdminSettings() {
|
|
1369
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
1370
|
+
return this.http.get(environment.apiUrl + '/admin/settings', httpOptions);
|
|
1371
|
+
}
|
|
1372
|
+
updateActions(token, dtModel) {
|
|
1373
|
+
const params = {
|
|
1374
|
+
'Content-Type': 'application/json',
|
|
1375
|
+
'Auth-Key': "Bearer " + token
|
|
1376
|
+
};
|
|
1377
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1378
|
+
return this.http.post(environment.apiUrl + '/admin/change/settings', dtModel, httpOptions);
|
|
1379
|
+
}
|
|
1380
|
+
updateValueAddedServices(token, dtModel) {
|
|
1381
|
+
const params = {
|
|
1382
|
+
'Content-Type': 'application/json',
|
|
1383
|
+
'Auth-Key': "Bearer " + token
|
|
1384
|
+
};
|
|
1385
|
+
const httpOptions = { headers: new HttpHeaders(params) };
|
|
1386
|
+
return this.http.post(environment.apiUrl + '/admin/value/added/service', dtModel, httpOptions);
|
|
1387
|
+
}
|
|
1388
|
+
deleteAdminUsers(token, userIds) {
|
|
1389
|
+
const httpOptions = {
|
|
1390
|
+
headers: new HttpHeaders({
|
|
1391
|
+
'Content-Type': 'application/json',
|
|
1392
|
+
'Auth-Key': 'Bearer ' + token
|
|
1393
|
+
})
|
|
1394
|
+
};
|
|
1395
|
+
return this.http.delete(environment.apiUrl + `/admin/delete/value/usage/${userIds}`, httpOptions);
|
|
1396
|
+
}
|
|
1397
|
+
getUserInformation(twilioAuthId) {
|
|
1398
|
+
const httpOptions = {
|
|
1399
|
+
headers: new HttpHeaders({
|
|
1400
|
+
'Content-Type': 'application/json',
|
|
1401
|
+
'Auth-Key': 'Bearer ' + this.token
|
|
1402
|
+
})
|
|
1403
|
+
};
|
|
1404
|
+
return this.http.get(environment.apiUrl + '/utilities/twilio/c2c/information/' + twilioAuthId, httpOptions);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
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 });
|
|
1408
|
+
ExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, providedIn: 'root' });
|
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, decorators: [{
|
|
1410
|
+
type: Injectable,
|
|
1411
|
+
args: [{
|
|
1412
|
+
providedIn: 'root'
|
|
1413
|
+
}]
|
|
1414
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: IpAddressService }]; } });
|
|
1415
|
+
|
|
214
1416
|
class DialboxComponent {
|
|
215
|
-
constructor(twilioService,
|
|
216
|
-
// private extService: ExtensionService,
|
|
1417
|
+
constructor(twilioService, extService,
|
|
217
1418
|
// private dialog: MatDialog,
|
|
218
|
-
|
|
219
|
-
// private extensionService: ExtensionService,
|
|
220
|
-
router) {
|
|
1419
|
+
ipService, extensionService, router) {
|
|
221
1420
|
this.twilioService = twilioService;
|
|
1421
|
+
this.extService = extService;
|
|
1422
|
+
this.ipService = ipService;
|
|
1423
|
+
this.extensionService = extensionService;
|
|
222
1424
|
this.router = router;
|
|
223
1425
|
this.isDialpadHidden = false;
|
|
224
1426
|
this.closeDialpadEvent = new EventEmitter();
|
|
@@ -260,7 +1462,6 @@ class DialboxComponent {
|
|
|
260
1462
|
msg: '',
|
|
261
1463
|
show: false
|
|
262
1464
|
};
|
|
263
|
-
this.token = '';
|
|
264
1465
|
this.showDedicatedPopup = false;
|
|
265
1466
|
this.newIncomingCalls = [];
|
|
266
1467
|
this.incomingCallsList = [];
|
|
@@ -522,22 +1723,24 @@ class DialboxComponent {
|
|
|
522
1723
|
this.sanitizedNum = '';
|
|
523
1724
|
this.showInputClearBtn = false;
|
|
524
1725
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
1726
|
+
getCallerIdList() {
|
|
1727
|
+
this.extService.displayID(this.token || '').subscribe((res) => {
|
|
1728
|
+
//this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
|
|
1729
|
+
this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
|
|
1730
|
+
// this.callerIdList = res.callerIdList;
|
|
1731
|
+
if (this.callerIdList.length == 1) {
|
|
1732
|
+
this.selectedCallerId = this.callerIdList[0];
|
|
1733
|
+
}
|
|
1734
|
+
else {
|
|
1735
|
+
if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
|
|
1736
|
+
this.selectedCallerId = null;
|
|
1737
|
+
}
|
|
1738
|
+
else {
|
|
1739
|
+
this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
541
1744
|
getContactList() {
|
|
542
1745
|
this.twilioService.getContactList().subscribe((resp) => {
|
|
543
1746
|
if (resp.response == 'Success') {
|
|
@@ -949,42 +2152,46 @@ class DialboxComponent {
|
|
|
949
2152
|
this.dialAlert.show = false;
|
|
950
2153
|
}, 3000);
|
|
951
2154
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
2155
|
+
async isCallerIdSet() {
|
|
2156
|
+
try {
|
|
2157
|
+
const tkn = localStorage.getItem('ext_token');
|
|
2158
|
+
const res = await this.extService.fetchCallerId(tkn || '').toPromise();
|
|
2159
|
+
if (res.status == 200) {
|
|
2160
|
+
localStorage.setItem('trialOver', res.trialOver);
|
|
2161
|
+
this.twilioService.isTrialOver.next(res.trialOver);
|
|
2162
|
+
localStorage.setItem('paymentDue', res.paymentDue);
|
|
2163
|
+
this.twilioService.isPaymentDue.next(res.paymentDue);
|
|
2164
|
+
}
|
|
2165
|
+
if (res.callerid) {
|
|
2166
|
+
localStorage.setItem('callerID', res.callerid);
|
|
2167
|
+
this.extService.changeMessage(res.callerid);
|
|
2168
|
+
}
|
|
2169
|
+
else {
|
|
2170
|
+
localStorage.setItem('callerID', 'Not set');
|
|
2171
|
+
this.extService.changeMessage('Not set');
|
|
2172
|
+
}
|
|
2173
|
+
return (localStorage.getItem('callerID') !== 'Not set');
|
|
2174
|
+
}
|
|
2175
|
+
catch (e) {
|
|
2176
|
+
console.log(e);
|
|
2177
|
+
return false;
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
async checkMicrophonePermission() {
|
|
2181
|
+
try {
|
|
2182
|
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
2183
|
+
stream.getTracks().forEach(track => track.stop());
|
|
2184
|
+
return true;
|
|
2185
|
+
}
|
|
2186
|
+
catch (error) {
|
|
2187
|
+
if (error instanceof DOMException && error.name === 'NotAllowedError') {
|
|
2188
|
+
return false;
|
|
2189
|
+
}
|
|
2190
|
+
else {
|
|
2191
|
+
return false;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
988
2195
|
async askForMicrophonePermission() {
|
|
989
2196
|
try {
|
|
990
2197
|
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
@@ -995,17 +2202,17 @@ class DialboxComponent {
|
|
|
995
2202
|
}
|
|
996
2203
|
}
|
|
997
2204
|
// below function is to get the country code with number from server
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
2205
|
+
async getToNumber(dialedNumber) {
|
|
2206
|
+
if (dialedNumber[0] !== '+') {
|
|
2207
|
+
// this is case when user geolocation dial code is on
|
|
2208
|
+
let ipAddress = await this.ipService.getIpAddressInfo().toPromise();
|
|
2209
|
+
const res = await this.twilioService.getToNumber(dialedNumber, ipAddress.address.countryCode).toPromise();
|
|
2210
|
+
if (res.status == 200) {
|
|
2211
|
+
this.toastTimeout = res.timeInterval * 1000;
|
|
2212
|
+
await this.showNumberToast(res);
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
1009
2216
|
isAlertEnable() {
|
|
1010
2217
|
return localStorage.getItem('isAlertEnable');
|
|
1011
2218
|
}
|
|
@@ -1049,21 +2256,21 @@ class DialboxComponent {
|
|
|
1049
2256
|
this.showInputClearBtn = true;
|
|
1050
2257
|
this.numberDialed.emit(this.dialedNumber);
|
|
1051
2258
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
2259
|
+
getUserCallSetting() {
|
|
2260
|
+
const tkn = localStorage.getItem('ext_token');
|
|
2261
|
+
this.extService.fetchCallerId(tkn || '').subscribe((resp) => {
|
|
2262
|
+
if (resp.status == 200) {
|
|
2263
|
+
//this.callPrefernce = resp.userSetting;
|
|
2264
|
+
this.callPreference = resp.callerid;
|
|
2265
|
+
this.getCallerIdList();
|
|
2266
|
+
}
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
onDedicatedNumSelect(id) {
|
|
2270
|
+
this.selectedCallerId = id;
|
|
2271
|
+
this.isCallerIdHidden = true;
|
|
2272
|
+
this.extService.setCallerId(id);
|
|
2273
|
+
}
|
|
1067
2274
|
cancelDialNumber() {
|
|
1068
2275
|
this.terminateCall = true;
|
|
1069
2276
|
this.callNumberToast.show = false;
|
|
@@ -1138,12 +2345,12 @@ class DialboxComponent {
|
|
|
1138
2345
|
}
|
|
1139
2346
|
}
|
|
1140
2347
|
}
|
|
1141
|
-
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [{ token: TwilioService }, { token:
|
|
1142
|
-
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { isDialpadHidden: "isDialpadHidden" }, 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 <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [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 <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \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;height:600px;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: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
2348
|
+
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [{ token: TwilioService }, { token: ExtensionService }, { token: IpAddressService }, { token: ExtensionService }, { token: i4.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
2349
|
+
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { isDialpadHidden: "isDialpadHidden" }, 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 <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [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 <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \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;height:600px;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: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.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: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
1143
2350
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
|
|
1144
2351
|
type: Component,
|
|
1145
2352
|
args: [{ selector: 'lib-dialbox', template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [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 <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \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;height:600px;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"] }]
|
|
1146
|
-
}], ctorParameters: function () { return [{ type: TwilioService }, { type:
|
|
2353
|
+
}], ctorParameters: function () { return [{ type: TwilioService }, { type: ExtensionService }, { type: IpAddressService }, { type: ExtensionService }, { type: i4.Router }]; }, propDecorators: { isDialpadHidden: [{
|
|
1147
2354
|
type: Input
|
|
1148
2355
|
}], closeDialpadEvent: [{
|
|
1149
2356
|
type: Output
|