@vgroup/dialbox 0.0.3 → 0.0.5

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