@vgroup/dialbox 0.0.7 → 0.0.9

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,19 +2,19 @@ import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, EventEmitter, Component, Input, Output, ViewChild, Inject, NgModule } from '@angular/core';
4
4
  import { AsYouType } from 'libphonenumber-js';
5
- import { BehaviorSubject, throwError, Subscription, interval } from 'rxjs';
5
+ import { BehaviorSubject, throwError, interval, Subscription } from 'rxjs';
6
6
  import * as i1 from '@angular/common/http';
7
7
  import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
8
8
  import { catchError, switchMap, map } from 'rxjs/operators';
9
9
  import * as i4 from '@angular/router';
10
10
  import { RouterLink } from '@angular/router';
11
- import * as i5 from '@angular/common';
11
+ import * as i3 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
- import * as i6 from '@angular/forms';
13
+ import * as i3$1 from '@angular/forms';
14
14
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
15
15
  import { Device } from '@twilio/voice-sdk';
16
16
  import swal from 'sweetalert2';
17
- import * as i3 from '@angular/material/dialog';
17
+ import * as i3$2 from '@angular/material/dialog';
18
18
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
19
19
 
20
20
  const keypad = [
@@ -1418,412 +1418,1044 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1418
1418
  }]
1419
1419
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: IpAddressService }]; } });
1420
1420
 
1421
- class DialboxComponent {
1422
- constructor(twilioService, extService,
1423
- // private dialog: MatDialog,
1424
- ipService, extensionService, router) {
1425
- this.twilioService = twilioService;
1426
- this.extService = extService;
1427
- this.ipService = ipService;
1421
+ const GlobalConstant = {
1422
+ ErrorMsg500: "Unable to process request. Please try again later.",
1423
+ isSMSVisible: true,
1424
+ dedicatedNumText: 'C2C Number'
1425
+ };
1426
+
1427
+ class IncomingCallComponent {
1428
+ constructor(extensionService, twilioService) {
1428
1429
  this.extensionService = extensionService;
1429
- this.router = router;
1430
- this.isDialpadHidden = false;
1431
- this.closeDialpadEvent = new EventEmitter();
1432
- this.callInitiated = new EventEmitter();
1433
- this.endCallEvent = new EventEmitter();
1434
- this.minimiseEvent = new EventEmitter();
1435
- this.incomingCallsNewInfoEvent = new EventEmitter();
1436
- this.incomingCallInitiated = new EventEmitter();
1437
- this.numberDialed = new EventEmitter();
1438
- this.isCallInProgress = false;
1439
- this.keypadVal = keypad;
1440
- this.showInputClearBtn = false;
1441
- this.dialedNumber = '';
1442
- this.contactList = [];
1443
- this.filteredContactList = [];
1444
- this.callerIdList = [];
1445
- this.isCallerIdHidden = true;
1446
- this.isTrialPeriodOver = false;
1447
- this.isPaymentDue = false;
1448
- this.terminateCall = false;
1449
- this.toastTimeout = 7000;
1450
- this.callNumberToast = {
1451
- show: false,
1452
- type: 'alert-success',
1453
- number: '',
1454
- displayNum: ''
1455
- };
1456
- this.callData = {
1457
- phone: '',
1458
- displayNum: '',
1459
- dial: false,
1460
- name: '',
1461
- img: 'assets/images/user.jpg',
1462
- isIncomingCall: false,
1463
- extNum: ''
1464
- };
1465
- this.lastDialed = null;
1466
- this.dialAlert = {
1467
- msg: '',
1468
- show: false
1469
- };
1470
- this.showDedicatedPopup = false;
1471
- this.newIncomingCalls = [];
1472
- this.incomingCallsList = [];
1473
- this.subscriptions = new Subscription();
1474
- this.shakeDedicatedBtn = false;
1475
- this.isSmartDialCall = false;
1476
- this.isMinimised = false;
1430
+ this.twilioService = twilioService;
1431
+ this.showRingAnimation = true;
1432
+ this.selectedIncomingCall = {};
1433
+ this.twilioAuthId = '';
1434
+ this.dedicatedNum = '';
1435
+ this.recordCall = false;
1436
+ this.shouldRecordCall = false;
1437
+ this.isClickExpand = false;
1438
+ this.disbaleEndCallBtn = true;
1439
+ this.closeIncomingCallDiv = new EventEmitter();
1440
+ this.incomingCallsNewList = new EventEmitter();
1441
+ this.selectedIncomingCallInfo = new EventEmitter();
1442
+ this.isMute = false;
1477
1443
  }
1478
1444
  ngOnInit() {
1479
1445
  try {
1480
- this.token = localStorage.getItem('ext_token');
1481
- //this.isCallInProgress = true;
1482
- this.getContactList();
1483
- // this.getUserCallSetting();
1484
- const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact) => {
1485
- if (contact.number) {
1486
- this.isSmartDialCall = false;
1487
- if (contact.isDialFromHistory) {
1488
- //handle dialing from history page
1489
- if (contact.callerId == 'smartDialing') {
1490
- this.selectedCallerId = { number: contact.from };
1491
- this.isSmartDialCall = true;
1492
- setTimeout(() => {
1493
- this.isDialpadHidden = false;
1494
- }, 2000);
1495
- this.callData.phone = contact.number;
1496
- this.callData.name = contact.name;
1497
- this.callData.img = contact.img;
1498
- this.callData.from = contact.from;
1499
- this.sanitizedNum = contact.number;
1500
- // this.getUserInformation(contact);
1501
- // this.incomingCallsList.push(contact)
1502
- this.initiateCall();
1503
- }
1504
- else {
1505
- // this.getUserCallSetting();
1506
- setTimeout(() => {
1507
- this.isDialpadHidden = false;
1508
- }, 1000);
1509
- // this.getUserInformation(contact);
1510
- // this.incomingCallsList.push(contact)
1511
- this.dialedNumber = contact.number;
1512
- this.sanitizedNum = contact.number;
1513
- }
1514
- }
1515
- else {
1516
- if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
1517
- // this.getUserCallSetting();
1518
- setTimeout(() => {
1519
- this.isDialpadHidden = false;
1520
- }, 1000);
1521
- this.dialedNumber = contact.number;
1522
- this.sanitizedNum = contact.number;
1523
- }
1524
- else {
1525
- setTimeout(() => {
1526
- this.isDialpadHidden = false;
1527
- }, 2000);
1528
- this.callData.phone = contact.number;
1529
- this.callData.name = contact.name;
1530
- this.callData.img = contact.img;
1531
- this.sanitizedNum = contact.number;
1532
- this.initiateCall();
1533
- }
1534
- }
1535
- }
1536
- });
1537
- // handle incoming call
1538
- const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
1539
- // if (incomingCallData) {
1540
- // this.isCallInProgress = true;
1541
- // this.isDialpadHidden = false;
1542
- // this.callData.phone = incomingCallData.parameters.From;
1543
- // this.callData.name = incomingCallData.customParameters.get('name');
1544
- // this.callData.img = incomingCallData.customParameters.get('image');
1545
- // this.callData.isIncomingCall = true;
1546
- // }
1547
- if (incomingCallData) {
1548
- if (this.isCallInProgress) {
1549
- this.newIncomingCalls.push(incomingCallData);
1550
- // this.getUserInformation(incomingCallData);
1551
- }
1552
- else {
1553
- this.isCallInProgress = true;
1554
- this.isDialpadHidden = false;
1555
- this.callData.phone = incomingCallData.parameters['From'];
1556
- // this.getUserInformation(incomingCallData);
1557
- this.callData.name = incomingCallData.customParameters.get('name');
1558
- this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
1559
- this.callData.isIncomingCall = true;
1446
+ this.twilioService.currentCall.subscribe(call => {
1447
+ if (call) {
1448
+ this.twilioCallData = call;
1449
+ this.twilioAuthId = call.customParameters.get('twilioAuthId') || '';
1450
+ if (!call.parameters) {
1451
+ call.parameters = {};
1560
1452
  }
1561
- incomingCallData.on('cancel', () => {
1562
- // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
1563
- if (this.incomingCallsList.length == 0) {
1564
- this.isCallInProgress = false;
1453
+ this.sendIPforIncomingCall(this.twilioAuthId, '');
1454
+ call.on('cancel', () => {
1455
+ if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
1456
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
1565
1457
  }
1458
+ this.rejectCallFromList(call);
1566
1459
  });
1567
- incomingCallData.on('disconnect', () => {
1568
- // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
1569
- if (this.incomingCallsList.length == 0) {
1570
- this.isCallInProgress = false;
1460
+ call.on('disconnect', () => {
1461
+ if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
1462
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
1571
1463
  }
1464
+ this.rejectCallFromList(call);
1572
1465
  });
1573
1466
  }
1574
1467
  });
1575
- this.subscriptions.add(sub1);
1576
- this.subscriptions.add(sub2);
1577
1468
  }
1578
1469
  catch (e) {
1579
1470
  console.log(e);
1580
1471
  }
1581
1472
  }
1582
- // getUserInformation(incomingCallData: any) {
1583
- // let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
1584
- // this.extensionService.getUserInformation(data.twilioAuthId).subscribe(
1585
- // response => {
1586
- // incomingCallData['userInfo']=response
1587
- // this.incomingCallsList.push(incomingCallData);
1588
- // }, error => {
1589
- // console.error('Error starting recording', error);
1590
- // });
1591
- // }
1592
- fromEntries(entries) {
1593
- return entries.reduce((acc, [key, value]) => {
1594
- acc[key] = value;
1595
- return acc;
1596
- }, {});
1597
- }
1598
- ngAfterViewInit() {
1599
- this.registerDragElement();
1473
+ acceptCallFromList(data) {
1474
+ console.log(data, 'checking dii');
1475
+ data.accept();
1476
+ // data.parameters['isCallConnected'] = true;
1477
+ data.isCallConnected = true;
1478
+ this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
1479
+ if (this.shouldRecordCall) { // default recording
1480
+ this.extensionService.setCallSid(this.CallSid, this.recordCall);
1481
+ this.closeIncomingCallWrapper(1);
1482
+ }
1483
+ else { // manual recording
1484
+ this.extensionService.setCallSid(this.CallSid, this.recordCall);
1485
+ this.closeIncomingCallWrapper(1);
1486
+ }
1487
+ });
1600
1488
  }
1601
- ngOnChanges(changes) {
1602
- if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
1603
- this.getContactList();
1604
- // this.getUserCallSetting();
1605
- setTimeout(() => {
1606
- this.dialInputElement.nativeElement.focus();
1607
- }, 0);
1489
+ rejectCallFromList(data) {
1490
+ if (!data)
1491
+ return;
1492
+ if (data.reject)
1493
+ data.reject();
1494
+ if (data.disconnect)
1495
+ data.disconnect();
1496
+ if (data.parameters) {
1497
+ data.parameters['isCallConnected'] = false; // Should be false when rejecting
1498
+ }
1499
+ if (data.customParameters) {
1500
+ this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered');
1501
+ }
1502
+ if (this.newIncomingCallsList && data && data.parameters && data.parameters.CallSid) {
1503
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== data.parameters.CallSid);
1504
+ this.incomingCallsNewList.emit(this.newIncomingCallsList);
1505
+ if (this.newIncomingCallsList.length == 0) {
1506
+ this.closeIncomingCallDiv.emit({ show: 0, call: data });
1507
+ }
1608
1508
  }
1609
1509
  }
1610
- registerDragElement() {
1611
- try {
1612
- const elmnt = document.getElementById('dragparent1');
1613
- let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
1614
- const dragMouseDown = (e) => {
1615
- // If the target is an input, return and don't initiate dragging
1616
- if (e.target.tagName.toLowerCase() === 'input') {
1617
- return;
1618
- }
1619
- e = e || window.event;
1620
- // get the mouse cursor position at startup:
1621
- pos3 = e.clientX;
1622
- pos4 = e.clientY;
1623
- document.onmouseup = closeDragElement;
1624
- // call a function whenever the cursor moves:
1625
- document.onmousemove = elementDrag;
1626
- };
1627
- const elementDrag = (e) => {
1628
- e = e || window.event;
1629
- // calculate the new cursor position:
1630
- pos1 = pos3 - e.clientX;
1631
- pos2 = pos4 - e.clientY;
1632
- pos3 = e.clientX;
1633
- pos4 = e.clientY;
1634
- // set the element's new position:
1635
- // elmnt.style.top = elmnt.offsetTop - pos2 + 'px';
1636
- // elmnt.style.left = elmnt.offsetLeft - pos1 + 'px';
1637
- };
1638
- const closeDragElement = () => {
1639
- /* stop moving when mouse button is released:*/
1640
- document.onmouseup = null;
1641
- document.onmousemove = null;
1642
- };
1643
- // if (document.getElementById(elmnt.id + 'header')) {
1644
- // /* if present, the header is where you move the DIV from:*/
1645
- // document.getElementById(elmnt.id + 'header').onmousedown = dragMouseDown;
1646
- // } else {
1647
- // /* otherwise, move the DIV from anywhere inside the DIV:*/
1648
- // elmnt.onmousedown = dragMouseDown;
1649
- // }
1650
- }
1651
- catch (e) {
1652
- console.log(e);
1653
- }
1510
+ closeIncomingCallWrapper(val) {
1511
+ this.closeIncomingCallDiv.emit({ show: val, call: this.twilioCallData });
1654
1512
  }
1655
- addNumber(num) {
1656
- if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
1657
- if (num == '#') {
1658
- new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
1659
- }
1660
- else if (num == '*') {
1661
- new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
1662
- }
1663
- else {
1664
- new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
1665
- }
1666
- this.dialedNumber += num;
1667
- this.showInputClearBtn = true;
1668
- this.numberDialed.emit(this.dialedNumber);
1669
- this.onDialInputChange(this.dialedNumber);
1670
- // this.dialInputRef.nativeElement.focus();
1671
- }
1672
- else if (num === 'voicemail') {
1673
- // this.showDedicatedPopup = true;
1674
- this.router.navigate(['extension/voicemail/' + this.token]);
1675
- }
1513
+ toggleMute(data) {
1514
+ this.isMute = !this.isMute;
1515
+ data.mute(this.isMute);
1676
1516
  }
1677
- hideDialpad() {
1678
- this.isDialpadHidden = true;
1679
- this.closeDialpadEvent.emit();
1680
- this.clearAllDialed();
1681
- this.filteredContactList = [];
1517
+ sendIPforIncomingCall(recordId, callstatus) {
1518
+ return new Promise((resolve, reject) => {
1519
+ this.extensionService.getIPDetailsForCall(recordId, callstatus).subscribe((res) => {
1520
+ const resp = res;
1521
+ if (res.status == 200) {
1522
+ if (resp.callAuth) {
1523
+ this.CallSid = resp.callAuth.callSid;
1524
+ this.recordCall = resp.callAuth.recordCall;
1525
+ // Handle the recordCall flag
1526
+ if (resp.callAuth.recordCall) {
1527
+ this.shouldRecordCall = true;
1528
+ }
1529
+ else {
1530
+ this.shouldRecordCall = false;
1531
+ }
1532
+ }
1533
+ else {
1534
+ // swal("Error", "Missing call authentication details.", "error");
1535
+ }
1536
+ resolve();
1537
+ }
1538
+ else {
1539
+ swal("Error", resp.message.join("<br/>"), "error");
1540
+ resolve();
1541
+ }
1542
+ }, (error) => {
1543
+ swal("Error", GlobalConstant.ErrorMsg500, "error");
1544
+ resolve();
1545
+ });
1546
+ });
1682
1547
  }
1683
- onDialInputChange(inputVal) {
1684
- try {
1685
- // Updated regex to include x, X, ext., Ext., and ,
1686
- const isNumericInput = /^[\d\s+\-]+$/.test(inputVal);
1687
- let mainNumber = inputVal;
1688
- // Check for extension indicators and split the input
1689
- const extMatch = inputVal.match(/(x|X|ext\.|Ext\.|,)(.*)/);
1690
- if (extMatch) {
1691
- mainNumber = inputVal.substring(0, extMatch.index).trim();
1692
- this.callData.extNum = extMatch[2].trim();
1693
- }
1694
- this.sanitizedNum = isNumericInput ? mainNumber.replace(/[\s\-]+/g, '') : mainNumber;
1695
- this.callData.phone = isNumericInput ? this.sanitizedNum : '';
1696
- this.showInputClearBtn = inputVal.length > 0;
1697
- if (isNumericInput) {
1698
- this.dialedNumber = new AsYouType().input(this.sanitizedNum);
1699
- }
1700
- // emit current number whenever input changes
1701
- this.numberDialed.emit(this.dialedNumber);
1702
- if (inputVal.length > 2) {
1703
- this.filteredContactList = this.contactList.filter(contact => {
1704
- const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
1705
- // return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some(num => num.number.includes(this.sanitizedNum));
1706
- }).slice(0, 2);
1548
+ onUserInfoByCallSid() {
1549
+ if (this.selectedIncomingCall && this.selectedIncomingCall.userInfo) {
1550
+ }
1551
+ return this.selectedIncomingCall ? Object.keys(this.selectedIncomingCall).length ? true : false : false;
1552
+ }
1553
+ onClickExpand(data) {
1554
+ if (this.selectedIncomingCall === data && this.isClickExpand) {
1555
+ this.isClickExpand = false;
1556
+ this.selectedIncomingCall = null;
1557
+ this.selectedIncomingCallInfo.emit({});
1558
+ return;
1559
+ }
1560
+ this.isClickExpand = true;
1561
+ this.selectedIncomingCall = data;
1562
+ if (this.selectedIncomingCall) {
1563
+ this.selectedIncomingCall['isClickExpand'] = true;
1564
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
1565
+ this.newIncomingCallsList.forEach((call) => {
1566
+ if (call !== this.selectedIncomingCall) {
1567
+ call['isClickExpand'] = false;
1568
+ }
1569
+ });
1707
1570
  }
1708
- else {
1709
- this.filteredContactList = [];
1571
+ this.selectedIncomingCallInfo.emit(this.selectedIncomingCall);
1572
+ if (!this.selectedIncomingCall.userInfo || this.selectedIncomingCall.userInfo.status == 201) {
1573
+ this.getUserInformation(this.selectedIncomingCall);
1710
1574
  }
1711
1575
  }
1712
- catch (e) {
1713
- console.log(e);
1714
- }
1715
1576
  }
1716
- getFirstLetter(name) {
1717
- return name ? name.charAt(0).toUpperCase() : '';
1577
+ getUserInformation(incomingCallData) {
1578
+ let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
1579
+ this.extensionService.getUserInformation(data['twilioAuthId']).subscribe(response => {
1580
+ setTimeout(() => {
1581
+ incomingCallData['userInfo'] = response;
1582
+ }, 5000);
1583
+ }, error => {
1584
+ console.error('Error starting recording', error);
1585
+ });
1718
1586
  }
1719
- clearInput() {
1720
- if (this.dialedNumber.length > 0) {
1721
- this.dialedNumber = this.dialedNumber.slice(0, -1);
1722
- this.showInputClearBtn = this.dialedNumber.length !== 0;
1723
- this.onDialInputChange(this.dialedNumber);
1724
- }
1587
+ fromEntries(entries) {
1588
+ return entries.reduce((acc, [key, value]) => {
1589
+ acc[key] = value;
1590
+ return acc;
1591
+ }, {});
1725
1592
  }
1726
- clearAllDialed() {
1727
- this.dialedNumber = '';
1728
- this.sanitizedNum = '';
1729
- this.showInputClearBtn = false;
1593
+ }
1594
+ IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }], target: i0.ɵɵFactoryTarget.Component });
1595
+ IncomingCallComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: { incomingCallData: "incomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { closeIncomingCallDiv: "closeIncomingCallDiv", incomingCallsNewList: "incomingCallsNewList", selectedIncomingCallInfo: "selectedIncomingCallInfo" }, ngImport: i0, template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"], dependencies: [{ kind: "directive", type: 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"] }] });
1596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, decorators: [{
1597
+ type: Component,
1598
+ args: [{ selector: 'lib-incoming-call', template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"] }]
1599
+ }], ctorParameters: function () { return [{ type: ExtensionService }, { type: TwilioService }]; }, propDecorators: { incomingCallData: [{
1600
+ type: Input
1601
+ }], newIncomingCallsList: [{
1602
+ type: Input
1603
+ }], closeIncomingCallDiv: [{
1604
+ type: Output
1605
+ }], incomingCallsNewList: [{
1606
+ type: Output
1607
+ }], selectedIncomingCallInfo: [{
1608
+ type: Output
1609
+ }] } });
1610
+
1611
+ class CallProgressComponent {
1612
+ constructor(extensionService, cdr) {
1613
+ this.extensionService = extensionService;
1614
+ this.cdr = cdr;
1615
+ this.endCallEvent = new EventEmitter();
1616
+ this.incomingCallsNewInfo = new EventEmitter();
1617
+ this.minimiseEvent = new EventEmitter();
1618
+ this.showRingAnimation = false;
1619
+ this.timer = '00:00';
1620
+ this.showKeypad = false;
1621
+ this.keypadVal = keypad;
1622
+ this.callInput = '';
1623
+ this.isMute = false;
1624
+ this.disbaleEndCallBtn = true;
1625
+ this.showClearBtn = false;
1626
+ this.isCollops = false;
1627
+ // Incoming call variables
1628
+ this.incomingCallDiv = false;
1629
+ this.showCallProgressEvent = new EventEmitter();
1630
+ this.incomingCallInitiated = new EventEmitter();
1631
+ this.isRecording = false;
1632
+ this.isPaused = false;
1633
+ this.timeElapsed = 0; // in seconds
1634
+ this.recordCall = false;
1635
+ this.callStatus = 'ringing';
1636
+ this.isMinimised = false;
1730
1637
  }
1731
- getCallerIdList() {
1732
- this.extService.displayID(this.token || '').subscribe((res) => {
1733
- //this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
1734
- this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
1735
- // this.callerIdList = res.callerIdList;
1736
- if (this.callerIdList.length == 1) {
1737
- this.selectedCallerId = this.callerIdList[0];
1638
+ ngOnInit() {
1639
+ console.log('Call Progress Component');
1640
+ }
1641
+ ngOnChanges(changes) {
1642
+ var _a, _b, _c, _d;
1643
+ console.log('Call Progress Component ngOnChanges');
1644
+ if (changes['callData']) {
1645
+ console.log('Call Progress Component ngOnChanges callData', changes['callData']);
1646
+ if (changes['callData'].currentValue.isIncomingCall) {
1647
+ this.incomingCallDiv = true;
1738
1648
  }
1739
1649
  else {
1740
- if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
1741
- this.selectedCallerId = null;
1742
- }
1743
- else {
1744
- this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
1650
+ //for outgoing call
1651
+ this.startCall(changes['callData'].currentValue);
1652
+ }
1653
+ }
1654
+ if (changes['newIncomingCallData']) {
1655
+ try {
1656
+ if (changes['newIncomingCallData'].currentValue) {
1657
+ if (this.call && (this.call.status() == 'open')) {
1658
+ this.call.disconnect();
1659
+ this.call = changes['newIncomingCallData'].currentValue;
1660
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.accept();
1661
+ this.callData.phone = (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['From'];
1662
+ this.callData.name = (_c = this.call) === null || _c === void 0 ? void 0 : _c.customParameters.get('name');
1663
+ this.callData.img = ((_d = this.call) === null || _d === void 0 ? void 0 : _d.customParameters.get('image')) || 'assets/images/user.jpg';
1664
+ this.incomingCallInitiated.emit();
1665
+ this.startTimer();
1666
+ }
1745
1667
  }
1746
1668
  }
1747
- });
1669
+ catch (e) {
1670
+ console.log(e);
1671
+ }
1672
+ }
1748
1673
  }
1749
- getContactList() {
1750
- this.twilioService.getContactList().subscribe((resp) => {
1751
- if (resp.response == 'Success') {
1752
- this.contactList = resp.phoneBook;
1674
+ ngAfterViewInit() { }
1675
+ startCall(callData) {
1676
+ return __awaiter(this, void 0, void 0, function* () {
1677
+ try {
1678
+ this.showRingAnimation = true;
1679
+ const payload = {
1680
+ channelId: environment.channelId,
1681
+ userId: localStorage.getItem('userId'),
1682
+ to: callData.phone,
1683
+ scope: 'local',
1684
+ fromNumber: callData.from
1685
+ };
1686
+ const response = yield this.initiateCall(payload);
1687
+ if (response.status == 200) {
1688
+ const { id: callAuthId, recordCall } = yield this.getCallAuthId(response);
1689
+ this.getUserInformation(callAuthId);
1690
+ this.recordCall = recordCall; // Store the recordCall value
1691
+ const tokenData = yield this.getOutgoingCallToken(callAuthId);
1692
+ yield this.connectToDevice(tokenData.token, callData);
1693
+ // Poll the status for 30-45 seconds
1694
+ this.pollCallStatus(callAuthId);
1695
+ }
1696
+ else if (response.status == 201) {
1697
+ swal("Error", response.message.join("<br/>"), "error");
1698
+ this.endCall();
1699
+ }
1753
1700
  }
1754
- }, err => {
1701
+ catch (error) {
1702
+ this.showRingAnimation = false;
1703
+ this.handleError(error);
1704
+ this.endCall();
1705
+ }
1706
+ });
1707
+ }
1708
+ initiateCall(payload) {
1709
+ return __awaiter(this, void 0, void 0, function* () {
1710
+ return yield this.extensionService.initiateCall(payload).toPromise();
1711
+ });
1712
+ }
1713
+ getCallAuthId(response) {
1714
+ return __awaiter(this, void 0, void 0, function* () {
1715
+ return {
1716
+ id: response.callauth.id,
1717
+ recordCall: response.callauth.recordCall
1718
+ };
1719
+ });
1720
+ }
1721
+ getOutgoingCallToken(callAuthId) {
1722
+ return __awaiter(this, void 0, void 0, function* () {
1723
+ return yield this.extensionService.getOutgoingCallToken({ authId: callAuthId }).toPromise();
1724
+ });
1725
+ }
1726
+ connectToDevice(token, callData) {
1727
+ return __awaiter(this, void 0, void 0, function* () {
1728
+ const options = {
1729
+ codecPreferences: ['opus', 'pcmu'],
1730
+ closeProtection: true,
1731
+ };
1732
+ this.device = new Device(token.value, options);
1733
+ this.call = yield this.device.connect({
1734
+ params: {
1735
+ From: callData.from,
1736
+ To: callData.phone,
1737
+ Env: environment.abb,
1738
+ Token: token.id,
1739
+ Ext: callData.extNum
1740
+ },
1741
+ rtcConstraints: { audio: { deviceId: 'default' } },
1742
+ });
1743
+ this.setupEventListeners();
1744
+ });
1745
+ }
1746
+ setupEventListeners() {
1747
+ var _a, _b, _c, _d, _e, _f, _g;
1748
+ this.startTimer();
1749
+ (_a = this.device) === null || _a === void 0 ? void 0 : _a.on('error', (err) => {
1755
1750
  console.log(err);
1751
+ this.showRingAnimation = false;
1752
+ this.stopTimer();
1753
+ });
1754
+ (_b = this.call) === null || _b === void 0 ? void 0 : _b.on('error', (error) => {
1755
+ this.showRingAnimation = false;
1756
+ this.stopTimer();
1757
+ });
1758
+ (_c = this.call) === null || _c === void 0 ? void 0 : _c.on('disconnect', () => {
1759
+ this.endCall();
1760
+ });
1761
+ (_d = this.call) === null || _d === void 0 ? void 0 : _d.on('ringing', () => {
1762
+ });
1763
+ (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('reject', () => {
1764
+ this.endCall();
1765
+ });
1766
+ (_f = this.call) === null || _f === void 0 ? void 0 : _f.on('accept', () => {
1767
+ this.showRingAnimation = false;
1768
+ this.disbaleEndCallBtn = false;
1769
+ // Start recording if recordCall is true and call is accepted for 30 seconds
1770
+ // if (this.recordCall) {
1771
+ // setTimeout(() => {
1772
+ // if (this.isRecording) return; // If already recording, skip
1773
+ // this.startRecording();
1774
+ // }, 30000);
1775
+ // } else {
1776
+ // this.stopRecording();
1777
+ // }
1778
+ });
1779
+ (_g = this.call) === null || _g === void 0 ? void 0 : _g.on('messageReceived', (message) => {
1756
1780
  });
1757
1781
  }
1758
- getFullName(contact) {
1759
- let fullName = contact.firstName || '';
1760
- if (contact.middleName) {
1761
- fullName += ` ${contact.middleName}`;
1762
- }
1763
- if (contact.lastName) {
1764
- fullName += ` ${contact.lastName}`;
1765
- }
1766
- return fullName.trim();
1782
+ startTimer() {
1783
+ let seconds = 0;
1784
+ this.intervalId = setInterval(() => {
1785
+ seconds++;
1786
+ this.timer = this.formatTime(seconds);
1787
+ }, 1000);
1767
1788
  }
1768
- toggleCallerIdDiv() {
1769
- this.isCallerIdHidden = !this.isCallerIdHidden;
1789
+ stopTimer() {
1790
+ clearInterval(this.intervalId);
1791
+ this.timer = '00:00';
1770
1792
  }
1771
- onContactSelect(contact) {
1772
- this.dialedNumber = contact.numbersList[0].number;
1773
- this.callData.name = this.getFullName(contact);
1774
- this.callData.img = contact.image || 'assets/images/user.jpg';
1775
- this.onDialInputChange(this.dialedNumber);
1776
- this.filteredContactList = [];
1793
+ formatTime(totalSeconds) {
1794
+ const minutes = Math.floor(totalSeconds / 60);
1795
+ const seconds = totalSeconds % 60;
1796
+ return `${this.pad(minutes)}:${this.pad(seconds)}`;
1797
+ }
1798
+ pad(value) {
1799
+ return value < 10 ? `0${value}` : `${value}`;
1800
+ }
1801
+ handleError(error) {
1802
+ swal("Error", error, "error");
1777
1803
  }
1778
1804
  endCall() {
1805
+ this.endCallEvent.emit();
1806
+ if (this.call) {
1807
+ this.call.disconnect();
1808
+ }
1809
+ this.showRingAnimation = false;
1810
+ this.stopTimer();
1811
+ this.maximiseDialpad();
1812
+ }
1813
+ toggleMute() {
1814
+ var _a;
1815
+ this.isMute = !this.isMute;
1816
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.mute(this.isMute);
1817
+ }
1818
+ toggleKeypad() {
1819
+ this.showKeypad = !this.showKeypad;
1820
+ this.callInput = '';
1821
+ }
1822
+ onCallInputs(num) {
1823
+ var _a;
1779
1824
  try {
1780
- console.log('Ending call');
1781
- this.isCallInProgress = false;
1782
- this.filteredContactList = [];
1783
- // Reset call data
1784
- this.callData = {
1785
- phone: '',
1786
- name: '',
1787
- img: 'assets/images/user.jpg',
1788
- isIncomingCall: false,
1789
- dial: false,
1790
- displayNum: '',
1791
- extNum: ''
1792
- };
1793
- // Reset dialed number
1794
- this.dialedNumber = '';
1795
- this.sanitizedNum = '';
1796
- // Emit end call event
1797
- this.endCallEvent.emit();
1798
- console.log('Call ended successfully');
1825
+ if (Number.isInteger(num) || num == '+' || num == '*' || num == '#') {
1826
+ if (num == '#') {
1827
+ new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
1828
+ }
1829
+ else if (num == '*') {
1830
+ new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
1831
+ }
1832
+ else {
1833
+ new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
1834
+ }
1835
+ this.callInput = this.callInput + String(num);
1836
+ this.showClearBtn = true;
1837
+ }
1838
+ let str = String(num);
1839
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(str);
1799
1840
  }
1800
- catch (error) {
1801
- console.error('Error in endCall:', error);
1802
- // Even if there's an error, try to reset the state
1803
- this.isCallInProgress = false;
1804
- this.callData = {
1805
- phone: '',
1806
- name: '',
1807
- img: 'assets/images/user.jpg',
1808
- isIncomingCall: false,
1809
- dial: false,
1810
- displayNum: '',
1811
- extNum: ''
1812
- };
1841
+ catch (e) {
1842
+ console.log(e);
1843
+ }
1844
+ }
1845
+ onCallInputEnter(ev) {
1846
+ var _a;
1847
+ try {
1848
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(String(ev.key));
1849
+ }
1850
+ catch (e) {
1851
+ console.log(e);
1852
+ }
1853
+ }
1854
+ closeIncomingCall(data) {
1855
+ // this.incomingCallDiv = false;
1856
+ if (data.show) {
1857
+ //this.showCallProgressEvent.emit()
1858
+ // handle incoming call accepted
1859
+ this.startTimer();
1860
+ this.disbaleEndCallBtn = false;
1861
+ this.call = data.call;
1862
+ const incomingDetail = this.extensionService.getCallSid();
1863
+ this.incomingRecordCall = incomingDetail.recordCall;
1864
+ // Start recording if the call is answered and recording is enabled
1865
+ if (this.incomingRecordCall) {
1866
+ this.startRecording();
1867
+ }
1868
+ else {
1869
+ this.isRecording = false;
1870
+ }
1871
+ this.cdr.detectChanges();
1872
+ }
1873
+ else {
1874
+ // incoming call rejected
1813
1875
  this.endCallEvent.emit();
1814
1876
  }
1815
1877
  }
1816
- // async initiateCall() {
1817
- // try {
1818
- // console.log('Initiating call with number:', this.dialedNumber);
1819
- // if (!this.dialedNumber && this.lastDialed) {
1820
- // console.log('Using last dialed number:', this.lastDialed.number);
1821
- // this.sanitizedNum = this.lastDialed.number;
1822
- // }
1823
- // const isInvalid = await this.isInvalidNumber();
1824
- // if (isInvalid) {
1825
- // console.error('Invalid number format');
1826
- // return false;
1878
+ clearInputs() {
1879
+ this.callInput = this.callInput.slice(0, -1);
1880
+ }
1881
+ minimiseDialpad() {
1882
+ this.minimiseEvent.emit(true);
1883
+ this.isMinimised = true;
1884
+ }
1885
+ maximiseDialpad() {
1886
+ this.minimiseEvent.emit(false);
1887
+ this.isMinimised = false;
1888
+ }
1889
+ toggleRecording() {
1890
+ if (this.isRecording) {
1891
+ this.stopRecording();
1892
+ }
1893
+ else {
1894
+ this.startRecording();
1895
+ }
1896
+ }
1897
+ startRecording() {
1898
+ let sid;
1899
+ const details = this.extensionService.getCallSid();
1900
+ this.incomingCallSid = details.callSid;
1901
+ this.incomingRecordCall = details.recordCall;
1902
+ sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
1903
+ // if (!this.incomingRecordCall && !this.recordCall) {
1904
+ // return;
1905
+ // }
1906
+ this.extensionService.getCallRecording(sid).subscribe(response => {
1907
+ this.isRecording = true;
1908
+ this.isPaused = false;
1909
+ this.timeElapsed = 0;
1910
+ this.startTimer1();
1911
+ }, error => {
1912
+ console.error('Error starting recording', error);
1913
+ });
1914
+ }
1915
+ stopRecording() {
1916
+ // if (!this.incomingRecordCall && !this.recordCall) {
1917
+ // return;
1918
+ // }
1919
+ this.isRecording = false;
1920
+ this.isPaused = false;
1921
+ if (this.timerSubscription) {
1922
+ this.timerSubscription.unsubscribe();
1923
+ }
1924
+ }
1925
+ pauseRecording() {
1926
+ const details = this.extensionService.getCallSid();
1927
+ this.incomingCallSid = details.callSid;
1928
+ this.incomingRecordCall = details.recordCall;
1929
+ const sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
1930
+ // if (!this.incomingRecordCall && !this.recordCall) {
1931
+ // return;
1932
+ // }
1933
+ this.extensionService.pauseOrResumeRecording(sid, 'pause').subscribe(response => {
1934
+ this.stopRecordingTimer();
1935
+ this.isPaused = true;
1936
+ }, error => {
1937
+ console.error('Error pausing recording:', error);
1938
+ // Consider updating the UI to show the error state
1939
+ });
1940
+ }
1941
+ resumeRecording() {
1942
+ let sid;
1943
+ const details = this.extensionService.getCallSid();
1944
+ this.incomingCallSid = details.callSid;
1945
+ this.incomingRecordCall = details.recordCall;
1946
+ sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
1947
+ // if (!this.incomingRecordCall && !this.recordCall) {
1948
+ // return; // Skip if recording is not enabled
1949
+ // }
1950
+ this.extensionService.pauseOrResumeRecording(sid, 'resume').subscribe(response => {
1951
+ this.isPaused = false;
1952
+ this.startTimer1();
1953
+ }, error => {
1954
+ console.error('Error resuming recording', error);
1955
+ });
1956
+ }
1957
+ startTimer1() {
1958
+ this.timerSubscription = interval(1000).subscribe(() => {
1959
+ this.timeElapsed++;
1960
+ });
1961
+ }
1962
+ stopRecordingTimer() {
1963
+ if (this.timerSubscription) {
1964
+ this.timerSubscription.unsubscribe(); // Pause the timer
1965
+ this.timerSubscription = undefined; // Optionally reset the subscription
1966
+ }
1967
+ }
1968
+ getFormattedTime() {
1969
+ const minutes = Math.floor(this.timeElapsed / 60);
1970
+ const seconds = this.timeElapsed % 60;
1971
+ return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
1972
+ }
1973
+ pollCallStatus(callAuthId) {
1974
+ const maxTime = 30000; // Poll for up to 30 seconds
1975
+ const pollInterval = 3000; // Poll every 3 seconds
1976
+ let elapsedTime = 0;
1977
+ const intervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () {
1978
+ elapsedTime += pollInterval;
1979
+ try {
1980
+ const statusResponse = yield this.extensionService.getCallStatus(callAuthId).toPromise();
1981
+ if (statusResponse && statusResponse.callDetails) {
1982
+ this.callStatus = statusResponse.callDetails.callStatus;
1983
+ if (this.callStatus === 'in-progress') {
1984
+ this.callSid = statusResponse.callDetails.callSid;
1985
+ if (this.recordCall && !this.isRecording) {
1986
+ this.startRecording();
1987
+ }
1988
+ clearInterval(intervalId);
1989
+ }
1990
+ else if (this.callStatus === 'completed') {
1991
+ clearInterval(intervalId);
1992
+ this.endCall();
1993
+ this.stopRecording();
1994
+ }
1995
+ else if (this.callStatus === 'ringing') {
1996
+ // Continue polling; do not clear the interval yet
1997
+ }
1998
+ }
1999
+ }
2000
+ catch (error) {
2001
+ clearInterval(intervalId);
2002
+ }
2003
+ if (elapsedTime >= maxTime) {
2004
+ // console.log('Max polling time reached. Stopping poll.');
2005
+ clearInterval(intervalId);
2006
+ }
2007
+ }), pollInterval);
2008
+ }
2009
+ getUserInformation(id) {
2010
+ this.extensionService.getUserInformation(id).subscribe(response => {
2011
+ console.log(response);
2012
+ }, error => {
2013
+ console.error('Error starting recording', error);
2014
+ });
2015
+ }
2016
+ incomingCallsNewList(data) {
2017
+ this.newIncomingCallsList = data;
2018
+ this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2019
+ }
2020
+ selectedIncomingCallInfo(data) {
2021
+ this.selectedIncomingCall = data;
2022
+ }
2023
+ ngOnDestroy() {
2024
+ this.callData.dial = false;
2025
+ if (this.timerSubscription) {
2026
+ this.timerSubscription.unsubscribe();
2027
+ }
2028
+ }
2029
+ }
2030
+ CallProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, deps: [{ token: ExtensionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2031
+ CallProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallProgressComponent, selector: "lib-call-progress", inputs: { callData: "callData", newIncomingCallData: "newIncomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { endCallEvent: "endCallEvent", incomingCallsNewInfo: "incomingCallsNewInfo", minimiseEvent: "minimiseEvent", showCallProgressEvent: "showCallProgressEvent", incomingCallInitiated: "incomingCallInitiated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand}\">\n <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div>\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div style=\"display: flex; flex-direction: column;position: relative; width: 100%;\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button>\n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : '&nbsp;'}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"], dependencies: [{ kind: "directive", type: 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: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: ["incomingCallData", "newIncomingCallsList"], outputs: ["closeIncomingCallDiv", "incomingCallsNewList", "selectedIncomingCallInfo"] }] });
2032
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, decorators: [{
2033
+ type: Component,
2034
+ args: [{ selector: 'lib-call-progress', template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand}\">\n <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div>\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div style=\"display: flex; flex-direction: column;position: relative; width: 100%;\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button>\n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : '&nbsp;'}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
2035
+ }], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { callData: [{
2036
+ type: Input
2037
+ }], newIncomingCallData: [{
2038
+ type: Input
2039
+ }], newIncomingCallsList: [{
2040
+ type: Input
2041
+ }], endCallEvent: [{
2042
+ type: Output
2043
+ }], incomingCallsNewInfo: [{
2044
+ type: Output
2045
+ }], minimiseEvent: [{
2046
+ type: Output
2047
+ }], showCallProgressEvent: [{
2048
+ type: Output
2049
+ }], incomingCallInitiated: [{
2050
+ type: Output
2051
+ }] } });
2052
+
2053
+ class DialboxComponent {
2054
+ constructor(twilioService, extService,
2055
+ // private dialog: MatDialog,
2056
+ ipService, extensionService, router) {
2057
+ this.twilioService = twilioService;
2058
+ this.extService = extService;
2059
+ this.ipService = ipService;
2060
+ this.extensionService = extensionService;
2061
+ this.router = router;
2062
+ this.isDialpadHidden = false;
2063
+ this.closeDialpadEvent = new EventEmitter();
2064
+ this.callInitiated = new EventEmitter();
2065
+ this.endCallEvent = new EventEmitter();
2066
+ this.minimiseEvent = new EventEmitter();
2067
+ this.incomingCallsNewInfoEvent = new EventEmitter();
2068
+ this.incomingCallInitiated = new EventEmitter();
2069
+ this.numberDialed = new EventEmitter();
2070
+ this.isCallInProgress = false;
2071
+ this.keypadVal = keypad;
2072
+ this.showInputClearBtn = false;
2073
+ this.dialedNumber = '';
2074
+ this.contactList = [];
2075
+ this.filteredContactList = [];
2076
+ this.callerIdList = [];
2077
+ this.isCallerIdHidden = true;
2078
+ this.isTrialPeriodOver = false;
2079
+ this.isPaymentDue = false;
2080
+ this.terminateCall = false;
2081
+ this.toastTimeout = 7000;
2082
+ this.callNumberToast = {
2083
+ show: false,
2084
+ type: 'alert-success',
2085
+ number: '',
2086
+ displayNum: ''
2087
+ };
2088
+ this.callData = {
2089
+ phone: '',
2090
+ displayNum: '',
2091
+ dial: false,
2092
+ name: '',
2093
+ img: 'assets/images/user.jpg',
2094
+ isIncomingCall: false,
2095
+ extNum: ''
2096
+ };
2097
+ this.lastDialed = null;
2098
+ this.dialAlert = {
2099
+ msg: '',
2100
+ show: false
2101
+ };
2102
+ this.showDedicatedPopup = false;
2103
+ this.newIncomingCalls = [];
2104
+ this.incomingCallsList = [];
2105
+ this.subscriptions = new Subscription();
2106
+ this.shakeDedicatedBtn = false;
2107
+ this.isSmartDialCall = false;
2108
+ this.isMinimised = false;
2109
+ }
2110
+ ngOnInit() {
2111
+ try {
2112
+ this.token = localStorage.getItem('ext_token');
2113
+ //this.isCallInProgress = true;
2114
+ this.getContactList();
2115
+ // this.getUserCallSetting();
2116
+ const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact) => {
2117
+ if (contact.number) {
2118
+ this.isSmartDialCall = false;
2119
+ if (contact.isDialFromHistory) {
2120
+ //handle dialing from history page
2121
+ if (contact.callerId == 'smartDialing') {
2122
+ this.selectedCallerId = { number: contact.from };
2123
+ this.isSmartDialCall = true;
2124
+ setTimeout(() => {
2125
+ this.isDialpadHidden = false;
2126
+ }, 2000);
2127
+ this.callData.phone = contact.number;
2128
+ this.callData.name = contact.name;
2129
+ this.callData.img = contact.img;
2130
+ this.callData.from = contact.from;
2131
+ this.sanitizedNum = contact.number;
2132
+ // this.getUserInformation(contact);
2133
+ // this.incomingCallsList.push(contact)
2134
+ this.initiateCall();
2135
+ }
2136
+ else {
2137
+ // this.getUserCallSetting();
2138
+ setTimeout(() => {
2139
+ this.isDialpadHidden = false;
2140
+ }, 1000);
2141
+ // this.getUserInformation(contact);
2142
+ // this.incomingCallsList.push(contact)
2143
+ this.dialedNumber = contact.number;
2144
+ this.sanitizedNum = contact.number;
2145
+ }
2146
+ }
2147
+ else {
2148
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
2149
+ // this.getUserCallSetting();
2150
+ setTimeout(() => {
2151
+ this.isDialpadHidden = false;
2152
+ }, 1000);
2153
+ this.dialedNumber = contact.number;
2154
+ this.sanitizedNum = contact.number;
2155
+ }
2156
+ else {
2157
+ setTimeout(() => {
2158
+ this.isDialpadHidden = false;
2159
+ }, 2000);
2160
+ this.callData.phone = contact.number;
2161
+ this.callData.name = contact.name;
2162
+ this.callData.img = contact.img;
2163
+ this.sanitizedNum = contact.number;
2164
+ this.initiateCall();
2165
+ }
2166
+ }
2167
+ }
2168
+ });
2169
+ // handle incoming call
2170
+ const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
2171
+ // if (incomingCallData) {
2172
+ // this.isCallInProgress = true;
2173
+ // this.isDialpadHidden = false;
2174
+ // this.callData.phone = incomingCallData.parameters.From;
2175
+ // this.callData.name = incomingCallData.customParameters.get('name');
2176
+ // this.callData.img = incomingCallData.customParameters.get('image');
2177
+ // this.callData.isIncomingCall = true;
2178
+ // }
2179
+ if (incomingCallData) {
2180
+ if (this.isCallInProgress) {
2181
+ this.newIncomingCalls.push(incomingCallData);
2182
+ // this.getUserInformation(incomingCallData);
2183
+ }
2184
+ else {
2185
+ this.isCallInProgress = true;
2186
+ this.isDialpadHidden = false;
2187
+ this.callData.phone = incomingCallData.parameters['From'];
2188
+ // this.getUserInformation(incomingCallData);
2189
+ this.callData.name = incomingCallData.customParameters.get('name');
2190
+ this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
2191
+ this.callData.isIncomingCall = true;
2192
+ }
2193
+ incomingCallData.on('cancel', () => {
2194
+ // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
2195
+ if (this.incomingCallsList.length == 0) {
2196
+ this.isCallInProgress = false;
2197
+ }
2198
+ });
2199
+ incomingCallData.on('disconnect', () => {
2200
+ // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
2201
+ if (this.incomingCallsList.length == 0) {
2202
+ this.isCallInProgress = false;
2203
+ }
2204
+ });
2205
+ }
2206
+ });
2207
+ this.subscriptions.add(sub1);
2208
+ this.subscriptions.add(sub2);
2209
+ }
2210
+ catch (e) {
2211
+ console.log(e);
2212
+ }
2213
+ }
2214
+ // getUserInformation(incomingCallData: any) {
2215
+ // let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
2216
+ // this.extensionService.getUserInformation(data.twilioAuthId).subscribe(
2217
+ // response => {
2218
+ // incomingCallData['userInfo']=response
2219
+ // this.incomingCallsList.push(incomingCallData);
2220
+ // }, error => {
2221
+ // console.error('Error starting recording', error);
2222
+ // });
2223
+ // }
2224
+ fromEntries(entries) {
2225
+ return entries.reduce((acc, [key, value]) => {
2226
+ acc[key] = value;
2227
+ return acc;
2228
+ }, {});
2229
+ }
2230
+ ngAfterViewInit() {
2231
+ this.registerDragElement();
2232
+ }
2233
+ ngOnChanges(changes) {
2234
+ if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
2235
+ this.getContactList();
2236
+ // this.getUserCallSetting();
2237
+ setTimeout(() => {
2238
+ this.dialInputElement.nativeElement.focus();
2239
+ }, 0);
2240
+ }
2241
+ }
2242
+ registerDragElement() {
2243
+ try {
2244
+ const elmnt = document.getElementById('dragparent1');
2245
+ let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
2246
+ const dragMouseDown = (e) => {
2247
+ // If the target is an input, return and don't initiate dragging
2248
+ if (e.target.tagName.toLowerCase() === 'input') {
2249
+ return;
2250
+ }
2251
+ e = e || window.event;
2252
+ // get the mouse cursor position at startup:
2253
+ pos3 = e.clientX;
2254
+ pos4 = e.clientY;
2255
+ document.onmouseup = closeDragElement;
2256
+ // call a function whenever the cursor moves:
2257
+ document.onmousemove = elementDrag;
2258
+ };
2259
+ const elementDrag = (e) => {
2260
+ e = e || window.event;
2261
+ // calculate the new cursor position:
2262
+ pos1 = pos3 - e.clientX;
2263
+ pos2 = pos4 - e.clientY;
2264
+ pos3 = e.clientX;
2265
+ pos4 = e.clientY;
2266
+ // set the element's new position:
2267
+ // elmnt.style.top = elmnt.offsetTop - pos2 + 'px';
2268
+ // elmnt.style.left = elmnt.offsetLeft - pos1 + 'px';
2269
+ };
2270
+ const closeDragElement = () => {
2271
+ /* stop moving when mouse button is released:*/
2272
+ document.onmouseup = null;
2273
+ document.onmousemove = null;
2274
+ };
2275
+ // if (document.getElementById(elmnt.id + 'header')) {
2276
+ // /* if present, the header is where you move the DIV from:*/
2277
+ // document.getElementById(elmnt.id + 'header').onmousedown = dragMouseDown;
2278
+ // } else {
2279
+ // /* otherwise, move the DIV from anywhere inside the DIV:*/
2280
+ // elmnt.onmousedown = dragMouseDown;
2281
+ // }
2282
+ }
2283
+ catch (e) {
2284
+ console.log(e);
2285
+ }
2286
+ }
2287
+ addNumber(num) {
2288
+ if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
2289
+ if (num == '#') {
2290
+ new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
2291
+ }
2292
+ else if (num == '*') {
2293
+ new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
2294
+ }
2295
+ else {
2296
+ new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
2297
+ }
2298
+ this.dialedNumber += num;
2299
+ this.showInputClearBtn = true;
2300
+ this.numberDialed.emit(this.dialedNumber);
2301
+ this.onDialInputChange(this.dialedNumber);
2302
+ // this.dialInputRef.nativeElement.focus();
2303
+ }
2304
+ else if (num === 'voicemail') {
2305
+ // this.showDedicatedPopup = true;
2306
+ this.router.navigate(['extension/voicemail/' + this.token]);
2307
+ }
2308
+ }
2309
+ hideDialpad() {
2310
+ this.isDialpadHidden = true;
2311
+ this.closeDialpadEvent.emit();
2312
+ this.clearAllDialed();
2313
+ this.filteredContactList = [];
2314
+ }
2315
+ onDialInputChange(inputVal) {
2316
+ try {
2317
+ // Updated regex to include x, X, ext., Ext., and ,
2318
+ const isNumericInput = /^[\d\s+\-]+$/.test(inputVal);
2319
+ let mainNumber = inputVal;
2320
+ // Check for extension indicators and split the input
2321
+ const extMatch = inputVal.match(/(x|X|ext\.|Ext\.|,)(.*)/);
2322
+ if (extMatch) {
2323
+ mainNumber = inputVal.substring(0, extMatch.index).trim();
2324
+ this.callData.extNum = extMatch[2].trim();
2325
+ }
2326
+ this.sanitizedNum = isNumericInput ? mainNumber.replace(/[\s\-]+/g, '') : mainNumber;
2327
+ this.callData.phone = isNumericInput ? this.sanitizedNum : '';
2328
+ this.showInputClearBtn = inputVal.length > 0;
2329
+ if (isNumericInput) {
2330
+ this.dialedNumber = new AsYouType().input(this.sanitizedNum);
2331
+ }
2332
+ // emit current number whenever input changes
2333
+ this.numberDialed.emit(this.dialedNumber);
2334
+ if (inputVal.length > 2) {
2335
+ this.filteredContactList = this.contactList.filter(contact => {
2336
+ const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
2337
+ // return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some(num => num.number.includes(this.sanitizedNum));
2338
+ }).slice(0, 2);
2339
+ }
2340
+ else {
2341
+ this.filteredContactList = [];
2342
+ }
2343
+ }
2344
+ catch (e) {
2345
+ console.log(e);
2346
+ }
2347
+ }
2348
+ getFirstLetter(name) {
2349
+ return name ? name.charAt(0).toUpperCase() : '';
2350
+ }
2351
+ clearInput() {
2352
+ if (this.dialedNumber.length > 0) {
2353
+ this.dialedNumber = this.dialedNumber.slice(0, -1);
2354
+ this.showInputClearBtn = this.dialedNumber.length !== 0;
2355
+ this.onDialInputChange(this.dialedNumber);
2356
+ }
2357
+ }
2358
+ clearAllDialed() {
2359
+ this.dialedNumber = '';
2360
+ this.sanitizedNum = '';
2361
+ this.showInputClearBtn = false;
2362
+ }
2363
+ getCallerIdList() {
2364
+ this.extService.displayID(this.token || '').subscribe((res) => {
2365
+ //this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
2366
+ this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
2367
+ // this.callerIdList = res.callerIdList;
2368
+ if (this.callerIdList.length == 1) {
2369
+ this.selectedCallerId = this.callerIdList[0];
2370
+ }
2371
+ else {
2372
+ if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
2373
+ this.selectedCallerId = null;
2374
+ }
2375
+ else {
2376
+ this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
2377
+ }
2378
+ }
2379
+ });
2380
+ }
2381
+ getContactList() {
2382
+ this.twilioService.getContactList().subscribe((resp) => {
2383
+ if (resp.response == 'Success') {
2384
+ this.contactList = resp.phoneBook;
2385
+ }
2386
+ }, err => {
2387
+ console.log(err);
2388
+ });
2389
+ }
2390
+ getFullName(contact) {
2391
+ let fullName = contact.firstName || '';
2392
+ if (contact.middleName) {
2393
+ fullName += ` ${contact.middleName}`;
2394
+ }
2395
+ if (contact.lastName) {
2396
+ fullName += ` ${contact.lastName}`;
2397
+ }
2398
+ return fullName.trim();
2399
+ }
2400
+ toggleCallerIdDiv() {
2401
+ this.isCallerIdHidden = !this.isCallerIdHidden;
2402
+ }
2403
+ onContactSelect(contact) {
2404
+ this.dialedNumber = contact.numbersList[0].number;
2405
+ this.callData.name = this.getFullName(contact);
2406
+ this.callData.img = contact.image || 'assets/images/user.jpg';
2407
+ this.onDialInputChange(this.dialedNumber);
2408
+ this.filteredContactList = [];
2409
+ }
2410
+ endCall() {
2411
+ try {
2412
+ console.log('Ending call');
2413
+ this.isCallInProgress = false;
2414
+ this.filteredContactList = [];
2415
+ // Reset call data
2416
+ this.callData = {
2417
+ phone: '',
2418
+ name: '',
2419
+ img: 'assets/images/user.jpg',
2420
+ isIncomingCall: false,
2421
+ dial: false,
2422
+ displayNum: '',
2423
+ extNum: ''
2424
+ };
2425
+ // Reset dialed number
2426
+ this.dialedNumber = '';
2427
+ this.sanitizedNum = '';
2428
+ // Emit end call event
2429
+ this.endCallEvent.emit();
2430
+ console.log('Call ended successfully');
2431
+ }
2432
+ catch (error) {
2433
+ console.error('Error in endCall:', error);
2434
+ // Even if there's an error, try to reset the state
2435
+ this.isCallInProgress = false;
2436
+ this.callData = {
2437
+ phone: '',
2438
+ name: '',
2439
+ img: 'assets/images/user.jpg',
2440
+ isIncomingCall: false,
2441
+ dial: false,
2442
+ displayNum: '',
2443
+ extNum: ''
2444
+ };
2445
+ this.endCallEvent.emit();
2446
+ }
2447
+ }
2448
+ // async initiateCall() {
2449
+ // try {
2450
+ // console.log('Initiating call with number:', this.dialedNumber);
2451
+ // if (!this.dialedNumber && this.lastDialed) {
2452
+ // console.log('Using last dialed number:', this.lastDialed.number);
2453
+ // this.sanitizedNum = this.lastDialed.number;
2454
+ // }
2455
+ // const isInvalid = await this.isInvalidNumber();
2456
+ // if (isInvalid) {
2457
+ // console.error('Invalid number format');
2458
+ // return false;
1827
2459
  // }
1828
2460
  // this.saveLastDialed();
1829
2461
  // this.isSavedContactDialled();
@@ -2032,987 +2664,355 @@ class DialboxComponent {
2032
2664
  // // } else {
2033
2665
  // // swal('Error', 'Trial period is over. Please setup payment method to continue services')
2034
2666
  // // }
2035
- // }catch(e){
2036
- // console.error('Error in initiateCall:', e);
2037
- // this.showDialAlert('Failed to initiate call. Please try again.');
2038
- // this.isCallInProgress = false;
2039
- // return false;
2040
- // }
2041
- // }
2042
- initiateCall() {
2043
- return __awaiter(this, void 0, void 0, function* () {
2044
- try {
2045
- if (!this.dialedNumber && this.lastDialed) {
2046
- this.sanitizedNum = this.lastDialed.number;
2047
- }
2048
- const isInvalid = yield this.isInvalidNumber();
2049
- if (isInvalid) {
2050
- return false;
2051
- }
2052
- // this.saveLastDialed();
2053
- this.isSavedContactDialled();
2054
- this.isPaymentDue = localStorage.getItem('paymentDue') === 'false' ? false : true;
2055
- if (this.isPaymentDue) {
2056
- // swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
2057
- return false;
2058
- }
2059
- this.isTrialPeriodOver = localStorage.getItem('trialOver') === 'false' ? false : true;
2060
- if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
2061
- // swal('Error', 'You can not dial this number');
2062
- return false;
2063
- }
2064
- // const hasPermission = await this.checkMicrophonePermission();
2065
- // if (!hasPermission) {
2066
- // await this.askForMicrophonePermission();
2067
- // return false;
2068
- // }
2069
- if (!this.selectedCallerId) {
2070
- this.shakeDedicatedBtn = true;
2071
- this.showDialAlert('Select a C2C number to call');
2072
- setTimeout(() => {
2073
- this.shakeDedicatedBtn = false;
2074
- }, 3000);
2075
- return false;
2076
- }
2077
- // Clear displayNum if value is bound from previous call
2078
- this.callData.displayNum = '';
2079
- // Get number to be dialed from backend
2080
- // await this.getToNumber(this.sanitizedNum);
2081
- if (this.terminateCall) {
2082
- this.terminateCall = false;
2083
- return;
2084
- }
2085
- // Update call data in a single operation
2086
- this.callData = Object.assign(Object.assign({}, this.callData), { phone: this.sanitizedNum, isIncomingCall: false, dial: true, from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number, timestamp: new Date().toISOString() });
2087
- console.log('Initiating call with data:', this.callData);
2088
- this.isCallInProgress = true;
2089
- this.callInitiated.emit(Object.assign({}, this.callData));
2090
- return true;
2091
- }
2092
- catch (e) {
2093
- console.error('Error in initiateCall:', e);
2094
- this.showDialAlert('Failed to initiate call. Please try again.');
2095
- this.isCallInProgress = false;
2096
- return false;
2097
- }
2098
- });
2099
- }
2100
- isInvalidNumber() {
2101
- return __awaiter(this, void 0, void 0, function* () {
2102
- try {
2103
- if (this.sanitizedNum == '') {
2104
- this.showDialAlert('Invalid Number');
2105
- return true;
2106
- }
2107
- const validNumberPattern = /^[+\d\s()-]*$/; // Regular expression to match valid characters
2108
- const phoneNumber = this.sanitizedNum;
2109
- if (!validNumberPattern.test(phoneNumber)) {
2110
- this.showDialAlert('Invalid Number');
2111
- return true;
2112
- }
2113
- return false;
2114
- }
2115
- catch (error) {
2116
- this.showDialAlert('Invalid Number');
2117
- return true; // Return true if an error occurred, meaning the number is invalid
2118
- }
2119
- });
2120
- }
2121
- // saveLastDialed() {
2122
- // const contact = this.filteredContactList.find(c => c.numbersList.some(n => n.number === this.dialedNumber));
2123
- // if (contact) {
2124
- // this.lastDialed = {
2125
- // name: contact.name,
2126
- // image: contact.image,
2127
- // number: this.dialedNumber
2128
- // };
2129
- // } else {
2130
- // if(this.dialedNumber){
2131
- // this.lastDialed = { number: this.dialedNumber };
2132
- // }
2133
- // }
2134
- // }
2135
- isSavedContactDialled() {
2136
- let phoneNum = this.sanitizedNum.replace(/\s+/g, '');
2137
- let contact = this.contactList.filter(contact => {
2138
- // return contact.numbersList.some(num => num.number === phoneNum)
2139
- });
2140
- if (contact.length) {
2141
- this.callData.name = `${contact[0].firstName} ${contact[0].middleName} ${contact[0].lastName}`.toLowerCase();
2142
- this.callData.img = contact[0].image || 'assets/images/user.jpg';
2143
- this.callData.phone = this.sanitizedNum;
2144
- return true;
2145
- }
2146
- return false;
2147
- }
2148
- showDialAlert(message) {
2149
- this.dialAlert = {
2150
- msg: message,
2151
- show: true
2152
- };
2153
- setTimeout(() => {
2154
- this.dialAlert.show = false;
2155
- }, 3000);
2156
- }
2157
- isCallerIdSet() {
2158
- return __awaiter(this, void 0, void 0, function* () {
2159
- try {
2160
- const tkn = localStorage.getItem('ext_token');
2161
- const res = yield this.extService.fetchCallerId(tkn || '').toPromise();
2162
- if (res.status == 200) {
2163
- localStorage.setItem('trialOver', res.trialOver);
2164
- this.twilioService.isTrialOver.next(res.trialOver);
2165
- localStorage.setItem('paymentDue', res.paymentDue);
2166
- this.twilioService.isPaymentDue.next(res.paymentDue);
2167
- }
2168
- if (res.callerid) {
2169
- localStorage.setItem('callerID', res.callerid);
2170
- this.extService.changeMessage(res.callerid);
2171
- }
2172
- else {
2173
- localStorage.setItem('callerID', 'Not set');
2174
- this.extService.changeMessage('Not set');
2175
- }
2176
- return (localStorage.getItem('callerID') !== 'Not set');
2177
- }
2178
- catch (e) {
2179
- console.log(e);
2180
- return false;
2181
- }
2182
- });
2183
- }
2184
- checkMicrophonePermission() {
2667
+ // }catch(e){
2668
+ // console.error('Error in initiateCall:', e);
2669
+ // this.showDialAlert('Failed to initiate call. Please try again.');
2670
+ // this.isCallInProgress = false;
2671
+ // return false;
2672
+ // }
2673
+ // }
2674
+ initiateCall() {
2185
2675
  return __awaiter(this, void 0, void 0, function* () {
2186
2676
  try {
2187
- const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2188
- stream.getTracks().forEach(track => track.stop());
2189
- return true;
2190
- }
2191
- catch (error) {
2192
- if (error instanceof DOMException && error.name === 'NotAllowedError') {
2193
- return false;
2677
+ if (!this.dialedNumber && this.lastDialed) {
2678
+ this.sanitizedNum = this.lastDialed.number;
2194
2679
  }
2195
- else {
2680
+ const isInvalid = yield this.isInvalidNumber();
2681
+ if (isInvalid) {
2196
2682
  return false;
2197
2683
  }
2198
- }
2199
- });
2200
- }
2201
- askForMicrophonePermission() {
2202
- return __awaiter(this, void 0, void 0, function* () {
2203
- try {
2204
- const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2205
- stream.getTracks().forEach(track => track.stop());
2206
- }
2207
- catch (error) {
2208
- console.error('User denied microphone permission:', error);
2209
- }
2210
- });
2211
- }
2212
- // below function is to get the country code with number from server
2213
- getToNumber(dialedNumber) {
2214
- return __awaiter(this, void 0, void 0, function* () {
2215
- if (dialedNumber[0] !== '+') {
2216
- // this is case when user geolocation dial code is on
2217
- let ipAddress = yield this.ipService.getIpAddressInfo().toPromise();
2218
- const res = yield this.twilioService.getToNumber(dialedNumber, ipAddress.address.countryCode).toPromise();
2219
- if (res.status == 200) {
2220
- this.toastTimeout = res.timeInterval * 1000;
2221
- yield this.showNumberToast(res);
2222
- }
2223
- }
2224
- });
2225
- }
2226
- isAlertEnable() {
2227
- return localStorage.getItem('isAlertEnable');
2228
- }
2229
- showNumberToast(data) {
2230
- return __awaiter(this, void 0, void 0, function* () {
2231
- const isAlertOn = (localStorage.getItem('isCountryCodeToastOn'));
2232
- if (isAlertOn == 'true') {
2233
- this.callNumberToast.show = true;
2234
- this.callNumberToast.number = data.toNumber;
2235
- this.callNumberToast.displayNum = data.displayNumber;
2236
- }
2237
- this.callData.displayNum = data.displayNumber;
2238
- //this.callData.phone = data.toNumber;
2239
- yield this.delay(this.toastTimeout);
2240
- this.dialedNumber = data.toNumber;
2241
- this.sanitizedNum = data.toNumber;
2242
- this.callNumberToast.show = false;
2243
- this.callNumberToast.number = '';
2244
- this.callNumberToast.displayNum = '';
2245
- });
2246
- }
2247
- delay(ms) {
2248
- return new Promise(resolve => setTimeout(resolve, ms));
2249
- }
2250
- onMinimise(isMinimised) {
2251
- this.isMinimised = isMinimised;
2252
- this.minimiseEvent.emit(isMinimised);
2253
- }
2254
- handleNumberPaste(event) {
2255
- event.preventDefault();
2256
- const clipboardData = event.clipboardData || window.clipboardData;
2257
- const pastedData = clipboardData.getData('text');
2258
- // Log the pasted content to the console
2259
- if (pastedData) {
2260
- this.dialedNumber = pastedData;
2261
- this.sanitizedNum = pastedData;
2262
- }
2263
- }
2264
- onEnter(num) {
2265
- console.log(num, 'number fn');
2266
- this.dialedNumber = this.dialedNumber + num;
2267
- this.sanitizedNum = this.dialedNumber;
2268
- this.showInputClearBtn = true;
2269
- this.numberDialed.emit(this.dialedNumber);
2270
- }
2271
- getUserCallSetting() {
2272
- const tkn = localStorage.getItem('ext_token');
2273
- this.extService.fetchCallerId(tkn || '').subscribe((resp) => {
2274
- if (resp.status == 200) {
2275
- //this.callPrefernce = resp.userSetting;
2276
- this.callPreference = resp.callerid;
2277
- this.getCallerIdList();
2278
- }
2279
- });
2280
- }
2281
- onDedicatedNumSelect(id) {
2282
- this.selectedCallerId = id;
2283
- this.isCallerIdHidden = true;
2284
- this.extService.setCallerId(id);
2285
- }
2286
- cancelDialNumber() {
2287
- this.terminateCall = true;
2288
- this.callNumberToast.show = false;
2289
- }
2290
- handleDivKeydown(ev) {
2291
- if (this.dialedNumber.length == 0) {
2292
- this.dialInputElement.nativeElement.focus();
2293
- }
2294
- if (ev.key === 'Enter') {
2295
- // Check if the dialpad is open
2296
- if (!this.isDialpadHidden) {
2297
- if (this.dialedNumber.length > 2 && this.selectedCallerId) {
2298
- this.initiateCall();
2299
- }
2300
- if (!this.selectedCallerId) {
2301
- this.shakeDedicatedBtn = true;
2302
- setTimeout(() => {
2303
- this.shakeDedicatedBtn = false;
2304
- }, 10000);
2684
+ // this.saveLastDialed();
2685
+ this.isSavedContactDialled();
2686
+ this.isPaymentDue = localStorage.getItem('paymentDue') === 'false' ? false : true;
2687
+ if (this.isPaymentDue) {
2688
+ // swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
2689
+ return false;
2305
2690
  }
2306
- }
2307
- }
2308
- }
2309
- onCallBtnMouseEnter(ev) {
2310
- if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2311
- this.shakeDedicatedBtn = true;
2312
- }
2313
- }
2314
- onCallBtnMouseLeave(ev) {
2315
- if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2316
- this.shakeDedicatedBtn = false;
2317
- }
2318
- }
2319
- acceptNewIncomingCall(call) {
2320
- //first cut the current call
2321
- //this.callData = call;
2322
- this.newIncomingCallData = call;
2323
- }
2324
- rejectNewIncomingCall(call) {
2325
- call.reject();
2326
- this.newIncomingCalls = this.newIncomingCalls.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2327
- this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2328
- }
2329
- newIncomingCallInitiated() {
2330
- this.isCallInProgress = true;
2331
- this.newIncomingCalls = [];
2332
- this.incomingCallInitiated.emit();
2333
- }
2334
- incomingCallsNewInfo(data) {
2335
- this.incomingCallsList = data;
2336
- this.incomingCallsNewInfoEvent.emit(data);
2337
- }
2338
- ngOnDestroy() {
2339
- try {
2340
- console.log('Cleaning up C2cDialpadComponent');
2341
- // Unsubscribe from all subscriptions
2342
- if (this.subscriptions) {
2343
- this.subscriptions.unsubscribe();
2344
- }
2345
- // End any active call
2346
- if (this.isCallInProgress) {
2347
- this.endCall();
2348
- }
2349
- // Clear any timeouts or intervals if they exist
2350
- if (this.toastTimeout) {
2351
- clearTimeout(this.toastTimeout);
2352
- }
2353
- console.log('C2cDialpadComponent cleanup complete');
2354
- }
2355
- catch (error) {
2356
- console.error('Error during component cleanup:', error);
2357
- }
2358
- }
2359
- }
2360
- 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 });
2361
- 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>\r\n lib all called\r\n</div>\r\n<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"] }] });
2362
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
2363
- type: Component,
2364
- args: [{ selector: 'lib-dialbox', template: "<div>\r\n lib all called\r\n</div>\r\n<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"] }]
2365
- }], ctorParameters: function () { return [{ type: TwilioService }, { type: ExtensionService }, { type: IpAddressService }, { type: ExtensionService }, { type: i4.Router }]; }, propDecorators: { isDialpadHidden: [{
2366
- type: Input
2367
- }], closeDialpadEvent: [{
2368
- type: Output
2369
- }], callInitiated: [{
2370
- type: Output
2371
- }], endCallEvent: [{
2372
- type: Output
2373
- }], minimiseEvent: [{
2374
- type: Output
2375
- }], incomingCallsNewInfoEvent: [{
2376
- type: Output
2377
- }], incomingCallInitiated: [{
2378
- type: Output
2379
- }], dialInputElement: [{
2380
- type: ViewChild,
2381
- args: ['dialInput']
2382
- }], numberDialed: [{
2383
- type: Output
2384
- }] } });
2385
-
2386
- const GlobalConstant = {
2387
- ErrorMsg500: "Unable to process request. Please try again later.",
2388
- isSMSVisible: true,
2389
- dedicatedNumText: 'C2C Number'
2390
- };
2391
-
2392
- class IncomingCallComponent {
2393
- constructor(extensionService, twilioService) {
2394
- this.extensionService = extensionService;
2395
- this.twilioService = twilioService;
2396
- this.showRingAnimation = true;
2397
- this.selectedIncomingCall = {};
2398
- this.twilioAuthId = '';
2399
- this.dedicatedNum = '';
2400
- this.recordCall = false;
2401
- this.shouldRecordCall = false;
2402
- this.isClickExpand = false;
2403
- this.disbaleEndCallBtn = true;
2404
- this.closeIncomingCallDiv = new EventEmitter();
2405
- this.incomingCallsNewList = new EventEmitter();
2406
- this.selectedIncomingCallInfo = new EventEmitter();
2407
- this.isMute = false;
2408
- }
2409
- ngOnInit() {
2410
- try {
2411
- this.twilioService.currentCall.subscribe(call => {
2412
- if (call) {
2413
- this.twilioCallData = call;
2414
- this.twilioAuthId = call.customParameters.get('twilioAuthId') || '';
2415
- if (!call.parameters) {
2416
- call.parameters = {};
2417
- }
2418
- this.sendIPforIncomingCall(this.twilioAuthId, '');
2419
- call.on('cancel', () => {
2420
- if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
2421
- this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
2422
- }
2423
- this.rejectCallFromList(call);
2424
- });
2425
- call.on('disconnect', () => {
2426
- if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
2427
- this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
2428
- }
2429
- this.rejectCallFromList(call);
2430
- });
2691
+ this.isTrialPeriodOver = localStorage.getItem('trialOver') === 'false' ? false : true;
2692
+ if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
2693
+ // swal('Error', 'You can not dial this number');
2694
+ return false;
2431
2695
  }
2432
- });
2433
- }
2434
- catch (e) {
2435
- console.log(e);
2436
- }
2437
- }
2438
- acceptCallFromList(data) {
2439
- console.log(data, 'checking dii');
2440
- data.accept();
2441
- // data.parameters['isCallConnected'] = true;
2442
- data.isCallConnected = true;
2443
- this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
2444
- if (this.shouldRecordCall) { // default recording
2445
- this.extensionService.setCallSid(this.CallSid, this.recordCall);
2446
- this.closeIncomingCallWrapper(1);
2696
+ // const hasPermission = await this.checkMicrophonePermission();
2697
+ // if (!hasPermission) {
2698
+ // await this.askForMicrophonePermission();
2699
+ // return false;
2700
+ // }
2701
+ if (!this.selectedCallerId) {
2702
+ this.shakeDedicatedBtn = true;
2703
+ this.showDialAlert('Select a C2C number to call');
2704
+ setTimeout(() => {
2705
+ this.shakeDedicatedBtn = false;
2706
+ }, 3000);
2707
+ return false;
2708
+ }
2709
+ // Clear displayNum if value is bound from previous call
2710
+ this.callData.displayNum = '';
2711
+ // Get number to be dialed from backend
2712
+ // await this.getToNumber(this.sanitizedNum);
2713
+ if (this.terminateCall) {
2714
+ this.terminateCall = false;
2715
+ return;
2716
+ }
2717
+ // Update call data in a single operation
2718
+ this.callData = Object.assign(Object.assign({}, this.callData), { phone: this.sanitizedNum, isIncomingCall: false, dial: true, from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number, timestamp: new Date().toISOString() });
2719
+ console.log('Initiating call with data:', this.callData);
2720
+ this.isCallInProgress = true;
2721
+ this.callInitiated.emit(Object.assign({}, this.callData));
2722
+ return true;
2447
2723
  }
2448
- else { // manual recording
2449
- this.extensionService.setCallSid(this.CallSid, this.recordCall);
2450
- this.closeIncomingCallWrapper(1);
2724
+ catch (e) {
2725
+ console.error('Error in initiateCall:', e);
2726
+ this.showDialAlert('Failed to initiate call. Please try again.');
2727
+ this.isCallInProgress = false;
2728
+ return false;
2451
2729
  }
2452
2730
  });
2453
2731
  }
2454
- rejectCallFromList(data) {
2455
- if (!data)
2456
- return;
2457
- if (data.reject)
2458
- data.reject();
2459
- if (data.disconnect)
2460
- data.disconnect();
2461
- if (data.parameters) {
2462
- data.parameters['isCallConnected'] = false; // Should be false when rejecting
2463
- }
2464
- if (data.customParameters) {
2465
- this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered');
2466
- }
2467
- if (this.newIncomingCallsList && data && data.parameters && data.parameters.CallSid) {
2468
- this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== data.parameters.CallSid);
2469
- this.incomingCallsNewList.emit(this.newIncomingCallsList);
2470
- if (this.newIncomingCallsList.length == 0) {
2471
- this.closeIncomingCallDiv.emit({ show: 0, call: data });
2472
- }
2473
- }
2474
- }
2475
- closeIncomingCallWrapper(val) {
2476
- this.closeIncomingCallDiv.emit({ show: val, call: this.twilioCallData });
2477
- }
2478
- toggleMute(data) {
2479
- this.isMute = !this.isMute;
2480
- data.mute(this.isMute);
2481
- }
2482
- sendIPforIncomingCall(recordId, callstatus) {
2483
- return new Promise((resolve, reject) => {
2484
- this.extensionService.getIPDetailsForCall(recordId, callstatus).subscribe((res) => {
2485
- const resp = res;
2486
- if (res.status == 200) {
2487
- if (resp.callAuth) {
2488
- this.CallSid = resp.callAuth.callSid;
2489
- this.recordCall = resp.callAuth.recordCall;
2490
- // Handle the recordCall flag
2491
- if (resp.callAuth.recordCall) {
2492
- this.shouldRecordCall = true;
2493
- }
2494
- else {
2495
- this.shouldRecordCall = false;
2496
- }
2497
- }
2498
- else {
2499
- // swal("Error", "Missing call authentication details.", "error");
2500
- }
2501
- resolve();
2732
+ isInvalidNumber() {
2733
+ return __awaiter(this, void 0, void 0, function* () {
2734
+ try {
2735
+ if (this.sanitizedNum == '') {
2736
+ this.showDialAlert('Invalid Number');
2737
+ return true;
2502
2738
  }
2503
- else {
2504
- swal("Error", resp.message.join("<br/>"), "error");
2505
- resolve();
2739
+ const validNumberPattern = /^[+\d\s()-]*$/; // Regular expression to match valid characters
2740
+ const phoneNumber = this.sanitizedNum;
2741
+ if (!validNumberPattern.test(phoneNumber)) {
2742
+ this.showDialAlert('Invalid Number');
2743
+ return true;
2506
2744
  }
2507
- }, (error) => {
2508
- swal("Error", GlobalConstant.ErrorMsg500, "error");
2509
- resolve();
2510
- });
2511
- });
2512
- }
2513
- onUserInfoByCallSid() {
2514
- if (this.selectedIncomingCall && this.selectedIncomingCall.userInfo) {
2515
- }
2516
- return this.selectedIncomingCall ? Object.keys(this.selectedIncomingCall).length ? true : false : false;
2517
- }
2518
- onClickExpand(data) {
2519
- if (this.selectedIncomingCall === data && this.isClickExpand) {
2520
- this.isClickExpand = false;
2521
- this.selectedIncomingCall = null;
2522
- this.selectedIncomingCallInfo.emit({});
2523
- return;
2524
- }
2525
- this.isClickExpand = true;
2526
- this.selectedIncomingCall = data;
2527
- if (this.selectedIncomingCall) {
2528
- this.selectedIncomingCall['isClickExpand'] = true;
2529
- if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2530
- this.newIncomingCallsList.forEach((call) => {
2531
- if (call !== this.selectedIncomingCall) {
2532
- call['isClickExpand'] = false;
2533
- }
2534
- });
2745
+ return false;
2535
2746
  }
2536
- this.selectedIncomingCallInfo.emit(this.selectedIncomingCall);
2537
- if (!this.selectedIncomingCall.userInfo || this.selectedIncomingCall.userInfo.status == 201) {
2538
- this.getUserInformation(this.selectedIncomingCall);
2747
+ catch (error) {
2748
+ this.showDialAlert('Invalid Number');
2749
+ return true; // Return true if an error occurred, meaning the number is invalid
2539
2750
  }
2540
- }
2541
- }
2542
- getUserInformation(incomingCallData) {
2543
- let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
2544
- this.extensionService.getUserInformation(data['twilioAuthId']).subscribe(response => {
2545
- setTimeout(() => {
2546
- incomingCallData['userInfo'] = response;
2547
- }, 5000);
2548
- }, error => {
2549
- console.error('Error starting recording', error);
2550
2751
  });
2551
2752
  }
2552
- fromEntries(entries) {
2553
- return entries.reduce((acc, [key, value]) => {
2554
- acc[key] = value;
2555
- return acc;
2556
- }, {});
2557
- }
2558
- }
2559
- IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }], target: i0.ɵɵFactoryTarget.Component });
2560
- IncomingCallComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: { incomingCallData: "incomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { closeIncomingCallDiv: "closeIncomingCallDiv", incomingCallsNewList: "incomingCallsNewList", selectedIncomingCallInfo: "selectedIncomingCallInfo" }, ngImport: i0, template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"], dependencies: [{ kind: "directive", type: 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"] }] });
2561
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, decorators: [{
2562
- type: Component,
2563
- args: [{ selector: 'lib-incoming-call', template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"] }]
2564
- }], ctorParameters: function () { return [{ type: ExtensionService }, { type: TwilioService }]; }, propDecorators: { incomingCallData: [{
2565
- type: Input
2566
- }], newIncomingCallsList: [{
2567
- type: Input
2568
- }], closeIncomingCallDiv: [{
2569
- type: Output
2570
- }], incomingCallsNewList: [{
2571
- type: Output
2572
- }], selectedIncomingCallInfo: [{
2573
- type: Output
2574
- }] } });
2575
-
2576
- class CallProgressComponent {
2577
- constructor(extensionService, cdr) {
2578
- this.extensionService = extensionService;
2579
- this.cdr = cdr;
2580
- this.endCallEvent = new EventEmitter();
2581
- this.incomingCallsNewInfo = new EventEmitter();
2582
- this.minimiseEvent = new EventEmitter();
2583
- this.showRingAnimation = false;
2584
- this.timer = '00:00';
2585
- this.showKeypad = false;
2586
- this.keypadVal = keypad;
2587
- this.callInput = '';
2588
- this.isMute = false;
2589
- this.disbaleEndCallBtn = true;
2590
- this.showClearBtn = false;
2591
- this.isCollops = false;
2592
- // Incoming call variables
2593
- this.incomingCallDiv = false;
2594
- this.showCallProgressEvent = new EventEmitter();
2595
- this.incomingCallInitiated = new EventEmitter();
2596
- this.isRecording = false;
2597
- this.isPaused = false;
2598
- this.timeElapsed = 0; // in seconds
2599
- this.recordCall = false;
2600
- this.callStatus = 'ringing';
2601
- this.isMinimised = false;
2602
- }
2603
- ngOnInit() {
2604
- console.log('Call Progress Component');
2605
- }
2606
- ngOnChanges(changes) {
2607
- var _a, _b, _c, _d;
2608
- console.log('Call Progress Component ngOnChanges');
2609
- if (changes['callData']) {
2610
- console.log('Call Progress Component ngOnChanges callData', changes['callData']);
2611
- if (changes['callData'].currentValue.isIncomingCall) {
2612
- this.incomingCallDiv = true;
2613
- }
2614
- else {
2615
- //for outgoing call
2616
- this.startCall(changes['callData'].currentValue);
2617
- }
2753
+ // saveLastDialed() {
2754
+ // const contact = this.filteredContactList.find(c => c.numbersList.some(n => n.number === this.dialedNumber));
2755
+ // if (contact) {
2756
+ // this.lastDialed = {
2757
+ // name: contact.name,
2758
+ // image: contact.image,
2759
+ // number: this.dialedNumber
2760
+ // };
2761
+ // } else {
2762
+ // if(this.dialedNumber){
2763
+ // this.lastDialed = { number: this.dialedNumber };
2764
+ // }
2765
+ // }
2766
+ // }
2767
+ isSavedContactDialled() {
2768
+ let phoneNum = this.sanitizedNum.replace(/\s+/g, '');
2769
+ let contact = this.contactList.filter(contact => {
2770
+ // return contact.numbersList.some(num => num.number === phoneNum)
2771
+ });
2772
+ if (contact.length) {
2773
+ this.callData.name = `${contact[0].firstName} ${contact[0].middleName} ${contact[0].lastName}`.toLowerCase();
2774
+ this.callData.img = contact[0].image || 'assets/images/user.jpg';
2775
+ this.callData.phone = this.sanitizedNum;
2776
+ return true;
2618
2777
  }
2619
- if (changes['newIncomingCallData']) {
2778
+ return false;
2779
+ }
2780
+ showDialAlert(message) {
2781
+ this.dialAlert = {
2782
+ msg: message,
2783
+ show: true
2784
+ };
2785
+ setTimeout(() => {
2786
+ this.dialAlert.show = false;
2787
+ }, 3000);
2788
+ }
2789
+ isCallerIdSet() {
2790
+ return __awaiter(this, void 0, void 0, function* () {
2620
2791
  try {
2621
- if (changes['newIncomingCallData'].currentValue) {
2622
- if (this.call && (this.call.status() == 'open')) {
2623
- this.call.disconnect();
2624
- this.call = changes['newIncomingCallData'].currentValue;
2625
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.accept();
2626
- this.callData.phone = (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['From'];
2627
- this.callData.name = (_c = this.call) === null || _c === void 0 ? void 0 : _c.customParameters.get('name');
2628
- this.callData.img = ((_d = this.call) === null || _d === void 0 ? void 0 : _d.customParameters.get('image')) || 'assets/images/user.jpg';
2629
- this.incomingCallInitiated.emit();
2630
- this.startTimer();
2631
- }
2792
+ const tkn = localStorage.getItem('ext_token');
2793
+ const res = yield this.extService.fetchCallerId(tkn || '').toPromise();
2794
+ if (res.status == 200) {
2795
+ localStorage.setItem('trialOver', res.trialOver);
2796
+ this.twilioService.isTrialOver.next(res.trialOver);
2797
+ localStorage.setItem('paymentDue', res.paymentDue);
2798
+ this.twilioService.isPaymentDue.next(res.paymentDue);
2799
+ }
2800
+ if (res.callerid) {
2801
+ localStorage.setItem('callerID', res.callerid);
2802
+ this.extService.changeMessage(res.callerid);
2803
+ }
2804
+ else {
2805
+ localStorage.setItem('callerID', 'Not set');
2806
+ this.extService.changeMessage('Not set');
2632
2807
  }
2808
+ return (localStorage.getItem('callerID') !== 'Not set');
2633
2809
  }
2634
2810
  catch (e) {
2635
2811
  console.log(e);
2812
+ return false;
2636
2813
  }
2637
- }
2814
+ });
2638
2815
  }
2639
- ngAfterViewInit() { }
2640
- startCall(callData) {
2816
+ checkMicrophonePermission() {
2641
2817
  return __awaiter(this, void 0, void 0, function* () {
2642
2818
  try {
2643
- this.showRingAnimation = true;
2644
- const payload = {
2645
- channelId: environment.channelId,
2646
- userId: localStorage.getItem('userId'),
2647
- to: callData.phone,
2648
- scope: 'local',
2649
- fromNumber: callData.from
2650
- };
2651
- const response = yield this.initiateCall(payload);
2652
- if (response.status == 200) {
2653
- const { id: callAuthId, recordCall } = yield this.getCallAuthId(response);
2654
- this.getUserInformation(callAuthId);
2655
- this.recordCall = recordCall; // Store the recordCall value
2656
- const tokenData = yield this.getOutgoingCallToken(callAuthId);
2657
- yield this.connectToDevice(tokenData.token, callData);
2658
- // Poll the status for 30-45 seconds
2659
- this.pollCallStatus(callAuthId);
2660
- }
2661
- else if (response.status == 201) {
2662
- swal("Error", response.message.join("<br/>"), "error");
2663
- this.endCall();
2664
- }
2819
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2820
+ stream.getTracks().forEach(track => track.stop());
2821
+ return true;
2665
2822
  }
2666
2823
  catch (error) {
2667
- this.showRingAnimation = false;
2668
- this.handleError(error);
2669
- this.endCall();
2824
+ if (error instanceof DOMException && error.name === 'NotAllowedError') {
2825
+ return false;
2826
+ }
2827
+ else {
2828
+ return false;
2829
+ }
2670
2830
  }
2671
2831
  });
2672
2832
  }
2673
- initiateCall(payload) {
2833
+ askForMicrophonePermission() {
2674
2834
  return __awaiter(this, void 0, void 0, function* () {
2675
- return yield this.extensionService.initiateCall(payload).toPromise();
2835
+ try {
2836
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2837
+ stream.getTracks().forEach(track => track.stop());
2838
+ }
2839
+ catch (error) {
2840
+ console.error('User denied microphone permission:', error);
2841
+ }
2676
2842
  });
2677
2843
  }
2678
- getCallAuthId(response) {
2844
+ // below function is to get the country code with number from server
2845
+ getToNumber(dialedNumber) {
2679
2846
  return __awaiter(this, void 0, void 0, function* () {
2680
- return {
2681
- id: response.callauth.id,
2682
- recordCall: response.callauth.recordCall
2683
- };
2847
+ if (dialedNumber[0] !== '+') {
2848
+ // this is case when user geolocation dial code is on
2849
+ let ipAddress = yield this.ipService.getIpAddressInfo().toPromise();
2850
+ const res = yield this.twilioService.getToNumber(dialedNumber, ipAddress.address.countryCode).toPromise();
2851
+ if (res.status == 200) {
2852
+ this.toastTimeout = res.timeInterval * 1000;
2853
+ yield this.showNumberToast(res);
2854
+ }
2855
+ }
2684
2856
  });
2685
2857
  }
2686
- getOutgoingCallToken(callAuthId) {
2687
- return __awaiter(this, void 0, void 0, function* () {
2688
- return yield this.extensionService.getOutgoingCallToken({ authId: callAuthId }).toPromise();
2689
- });
2858
+ isAlertEnable() {
2859
+ return localStorage.getItem('isAlertEnable');
2690
2860
  }
2691
- connectToDevice(token, callData) {
2861
+ showNumberToast(data) {
2692
2862
  return __awaiter(this, void 0, void 0, function* () {
2693
- const options = {
2694
- codecPreferences: ['opus', 'pcmu'],
2695
- closeProtection: true,
2696
- };
2697
- this.device = new Device(token.value, options);
2698
- this.call = yield this.device.connect({
2699
- params: {
2700
- From: callData.from,
2701
- To: callData.phone,
2702
- Env: environment.abb,
2703
- Token: token.id,
2704
- Ext: callData.extNum
2705
- },
2706
- rtcConstraints: { audio: { deviceId: 'default' } },
2707
- });
2708
- this.setupEventListeners();
2709
- });
2710
- }
2711
- setupEventListeners() {
2712
- var _a, _b, _c, _d, _e, _f, _g;
2713
- this.startTimer();
2714
- (_a = this.device) === null || _a === void 0 ? void 0 : _a.on('error', (err) => {
2715
- console.log(err);
2716
- this.showRingAnimation = false;
2717
- this.stopTimer();
2718
- });
2719
- (_b = this.call) === null || _b === void 0 ? void 0 : _b.on('error', (error) => {
2720
- this.showRingAnimation = false;
2721
- this.stopTimer();
2722
- });
2723
- (_c = this.call) === null || _c === void 0 ? void 0 : _c.on('disconnect', () => {
2724
- this.endCall();
2725
- });
2726
- (_d = this.call) === null || _d === void 0 ? void 0 : _d.on('ringing', () => {
2727
- });
2728
- (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('reject', () => {
2729
- this.endCall();
2730
- });
2731
- (_f = this.call) === null || _f === void 0 ? void 0 : _f.on('accept', () => {
2732
- this.showRingAnimation = false;
2733
- this.disbaleEndCallBtn = false;
2734
- // Start recording if recordCall is true and call is accepted for 30 seconds
2735
- // if (this.recordCall) {
2736
- // setTimeout(() => {
2737
- // if (this.isRecording) return; // If already recording, skip
2738
- // this.startRecording();
2739
- // }, 30000);
2740
- // } else {
2741
- // this.stopRecording();
2742
- // }
2743
- });
2744
- (_g = this.call) === null || _g === void 0 ? void 0 : _g.on('messageReceived', (message) => {
2863
+ const isAlertOn = (localStorage.getItem('isCountryCodeToastOn'));
2864
+ if (isAlertOn == 'true') {
2865
+ this.callNumberToast.show = true;
2866
+ this.callNumberToast.number = data.toNumber;
2867
+ this.callNumberToast.displayNum = data.displayNumber;
2868
+ }
2869
+ this.callData.displayNum = data.displayNumber;
2870
+ //this.callData.phone = data.toNumber;
2871
+ yield this.delay(this.toastTimeout);
2872
+ this.dialedNumber = data.toNumber;
2873
+ this.sanitizedNum = data.toNumber;
2874
+ this.callNumberToast.show = false;
2875
+ this.callNumberToast.number = '';
2876
+ this.callNumberToast.displayNum = '';
2745
2877
  });
2746
2878
  }
2747
- startTimer() {
2748
- let seconds = 0;
2749
- this.intervalId = setInterval(() => {
2750
- seconds++;
2751
- this.timer = this.formatTime(seconds);
2752
- }, 1000);
2753
- }
2754
- stopTimer() {
2755
- clearInterval(this.intervalId);
2756
- this.timer = '00:00';
2757
- }
2758
- formatTime(totalSeconds) {
2759
- const minutes = Math.floor(totalSeconds / 60);
2760
- const seconds = totalSeconds % 60;
2761
- return `${this.pad(minutes)}:${this.pad(seconds)}`;
2762
- }
2763
- pad(value) {
2764
- return value < 10 ? `0${value}` : `${value}`;
2765
- }
2766
- handleError(error) {
2767
- swal("Error", error, "error");
2768
- }
2769
- endCall() {
2770
- this.endCallEvent.emit();
2771
- if (this.call) {
2772
- this.call.disconnect();
2773
- }
2774
- this.showRingAnimation = false;
2775
- this.stopTimer();
2776
- this.maximiseDialpad();
2777
- }
2778
- toggleMute() {
2779
- var _a;
2780
- this.isMute = !this.isMute;
2781
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.mute(this.isMute);
2782
- }
2783
- toggleKeypad() {
2784
- this.showKeypad = !this.showKeypad;
2785
- this.callInput = '';
2879
+ delay(ms) {
2880
+ return new Promise(resolve => setTimeout(resolve, ms));
2786
2881
  }
2787
- onCallInputs(num) {
2788
- var _a;
2789
- try {
2790
- if (Number.isInteger(num) || num == '+' || num == '*' || num == '#') {
2791
- if (num == '#') {
2792
- new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
2793
- }
2794
- else if (num == '*') {
2795
- new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
2796
- }
2797
- else {
2798
- new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
2799
- }
2800
- this.callInput = this.callInput + String(num);
2801
- this.showClearBtn = true;
2802
- }
2803
- let str = String(num);
2804
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(str);
2805
- }
2806
- catch (e) {
2807
- console.log(e);
2808
- }
2882
+ onMinimise(isMinimised) {
2883
+ this.isMinimised = isMinimised;
2884
+ this.minimiseEvent.emit(isMinimised);
2809
2885
  }
2810
- onCallInputEnter(ev) {
2811
- var _a;
2812
- try {
2813
- (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(String(ev.key));
2814
- }
2815
- catch (e) {
2816
- console.log(e);
2886
+ handleNumberPaste(event) {
2887
+ event.preventDefault();
2888
+ const clipboardData = event.clipboardData || window.clipboardData;
2889
+ const pastedData = clipboardData.getData('text');
2890
+ // Log the pasted content to the console
2891
+ if (pastedData) {
2892
+ this.dialedNumber = pastedData;
2893
+ this.sanitizedNum = pastedData;
2817
2894
  }
2818
2895
  }
2819
- closeIncomingCall(data) {
2820
- // this.incomingCallDiv = false;
2821
- if (data.show) {
2822
- //this.showCallProgressEvent.emit()
2823
- // handle incoming call accepted
2824
- this.startTimer();
2825
- this.disbaleEndCallBtn = false;
2826
- this.call = data.call;
2827
- const incomingDetail = this.extensionService.getCallSid();
2828
- this.incomingRecordCall = incomingDetail.recordCall;
2829
- // Start recording if the call is answered and recording is enabled
2830
- if (this.incomingRecordCall) {
2831
- this.startRecording();
2832
- }
2833
- else {
2834
- this.isRecording = false;
2835
- }
2836
- this.cdr.detectChanges();
2837
- }
2838
- else {
2839
- // incoming call rejected
2840
- this.endCallEvent.emit();
2841
- }
2896
+ onEnter(num) {
2897
+ console.log(num, 'number fn');
2898
+ this.dialedNumber = this.dialedNumber + num;
2899
+ this.sanitizedNum = this.dialedNumber;
2900
+ this.showInputClearBtn = true;
2901
+ this.numberDialed.emit(this.dialedNumber);
2842
2902
  }
2843
- clearInputs() {
2844
- this.callInput = this.callInput.slice(0, -1);
2903
+ getUserCallSetting() {
2904
+ const tkn = localStorage.getItem('ext_token');
2905
+ this.extService.fetchCallerId(tkn || '').subscribe((resp) => {
2906
+ if (resp.status == 200) {
2907
+ //this.callPrefernce = resp.userSetting;
2908
+ this.callPreference = resp.callerid;
2909
+ this.getCallerIdList();
2910
+ }
2911
+ });
2845
2912
  }
2846
- minimiseDialpad() {
2847
- this.minimiseEvent.emit(true);
2848
- this.isMinimised = true;
2913
+ onDedicatedNumSelect(id) {
2914
+ this.selectedCallerId = id;
2915
+ this.isCallerIdHidden = true;
2916
+ this.extService.setCallerId(id);
2849
2917
  }
2850
- maximiseDialpad() {
2851
- this.minimiseEvent.emit(false);
2852
- this.isMinimised = false;
2918
+ cancelDialNumber() {
2919
+ this.terminateCall = true;
2920
+ this.callNumberToast.show = false;
2853
2921
  }
2854
- toggleRecording() {
2855
- if (this.isRecording) {
2856
- this.stopRecording();
2922
+ handleDivKeydown(ev) {
2923
+ if (this.dialedNumber.length == 0) {
2924
+ this.dialInputElement.nativeElement.focus();
2857
2925
  }
2858
- else {
2859
- this.startRecording();
2926
+ if (ev.key === 'Enter') {
2927
+ // Check if the dialpad is open
2928
+ if (!this.isDialpadHidden) {
2929
+ if (this.dialedNumber.length > 2 && this.selectedCallerId) {
2930
+ this.initiateCall();
2931
+ }
2932
+ if (!this.selectedCallerId) {
2933
+ this.shakeDedicatedBtn = true;
2934
+ setTimeout(() => {
2935
+ this.shakeDedicatedBtn = false;
2936
+ }, 10000);
2937
+ }
2938
+ }
2860
2939
  }
2861
2940
  }
2862
- startRecording() {
2863
- let sid;
2864
- const details = this.extensionService.getCallSid();
2865
- this.incomingCallSid = details.callSid;
2866
- this.incomingRecordCall = details.recordCall;
2867
- sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2868
- // if (!this.incomingRecordCall && !this.recordCall) {
2869
- // return;
2870
- // }
2871
- this.extensionService.getCallRecording(sid).subscribe(response => {
2872
- this.isRecording = true;
2873
- this.isPaused = false;
2874
- this.timeElapsed = 0;
2875
- this.startTimer1();
2876
- }, error => {
2877
- console.error('Error starting recording', error);
2878
- });
2879
- }
2880
- stopRecording() {
2881
- // if (!this.incomingRecordCall && !this.recordCall) {
2882
- // return;
2883
- // }
2884
- this.isRecording = false;
2885
- this.isPaused = false;
2886
- if (this.timerSubscription) {
2887
- this.timerSubscription.unsubscribe();
2941
+ onCallBtnMouseEnter(ev) {
2942
+ if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2943
+ this.shakeDedicatedBtn = true;
2888
2944
  }
2889
2945
  }
2890
- pauseRecording() {
2891
- const details = this.extensionService.getCallSid();
2892
- this.incomingCallSid = details.callSid;
2893
- this.incomingRecordCall = details.recordCall;
2894
- const sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2895
- // if (!this.incomingRecordCall && !this.recordCall) {
2896
- // return;
2897
- // }
2898
- this.extensionService.pauseOrResumeRecording(sid, 'pause').subscribe(response => {
2899
- this.stopRecordingTimer();
2900
- this.isPaused = true;
2901
- }, error => {
2902
- console.error('Error pausing recording:', error);
2903
- // Consider updating the UI to show the error state
2904
- });
2946
+ onCallBtnMouseLeave(ev) {
2947
+ if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2948
+ this.shakeDedicatedBtn = false;
2949
+ }
2905
2950
  }
2906
- resumeRecording() {
2907
- let sid;
2908
- const details = this.extensionService.getCallSid();
2909
- this.incomingCallSid = details.callSid;
2910
- this.incomingRecordCall = details.recordCall;
2911
- sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2912
- // if (!this.incomingRecordCall && !this.recordCall) {
2913
- // return; // Skip if recording is not enabled
2914
- // }
2915
- this.extensionService.pauseOrResumeRecording(sid, 'resume').subscribe(response => {
2916
- this.isPaused = false;
2917
- this.startTimer1();
2918
- }, error => {
2919
- console.error('Error resuming recording', error);
2920
- });
2951
+ acceptNewIncomingCall(call) {
2952
+ //first cut the current call
2953
+ //this.callData = call;
2954
+ this.newIncomingCallData = call;
2921
2955
  }
2922
- startTimer1() {
2923
- this.timerSubscription = interval(1000).subscribe(() => {
2924
- this.timeElapsed++;
2925
- });
2956
+ rejectNewIncomingCall(call) {
2957
+ call.reject();
2958
+ this.newIncomingCalls = this.newIncomingCalls.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2959
+ this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2926
2960
  }
2927
- stopRecordingTimer() {
2928
- if (this.timerSubscription) {
2929
- this.timerSubscription.unsubscribe(); // Pause the timer
2930
- this.timerSubscription = undefined; // Optionally reset the subscription
2931
- }
2961
+ newIncomingCallInitiated() {
2962
+ this.isCallInProgress = true;
2963
+ this.newIncomingCalls = [];
2964
+ this.incomingCallInitiated.emit();
2932
2965
  }
2933
- getFormattedTime() {
2934
- const minutes = Math.floor(this.timeElapsed / 60);
2935
- const seconds = this.timeElapsed % 60;
2936
- return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
2966
+ incomingCallsNewInfo(data) {
2967
+ this.incomingCallsList = data;
2968
+ this.incomingCallsNewInfoEvent.emit(data);
2937
2969
  }
2938
- pollCallStatus(callAuthId) {
2939
- const maxTime = 30000; // Poll for up to 30 seconds
2940
- const pollInterval = 3000; // Poll every 3 seconds
2941
- let elapsedTime = 0;
2942
- const intervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () {
2943
- elapsedTime += pollInterval;
2944
- try {
2945
- const statusResponse = yield this.extensionService.getCallStatus(callAuthId).toPromise();
2946
- if (statusResponse && statusResponse.callDetails) {
2947
- this.callStatus = statusResponse.callDetails.callStatus;
2948
- if (this.callStatus === 'in-progress') {
2949
- this.callSid = statusResponse.callDetails.callSid;
2950
- if (this.recordCall && !this.isRecording) {
2951
- this.startRecording();
2952
- }
2953
- clearInterval(intervalId);
2954
- }
2955
- else if (this.callStatus === 'completed') {
2956
- clearInterval(intervalId);
2957
- this.endCall();
2958
- this.stopRecording();
2959
- }
2960
- else if (this.callStatus === 'ringing') {
2961
- // Continue polling; do not clear the interval yet
2962
- }
2963
- }
2970
+ ngOnDestroy() {
2971
+ try {
2972
+ console.log('Cleaning up C2cDialpadComponent');
2973
+ // Unsubscribe from all subscriptions
2974
+ if (this.subscriptions) {
2975
+ this.subscriptions.unsubscribe();
2964
2976
  }
2965
- catch (error) {
2966
- clearInterval(intervalId);
2977
+ // End any active call
2978
+ if (this.isCallInProgress) {
2979
+ this.endCall();
2967
2980
  }
2968
- if (elapsedTime >= maxTime) {
2969
- // console.log('Max polling time reached. Stopping poll.');
2970
- clearInterval(intervalId);
2981
+ // Clear any timeouts or intervals if they exist
2982
+ if (this.toastTimeout) {
2983
+ clearTimeout(this.toastTimeout);
2971
2984
  }
2972
- }), pollInterval);
2973
- }
2974
- getUserInformation(id) {
2975
- this.extensionService.getUserInformation(id).subscribe(response => {
2976
- console.log(response);
2977
- }, error => {
2978
- console.error('Error starting recording', error);
2979
- });
2980
- }
2981
- incomingCallsNewList(data) {
2982
- this.newIncomingCallsList = data;
2983
- this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2984
- }
2985
- selectedIncomingCallInfo(data) {
2986
- this.selectedIncomingCall = data;
2987
- }
2988
- ngOnDestroy() {
2989
- this.callData.dial = false;
2990
- if (this.timerSubscription) {
2991
- this.timerSubscription.unsubscribe();
2985
+ console.log('C2cDialpadComponent cleanup complete');
2986
+ }
2987
+ catch (error) {
2988
+ console.error('Error during component cleanup:', error);
2992
2989
  }
2993
2990
  }
2994
2991
  }
2995
- CallProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, deps: [{ token: ExtensionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2996
- CallProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallProgressComponent, selector: "lib-call-progress", inputs: { callData: "callData", newIncomingCallData: "newIncomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { endCallEvent: "endCallEvent", incomingCallsNewInfo: "incomingCallsNewInfo", minimiseEvent: "minimiseEvent", showCallProgressEvent: "showCallProgressEvent", incomingCallInitiated: "incomingCallInitiated" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand}\">\n <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div>\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div style=\"display: flex; flex-direction: column;position: relative; width: 100%;\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button>\n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : '&nbsp;'}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"], dependencies: [{ kind: "directive", type: 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: "component", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: ["incomingCallData", "newIncomingCallsList"], outputs: ["closeIncomingCallDiv", "incomingCallsNewList", "selectedIncomingCallInfo"] }] });
2997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, decorators: [{
2992
+ 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 });
2993
+ 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>\r\n msssmsm\r\n</div>\r\n<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <lib-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent)=\"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\">\r\n </lib-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: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.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"] }, { kind: "component", type: CallProgressComponent, selector: "lib-call-progress", inputs: ["callData", "newIncomingCallData", "newIncomingCallsList"], outputs: ["endCallEvent", "incomingCallsNewInfo", "minimiseEvent", "showCallProgressEvent", "incomingCallInitiated"] }] });
2994
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
2998
2995
  type: Component,
2999
- args: [{ selector: 'lib-call-progress', template: "<div class=\"call-container\" *ngIf=\"!isMinimised\" [ngClass]=\"{'collops': isCollops, 'incoming-call-container': selectedIncomingCall?.isClickExpand}\">\n <div id=\"minimize-btn-div\">\n <span class=\"material-symbols-outlined minimize-btn\" (click)=\"minimiseDialpad()\">\n minimize\n </span>\n </div>\n <lib-incoming-call *ngIf=\"incomingCallDiv\" [incomingCallData]=\"callData\" [newIncomingCallsList]=\"newIncomingCallsList\" (closeIncomingCallDiv)=\"closeIncomingCall($event)\" \n (incomingCallsNewList)=\"incomingCallsNewList($event)\" (selectedIncomingCallInfo)=\"selectedIncomingCallInfo($event)\"></lib-incoming-call>\n <div style=\"display: flex; flex-direction: column;position: relative; width: 100%;\">\n \n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"callData.img\" alt=\"\" width=\"120\" />\n </div>\n <div class=\"callerDetails\">\n <h1 [ngStyle]=\"{'margin-top': showKeypad ? '0': '8px'}\">{{callData.name}}</h1>\n <p>{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n <h4 style=\"margin-top: 4px\">{{timer}}</h4>\n </div>\n <div class=\"record-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '20px'}\">\n <div class=\"record-btn-container\">\n <button class=\"record-btn start-stop\" *ngIf=\"!isRecording\" [ngClass]=\"{'recording': isRecording, 'stopped': !isRecording}\" (click)=\"toggleRecording()\" [title]=\"isRecording ? 'Stop Recording' : 'Start Recording'\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"recording-icon\"></span>\n </button>\n <div class=\"pause-resume-btns\">\n <button class=\"record-btn pause-resume\" *ngIf=\"isRecording && !isPaused\" (click)=\"pauseRecording()\">\n <span class=\"material-symbols-outlined\"> pause </span>\n </button>\n <button class=\"record-btn pause-resume\" *ngIf=\"isPaused\" (click)=\"resumeRecording()\">\n <span class=\"material-symbols-outlined\"> play_arrow </span>\n </button>\n </div>\n </div>\n <div *ngIf=\"isRecording\" class=\"timer-display\">\n {{ getFormattedTime() }}\n </div>\n </div>\n <div *ngIf=\"showKeypad\" class=\"sendDigit\">\n <input type=\"text\" name=\"call-inputs\" id=\"call-input\" [(ngModel)]=\"callInput\" (keyup)=\"onCallInputEnter($event)\">\n <span class=\"material-symbols-outlined input-clear-btn\" *ngIf=\"callInput\" (click)=\"clearInputs()\">close_small</span>\n </div>\n <div class=\"btn-container justify-content-center\" *ngIf=\"showKeypad\">\n <div class=\"key-btn\" *ngFor=\"let key of keypadVal\" (click)=\"onCallInputs(key.num)\">\n {{key.num}}\n <span class=\"btn-albhabets\">{{key.text ? key.text : '&nbsp;'}}</span>\n </div>\n </div>\n <div class=\"call-action-btns\" [ngStyle]=\"{'margin-top': showKeypad ? '0': '160px'}\">\n <button class=\"call-sec-btn\" [disabled]=\"disbaleEndCallBtn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" (click)=\"toggleMute()\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n\n </button>\n <button class=\"call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n <button class=\"call-sec-btn\" [ngStyle]=\"{'top': showKeypad ? '0': '-70px'}\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" (click)=\"toggleKeypad()\"> transition_dissolve </span>\n </button>\n </div>\n <!-- <div class=\"mt-2 px-3 call-info-wrapper \" [ngClass]=\"{'open-collops': isCollops}\">\n <div class=\"text-center\" >\n <i class=\"fa fa-angle-down\" *ngIf=\"isCollops\" (click)=\"isCollops = !isCollops\"></i>\n <i class=\"fa fa-angle-up\" *ngIf=\"!isCollops\" (click)=\"isCollops = !isCollops\"></i>\n </div>\n <ng-container *ngIf=\"isCollops\">\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div >First Name:</div>\n <div >test ttttt</div>\n </div>\n <div class=\"col-6\">\n <div>Last Name:</div>\n <div>tetst test </div>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"\">Email:</div>\n <div class=\"\">abcdeft@vgroup.com</div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Number:</div>\n <div class=\"\">63545985264225</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"\">English</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6\">\n <div class=\"\">Image :</div>\n <div class=\"\">test.jpg </div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Extension :</div>\n <div class=\"\">4596</div>\n </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">Note :</div>\n <div class=\"\">tes test test </div>\n </div>\n <div class=\" mb-2\">\n <div class=\"\">\n <div class=\"\">Subject:</div>\n <div class=\"\">hello world | test</div>\n </div>\n </div>\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"\">test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test </div>\n </div>\n </div>\n </ng-container>\n </div> -->\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" />\n <!-- <use\n xlink:href=\"#gentle-wave\"\n x=\"48\"\n y=\"5\"\n fill=\"rgba(255,255,255,0.3)\"\n /> -->\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>\n\n<div class=\"min-call-container\" *ngIf=\"isMinimised\">\n <span class=\"material-symbols-outlined fullscreen\" (click)=\"maximiseDialpad()\"> open_in_full </span>\n <div style=\"display: flex; width: 100%\">\n <div>\n <div class=\"min-call-animation\" id=\"call-avatar\">\n <img class=\"min-avatar-img\" [src]=\"callData.img\" alt=\"\" />\n </div>\n </div>\n <div>\n <div class=\"min-callerDetails\">\n <div class=\"name\">\n {{callData.name}}\n </div>\n <p style=\"margin: 0\">{{callData.displayNum ? callData.displayNum : callData.phone }}</p>\n </div>\n </div>\n </div>\n <div class=\"min-btn-container\">\n <div class=\"min-timer\">{{timer}}</div>\n <button class=\"min-call-sec-btn\" (click)=\"toggleMute()\" [disabled]=\"disbaleEndCallBtn\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"min-call-btn end-call-btn\" [disabled]=\"disbaleEndCallBtn\" (click)=\"endCall()\">\n <span class=\"material-symbols-outlined\"> call_end </span>\n </button>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
3000
- }], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { callData: [{
3001
- type: Input
3002
- }], newIncomingCallData: [{
3003
- type: Input
3004
- }], newIncomingCallsList: [{
2996
+ args: [{ selector: 'lib-dialbox', template: "<div>\r\n msssmsm\r\n</div>\r\n<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <lib-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent)=\"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\">\r\n </lib-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"] }]
2997
+ }], ctorParameters: function () { return [{ type: TwilioService }, { type: ExtensionService }, { type: IpAddressService }, { type: ExtensionService }, { type: i4.Router }]; }, propDecorators: { isDialpadHidden: [{
3005
2998
  type: Input
3006
- }], endCallEvent: [{
2999
+ }], closeDialpadEvent: [{
3007
3000
  type: Output
3008
- }], incomingCallsNewInfo: [{
3001
+ }], callInitiated: [{
3002
+ type: Output
3003
+ }], endCallEvent: [{
3009
3004
  type: Output
3010
3005
  }], minimiseEvent: [{
3011
3006
  type: Output
3012
- }], showCallProgressEvent: [{
3007
+ }], incomingCallsNewInfoEvent: [{
3013
3008
  type: Output
3014
3009
  }], incomingCallInitiated: [{
3015
3010
  type: Output
3011
+ }], dialInputElement: [{
3012
+ type: ViewChild,
3013
+ args: ['dialInput']
3014
+ }], numberDialed: [{
3015
+ type: Output
3016
3016
  }] } });
3017
3017
 
3018
3018
  class CallerIdDialogComponent {
@@ -3054,13 +3054,13 @@ class CallerIdDialogComponent {
3054
3054
  console.log('doNotShowAgain');
3055
3055
  }
3056
3056
  }
3057
- CallerIdDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, deps: [{ token: i4.Router }, { token: TwilioService }, { token: i3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3058
- CallerIdDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallerIdDialogComponent, selector: "lib-caller-id-dialog", ngImport: i0, template: "<div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i6.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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"] }] });
3057
+ CallerIdDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, deps: [{ token: i4.Router }, { token: TwilioService }, { token: i3$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3058
+ CallerIdDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallerIdDialogComponent, selector: "lib-caller-id-dialog", ngImport: i0, template: "<div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i3$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
3059
3059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, decorators: [{
3060
3060
  type: Component,
3061
3061
  args: [{ selector: 'lib-caller-id-dialog', template: "<div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div>" }]
3062
3062
  }], ctorParameters: function () {
3063
- return [{ type: i4.Router }, { type: TwilioService }, { type: i3.MatDialogRef }, { type: undefined, decorators: [{
3063
+ return [{ type: i4.Router }, { type: TwilioService }, { type: i3$2.MatDialogRef }, { type: undefined, decorators: [{
3064
3064
  type: Inject,
3065
3065
  args: [MAT_DIALOG_DATA]
3066
3066
  }] }];
@@ -3091,20 +3091,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3091
3091
  DialboxComponent,
3092
3092
  CallProgressComponent,
3093
3093
  CallerIdDialogComponent,
3094
- IncomingCallComponent,
3094
+ IncomingCallComponent
3095
3095
  ],
3096
3096
  imports: [
3097
3097
  CommonModule,
3098
3098
  FormsModule,
3099
3099
  ReactiveFormsModule,
3100
3100
  HttpClientModule,
3101
- RouterLink,
3101
+ RouterLink
3102
3102
  ],
3103
3103
  exports: [
3104
3104
  DialboxComponent,
3105
3105
  CallProgressComponent,
3106
3106
  CallerIdDialogComponent,
3107
- IncomingCallComponent,
3107
+ IncomingCallComponent
3108
3108
  ]
3109
3109
  }]
3110
3110
  }] });