@vgroup/dialbox 0.4.100 → 0.4.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/environments/environments.mjs +10 -10
- package/esm2020/lib/service/twilio.service.mjs +5 -7
- package/fesm2015/vgroup-dialbox.mjs +84 -85
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +84 -85
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/service/twilio.service.d.ts +1 -3
- package/package.json +1 -1
|
@@ -63,23 +63,23 @@ const keypad = [
|
|
|
63
63
|
];
|
|
64
64
|
|
|
65
65
|
const environment = {
|
|
66
|
-
abb: "
|
|
66
|
+
abb: "d",
|
|
67
67
|
production: false,
|
|
68
68
|
secureCookies: true,
|
|
69
|
-
feUrl: 'https://
|
|
70
|
-
apiUrl: 'https://
|
|
71
|
-
websocketUrl: 'wss://
|
|
69
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
70
|
+
apiUrl: 'https://dev-api-t10.vgroupinc.com/dev_softphone_p91',
|
|
71
|
+
websocketUrl: 'wss://dev-api-t10.vgroupinc.com/dev_softphone_p91/',
|
|
72
72
|
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
73
|
-
stripePublishableKey: "
|
|
73
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
74
74
|
sessionTimeout: 15,
|
|
75
75
|
deviceType: "web",
|
|
76
76
|
appVersion: "2.3",
|
|
77
77
|
channelId: '61481b12e138eb7dc3007579',
|
|
78
78
|
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
79
|
-
c2c_support_channel_id: '
|
|
79
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
80
80
|
c2c_point_url: 'https://app.contexttocall.com/assets/cdn/c2c.js',
|
|
81
|
-
c2c_call_label_id: '
|
|
82
|
-
c2c_email_label_id: '
|
|
81
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
82
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
83
83
|
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
84
84
|
firebase: {
|
|
85
85
|
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
@@ -93,7 +93,7 @@ const environment = {
|
|
|
93
93
|
},
|
|
94
94
|
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s',
|
|
95
95
|
keycloakURL: 'https://test-keycloak.vgroupinc.com/',
|
|
96
|
-
keycloakRealm: 'vgroup-
|
|
96
|
+
keycloakRealm: 'vgroup-dev',
|
|
97
97
|
keycloakClientId: 'c2c-softphone-app'
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -1399,82 +1399,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1399
1399
|
}]
|
|
1400
1400
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: IpAddressService }]; } });
|
|
1401
1401
|
|
|
1402
|
-
class NotificationService {
|
|
1403
|
-
constructor(twilioService) {
|
|
1404
|
-
this.twilioService = twilioService;
|
|
1405
|
-
this.redirectUrl = window.location.href;
|
|
1406
|
-
if ('serviceWorker' in navigator) {
|
|
1407
|
-
navigator.serviceWorker.addEventListener('message', this.handleServiceWorkerMessage.bind(this));
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
showNotification(callData) {
|
|
1411
|
-
this.twilioAuthId = callData.customParameters.get('twilioAuthId');
|
|
1412
|
-
this.twilioCallData = callData;
|
|
1413
|
-
const incomingNumber = callData.parameters.From;
|
|
1414
|
-
const callerName = callData.customParameters.get('name');
|
|
1415
|
-
const callerImage = callData.customParameters.get('image');
|
|
1416
|
-
if (('serviceWorker' in navigator)) {
|
|
1417
|
-
navigator.serviceWorker.ready.then((registration) => {
|
|
1418
|
-
const options = {
|
|
1419
|
-
body: `Incoming call from ${callerName || incomingNumber}`,
|
|
1420
|
-
icon: callerImage,
|
|
1421
|
-
actions: [
|
|
1422
|
-
{
|
|
1423
|
-
action: 'accept',
|
|
1424
|
-
title: 'Accept',
|
|
1425
|
-
icon: '../../../assets/images/notification-icons/call-accept-icon.png'
|
|
1426
|
-
},
|
|
1427
|
-
{
|
|
1428
|
-
action: 'reject',
|
|
1429
|
-
title: 'Reject',
|
|
1430
|
-
icon: '../../../assets/images/notification-icons/call-reject-icon.jpg'
|
|
1431
|
-
}
|
|
1432
|
-
],
|
|
1433
|
-
data: {
|
|
1434
|
-
url: this.redirectUrl,
|
|
1435
|
-
},
|
|
1436
|
-
requireInteraction: true,
|
|
1437
|
-
};
|
|
1438
|
-
registration.showNotification('Icoming Call', options);
|
|
1439
|
-
});
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
handleServiceWorkerMessage(event) {
|
|
1443
|
-
if (!event.data)
|
|
1444
|
-
return;
|
|
1445
|
-
switch (event.data.action) {
|
|
1446
|
-
case 'accept':
|
|
1447
|
-
this.onNotificationAccept();
|
|
1448
|
-
break;
|
|
1449
|
-
case 'reject':
|
|
1450
|
-
this.onNotificationReject();
|
|
1451
|
-
break;
|
|
1452
|
-
default:
|
|
1453
|
-
console.log('default action:');
|
|
1454
|
-
break;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
onNotificationAccept() {
|
|
1458
|
-
this.twilioService.callhandleFromNotification.next({ callStatus: 'accept' });
|
|
1459
|
-
}
|
|
1460
|
-
onNotificationReject() {
|
|
1461
|
-
this.twilioService.callhandleFromNotification.next({ callStatus: 'reject' });
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [{ token: TwilioService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1465
|
-
NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
1466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
|
|
1467
|
-
type: Injectable,
|
|
1468
|
-
args: [{
|
|
1469
|
-
providedIn: 'root'
|
|
1470
|
-
}]
|
|
1471
|
-
}], ctorParameters: function () { return [{ type: TwilioService }]; } });
|
|
1472
|
-
|
|
1473
1402
|
class TwilioService {
|
|
1474
|
-
constructor(http, extensionService
|
|
1403
|
+
constructor(http, extensionService) {
|
|
1475
1404
|
this.http = http;
|
|
1476
1405
|
this.extensionService = extensionService;
|
|
1477
|
-
this.notificationSerivce = notificationSerivce;
|
|
1478
1406
|
this.openInProgressDialpad = new BehaviorSubject(false);
|
|
1479
1407
|
this.currentCall = new BehaviorSubject(null);
|
|
1480
1408
|
this.currentCallState = new BehaviorSubject('none'); //in-progress, out-progress, none
|
|
@@ -1541,7 +1469,7 @@ class TwilioService {
|
|
|
1541
1469
|
this.currentCall.next(call);
|
|
1542
1470
|
this.callType.next('INCOMING');
|
|
1543
1471
|
this.currentCallState.next('incoming');
|
|
1544
|
-
this.notificationSerivce.showNotification(call);
|
|
1472
|
+
// this.notificationSerivce.showNotification(call);
|
|
1545
1473
|
});
|
|
1546
1474
|
this.device.on('error', (error) => {
|
|
1547
1475
|
console.error('Twilio Device Error:', error);
|
|
@@ -1667,14 +1595,14 @@ class TwilioService {
|
|
|
1667
1595
|
});
|
|
1668
1596
|
}
|
|
1669
1597
|
}
|
|
1670
|
-
TwilioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, deps: [{ token: i1.HttpClient }, { token: ExtensionService }
|
|
1598
|
+
TwilioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, deps: [{ token: i1.HttpClient }, { token: ExtensionService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1671
1599
|
TwilioService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, providedIn: 'root' });
|
|
1672
1600
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, decorators: [{
|
|
1673
1601
|
type: Injectable,
|
|
1674
1602
|
args: [{
|
|
1675
1603
|
providedIn: 'root'
|
|
1676
1604
|
}]
|
|
1677
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ExtensionService }
|
|
1605
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: ExtensionService }]; } });
|
|
1678
1606
|
|
|
1679
1607
|
class IncomeingCallSocketService {
|
|
1680
1608
|
constructor() {
|
|
@@ -4613,6 +4541,77 @@ const GlobalConstant = {
|
|
|
4613
4541
|
dedicatedNumText: 'C2C Number'
|
|
4614
4542
|
};
|
|
4615
4543
|
|
|
4544
|
+
class NotificationService {
|
|
4545
|
+
constructor(twilioService) {
|
|
4546
|
+
this.twilioService = twilioService;
|
|
4547
|
+
this.redirectUrl = window.location.href;
|
|
4548
|
+
if ('serviceWorker' in navigator) {
|
|
4549
|
+
navigator.serviceWorker.addEventListener('message', this.handleServiceWorkerMessage.bind(this));
|
|
4550
|
+
}
|
|
4551
|
+
}
|
|
4552
|
+
showNotification(callData) {
|
|
4553
|
+
this.twilioAuthId = callData.customParameters.get('twilioAuthId');
|
|
4554
|
+
this.twilioCallData = callData;
|
|
4555
|
+
const incomingNumber = callData.parameters.From;
|
|
4556
|
+
const callerName = callData.customParameters.get('name');
|
|
4557
|
+
const callerImage = callData.customParameters.get('image');
|
|
4558
|
+
if (('serviceWorker' in navigator)) {
|
|
4559
|
+
navigator.serviceWorker.ready.then((registration) => {
|
|
4560
|
+
const options = {
|
|
4561
|
+
body: `Incoming call from ${callerName || incomingNumber}`,
|
|
4562
|
+
icon: callerImage,
|
|
4563
|
+
actions: [
|
|
4564
|
+
{
|
|
4565
|
+
action: 'accept',
|
|
4566
|
+
title: 'Accept',
|
|
4567
|
+
icon: '../../../assets/images/notification-icons/call-accept-icon.png'
|
|
4568
|
+
},
|
|
4569
|
+
{
|
|
4570
|
+
action: 'reject',
|
|
4571
|
+
title: 'Reject',
|
|
4572
|
+
icon: '../../../assets/images/notification-icons/call-reject-icon.jpg'
|
|
4573
|
+
}
|
|
4574
|
+
],
|
|
4575
|
+
data: {
|
|
4576
|
+
url: this.redirectUrl,
|
|
4577
|
+
},
|
|
4578
|
+
requireInteraction: true,
|
|
4579
|
+
};
|
|
4580
|
+
registration.showNotification('Icoming Call', options);
|
|
4581
|
+
});
|
|
4582
|
+
}
|
|
4583
|
+
}
|
|
4584
|
+
handleServiceWorkerMessage(event) {
|
|
4585
|
+
if (!event.data)
|
|
4586
|
+
return;
|
|
4587
|
+
switch (event.data.action) {
|
|
4588
|
+
case 'accept':
|
|
4589
|
+
this.onNotificationAccept();
|
|
4590
|
+
break;
|
|
4591
|
+
case 'reject':
|
|
4592
|
+
this.onNotificationReject();
|
|
4593
|
+
break;
|
|
4594
|
+
default:
|
|
4595
|
+
console.log('default action:');
|
|
4596
|
+
break;
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
onNotificationAccept() {
|
|
4600
|
+
this.twilioService.callhandleFromNotification.next({ callStatus: 'accept' });
|
|
4601
|
+
}
|
|
4602
|
+
onNotificationReject() {
|
|
4603
|
+
this.twilioService.callhandleFromNotification.next({ callStatus: 'reject' });
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, deps: [{ token: TwilioService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4607
|
+
NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
4608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NotificationService, decorators: [{
|
|
4609
|
+
type: Injectable,
|
|
4610
|
+
args: [{
|
|
4611
|
+
providedIn: 'root'
|
|
4612
|
+
}]
|
|
4613
|
+
}], ctorParameters: function () { return [{ type: TwilioService }]; } });
|
|
4614
|
+
|
|
4616
4615
|
class IncomingCallComponent {
|
|
4617
4616
|
constructor(extensionService, twilioService, notificationSerivce) {
|
|
4618
4617
|
this.extensionService = extensionService;
|