@vgroup/dialbox 0.0.2 → 0.0.3
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/keypad.mjs +45 -0
- package/esm2020/lib/dialbox.component.mjs +964 -20
- package/esm2020/lib/dialbox.module.mjs +25 -6
- package/esm2020/lib/environments/environments.mjs +31 -0
- package/esm2020/lib/service/twilio.service.mjs +131 -0
- package/esm2020/public-api.mjs +15 -1
- package/fesm2015/vgroup-dialbox.mjs +1194 -25
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +1192 -25
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/keypad.d.ts +1 -0
- package/lib/dialbox.component.d.ts +92 -1
- package/lib/dialbox.module.d.ts +5 -1
- package/lib/environments/environments.d.ts +30 -0
- package/lib/service/twilio.service.d.ts +48 -0
- package/package.json +1 -1
|
@@ -1,50 +1,1217 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { AsYouType } from 'libphonenumber-js';
|
|
4
|
+
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
5
|
+
import * as i1 from '@angular/common/http';
|
|
6
|
+
import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
7
|
+
import * as i2 from '@angular/router';
|
|
8
|
+
import { RouterLink } from '@angular/router';
|
|
9
|
+
import * as i3 from '@angular/common';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import * as i4 from '@angular/forms';
|
|
12
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
+
|
|
14
|
+
const keypad = [
|
|
15
|
+
{
|
|
16
|
+
num: 1,
|
|
17
|
+
text: 'voicemail'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
num: 2,
|
|
21
|
+
text: 'abc'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
num: 3,
|
|
25
|
+
text: 'def'
|
|
26
|
+
}, {
|
|
27
|
+
num: 4,
|
|
28
|
+
text: 'ghi'
|
|
29
|
+
}, {
|
|
30
|
+
num: 5,
|
|
31
|
+
text: 'jkl'
|
|
32
|
+
}, {
|
|
33
|
+
num: 6,
|
|
34
|
+
text: 'mno'
|
|
35
|
+
}, {
|
|
36
|
+
num: 7,
|
|
37
|
+
text: 'pqrs'
|
|
38
|
+
}, {
|
|
39
|
+
num: 8,
|
|
40
|
+
text: 'tuv'
|
|
41
|
+
}, {
|
|
42
|
+
num: 9,
|
|
43
|
+
text: 'wxyz'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
num: '*',
|
|
47
|
+
text: ' '
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
num: 0,
|
|
51
|
+
text: '+'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
num: '#',
|
|
55
|
+
text: ''
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const environment = {
|
|
60
|
+
abb: "d",
|
|
61
|
+
production: false,
|
|
62
|
+
secureCookies: true,
|
|
63
|
+
feUrl: 'https://dev.vgroupinc.com:91/',
|
|
64
|
+
apiUrl: 'https://apis.vgroupinc.com/test_softphone',
|
|
65
|
+
captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
|
|
66
|
+
stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
|
|
67
|
+
sessionTimeout: 15,
|
|
68
|
+
deviceType: "web",
|
|
69
|
+
appVersion: "2.3",
|
|
70
|
+
channelId: '61481b12e138eb7dc3007579',
|
|
71
|
+
c2c_support_point_id: '60424735f74ac306c1bfa900',
|
|
72
|
+
c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
|
|
73
|
+
c2c_point_url: 'https://bit.ly/3blWnPv',
|
|
74
|
+
c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
|
|
75
|
+
c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
|
|
76
|
+
radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
|
|
77
|
+
firebase: {
|
|
78
|
+
apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
|
|
79
|
+
authDomain: "softphone-d5777.firebaseapp.com",
|
|
80
|
+
projectId: "softphone-d5777",
|
|
81
|
+
storageBucket: "softphone-d5777.appspot.com",
|
|
82
|
+
messagingSenderId: "850812494538",
|
|
83
|
+
appId: "1:850812494538:web:74f8a30fc18e28ded78a33",
|
|
84
|
+
measurementId: "G-NGXTSV9SH3",
|
|
85
|
+
vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
|
|
86
|
+
},
|
|
87
|
+
perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
class TwilioService {
|
|
91
|
+
constructor(http) {
|
|
92
|
+
this.http = http;
|
|
93
|
+
this.openInProgressDialpad = new BehaviorSubject(false);
|
|
94
|
+
this.currentCall = new BehaviorSubject(null);
|
|
95
|
+
this.currentCallState = new BehaviorSubject('none'); //in-progress, out-progress, none
|
|
96
|
+
// incomingCallToken:string;
|
|
97
|
+
// outgoingCallToken:string;
|
|
98
|
+
this.callType = new BehaviorSubject('NIL');
|
|
99
|
+
this.isIncomingCallPicked = new BehaviorSubject(false); // for both incoming and outgoing
|
|
100
|
+
this.token = localStorage.getItem('ext_token');
|
|
101
|
+
this.isNewContactAdded = new BehaviorSubject(false);
|
|
102
|
+
this.updateRecentCall = new BehaviorSubject(false);
|
|
103
|
+
this.callhandleFromNotification = new BehaviorSubject({});
|
|
104
|
+
this.endCall = new BehaviorSubject(false);
|
|
105
|
+
this.dialNumberFromOtherModule = new BehaviorSubject({ number: '', name: '', img: '', callerId: '', isDialFromHistory: false, from: '' });
|
|
106
|
+
this.toggleCallerIdAlert = new BehaviorSubject(true);
|
|
107
|
+
this.isTrialOver = new BehaviorSubject(false);
|
|
108
|
+
this.isPaymentDue = new BehaviorSubject(false);
|
|
109
|
+
this.isAvailableNumber = new BehaviorSubject(false);
|
|
110
|
+
this.callerIdList = new BehaviorSubject([]);
|
|
111
|
+
this.triggerSMSReload = new BehaviorSubject(false);
|
|
112
|
+
}
|
|
113
|
+
// onIncomingCall(){
|
|
114
|
+
// this.device.on('incoming', (call:any) => {
|
|
115
|
+
// console.log(call);
|
|
116
|
+
// //call.accept();
|
|
117
|
+
// });
|
|
118
|
+
// }
|
|
119
|
+
saveContact(payload) {
|
|
120
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
121
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts/manually', payload, httpOptions);
|
|
122
|
+
}
|
|
123
|
+
updateContact(payload) {
|
|
124
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + this.token }) };
|
|
125
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/contact', payload, httpOptions);
|
|
126
|
+
}
|
|
127
|
+
deleteContact(id) {
|
|
128
|
+
let payload = {
|
|
129
|
+
phonebookid: id
|
|
130
|
+
};
|
|
131
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
132
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/contact/' + id, payload, httpOptions);
|
|
133
|
+
}
|
|
134
|
+
getContactList() {
|
|
135
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
136
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
|
|
137
|
+
}
|
|
138
|
+
addContactToFavourite(payload) {
|
|
139
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
140
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/update/favourite', payload, httpOptions);
|
|
141
|
+
}
|
|
142
|
+
getFavouritContacts() {
|
|
143
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
144
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/favourite/contacts', httpOptions);
|
|
145
|
+
}
|
|
146
|
+
getRecentCalls(pageIndex, pageSize) {
|
|
147
|
+
// let params = new HttpParams();
|
|
148
|
+
// params = params.set('size', pageSize);
|
|
149
|
+
// params = params.set('page', pageIndex);
|
|
150
|
+
const headers = { 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') };
|
|
151
|
+
const httpOptions = { headers };
|
|
152
|
+
return this.http.get(environment.apiUrl + '/utilities/phonebook/recent/calls', httpOptions);
|
|
153
|
+
}
|
|
154
|
+
deleteRecentCallLog(id) {
|
|
155
|
+
let payload = {
|
|
156
|
+
recordId: id
|
|
157
|
+
};
|
|
158
|
+
const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
|
|
159
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/calls/' + id, payload, httpOptions);
|
|
160
|
+
}
|
|
161
|
+
uploadPhoto(payload) {
|
|
162
|
+
let httpOptions = {
|
|
163
|
+
headers: new HttpHeaders({
|
|
164
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
165
|
+
})
|
|
166
|
+
};
|
|
167
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', payload, httpOptions);
|
|
168
|
+
}
|
|
169
|
+
deletePhoto(id) {
|
|
170
|
+
let payload = {
|
|
171
|
+
phonebookid: id
|
|
172
|
+
};
|
|
173
|
+
let httpOptions = {
|
|
174
|
+
headers: new HttpHeaders({
|
|
175
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
176
|
+
})
|
|
177
|
+
};
|
|
178
|
+
return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/photo/' + id, payload, httpOptions);
|
|
179
|
+
}
|
|
180
|
+
// toggleCallerIdAlertFn(val: any) {
|
|
181
|
+
// let httpOptions = {
|
|
182
|
+
// headers: new HttpHeaders({
|
|
183
|
+
// 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
184
|
+
// })
|
|
185
|
+
// };
|
|
186
|
+
// return this.http.put<[]>(environment.apiUrl + '/utilities/softphone/callerid/alert/' + val, {}, httpOptions);
|
|
187
|
+
// }
|
|
188
|
+
toggleCoutryCodeToast(val) {
|
|
189
|
+
let httpOptions = {
|
|
190
|
+
headers: new HttpHeaders({
|
|
191
|
+
'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
|
|
192
|
+
})
|
|
193
|
+
};
|
|
194
|
+
return this.http.put(environment.apiUrl + '/utilities/softphone/countrycode/alert/' + val, {}, httpOptions);
|
|
195
|
+
}
|
|
196
|
+
getToNumber(dialledNo, isoCode) {
|
|
197
|
+
const httpOptions = {
|
|
198
|
+
headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
|
|
199
|
+
params: new HttpParams().set('isoCode', isoCode)
|
|
200
|
+
};
|
|
201
|
+
const params = new HttpParams().set('isoCode', isoCode);
|
|
202
|
+
return this.http.get(environment.apiUrl + '/utilities/softphone/check/countryCode/' + dialledNo, httpOptions);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
TwilioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
206
|
+
TwilioService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, providedIn: 'root' });
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, decorators: [{
|
|
208
|
+
type: Injectable,
|
|
209
|
+
args: [{
|
|
210
|
+
providedIn: 'root'
|
|
211
|
+
}]
|
|
212
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
3
213
|
|
|
4
214
|
class DialboxComponent {
|
|
215
|
+
constructor(twilioService,
|
|
216
|
+
// private extService: ExtensionService,
|
|
217
|
+
// private dialog: MatDialog,
|
|
218
|
+
// private ipService: IpAddressService,
|
|
219
|
+
// private extensionService: ExtensionService,
|
|
220
|
+
router) {
|
|
221
|
+
this.twilioService = twilioService;
|
|
222
|
+
this.router = router;
|
|
223
|
+
this.isDialpadHidden = false;
|
|
224
|
+
this.closeDialpadEvent = new EventEmitter();
|
|
225
|
+
this.callInitiated = new EventEmitter();
|
|
226
|
+
this.endCallEvent = new EventEmitter();
|
|
227
|
+
this.minimiseEvent = new EventEmitter();
|
|
228
|
+
this.incomingCallsNewInfoEvent = new EventEmitter();
|
|
229
|
+
this.incomingCallInitiated = new EventEmitter();
|
|
230
|
+
this.numberDialed = new EventEmitter();
|
|
231
|
+
this.isCallInProgress = false;
|
|
232
|
+
this.keypadVal = keypad;
|
|
233
|
+
this.showInputClearBtn = false;
|
|
234
|
+
this.dialedNumber = '';
|
|
235
|
+
this.contactList = [];
|
|
236
|
+
this.filteredContactList = [];
|
|
237
|
+
this.callerIdList = [];
|
|
238
|
+
this.isCallerIdHidden = true;
|
|
239
|
+
this.isTrialPeriodOver = false;
|
|
240
|
+
this.isPaymentDue = false;
|
|
241
|
+
this.terminateCall = false;
|
|
242
|
+
this.toastTimeout = 7000;
|
|
243
|
+
this.callNumberToast = {
|
|
244
|
+
show: false,
|
|
245
|
+
type: 'alert-success',
|
|
246
|
+
number: '',
|
|
247
|
+
displayNum: ''
|
|
248
|
+
};
|
|
249
|
+
this.callData = {
|
|
250
|
+
phone: '',
|
|
251
|
+
displayNum: '',
|
|
252
|
+
dial: false,
|
|
253
|
+
name: '',
|
|
254
|
+
img: 'assets/images/user.jpg',
|
|
255
|
+
isIncomingCall: false,
|
|
256
|
+
extNum: ''
|
|
257
|
+
};
|
|
258
|
+
this.lastDialed = null;
|
|
259
|
+
this.dialAlert = {
|
|
260
|
+
msg: '',
|
|
261
|
+
show: false
|
|
262
|
+
};
|
|
263
|
+
this.token = '';
|
|
264
|
+
this.showDedicatedPopup = false;
|
|
265
|
+
this.newIncomingCalls = [];
|
|
266
|
+
this.incomingCallsList = [];
|
|
267
|
+
this.subscriptions = new Subscription();
|
|
268
|
+
this.shakeDedicatedBtn = false;
|
|
269
|
+
this.isSmartDialCall = false;
|
|
270
|
+
this.isMinimised = false;
|
|
271
|
+
}
|
|
272
|
+
ngOnInit() {
|
|
273
|
+
try {
|
|
274
|
+
this.token = localStorage.getItem('ext_token');
|
|
275
|
+
//this.isCallInProgress = true;
|
|
276
|
+
this.getContactList();
|
|
277
|
+
// this.getUserCallSetting();
|
|
278
|
+
const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact) => {
|
|
279
|
+
if (contact.number) {
|
|
280
|
+
this.isSmartDialCall = false;
|
|
281
|
+
if (contact.isDialFromHistory) {
|
|
282
|
+
//handle dialing from history page
|
|
283
|
+
if (contact.callerId == 'smartDialing') {
|
|
284
|
+
this.selectedCallerId = { number: contact.from };
|
|
285
|
+
this.isSmartDialCall = true;
|
|
286
|
+
setTimeout(() => {
|
|
287
|
+
this.isDialpadHidden = false;
|
|
288
|
+
}, 2000);
|
|
289
|
+
this.callData.phone = contact.number;
|
|
290
|
+
this.callData.name = contact.name;
|
|
291
|
+
this.callData.img = contact.img;
|
|
292
|
+
this.callData.from = contact.from;
|
|
293
|
+
this.sanitizedNum = contact.number;
|
|
294
|
+
// this.getUserInformation(contact);
|
|
295
|
+
// this.incomingCallsList.push(contact)
|
|
296
|
+
this.initiateCall();
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
// this.getUserCallSetting();
|
|
300
|
+
setTimeout(() => {
|
|
301
|
+
this.isDialpadHidden = false;
|
|
302
|
+
}, 1000);
|
|
303
|
+
// this.getUserInformation(contact);
|
|
304
|
+
// this.incomingCallsList.push(contact)
|
|
305
|
+
this.dialedNumber = contact.number;
|
|
306
|
+
this.sanitizedNum = contact.number;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
|
|
311
|
+
// this.getUserCallSetting();
|
|
312
|
+
setTimeout(() => {
|
|
313
|
+
this.isDialpadHidden = false;
|
|
314
|
+
}, 1000);
|
|
315
|
+
this.dialedNumber = contact.number;
|
|
316
|
+
this.sanitizedNum = contact.number;
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
setTimeout(() => {
|
|
320
|
+
this.isDialpadHidden = false;
|
|
321
|
+
}, 2000);
|
|
322
|
+
this.callData.phone = contact.number;
|
|
323
|
+
this.callData.name = contact.name;
|
|
324
|
+
this.callData.img = contact.img;
|
|
325
|
+
this.sanitizedNum = contact.number;
|
|
326
|
+
this.initiateCall();
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
// handle incoming call
|
|
332
|
+
const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
|
|
333
|
+
// if (incomingCallData) {
|
|
334
|
+
// this.isCallInProgress = true;
|
|
335
|
+
// this.isDialpadHidden = false;
|
|
336
|
+
// this.callData.phone = incomingCallData.parameters.From;
|
|
337
|
+
// this.callData.name = incomingCallData.customParameters.get('name');
|
|
338
|
+
// this.callData.img = incomingCallData.customParameters.get('image');
|
|
339
|
+
// this.callData.isIncomingCall = true;
|
|
340
|
+
// }
|
|
341
|
+
if (incomingCallData) {
|
|
342
|
+
if (this.isCallInProgress) {
|
|
343
|
+
this.newIncomingCalls.push(incomingCallData);
|
|
344
|
+
// this.getUserInformation(incomingCallData);
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
this.isCallInProgress = true;
|
|
348
|
+
this.isDialpadHidden = false;
|
|
349
|
+
this.callData.phone = incomingCallData.parameters['From'];
|
|
350
|
+
// this.getUserInformation(incomingCallData);
|
|
351
|
+
this.callData.name = incomingCallData.customParameters.get('name');
|
|
352
|
+
this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
|
|
353
|
+
this.callData.isIncomingCall = true;
|
|
354
|
+
}
|
|
355
|
+
incomingCallData.on('cancel', () => {
|
|
356
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
|
|
357
|
+
if (this.incomingCallsList.length == 0) {
|
|
358
|
+
this.isCallInProgress = false;
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
incomingCallData.on('disconnect', () => {
|
|
362
|
+
// this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
|
|
363
|
+
if (this.incomingCallsList.length == 0) {
|
|
364
|
+
this.isCallInProgress = false;
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
this.subscriptions.add(sub1);
|
|
370
|
+
this.subscriptions.add(sub2);
|
|
371
|
+
}
|
|
372
|
+
catch (e) {
|
|
373
|
+
console.log(e);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
// getUserInformation(incomingCallData: any) {
|
|
377
|
+
// let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
|
|
378
|
+
// this.extensionService.getUserInformation(data.twilioAuthId).subscribe(
|
|
379
|
+
// response => {
|
|
380
|
+
// incomingCallData['userInfo']=response
|
|
381
|
+
// this.incomingCallsList.push(incomingCallData);
|
|
382
|
+
// }, error => {
|
|
383
|
+
// console.error('Error starting recording', error);
|
|
384
|
+
// });
|
|
385
|
+
// }
|
|
386
|
+
fromEntries(entries) {
|
|
387
|
+
return entries.reduce((acc, [key, value]) => {
|
|
388
|
+
acc[key] = value;
|
|
389
|
+
return acc;
|
|
390
|
+
}, {});
|
|
391
|
+
}
|
|
392
|
+
ngAfterViewInit() {
|
|
393
|
+
this.registerDragElement();
|
|
394
|
+
}
|
|
395
|
+
ngOnChanges(changes) {
|
|
396
|
+
if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
|
|
397
|
+
this.getContactList();
|
|
398
|
+
// this.getUserCallSetting();
|
|
399
|
+
setTimeout(() => {
|
|
400
|
+
this.dialInputElement.nativeElement.focus();
|
|
401
|
+
}, 0);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
registerDragElement() {
|
|
405
|
+
try {
|
|
406
|
+
const elmnt = document.getElementById('dragparent1');
|
|
407
|
+
let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
|
|
408
|
+
const dragMouseDown = (e) => {
|
|
409
|
+
// If the target is an input, return and don't initiate dragging
|
|
410
|
+
if (e.target.tagName.toLowerCase() === 'input') {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
e = e || window.event;
|
|
414
|
+
// get the mouse cursor position at startup:
|
|
415
|
+
pos3 = e.clientX;
|
|
416
|
+
pos4 = e.clientY;
|
|
417
|
+
document.onmouseup = closeDragElement;
|
|
418
|
+
// call a function whenever the cursor moves:
|
|
419
|
+
document.onmousemove = elementDrag;
|
|
420
|
+
};
|
|
421
|
+
const elementDrag = (e) => {
|
|
422
|
+
e = e || window.event;
|
|
423
|
+
// calculate the new cursor position:
|
|
424
|
+
pos1 = pos3 - e.clientX;
|
|
425
|
+
pos2 = pos4 - e.clientY;
|
|
426
|
+
pos3 = e.clientX;
|
|
427
|
+
pos4 = e.clientY;
|
|
428
|
+
// set the element's new position:
|
|
429
|
+
// elmnt.style.top = elmnt.offsetTop - pos2 + 'px';
|
|
430
|
+
// elmnt.style.left = elmnt.offsetLeft - pos1 + 'px';
|
|
431
|
+
};
|
|
432
|
+
const closeDragElement = () => {
|
|
433
|
+
/* stop moving when mouse button is released:*/
|
|
434
|
+
document.onmouseup = null;
|
|
435
|
+
document.onmousemove = null;
|
|
436
|
+
};
|
|
437
|
+
// if (document.getElementById(elmnt.id + 'header')) {
|
|
438
|
+
// /* if present, the header is where you move the DIV from:*/
|
|
439
|
+
// document.getElementById(elmnt.id + 'header').onmousedown = dragMouseDown;
|
|
440
|
+
// } else {
|
|
441
|
+
// /* otherwise, move the DIV from anywhere inside the DIV:*/
|
|
442
|
+
// elmnt.onmousedown = dragMouseDown;
|
|
443
|
+
// }
|
|
444
|
+
}
|
|
445
|
+
catch (e) {
|
|
446
|
+
console.log(e);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
addNumber(num) {
|
|
450
|
+
if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
|
|
451
|
+
if (num == '#') {
|
|
452
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
|
|
453
|
+
}
|
|
454
|
+
else if (num == '*') {
|
|
455
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
|
|
459
|
+
}
|
|
460
|
+
this.dialedNumber += num;
|
|
461
|
+
this.showInputClearBtn = true;
|
|
462
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
463
|
+
this.onDialInputChange(this.dialedNumber);
|
|
464
|
+
// this.dialInputRef.nativeElement.focus();
|
|
465
|
+
}
|
|
466
|
+
else if (num === 'voicemail') {
|
|
467
|
+
// this.showDedicatedPopup = true;
|
|
468
|
+
this.router.navigate(['extension/voicemail/' + this.token]);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
hideDialpad() {
|
|
472
|
+
this.isDialpadHidden = true;
|
|
473
|
+
this.closeDialpadEvent.emit();
|
|
474
|
+
this.clearAllDialed();
|
|
475
|
+
this.filteredContactList = [];
|
|
476
|
+
}
|
|
477
|
+
onDialInputChange(inputVal) {
|
|
478
|
+
try {
|
|
479
|
+
// Updated regex to include x, X, ext., Ext., and ,
|
|
480
|
+
const isNumericInput = /^[\d\s+\-]+$/.test(inputVal);
|
|
481
|
+
let mainNumber = inputVal;
|
|
482
|
+
// Check for extension indicators and split the input
|
|
483
|
+
const extMatch = inputVal.match(/(x|X|ext\.|Ext\.|,)(.*)/);
|
|
484
|
+
if (extMatch) {
|
|
485
|
+
mainNumber = inputVal.substring(0, extMatch.index).trim();
|
|
486
|
+
this.callData.extNum = extMatch[2].trim();
|
|
487
|
+
}
|
|
488
|
+
this.sanitizedNum = isNumericInput ? mainNumber.replace(/[\s\-]+/g, '') : mainNumber;
|
|
489
|
+
this.callData.phone = isNumericInput ? this.sanitizedNum : '';
|
|
490
|
+
this.showInputClearBtn = inputVal.length > 0;
|
|
491
|
+
if (isNumericInput) {
|
|
492
|
+
this.dialedNumber = new AsYouType().input(this.sanitizedNum);
|
|
493
|
+
}
|
|
494
|
+
// emit current number whenever input changes
|
|
495
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
496
|
+
if (inputVal.length > 2) {
|
|
497
|
+
this.filteredContactList = this.contactList.filter(contact => {
|
|
498
|
+
const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
|
|
499
|
+
// return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some(num => num.number.includes(this.sanitizedNum));
|
|
500
|
+
}).slice(0, 2);
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
this.filteredContactList = [];
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
catch (e) {
|
|
507
|
+
console.log(e);
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
getFirstLetter(name) {
|
|
511
|
+
return name ? name.charAt(0).toUpperCase() : '';
|
|
512
|
+
}
|
|
513
|
+
clearInput() {
|
|
514
|
+
if (this.dialedNumber.length > 0) {
|
|
515
|
+
this.dialedNumber = this.dialedNumber.slice(0, -1);
|
|
516
|
+
this.showInputClearBtn = this.dialedNumber.length !== 0;
|
|
517
|
+
this.onDialInputChange(this.dialedNumber);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
clearAllDialed() {
|
|
521
|
+
this.dialedNumber = '';
|
|
522
|
+
this.sanitizedNum = '';
|
|
523
|
+
this.showInputClearBtn = false;
|
|
524
|
+
}
|
|
525
|
+
// getCallerIdList() {
|
|
526
|
+
// this.extService.displayID(this.token).subscribe((res: any) => {
|
|
527
|
+
// //this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
|
|
528
|
+
// this.callerIdList = res.callerIdList.filter(item => item.voiceFeature === true);
|
|
529
|
+
// // this.callerIdList = res.callerIdList;
|
|
530
|
+
// if (this.callerIdList.length == 1) {
|
|
531
|
+
// this.selectedCallerId = this.callerIdList[0];
|
|
532
|
+
// } else {
|
|
533
|
+
// if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
|
|
534
|
+
// this.selectedCallerId = null;
|
|
535
|
+
// } else {
|
|
536
|
+
// this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
|
|
537
|
+
// }
|
|
538
|
+
// }
|
|
539
|
+
// });
|
|
540
|
+
// }
|
|
541
|
+
getContactList() {
|
|
542
|
+
this.twilioService.getContactList().subscribe((resp) => {
|
|
543
|
+
if (resp.response == 'Success') {
|
|
544
|
+
this.contactList = resp.phoneBook;
|
|
545
|
+
}
|
|
546
|
+
}, err => {
|
|
547
|
+
console.log(err);
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
getFullName(contact) {
|
|
551
|
+
let fullName = contact.firstName || '';
|
|
552
|
+
if (contact.middleName) {
|
|
553
|
+
fullName += ` ${contact.middleName}`;
|
|
554
|
+
}
|
|
555
|
+
if (contact.lastName) {
|
|
556
|
+
fullName += ` ${contact.lastName}`;
|
|
557
|
+
}
|
|
558
|
+
return fullName.trim();
|
|
559
|
+
}
|
|
560
|
+
toggleCallerIdDiv() {
|
|
561
|
+
this.isCallerIdHidden = !this.isCallerIdHidden;
|
|
562
|
+
}
|
|
563
|
+
onContactSelect(contact) {
|
|
564
|
+
this.dialedNumber = contact.numbersList[0].number;
|
|
565
|
+
this.callData.name = this.getFullName(contact);
|
|
566
|
+
this.callData.img = contact.image || 'assets/images/user.jpg';
|
|
567
|
+
this.onDialInputChange(this.dialedNumber);
|
|
568
|
+
this.filteredContactList = [];
|
|
569
|
+
}
|
|
570
|
+
endCall() {
|
|
571
|
+
try {
|
|
572
|
+
console.log('Ending call');
|
|
573
|
+
this.isCallInProgress = false;
|
|
574
|
+
this.filteredContactList = [];
|
|
575
|
+
// Reset call data
|
|
576
|
+
this.callData = {
|
|
577
|
+
phone: '',
|
|
578
|
+
name: '',
|
|
579
|
+
img: 'assets/images/user.jpg',
|
|
580
|
+
isIncomingCall: false,
|
|
581
|
+
dial: false,
|
|
582
|
+
displayNum: '',
|
|
583
|
+
extNum: ''
|
|
584
|
+
};
|
|
585
|
+
// Reset dialed number
|
|
586
|
+
this.dialedNumber = '';
|
|
587
|
+
this.sanitizedNum = '';
|
|
588
|
+
// Emit end call event
|
|
589
|
+
this.endCallEvent.emit();
|
|
590
|
+
console.log('Call ended successfully');
|
|
591
|
+
}
|
|
592
|
+
catch (error) {
|
|
593
|
+
console.error('Error in endCall:', error);
|
|
594
|
+
// Even if there's an error, try to reset the state
|
|
595
|
+
this.isCallInProgress = false;
|
|
596
|
+
this.callData = {
|
|
597
|
+
phone: '',
|
|
598
|
+
name: '',
|
|
599
|
+
img: 'assets/images/user.jpg',
|
|
600
|
+
isIncomingCall: false,
|
|
601
|
+
dial: false,
|
|
602
|
+
displayNum: '',
|
|
603
|
+
extNum: ''
|
|
604
|
+
};
|
|
605
|
+
this.endCallEvent.emit();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
// async initiateCall() {
|
|
609
|
+
// try {
|
|
610
|
+
// console.log('Initiating call with number:', this.dialedNumber);
|
|
611
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
612
|
+
// console.log('Using last dialed number:', this.lastDialed.number);
|
|
613
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
614
|
+
// }
|
|
615
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
616
|
+
// if (isInvalid) {
|
|
617
|
+
// console.error('Invalid number format');
|
|
618
|
+
// return false;
|
|
619
|
+
// }
|
|
620
|
+
// this.saveLastDialed();
|
|
621
|
+
// this.isSavedContactDialled();
|
|
622
|
+
// // Check payment status
|
|
623
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') === 'true';
|
|
624
|
+
// if (this.isPaymentDue) {
|
|
625
|
+
// console.warn('Payment is due');
|
|
626
|
+
// swal('Warning', 'Please note that your payment is due. To continue using our services, kindly subscribe to avoid interruptions.');
|
|
627
|
+
// return false;
|
|
628
|
+
// }
|
|
629
|
+
// // Check if dialing own number
|
|
630
|
+
// if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
|
|
631
|
+
// console.error('Attempted to dial own number');
|
|
632
|
+
// swal('Error', 'You cannot dial your own number');
|
|
633
|
+
// return false;
|
|
634
|
+
// }
|
|
635
|
+
// // Check microphone permissions
|
|
636
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
637
|
+
// if (!hasPermission) {
|
|
638
|
+
// console.warn('Microphone permission not granted');
|
|
639
|
+
// await this.askForMicrophonePermission();
|
|
640
|
+
// return false;
|
|
641
|
+
// }
|
|
642
|
+
// if (!this.selectedCallerId) {
|
|
643
|
+
// console.error('No caller ID selected');
|
|
644
|
+
// this.shakeDedicatedBtn = true;
|
|
645
|
+
// this.showDialAlert('Please select a C2C number to call from');
|
|
646
|
+
// setTimeout(() => {
|
|
647
|
+
// this.shakeDedicatedBtn = false;
|
|
648
|
+
// }, 3000);
|
|
649
|
+
// return false;
|
|
650
|
+
// }
|
|
651
|
+
// console.log('Getting number with country code...');
|
|
652
|
+
// this.callData.displayNum = '';
|
|
653
|
+
// try {
|
|
654
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
655
|
+
// } catch (error) {
|
|
656
|
+
// console.error('Error getting number with country code:', error);
|
|
657
|
+
// this.showDialAlert('Error processing number. Please try again.');
|
|
658
|
+
// return false;
|
|
659
|
+
// }
|
|
660
|
+
// if (this.terminateCall) {
|
|
661
|
+
// console.log('Call terminated by user');
|
|
662
|
+
// this.terminateCall = false;
|
|
663
|
+
// return false;
|
|
664
|
+
// }
|
|
665
|
+
// // Prepare call data
|
|
666
|
+
// this.callData = {
|
|
667
|
+
// ...this.callData,
|
|
668
|
+
// phone: this.sanitizedNum,
|
|
669
|
+
// isIncomingCall: false,
|
|
670
|
+
// dial: true,
|
|
671
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
672
|
+
// timestamp: new Date().toISOString()
|
|
673
|
+
// };
|
|
674
|
+
// console.log('Initiating call with data:', this.callData);
|
|
675
|
+
// this.isCallInProgress = true;
|
|
676
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
677
|
+
// return true;
|
|
678
|
+
// } catch (error) {
|
|
679
|
+
// console.error('Error in initiateCall:', error);
|
|
680
|
+
// this.showDialAlert('Failed to initiate call. Please try again.');
|
|
681
|
+
// this.isCallInProgress = false;
|
|
682
|
+
// return false;
|
|
683
|
+
// }
|
|
684
|
+
// //this.clearAllDialed();
|
|
685
|
+
// // } else {
|
|
686
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
687
|
+
// // }
|
|
688
|
+
// }
|
|
689
|
+
// async initiateCall() {
|
|
690
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
691
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
692
|
+
// }
|
|
693
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
694
|
+
// if (isInvalid) {
|
|
695
|
+
// return false;
|
|
696
|
+
// }
|
|
697
|
+
// this.saveLastDialed();
|
|
698
|
+
// this.isSavedContactDialled();
|
|
699
|
+
// //let isCallerIdSet = await this.isCallerIdSet();
|
|
700
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
|
|
701
|
+
// if (this.isPaymentDue) {
|
|
702
|
+
// swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
703
|
+
// return;
|
|
704
|
+
// }
|
|
705
|
+
// this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
|
|
706
|
+
// // if (!this.isTrialPeriodOver) {
|
|
707
|
+
// if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
|
|
708
|
+
// swal('Error', 'You can not dial this number');
|
|
709
|
+
// return;
|
|
710
|
+
// }
|
|
711
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
712
|
+
// if (hasPermission) {
|
|
713
|
+
// if (this.selectedCallerId) {
|
|
714
|
+
// //clear displayNum if value is binded from previous call
|
|
715
|
+
// this.callData.displayNum = '';
|
|
716
|
+
// // get number to be dialled from backend
|
|
717
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
718
|
+
// if (this.terminateCall) {
|
|
719
|
+
// this.terminateCall = false;
|
|
720
|
+
// return;
|
|
721
|
+
// }
|
|
722
|
+
// this.callData.phone = this.sanitizedNum;
|
|
723
|
+
// this.callData.isIncomingCall = false;
|
|
724
|
+
// this.callData.dial = true;
|
|
725
|
+
// if (!this.isSmartDialCall) {
|
|
726
|
+
// this.callData.from = this.selectedCallerId.number;
|
|
727
|
+
// }
|
|
728
|
+
// this.isCallInProgress = true;
|
|
729
|
+
// this.callData = {
|
|
730
|
+
// ...this.callData,
|
|
731
|
+
// phone: this.sanitizedNum,
|
|
732
|
+
// isIncomingCall: false,
|
|
733
|
+
// dial: true,
|
|
734
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
735
|
+
// timestamp: new Date().toISOString()
|
|
736
|
+
// };
|
|
737
|
+
// console.log('Initiating call with data:', this.callData);
|
|
738
|
+
// this.isCallInProgress = true;
|
|
739
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
740
|
+
// return true;
|
|
741
|
+
// } else {
|
|
742
|
+
// this.shakeDedicatedBtn = true;
|
|
743
|
+
// this.showDialAlert('Select a C2C number to call');
|
|
744
|
+
// setTimeout(() => {
|
|
745
|
+
// this.shakeDedicatedBtn = false;
|
|
746
|
+
// }, 3000);
|
|
747
|
+
// return false;
|
|
748
|
+
// }
|
|
749
|
+
// //this.callingOpenEvent.emit({ phone: this.dialedNumber });
|
|
750
|
+
// } else {
|
|
751
|
+
// await this.askForMicrophonePermission();
|
|
752
|
+
// }
|
|
753
|
+
// //this.clearAllDialed();
|
|
754
|
+
// // } else {
|
|
755
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
756
|
+
// // }
|
|
757
|
+
// }
|
|
758
|
+
// async initiateCall() {
|
|
759
|
+
// try{
|
|
760
|
+
// if (!this.dialedNumber && this.lastDialed) {
|
|
761
|
+
// this.sanitizedNum = this.lastDialed.number;
|
|
762
|
+
// }
|
|
763
|
+
// const isInvalid = await this.isInvalidNumber();
|
|
764
|
+
// if (isInvalid) {
|
|
765
|
+
// return false;
|
|
766
|
+
// }
|
|
767
|
+
// this.saveLastDialed();
|
|
768
|
+
// this.isSavedContactDialled();
|
|
769
|
+
// //let isCallerIdSet = await this.isCallerIdSet();
|
|
770
|
+
// this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
|
|
771
|
+
// if (this.isPaymentDue) {
|
|
772
|
+
// swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
773
|
+
// return false;
|
|
774
|
+
// }
|
|
775
|
+
// this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
|
|
776
|
+
// // if (!this.isTrialPeriodOver) {
|
|
777
|
+
// if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
|
|
778
|
+
// swal('Error', 'You can not dial this number');
|
|
779
|
+
// return false;
|
|
780
|
+
// }
|
|
781
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
782
|
+
// if (hasPermission) {
|
|
783
|
+
// if (this.selectedCallerId) {
|
|
784
|
+
// //clear displayNum if value is binded from previous call
|
|
785
|
+
// this.callData.displayNum = '';
|
|
786
|
+
// // get number to be dialled from backend
|
|
787
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
788
|
+
// if (this.terminateCall) {
|
|
789
|
+
// this.terminateCall = false;
|
|
790
|
+
// return;
|
|
791
|
+
// }
|
|
792
|
+
// this.callData.phone = this.sanitizedNum;
|
|
793
|
+
// this.callData.isIncomingCall = false;
|
|
794
|
+
// this.callData.dial = true;
|
|
795
|
+
// if (!this.isSmartDialCall) {
|
|
796
|
+
// this.callData.from = this.selectedCallerId.number;
|
|
797
|
+
// }
|
|
798
|
+
// this.isCallInProgress = true;
|
|
799
|
+
// this.callData = {
|
|
800
|
+
// ...this.callData,
|
|
801
|
+
// phone: this.sanitizedNum,
|
|
802
|
+
// isIncomingCall: false,
|
|
803
|
+
// dial: true,
|
|
804
|
+
// from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
805
|
+
// timestamp: new Date().toISOString()
|
|
806
|
+
// };
|
|
807
|
+
// console.log('Initiating call with data:', this.callData);
|
|
808
|
+
// this.isCallInProgress = true;
|
|
809
|
+
// this.callInitiated.emit({ ...this.callData });
|
|
810
|
+
// return true;
|
|
811
|
+
// } else {
|
|
812
|
+
// this.shakeDedicatedBtn = true;
|
|
813
|
+
// this.showDialAlert('Select a C2C number to call');
|
|
814
|
+
// setTimeout(() => {
|
|
815
|
+
// this.shakeDedicatedBtn = false;
|
|
816
|
+
// }, 3000);
|
|
817
|
+
// return false;
|
|
818
|
+
// }
|
|
819
|
+
// //this.callingOpenEvent.emit({ phone: this.dialedNumber });
|
|
820
|
+
// } else {
|
|
821
|
+
// await this.askForMicrophonePermission();
|
|
822
|
+
// }
|
|
823
|
+
// //this.clearAllDialed();
|
|
824
|
+
// // } else {
|
|
825
|
+
// // swal('Error', 'Trial period is over. Please setup payment method to continue services')
|
|
826
|
+
// // }
|
|
827
|
+
// }catch(e){
|
|
828
|
+
// console.error('Error in initiateCall:', e);
|
|
829
|
+
// this.showDialAlert('Failed to initiate call. Please try again.');
|
|
830
|
+
// this.isCallInProgress = false;
|
|
831
|
+
// return false;
|
|
832
|
+
// }
|
|
833
|
+
// }
|
|
834
|
+
async initiateCall() {
|
|
835
|
+
try {
|
|
836
|
+
if (!this.dialedNumber && this.lastDialed) {
|
|
837
|
+
this.sanitizedNum = this.lastDialed.number;
|
|
838
|
+
}
|
|
839
|
+
const isInvalid = await this.isInvalidNumber();
|
|
840
|
+
if (isInvalid) {
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
843
|
+
// this.saveLastDialed();
|
|
844
|
+
this.isSavedContactDialled();
|
|
845
|
+
this.isPaymentDue = localStorage.getItem('paymentDue') === 'false' ? false : true;
|
|
846
|
+
if (this.isPaymentDue) {
|
|
847
|
+
// swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
850
|
+
this.isTrialPeriodOver = localStorage.getItem('trialOver') === 'false' ? false : true;
|
|
851
|
+
if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
|
|
852
|
+
// swal('Error', 'You can not dial this number');
|
|
853
|
+
return false;
|
|
854
|
+
}
|
|
855
|
+
// const hasPermission = await this.checkMicrophonePermission();
|
|
856
|
+
// if (!hasPermission) {
|
|
857
|
+
// await this.askForMicrophonePermission();
|
|
858
|
+
// return false;
|
|
859
|
+
// }
|
|
860
|
+
if (!this.selectedCallerId) {
|
|
861
|
+
this.shakeDedicatedBtn = true;
|
|
862
|
+
this.showDialAlert('Select a C2C number to call');
|
|
863
|
+
setTimeout(() => {
|
|
864
|
+
this.shakeDedicatedBtn = false;
|
|
865
|
+
}, 3000);
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
// Clear displayNum if value is bound from previous call
|
|
869
|
+
this.callData.displayNum = '';
|
|
870
|
+
// Get number to be dialed from backend
|
|
871
|
+
// await this.getToNumber(this.sanitizedNum);
|
|
872
|
+
if (this.terminateCall) {
|
|
873
|
+
this.terminateCall = false;
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
// Update call data in a single operation
|
|
877
|
+
this.callData = {
|
|
878
|
+
...this.callData,
|
|
879
|
+
phone: this.sanitizedNum,
|
|
880
|
+
isIncomingCall: false,
|
|
881
|
+
dial: true,
|
|
882
|
+
from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
|
|
883
|
+
timestamp: new Date().toISOString()
|
|
884
|
+
};
|
|
885
|
+
console.log('Initiating call with data:', this.callData);
|
|
886
|
+
this.isCallInProgress = true;
|
|
887
|
+
this.callInitiated.emit({ ...this.callData });
|
|
888
|
+
return true;
|
|
889
|
+
}
|
|
890
|
+
catch (e) {
|
|
891
|
+
console.error('Error in initiateCall:', e);
|
|
892
|
+
this.showDialAlert('Failed to initiate call. Please try again.');
|
|
893
|
+
this.isCallInProgress = false;
|
|
894
|
+
return false;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
async isInvalidNumber() {
|
|
898
|
+
try {
|
|
899
|
+
if (this.sanitizedNum == '') {
|
|
900
|
+
this.showDialAlert('Invalid Number');
|
|
901
|
+
return true;
|
|
902
|
+
}
|
|
903
|
+
const validNumberPattern = /^[+\d\s()-]*$/; // Regular expression to match valid characters
|
|
904
|
+
const phoneNumber = this.sanitizedNum;
|
|
905
|
+
if (!validNumberPattern.test(phoneNumber)) {
|
|
906
|
+
this.showDialAlert('Invalid Number');
|
|
907
|
+
return true;
|
|
908
|
+
}
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
catch (error) {
|
|
912
|
+
this.showDialAlert('Invalid Number');
|
|
913
|
+
return true; // Return true if an error occurred, meaning the number is invalid
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
// saveLastDialed() {
|
|
917
|
+
// const contact = this.filteredContactList.find(c => c.numbersList.some(n => n.number === this.dialedNumber));
|
|
918
|
+
// if (contact) {
|
|
919
|
+
// this.lastDialed = {
|
|
920
|
+
// name: contact.name,
|
|
921
|
+
// image: contact.image,
|
|
922
|
+
// number: this.dialedNumber
|
|
923
|
+
// };
|
|
924
|
+
// } else {
|
|
925
|
+
// if(this.dialedNumber){
|
|
926
|
+
// this.lastDialed = { number: this.dialedNumber };
|
|
927
|
+
// }
|
|
928
|
+
// }
|
|
929
|
+
// }
|
|
930
|
+
isSavedContactDialled() {
|
|
931
|
+
let phoneNum = this.sanitizedNum.replace(/\s+/g, '');
|
|
932
|
+
let contact = this.contactList.filter(contact => {
|
|
933
|
+
// return contact.numbersList.some(num => num.number === phoneNum)
|
|
934
|
+
});
|
|
935
|
+
if (contact.length) {
|
|
936
|
+
this.callData.name = `${contact[0].firstName} ${contact[0].middleName} ${contact[0].lastName}`.toLowerCase();
|
|
937
|
+
this.callData.img = contact[0].image || 'assets/images/user.jpg';
|
|
938
|
+
this.callData.phone = this.sanitizedNum;
|
|
939
|
+
return true;
|
|
940
|
+
}
|
|
941
|
+
return false;
|
|
942
|
+
}
|
|
943
|
+
showDialAlert(message) {
|
|
944
|
+
this.dialAlert = {
|
|
945
|
+
msg: message,
|
|
946
|
+
show: true
|
|
947
|
+
};
|
|
948
|
+
setTimeout(() => {
|
|
949
|
+
this.dialAlert.show = false;
|
|
950
|
+
}, 3000);
|
|
951
|
+
}
|
|
952
|
+
// async isCallerIdSet(): Promise<boolean> {
|
|
953
|
+
// try {
|
|
954
|
+
// const tkn = localStorage.getItem('ext_token');
|
|
955
|
+
// const res: any = await this.extService.fetchCallerId(tkn).toPromise();
|
|
956
|
+
// if (res.status == 200) {
|
|
957
|
+
// localStorage.setItem('trialOver', res.trialOver);
|
|
958
|
+
// this.twilioService.isTrialOver.next(res.trialOver);
|
|
959
|
+
// localStorage.setItem('paymentDue', res.paymentDue);
|
|
960
|
+
// this.twilioService.isPaymentDue.next(res.paymentDue);
|
|
961
|
+
// }
|
|
962
|
+
// if (res.callerid) {
|
|
963
|
+
// localStorage.setItem('callerID', res.callerid);
|
|
964
|
+
// this.extService.changeMessage(res.callerid);
|
|
965
|
+
// } else {
|
|
966
|
+
// localStorage.setItem('callerID', 'Not set');
|
|
967
|
+
// this.extService.changeMessage('Not set');
|
|
968
|
+
// }
|
|
969
|
+
// return (localStorage.getItem('callerID') !== 'Not set');
|
|
970
|
+
// } catch (e) {
|
|
971
|
+
// console.log(e);
|
|
972
|
+
// return false;
|
|
973
|
+
// }
|
|
974
|
+
// }
|
|
975
|
+
// async checkMicrophonePermission(): Promise<boolean> {
|
|
976
|
+
// try {
|
|
977
|
+
// const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
978
|
+
// stream.getTracks().forEach(track => track.stop());
|
|
979
|
+
// return true;
|
|
980
|
+
// } catch (error) {
|
|
981
|
+
// if (error.name === 'NotAllowedError') {
|
|
982
|
+
// return false;
|
|
983
|
+
// } else {
|
|
984
|
+
// return false;
|
|
985
|
+
// }
|
|
986
|
+
// }
|
|
987
|
+
// }
|
|
988
|
+
async askForMicrophonePermission() {
|
|
989
|
+
try {
|
|
990
|
+
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
991
|
+
stream.getTracks().forEach(track => track.stop());
|
|
992
|
+
}
|
|
993
|
+
catch (error) {
|
|
994
|
+
console.error('User denied microphone permission:', error);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
// below function is to get the country code with number from server
|
|
998
|
+
// async getToNumber(dialedNumber: string) {
|
|
999
|
+
// if (dialedNumber[0] !== '+') {
|
|
1000
|
+
// // this is case when user geolocation dial code is on
|
|
1001
|
+
// let ipAddress: any = await this.ipService.getIpAddressInfo().toPromise();
|
|
1002
|
+
// const res: any = await this.twilioService.getToNumber(dialedNumber,ipAddress.address.countryCode).toPromise();
|
|
1003
|
+
// if (res.status == 200) {
|
|
1004
|
+
// this.toastTimeout = res.timeInterval * 1000;
|
|
1005
|
+
// await this.showNumberToast(res);
|
|
1006
|
+
// }
|
|
1007
|
+
// }
|
|
1008
|
+
// }
|
|
1009
|
+
isAlertEnable() {
|
|
1010
|
+
return localStorage.getItem('isAlertEnable');
|
|
1011
|
+
}
|
|
1012
|
+
async showNumberToast(data) {
|
|
1013
|
+
const isAlertOn = (localStorage.getItem('isCountryCodeToastOn'));
|
|
1014
|
+
if (isAlertOn == 'true') {
|
|
1015
|
+
this.callNumberToast.show = true;
|
|
1016
|
+
this.callNumberToast.number = data.toNumber;
|
|
1017
|
+
this.callNumberToast.displayNum = data.displayNumber;
|
|
1018
|
+
}
|
|
1019
|
+
this.callData.displayNum = data.displayNumber;
|
|
1020
|
+
//this.callData.phone = data.toNumber;
|
|
1021
|
+
await this.delay(this.toastTimeout);
|
|
1022
|
+
this.dialedNumber = data.toNumber;
|
|
1023
|
+
this.sanitizedNum = data.toNumber;
|
|
1024
|
+
this.callNumberToast.show = false;
|
|
1025
|
+
this.callNumberToast.number = '';
|
|
1026
|
+
this.callNumberToast.displayNum = '';
|
|
1027
|
+
}
|
|
1028
|
+
delay(ms) {
|
|
1029
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
1030
|
+
}
|
|
1031
|
+
onMinimise(isMinimised) {
|
|
1032
|
+
this.isMinimised = isMinimised;
|
|
1033
|
+
this.minimiseEvent.emit(isMinimised);
|
|
1034
|
+
}
|
|
1035
|
+
handleNumberPaste(event) {
|
|
1036
|
+
event.preventDefault();
|
|
1037
|
+
const clipboardData = event.clipboardData || window.clipboardData;
|
|
1038
|
+
const pastedData = clipboardData.getData('text');
|
|
1039
|
+
// Log the pasted content to the console
|
|
1040
|
+
if (pastedData) {
|
|
1041
|
+
this.dialedNumber = pastedData;
|
|
1042
|
+
this.sanitizedNum = pastedData;
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
onEnter(num) {
|
|
1046
|
+
console.log(num, 'number fn');
|
|
1047
|
+
this.dialedNumber = this.dialedNumber + num;
|
|
1048
|
+
this.sanitizedNum = this.dialedNumber;
|
|
1049
|
+
this.showInputClearBtn = true;
|
|
1050
|
+
this.numberDialed.emit(this.dialedNumber);
|
|
1051
|
+
}
|
|
1052
|
+
// getUserCallSetting() {
|
|
1053
|
+
// const tkn = localStorage.getItem('ext_token');
|
|
1054
|
+
// this.extService.fetchCallerId(tkn).subscribe((resp: any) => {
|
|
1055
|
+
// if (resp.status == 200) {
|
|
1056
|
+
// //this.callPrefernce = resp.userSetting;
|
|
1057
|
+
// this.callPreference = resp.callerid;
|
|
1058
|
+
// this.getCallerIdList();
|
|
1059
|
+
// }
|
|
1060
|
+
// })
|
|
1061
|
+
// }
|
|
1062
|
+
// onDedicatedNumSelect(id: any) {
|
|
1063
|
+
// this.selectedCallerId = id;
|
|
1064
|
+
// this.isCallerIdHidden = true;
|
|
1065
|
+
// this.extService.setCallerId(id);
|
|
1066
|
+
// }
|
|
1067
|
+
cancelDialNumber() {
|
|
1068
|
+
this.terminateCall = true;
|
|
1069
|
+
this.callNumberToast.show = false;
|
|
1070
|
+
}
|
|
1071
|
+
handleDivKeydown(ev) {
|
|
1072
|
+
if (this.dialedNumber.length == 0) {
|
|
1073
|
+
this.dialInputElement.nativeElement.focus();
|
|
1074
|
+
}
|
|
1075
|
+
if (ev.key === 'Enter') {
|
|
1076
|
+
// Check if the dialpad is open
|
|
1077
|
+
if (!this.isDialpadHidden) {
|
|
1078
|
+
if (this.dialedNumber.length > 2 && this.selectedCallerId) {
|
|
1079
|
+
this.initiateCall();
|
|
1080
|
+
}
|
|
1081
|
+
if (!this.selectedCallerId) {
|
|
1082
|
+
this.shakeDedicatedBtn = true;
|
|
1083
|
+
setTimeout(() => {
|
|
1084
|
+
this.shakeDedicatedBtn = false;
|
|
1085
|
+
}, 10000);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
onCallBtnMouseEnter(ev) {
|
|
1091
|
+
if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
|
|
1092
|
+
this.shakeDedicatedBtn = true;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
onCallBtnMouseLeave(ev) {
|
|
1096
|
+
if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
|
|
1097
|
+
this.shakeDedicatedBtn = false;
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
acceptNewIncomingCall(call) {
|
|
1101
|
+
//first cut the current call
|
|
1102
|
+
//this.callData = call;
|
|
1103
|
+
this.newIncomingCallData = call;
|
|
1104
|
+
}
|
|
1105
|
+
// rejectNewIncomingCall(call: Call) {
|
|
1106
|
+
// call.reject();
|
|
1107
|
+
// this.newIncomingCalls = this.newIncomingCalls.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
|
|
1108
|
+
// this.incomingCallsList = this.incomingCallsList.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
|
|
1109
|
+
// }
|
|
1110
|
+
newIncomingCallInitiated() {
|
|
1111
|
+
this.isCallInProgress = true;
|
|
1112
|
+
this.newIncomingCalls = [];
|
|
1113
|
+
this.incomingCallInitiated.emit();
|
|
1114
|
+
}
|
|
1115
|
+
incomingCallsNewInfo(data) {
|
|
1116
|
+
this.incomingCallsList = data;
|
|
1117
|
+
this.incomingCallsNewInfoEvent.emit(data);
|
|
1118
|
+
}
|
|
1119
|
+
ngOnDestroy() {
|
|
1120
|
+
try {
|
|
1121
|
+
console.log('Cleaning up C2cDialpadComponent');
|
|
1122
|
+
// Unsubscribe from all subscriptions
|
|
1123
|
+
if (this.subscriptions) {
|
|
1124
|
+
this.subscriptions.unsubscribe();
|
|
1125
|
+
}
|
|
1126
|
+
// End any active call
|
|
1127
|
+
if (this.isCallInProgress) {
|
|
1128
|
+
this.endCall();
|
|
1129
|
+
}
|
|
1130
|
+
// Clear any timeouts or intervals if they exist
|
|
1131
|
+
if (this.toastTimeout) {
|
|
1132
|
+
clearTimeout(this.toastTimeout);
|
|
1133
|
+
}
|
|
1134
|
+
console.log('C2cDialpadComponent cleanup complete');
|
|
1135
|
+
}
|
|
1136
|
+
catch (error) {
|
|
1137
|
+
console.error('Error during component cleanup:', error);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
5
1140
|
}
|
|
6
|
-
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
-
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", ngImport: i0, template: `
|
|
8
|
-
<div style="padding: 20px; border: 1px solid #ccc; border-radius: 4px;">
|
|
9
|
-
<h3>Dialbox Component</h3>
|
|
10
|
-
<p>
|
|
11
|
-
Dialbox is working!
|
|
12
|
-
</p>
|
|
13
|
-
</div>
|
|
14
|
-
`, isInline: true, styles: [":host{display:block}\n"] });
|
|
1141
|
+
DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [{ token: TwilioService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
1142
|
+
DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { isDialpadHidden: "isDialpadHidden" }, outputs: { closeDialpadEvent: "closeDialpadEvent", callInitiated: "callInitiated", endCallEvent: "endCallEvent", minimiseEvent: "minimiseEvent", incomingCallsNewInfoEvent: "incomingCallsNewInfoEvent", incomingCallInitiated: "incomingCallInitiated", numberDialed: "numberDialed" }, viewQueries: [{ propertyName: "dialInputElement", first: true, predicate: ["dialInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : ' '}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <!-- <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li> -->\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <!-- <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n ", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px;height:600px;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
15
1143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
|
|
16
1144
|
type: Component,
|
|
17
|
-
args: [{ selector: 'lib-dialbox', template: `
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1145
|
+
args: [{ selector: 'lib-dialbox', template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : ' '}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <!-- <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li> -->\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <!-- <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n ", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px;height:600px;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"] }]
|
|
1146
|
+
}], ctorParameters: function () { return [{ type: TwilioService }, { type: i2.Router }]; }, propDecorators: { isDialpadHidden: [{
|
|
1147
|
+
type: Input
|
|
1148
|
+
}], closeDialpadEvent: [{
|
|
1149
|
+
type: Output
|
|
1150
|
+
}], callInitiated: [{
|
|
1151
|
+
type: Output
|
|
1152
|
+
}], endCallEvent: [{
|
|
1153
|
+
type: Output
|
|
1154
|
+
}], minimiseEvent: [{
|
|
1155
|
+
type: Output
|
|
1156
|
+
}], incomingCallsNewInfoEvent: [{
|
|
1157
|
+
type: Output
|
|
1158
|
+
}], incomingCallInitiated: [{
|
|
1159
|
+
type: Output
|
|
1160
|
+
}], dialInputElement: [{
|
|
1161
|
+
type: ViewChild,
|
|
1162
|
+
args: ['dialInput']
|
|
1163
|
+
}], numberDialed: [{
|
|
1164
|
+
type: Output
|
|
1165
|
+
}] } });
|
|
26
1166
|
|
|
27
1167
|
class DialboxModule {
|
|
28
1168
|
}
|
|
29
1169
|
DialboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
30
|
-
DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, declarations: [DialboxComponent],
|
|
31
|
-
|
|
1170
|
+
DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, declarations: [DialboxComponent], imports: [CommonModule,
|
|
1171
|
+
FormsModule,
|
|
1172
|
+
ReactiveFormsModule,
|
|
1173
|
+
HttpClientModule,
|
|
1174
|
+
RouterLink], exports: [DialboxComponent] });
|
|
1175
|
+
DialboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, imports: [CommonModule,
|
|
1176
|
+
FormsModule,
|
|
1177
|
+
ReactiveFormsModule,
|
|
1178
|
+
HttpClientModule] });
|
|
32
1179
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, decorators: [{
|
|
33
1180
|
type: NgModule,
|
|
34
1181
|
args: [{
|
|
35
1182
|
declarations: [
|
|
36
|
-
DialboxComponent
|
|
1183
|
+
DialboxComponent,
|
|
1184
|
+
],
|
|
1185
|
+
imports: [
|
|
1186
|
+
CommonModule,
|
|
1187
|
+
FormsModule,
|
|
1188
|
+
ReactiveFormsModule,
|
|
1189
|
+
HttpClientModule,
|
|
1190
|
+
RouterLink,
|
|
37
1191
|
],
|
|
38
|
-
imports: [],
|
|
39
1192
|
exports: [
|
|
40
|
-
DialboxComponent
|
|
1193
|
+
DialboxComponent,
|
|
41
1194
|
]
|
|
42
1195
|
}]
|
|
43
1196
|
}] });
|
|
44
1197
|
|
|
45
1198
|
/*
|
|
46
1199
|
* Public API Surface of dialbox
|
|
47
|
-
*/
|
|
1200
|
+
*/
|
|
1201
|
+
// Components
|
|
1202
|
+
// export * from './lib/components/dialpad/dialpad.component';
|
|
1203
|
+
// export * from './lib/components/dial-button/dial-button.component';
|
|
1204
|
+
// // Services
|
|
1205
|
+
// export * from './lib/components/services/dialer.service';
|
|
1206
|
+
// export * from './lib/components/services/call-handler.service';
|
|
1207
|
+
// // Models
|
|
1208
|
+
// export * from './lib/components/models/call.interface';
|
|
1209
|
+
// export * from './lib/components/models/dialer-options.interface';
|
|
1210
|
+
// // Utils
|
|
1211
|
+
// export * from './lib/components/utils/phone-validator.util';
|
|
1212
|
+
// export * from './lib/components/utils/format-phone.util';
|
|
1213
|
+
// // Module
|
|
1214
|
+
// export * from './lib/dialbox.module';
|
|
48
1215
|
|
|
49
1216
|
/**
|
|
50
1217
|
* Generated bundle index. Do not edit.
|