@vgroup/dialbox 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,50 +1,2432 @@
1
+ import { __awaiter } from 'tslib';
1
2
  import * as i0 from '@angular/core';
2
- import { Component, NgModule } from '@angular/core';
3
+ import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
4
+ import { AsYouType } from 'libphonenumber-js';
5
+ import { BehaviorSubject, throwError, Subscription } from 'rxjs';
6
+ import * as i1 from '@angular/common/http';
7
+ import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
8
+ import { catchError, switchMap, map } from 'rxjs/operators';
9
+ import * as i4 from '@angular/router';
10
+ import { RouterLink } from '@angular/router';
11
+ import * as i5 from '@angular/common';
12
+ import { CommonModule } from '@angular/common';
13
+ import * as i6 from '@angular/forms';
14
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
15
+
16
+ const keypad = [
17
+ {
18
+ num: 1,
19
+ text: 'voicemail'
20
+ },
21
+ {
22
+ num: 2,
23
+ text: 'abc'
24
+ },
25
+ {
26
+ num: 3,
27
+ text: 'def'
28
+ }, {
29
+ num: 4,
30
+ text: 'ghi'
31
+ }, {
32
+ num: 5,
33
+ text: 'jkl'
34
+ }, {
35
+ num: 6,
36
+ text: 'mno'
37
+ }, {
38
+ num: 7,
39
+ text: 'pqrs'
40
+ }, {
41
+ num: 8,
42
+ text: 'tuv'
43
+ }, {
44
+ num: 9,
45
+ text: 'wxyz'
46
+ },
47
+ {
48
+ num: '*',
49
+ text: ' '
50
+ },
51
+ {
52
+ num: 0,
53
+ text: '+'
54
+ },
55
+ {
56
+ num: '#',
57
+ text: ''
58
+ }
59
+ ];
60
+
61
+ const environment = {
62
+ abb: "d",
63
+ production: false,
64
+ secureCookies: true,
65
+ feUrl: 'https://dev.vgroupinc.com:91/',
66
+ apiUrl: 'https://apis.vgroupinc.com/test_softphone',
67
+ captchaKey: "6LfpOmEaAAAAAGsI6JXlMzOl3b7rW4YmYXFDjldD",
68
+ stripePublishableKey: "pk_test_51K6aTuBiNVV2TMlQfmBWY8jziwiDo0IZ3TrqWPqth1m32cpMAAg5Qpi2AlSMDEAX6hCZRBXoTzBB1uQQLc8B4tco00q2SgG6zO",
69
+ sessionTimeout: 15,
70
+ deviceType: "web",
71
+ appVersion: "2.3",
72
+ channelId: '61481b12e138eb7dc3007579',
73
+ c2c_support_point_id: '60424735f74ac306c1bfa900',
74
+ c2c_support_channel_id: '677f67f3be93ab507fbbfdfc',
75
+ c2c_point_url: 'https://bit.ly/3blWnPv',
76
+ c2c_call_label_id: 'ye2XFLfOHCr12GFVRzPh',
77
+ c2c_email_label_id: 'mvjVgOP2VCiYsVovQqdq',
78
+ radarAPIKey: 'prj_live_sk_569b6f639edde6120a26f703511c61aaecd3f7ef',
79
+ firebase: {
80
+ apiKey: "AIzaSyCA8LSPrqlDq_thk26LhBQexAQeY6pkU5Y",
81
+ authDomain: "softphone-d5777.firebaseapp.com",
82
+ projectId: "softphone-d5777",
83
+ storageBucket: "softphone-d5777.appspot.com",
84
+ messagingSenderId: "850812494538",
85
+ appId: "1:850812494538:web:74f8a30fc18e28ded78a33",
86
+ measurementId: "G-NGXTSV9SH3",
87
+ vapidKey: "BD6EgcQgbZTjOQfleG3YlEc0_SajB03prqTdDy-qGJkxTxezbq-A_qtuXE1l3yT47o8hnTAbTKBcH15D2AJB2To"
88
+ },
89
+ perspectiveApiKey: 'AIzaSyClf32lvLH4QOy-vOnzLzwSNntKIgapH8s'
90
+ };
91
+
92
+ class TwilioService {
93
+ constructor(http) {
94
+ this.http = http;
95
+ this.openInProgressDialpad = new BehaviorSubject(false);
96
+ this.currentCall = new BehaviorSubject(null);
97
+ this.currentCallState = new BehaviorSubject('none'); //in-progress, out-progress, none
98
+ // incomingCallToken:string;
99
+ // outgoingCallToken:string;
100
+ this.callType = new BehaviorSubject('NIL');
101
+ this.isIncomingCallPicked = new BehaviorSubject(false); // for both incoming and outgoing
102
+ this.token = localStorage.getItem('ext_token');
103
+ this.isNewContactAdded = new BehaviorSubject(false);
104
+ this.updateRecentCall = new BehaviorSubject(false);
105
+ this.callhandleFromNotification = new BehaviorSubject({});
106
+ this.endCall = new BehaviorSubject(false);
107
+ this.dialNumberFromOtherModule = new BehaviorSubject({ number: '', name: '', img: '', callerId: '', isDialFromHistory: false, from: '' });
108
+ this.toggleCallerIdAlert = new BehaviorSubject(true);
109
+ this.isTrialOver = new BehaviorSubject(false);
110
+ this.isPaymentDue = new BehaviorSubject(false);
111
+ this.isAvailableNumber = new BehaviorSubject(false);
112
+ this.callerIdList = new BehaviorSubject([]);
113
+ this.triggerSMSReload = new BehaviorSubject(false);
114
+ }
115
+ // onIncomingCall(){
116
+ // this.device.on('incoming', (call:any) => {
117
+ // console.log(call);
118
+ // //call.accept();
119
+ // });
120
+ // }
121
+ saveContact(payload) {
122
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
123
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts/manually', payload, httpOptions);
124
+ }
125
+ updateContact(payload) {
126
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + this.token }) };
127
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/update/contact', payload, httpOptions);
128
+ }
129
+ deleteContact(id) {
130
+ let payload = {
131
+ phonebookid: id
132
+ };
133
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
134
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/contact/' + id, payload, httpOptions);
135
+ }
136
+ getContactList() {
137
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
138
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
139
+ }
140
+ addContactToFavourite(payload) {
141
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
142
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/update/favourite', payload, httpOptions);
143
+ }
144
+ getFavouritContacts() {
145
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
146
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/favourite/contacts', httpOptions);
147
+ }
148
+ getRecentCalls(pageIndex, pageSize) {
149
+ // let params = new HttpParams();
150
+ // params = params.set('size', pageSize);
151
+ // params = params.set('page', pageIndex);
152
+ const headers = { 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') };
153
+ const httpOptions = { headers };
154
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/recent/calls', httpOptions);
155
+ }
156
+ deleteRecentCallLog(id) {
157
+ let payload = {
158
+ recordId: id
159
+ };
160
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
161
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/calls/' + id, payload, httpOptions);
162
+ }
163
+ uploadPhoto(payload) {
164
+ let httpOptions = {
165
+ headers: new HttpHeaders({
166
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
167
+ })
168
+ };
169
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', payload, httpOptions);
170
+ }
171
+ deletePhoto(id) {
172
+ let payload = {
173
+ phonebookid: id
174
+ };
175
+ let httpOptions = {
176
+ headers: new HttpHeaders({
177
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
178
+ })
179
+ };
180
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/delete/photo/' + id, payload, httpOptions);
181
+ }
182
+ // toggleCallerIdAlertFn(val: any) {
183
+ // let httpOptions = {
184
+ // headers: new HttpHeaders({
185
+ // 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
186
+ // })
187
+ // };
188
+ // return this.http.put<[]>(environment.apiUrl + '/utilities/softphone/callerid/alert/' + val, {}, httpOptions);
189
+ // }
190
+ toggleCoutryCodeToast(val) {
191
+ let httpOptions = {
192
+ headers: new HttpHeaders({
193
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
194
+ })
195
+ };
196
+ return this.http.put(environment.apiUrl + '/utilities/softphone/countrycode/alert/' + val, {}, httpOptions);
197
+ }
198
+ getToNumber(dialledNo, isoCode) {
199
+ const httpOptions = {
200
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
201
+ params: new HttpParams().set('isoCode', isoCode)
202
+ };
203
+ const params = new HttpParams().set('isoCode', isoCode);
204
+ return this.http.get(environment.apiUrl + '/utilities/softphone/check/countryCode/' + dialledNo, httpOptions);
205
+ }
206
+ }
207
+ TwilioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
208
+ TwilioService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, providedIn: 'root' });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TwilioService, decorators: [{
210
+ type: Injectable,
211
+ args: [{
212
+ providedIn: 'root'
213
+ }]
214
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
215
+
216
+ class IpAddressService {
217
+ constructor(http) {
218
+ this.http = http;
219
+ this.apiUrl = 'https://api.radar.io/v1/geocode/ip';
220
+ }
221
+ getIpAddressInfo() {
222
+ const authKey = environment.radarAPIKey;
223
+ const httpOptions = {
224
+ headers: new HttpHeaders({ 'Authorization': authKey }),
225
+ fraud: true
226
+ };
227
+ return this.http.get(this.apiUrl, httpOptions).pipe(catchError((error) => {
228
+ return throwError(new Error("Network is blocking the server, please check the proxy or your network."));
229
+ }));
230
+ }
231
+ }
232
+ IpAddressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
233
+ IpAddressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, providedIn: 'root' });
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IpAddressService, decorators: [{
235
+ type: Injectable,
236
+ args: [{
237
+ providedIn: 'root'
238
+ }]
239
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
240
+
241
+ class ExtensionService {
242
+ setCallSid(callSid, recordCall) {
243
+ this.callSid = callSid;
244
+ this.recordCall = recordCall;
245
+ }
246
+ getCallSid() {
247
+ return {
248
+ callSid: this.callSid,
249
+ recordCall: this.recordCall
250
+ };
251
+ }
252
+ setCallerId(callerId) {
253
+ this.callerIdSubject.next(callerId);
254
+ }
255
+ constructor(http, ipAddressService) {
256
+ this.http = http;
257
+ this.ipAddressService = ipAddressService;
258
+ this.callSid = '';
259
+ this.messageSource = new BehaviorSubject('');
260
+ this.channelId = environment.channelId;
261
+ this.currentMessage = this.messageSource.asObservable();
262
+ this.platform = 'web';
263
+ this.dedicatedStateSource = new BehaviorSubject('');
264
+ this.dedicatedState = this.dedicatedStateSource.asObservable();
265
+ this.callerIdStateSource = new BehaviorSubject('');
266
+ this.callerIdState = this.callerIdStateSource.asObservable();
267
+ this.sendSmsSource = new BehaviorSubject('');
268
+ this.sendMessage = this.sendSmsSource.asObservable();
269
+ this.draftSmsSource = new BehaviorSubject('');
270
+ this.draftMessage = this.draftSmsSource.asObservable();
271
+ this.isInputFocus$ = new BehaviorSubject(false);
272
+ this.token = localStorage.getItem('ext_token') || '';
273
+ this.isNewContactAdded = new BehaviorSubject(false);
274
+ this.isProfileUpdated = new BehaviorSubject(false);
275
+ this.callerIdSubject = new BehaviorSubject(null);
276
+ this.callerId$ = this.callerIdSubject.asObservable();
277
+ }
278
+ changeMessage(message) {
279
+ this.messageSource.next(message);
280
+ }
281
+ GetUserUsage(token) {
282
+ const params = {
283
+ 'Content-Type': 'application/json',
284
+ 'Auth-Key': "Bearer " + token
285
+ };
286
+ const httpOptions = { headers: new HttpHeaders(params) };
287
+ return this.http.get(environment.apiUrl + '/utilities/ext/usage', httpOptions);
288
+ }
289
+ GetUserProfile(token, data) {
290
+ const params = {
291
+ 'Content-Type': 'application/json',
292
+ 'Auth-Key': "Bearer " + token
293
+ };
294
+ const httpOptions = { headers: new HttpHeaders(params) };
295
+ return this.http.post(environment.apiUrl + '/utilities/ext/user', data, httpOptions);
296
+ }
297
+ UpdateProfile(userProfile, token) {
298
+ const userProfileObj = {
299
+ "billingAddress1": userProfile.billingAddress1,
300
+ "billingAddress2": userProfile.billingAddress2,
301
+ "billingCityid": userProfile.billingCity,
302
+ "billingCountryid": userProfile.billingCountry,
303
+ "billingStateid": userProfile.billingState,
304
+ "billingZipid": userProfile.billingZip,
305
+ "email": userProfile.email,
306
+ "mobile": userProfile.mobile,
307
+ "countrycode": userProfile.countrycode,
308
+ "timezone": userProfile.timezone,
309
+ "firstname": userProfile.firstname,
310
+ "lastname": userProfile.lastname,
311
+ "shippingAddress1": (userProfile.shippingAddress1 !== null && userProfile.shippingAddress1 !== undefined && userProfile.shippingAddress1 !== "") ? userProfile.shippingAddress1 : userProfile.billingAddress1,
312
+ "shippingAddress2": (userProfile.shippingAddress2 !== null && userProfile.shippingAddress2 !== undefined && userProfile.shippingAddress2 !== "") ? userProfile.shippingAddress2 : userProfile.billingAddress2,
313
+ "shippingCityid": (userProfile.shippingCity !== null && userProfile.shippingCity !== undefined && userProfile.shippingCity !== "") ? userProfile.shippingCity : userProfile.billingCity,
314
+ "shippingCountryid": (userProfile.shippingCountry !== null && userProfile.shippingCountry !== undefined && userProfile.shippingCountry !== "") ? userProfile.shippingCountry : userProfile.billingCountry,
315
+ "shippingStateid": (userProfile.shippingState !== null && userProfile.shippingState !== undefined && userProfile.shippingState !== "") ? userProfile.shippingState : userProfile.billingState,
316
+ "shippingZipid": (userProfile.shippingZip !== null && userProfile.shippingZip !== undefined && userProfile.shippingZip !== "") ? userProfile.shippingZip : userProfile.billingZip,
317
+ "imageId": (userProfile.imageId),
318
+ "imageName": (userProfile.imageName),
319
+ "companyName": userProfile.companyName,
320
+ "companySize": userProfile.companySize,
321
+ "companyFirstName": userProfile.companyFirstName,
322
+ "companyLastName": userProfile.companyLastName,
323
+ "companyContactNumber": userProfile.companyContactNumber
324
+ };
325
+ const params = {
326
+ 'Content-Type': 'application/json',
327
+ 'Auth-Key': "Bearer " + token
328
+ };
329
+ const httpOptions = { headers: new HttpHeaders(params) };
330
+ return this.http.put(environment.apiUrl + '/utilities/ext/update', userProfileObj, httpOptions);
331
+ }
332
+ deleteProfilePhoto(token) {
333
+ const params = {
334
+ 'Auth-Key': "Bearer " + token
335
+ };
336
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
337
+ return this.http.post(environment.apiUrl + '/utilities/ext/delete/profile/photo', params, httpOptions);
338
+ }
339
+ getOtpCode(countryCode, number, mode, token) {
340
+ const params = {
341
+ 'Content-Type': 'application/json',
342
+ 'Auth-Key': "Bearer " + token
343
+ };
344
+ const numberObj = {
345
+ "countrycode": countryCode,
346
+ "number": number,
347
+ "mode": mode
348
+ };
349
+ const httpOptions = { headers: new HttpHeaders(params) };
350
+ return this.http.post(environment.apiUrl + '/utilities/ext/sms/otp', numberObj, httpOptions);
351
+ }
352
+ getVerifyMobile(countryName, countrycode, number, otp, token) {
353
+ const params = {
354
+ 'Content-Type': 'application/json',
355
+ 'Auth-Key': "Bearer " + token
356
+ };
357
+ const verifyObj = {
358
+ "countryName": countryName,
359
+ "countrycode": countrycode,
360
+ "number": number,
361
+ "otp": otp
362
+ };
363
+ const httpOptions = { headers: new HttpHeaders(params) };
364
+ return this.http.post(environment.apiUrl + '/utilities/ext/sms/verify/otp', verifyObj, httpOptions);
365
+ }
366
+ connectWithStripe(token) {
367
+ const params = {
368
+ 'Auth-Key': "Bearer " + token
369
+ };
370
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
371
+ return this.http.post(environment.apiUrl + '/utilities/ext/stripe/connect', params, httpOptions);
372
+ }
373
+ connectWithStripeRedirection(redirection, token) {
374
+ const params = {
375
+ 'Auth-Key': "Bearer " + token,
376
+ "redirection": redirection
377
+ };
378
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
379
+ return this.http.post(environment.apiUrl + `/utilities/ext/stripe/connect/${redirection}`, params, httpOptions);
380
+ }
381
+ validateStripeSession(sessionId, token) {
382
+ const params = {
383
+ 'Content-Type': 'application/json',
384
+ 'Auth-Key': "Bearer " + token
385
+ };
386
+ const data = {
387
+ "sessionid": sessionId,
388
+ };
389
+ const httpOptions = { headers: new HttpHeaders(params) };
390
+ return this.http.post(environment.apiUrl + '/utilities/ext/validate/session', data, httpOptions);
391
+ }
392
+ loadPaymentMethods(token) {
393
+ const params = {
394
+ 'Content-Type': 'application/json',
395
+ 'Auth-Key': "Bearer " + token
396
+ };
397
+ const httpOptions = { headers: new HttpHeaders(params) };
398
+ return this.http.get(environment.apiUrl + '/utilities/ext/payment/methods', httpOptions);
399
+ }
400
+ setPaymentDefaultMethod(paymentMethodId, token) {
401
+ const params = {
402
+ 'Content-Type': 'application/json',
403
+ 'Auth-Key': "Bearer " + token
404
+ };
405
+ const data = {
406
+ "methodid": paymentMethodId,
407
+ };
408
+ const httpOptions = { headers: new HttpHeaders(params) };
409
+ return this.http.post(environment.apiUrl + '/utilities/ext/update/default', data, httpOptions);
410
+ }
411
+ sendEmailVerifyLink(emailval, token) {
412
+ const params = {
413
+ 'Auth-Key': "Bearer " + token,
414
+ "email": emailval
415
+ };
416
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
417
+ return this.http.post(environment.apiUrl + '/utilities/ext/verify/email', params, httpOptions);
418
+ }
419
+ VerifyEmailLink(key) {
420
+ const keyobj = { "key": key };
421
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
422
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/verify/request', keyobj, httpOptions);
423
+ }
424
+ DeleteMethod(paymentMethodId, token) {
425
+ const params = {
426
+ 'Content-Type': 'application/json',
427
+ 'Auth-Key': "Bearer " + token
428
+ };
429
+ const data = {
430
+ "methodid": paymentMethodId,
431
+ };
432
+ const httpOptions = { headers: new HttpHeaders(params) };
433
+ return this.http.post(environment.apiUrl + '/utilities/ext/detach/method', data, httpOptions);
434
+ }
435
+ VerifySession(token) {
436
+ const params = {
437
+ 'Content-Type': 'application/json',
438
+ 'Auth-Key': "Bearer " + token
439
+ };
440
+ const httpOptions = { headers: new HttpHeaders(params) };
441
+ return this.http.get(environment.apiUrl + '/utilities/ext/verify/session', httpOptions);
442
+ }
443
+ GetAllCountryList() {
444
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
445
+ return this.http.get(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
446
+ }
447
+ GetAllStateList(_countryId) {
448
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
449
+ return this.http.get(environment.apiUrl + '/global/master/ur/statelist/' + _countryId, httpOptions);
450
+ }
451
+ LogoutUser(authKey) {
452
+ const auth = { "Auth-Key": authKey };
453
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': authKey }) };
454
+ return this.http.post(environment.apiUrl + '/client/user/logout', auth, httpOptions);
455
+ }
456
+ purchasedNumber(token) {
457
+ const params = {
458
+ 'Content-Type': 'application/json',
459
+ 'Auth-Key': "Bearer " + token
460
+ };
461
+ const httpOptions = { headers: new HttpHeaders(params) };
462
+ return this.http.get(environment.apiUrl + '/utilities/softphone/view/purchased/number', httpOptions);
463
+ }
464
+ availableNumber(token, dtModel) {
465
+ const params = {
466
+ 'Content-Type': 'application/json;charset=UTF-8',
467
+ 'Auth-Key': "Bearer " + token
468
+ };
469
+ const httpOptions = { headers: new HttpHeaders(params) };
470
+ return this.http.post(environment.apiUrl + '/utilities/softphone/available/number', dtModel, httpOptions);
471
+ }
472
+ urAvailableNumber(token, dtModel) {
473
+ const params = {
474
+ 'Content-Type': 'application/json;charset=UTF-8',
475
+ };
476
+ const httpOptions = { headers: new HttpHeaders(params) };
477
+ return this.http.post(environment.apiUrl + '/utilities/softphone/ur/available/number', dtModel, httpOptions);
478
+ }
479
+ stagingNumber(token, dtModel) {
480
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
481
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/staging/number', dtModel, httpOptions);
482
+ }
483
+ saveCompanyDetail(dtModel) {
484
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
485
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/company/details', dtModel, httpOptions);
486
+ }
487
+ saveAddressInfo(dtModel) {
488
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
489
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/address', dtModel, httpOptions);
490
+ }
491
+ saveStripeInfo(userId) {
492
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
493
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/stripe/connect/' + userId, httpOptions);
494
+ }
495
+ saveCardInfo(dtModel) {
496
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
497
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/save/card/info', dtModel, httpOptions);
498
+ }
499
+ deleteCard(dtModel) {
500
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
501
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/delete/saved/card', dtModel, httpOptions);
502
+ }
503
+ purchasePlan(dtModel) {
504
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
505
+ return this.http.post(environment.apiUrl + '/utilities/softphone/ur/purchase/signup/number', dtModel, httpOptions);
506
+ }
507
+ getUserStagingInfo(data) {
508
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
509
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/signup/staging', data, httpOptions);
510
+ }
511
+ costCheckOut(token, cost) {
512
+ const params = {
513
+ 'Content-Type': 'application/json',
514
+ 'Auth-Key': "Bearer " + token
515
+ };
516
+ const httpOptions = { headers: new HttpHeaders(params) };
517
+ return this.http.get(environment.apiUrl + '/utilities/softphone/number/checkout/' + cost, httpOptions);
518
+ }
519
+ buyNumber(token, dtModel) {
520
+ const params = {
521
+ 'Content-Type': 'application/json',
522
+ 'Auth-Key': "Bearer " + token
523
+ };
524
+ const httpOptions = { headers: new HttpHeaders(params) };
525
+ return this.http.post(environment.apiUrl + '/utilities/softphone/purchase/number', dtModel, httpOptions);
526
+ }
527
+ fetchCallerId(token) {
528
+ const params = {
529
+ 'Content-Type': 'application/json',
530
+ 'Auth-Key': "Bearer " + token
531
+ };
532
+ const httpOptions = { headers: new HttpHeaders(params) };
533
+ return this.http.get(environment.apiUrl + '/utilities/softphone/fetch/callerid', httpOptions);
534
+ }
535
+ updateNumberLabel(token, dtModel) {
536
+ const params = {
537
+ 'Content-Type': 'application/json',
538
+ 'Auth-Key': "Bearer " + token
539
+ };
540
+ const httpOptions = { headers: new HttpHeaders(params) };
541
+ return this.http.put(environment.apiUrl + '/utilities/softphone/update/number/label', dtModel, httpOptions);
542
+ }
543
+ releaseNumber(token, twilioNum) {
544
+ const params = {
545
+ 'Content-Type': 'application/json',
546
+ 'Auth-Key': "Bearer " + token
547
+ };
548
+ const httpOptions = { headers: new HttpHeaders(params) };
549
+ // return this.http.post<[]>(environment.apiUrl + '/utilities/softphone/delete/twilio/number', httpOptions);
550
+ return this.http.get(environment.apiUrl + '/utilities/softphone/delete/twilio/number/' + twilioNum, httpOptions);
551
+ }
552
+ // Call forwarding api's
553
+ sendOTP(token, dtModel) {
554
+ const params = {
555
+ 'Content-Type': 'application/json',
556
+ 'Auth-Key': "Bearer " + token
557
+ };
558
+ const httpOptions = { headers: new HttpHeaders(params) };
559
+ return this.http.post(environment.apiUrl + '/utilities/ext/send/otp', dtModel, httpOptions);
560
+ }
561
+ verifyOTP(token, dtModel) {
562
+ const params = {
563
+ 'Content-Type': 'application/json',
564
+ 'Auth-Key': "Bearer " + token
565
+ };
566
+ const httpOptions = { headers: new HttpHeaders(params) };
567
+ return this.http.post(environment.apiUrl + '/utilities/ext/verify/otp', dtModel, httpOptions);
568
+ }
569
+ updateCallForwarding(token, dtModel) {
570
+ const params = {
571
+ 'Content-Type': 'application/json',
572
+ 'Auth-Key': "Bearer " + token
573
+ };
574
+ const httpOptions = { headers: new HttpHeaders(params) };
575
+ return this.http.post(environment.apiUrl + '/utilities/softphone/configure/call/forwarding', dtModel, httpOptions);
576
+ }
577
+ getSingleNumForwardingSetting(token, number) {
578
+ const params = {
579
+ 'Content-Type': 'application/json',
580
+ 'Auth-Key': "Bearer " + token
581
+ };
582
+ const httpOptions = { headers: new HttpHeaders(params) };
583
+ return this.http.get(environment.apiUrl + '/utilities/softphone/view/call/forwarding/' + number, httpOptions);
584
+ }
585
+ deleteCallForwarding(token, dtModel) {
586
+ const params = {
587
+ 'Content-Type': 'application/json',
588
+ 'Auth-Key': "Bearer " + token
589
+ };
590
+ const httpOptions = { headers: new HttpHeaders(params) };
591
+ return this.http.post(environment.apiUrl + '/utilities/softphone/call/forwarding/action', dtModel, httpOptions);
592
+ }
593
+ //calling prefernece api
594
+ displayID(token) {
595
+ const params = {
596
+ 'Content-Type': 'application/json',
597
+ 'Auth-Key': "Bearer " + token
598
+ };
599
+ const httpOptions = { headers: new HttpHeaders(params) };
600
+ return this.http.get(environment.apiUrl + '/utilities/softphone/display/callerids', httpOptions);
601
+ }
602
+ verifyNumber(token, dtModel) {
603
+ const params = {
604
+ 'Content-Type': 'application/json',
605
+ 'Auth-Key': "Bearer " + token
606
+ };
607
+ const httpOptions = { headers: new HttpHeaders(params) };
608
+ return this.http.post(environment.apiUrl + '/utilities/softphone/add/callerid', dtModel, httpOptions);
609
+ }
610
+ verifyStatus(token, dtModel) {
611
+ const params = {
612
+ 'Content-Type': 'application/json',
613
+ 'Auth-Key': "Bearer " + token
614
+ };
615
+ const httpOptions = { headers: new HttpHeaders(params) };
616
+ return this.http.get(environment.apiUrl + '/utilities/softphone/callerid/status/' + dtModel, httpOptions);
617
+ }
618
+ existingListmakeCallerID(token, dtModel) {
619
+ const params = {
620
+ 'Content-Type': 'application/json',
621
+ 'Auth-Key': "Bearer " + token
622
+ };
623
+ const httpOptions = { headers: new HttpHeaders(params) };
624
+ return this.http.post(environment.apiUrl + '/utilities/softphone/make/callerid', dtModel, httpOptions);
625
+ }
626
+ makeCallerID(token, dtModel, number) {
627
+ const params = {
628
+ 'Content-Type': 'application/json',
629
+ 'Auth-Key': "Bearer " + token
630
+ };
631
+ const httpOptions = { headers: new HttpHeaders(params) };
632
+ return this.http.post(environment.apiUrl + `/utilities/softphone/markas/callerid/${number}`, dtModel, httpOptions);
633
+ }
634
+ deleteCallerID(token, dtModel, id) {
635
+ const params = {
636
+ 'Content-Type': 'application/json',
637
+ 'Auth-Key': "Bearer " + token
638
+ };
639
+ const httpOptions = { headers: new HttpHeaders(params) };
640
+ return this.http.post(environment.apiUrl + `/utilities/softphone/delete/callerid/${id}`, dtModel, httpOptions);
641
+ }
642
+ deregisterCallerID(token, dtModel, id) {
643
+ const params = {
644
+ 'Content-Type': 'application/json',
645
+ 'Auth-Key': "Bearer " + token
646
+ };
647
+ const httpOptions = { headers: new HttpHeaders(params) };
648
+ return this.http.post(environment.apiUrl + `/utilities/softphone/deregister/callerid/${id}`, dtModel, httpOptions);
649
+ }
650
+ updateCallerIDLabel(token, dtModel) {
651
+ const params = {
652
+ 'Content-Type': 'application/json',
653
+ 'Auth-Key': "Bearer " + token
654
+ };
655
+ const httpOptions = { headers: new HttpHeaders(params) };
656
+ return this.http.put(environment.apiUrl + '/utilities/softphone/update/callerid/label', dtModel, httpOptions);
657
+ }
658
+ initiateCall(payload) {
659
+ return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
660
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap(ipAddressInfo => {
661
+ const params = {
662
+ 'Content-Type': 'application/json',
663
+ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
664
+ 'ip-address': ipAddressInfo.ip,
665
+ 'ip-country': ipAddressInfo.address.country,
666
+ };
667
+ payload = Object.assign(Object.assign({}, payload), { proxy: ipAddressInfo.proxy.toString() });
668
+ const httpOptions = { headers: new HttpHeaders(params) };
669
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions).pipe(catchError(error => {
670
+ return throwError(error);
671
+ }));
672
+ }), catchError(error => {
673
+ // Catch error from getIpAddressInfo
674
+ return throwError(error);
675
+ }));
676
+ }));
677
+ }
678
+ fetchBlockedCountries() {
679
+ return this.http.get(environment.apiUrl + '/global/master/ur/blacklisted/countrylist').pipe(map(response => {
680
+ if (response.response === 'Success' && Array.isArray(response.countries)) {
681
+ return response.countries.map((country) => country.isocode);
682
+ }
683
+ else {
684
+ throw new Error('Unable to fetch blocked countries');
685
+ }
686
+ }));
687
+ }
688
+ // initiateCall(payload: any): Observable<any> {
689
+ // return this.ipAddressService.getIpAddressInfo().pipe(
690
+ // switchMap(ipAddressInfo => {
691
+ // const params = {
692
+ // 'Content-Type': 'application/json',
693
+ // 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token'),
694
+ // 'ip-address': ipAddressInfo.ip,
695
+ // 'ip-country': ipAddressInfo.address.country
696
+ // };
697
+ // const httpOptions = { headers: new HttpHeaders(params) };
698
+ // return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/initiate/call', payload, httpOptions);
699
+ // })
700
+ // );
701
+ // }
702
+ getIncomingCallToken() {
703
+ const params = {
704
+ 'Content-Type': 'application/json',
705
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
706
+ };
707
+ const httpOptions = { headers: new HttpHeaders(params) };
708
+ return this.http.get(environment.apiUrl + '/utilities/twilio/incomingcall/token/web', httpOptions);
709
+ }
710
+ getOutgoingCallToken(payload) {
711
+ const params = {
712
+ 'Content-Type': 'application/json',
713
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token'),
714
+ 'c2c-request': window.location.hostname
715
+ };
716
+ const httpOptions = { headers: new HttpHeaders(params) };
717
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/generate/token', payload, httpOptions);
718
+ }
719
+ getCallRecording(callSid) {
720
+ const headers = new HttpHeaders({
721
+ 'Content-Type': 'application/json',
722
+ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
723
+ });
724
+ const httpOptions = { headers: headers };
725
+ return this.http.post(environment.apiUrl + '/utilities/twilio/call/callrecording?callSid=' + callSid, {}, httpOptions);
726
+ }
727
+ pauseOrResumeRecording(callSid, status) {
728
+ const headers = new HttpHeaders({
729
+ 'Content-Type': 'application/json',
730
+ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
731
+ });
732
+ const httpOptions = { headers: headers };
733
+ return this.http.post(environment.apiUrl + `/utilities/twilio/update/recording/status?callSid=${callSid}&status=${status}`, {}, httpOptions);
734
+ }
735
+ getCallStatus(callAuthId) {
736
+ const headers = new HttpHeaders({
737
+ 'Content-Type': 'application/json',
738
+ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token')
739
+ });
740
+ const httpOptions = { headers: headers };
741
+ return this.http.get(environment.apiUrl + `/utilities/twilio/call/status/${callAuthId}`, httpOptions);
742
+ }
743
+ //sms api
744
+ sendSms(c2c_latlong, c2c_request, dtModel) {
745
+ return this.fetchBlockedCountries().pipe(switchMap(blockedCountries => {
746
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
747
+ if (blockedCountries.includes(ipAddressInfo.address.countryCode)) {
748
+ return throwError({ message: ['User from blocked country'] });
749
+ }
750
+ else {
751
+ const params = {
752
+ 'Content-Type': 'application/json',
753
+ 'c2c-latlong': c2c_latlong,
754
+ 'c2c-request': c2c_request,
755
+ 'ip-address': ipAddressInfo.ip,
756
+ 'ip-country': ipAddressInfo.address.country,
757
+ };
758
+ dtModel = Object.assign(Object.assign({}, dtModel), { proxy: ipAddressInfo.proxy.toString() });
759
+ const httpOptions = { headers: new HttpHeaders(params) };
760
+ return this.http.post(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions).pipe(catchError(error => {
761
+ // Handle HTTP errors here if needed
762
+ return throwError(error);
763
+ }));
764
+ }
765
+ }), catchError(error => {
766
+ // Catch error from getIpAddressInfo
767
+ return throwError(error);
768
+ }));
769
+ }), catchError(error => {
770
+ // Catch error from fetchBlockedCountries
771
+ return throwError(error);
772
+ }));
773
+ }
774
+ // sendSms(c2c_latlong: string, c2c_request: string, dtModel: any): Observable<any> {
775
+ // return this.ipAddressService.getIpAddressInfo().pipe(
776
+ // switchMap(ipAddressInfo => {
777
+ // const params = {
778
+ // 'Content-Type': 'application/json',
779
+ // 'c2c-latlong': c2c_latlong,
780
+ // 'c2c-request': c2c_request,
781
+ // 'ip-address': ipAddressInfo.ip,
782
+ // 'ip-country': ipAddressInfo.address.country
783
+ // };
784
+ // const httpOptions = { headers: new HttpHeaders(params) };
785
+ // return this.http.post<[]>(environment.apiUrl + '/utilities/ext/ur/send/sms', dtModel, httpOptions);
786
+ // })
787
+ // );
788
+ // }
789
+ readContacts(token) {
790
+ const params = {
791
+ 'Content-Type': 'application/json',
792
+ 'Auth-Key': "Bearer " + token
793
+ };
794
+ const httpOptions = { headers: new HttpHeaders(params) };
795
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
796
+ }
797
+ sentSMS(token, pageSize, pageIndex) {
798
+ const headers = {
799
+ 'Content-Type': 'application/json',
800
+ 'Auth-Key': "Bearer " + token,
801
+ };
802
+ let params = new HttpParams();
803
+ params = params.set('size', pageSize || '10');
804
+ params = params.set('page', pageIndex || '1');
805
+ const httpOptions = { headers, params };
806
+ return this.http.get(environment.apiUrl + '/utilities/sms/sent/', httpOptions);
807
+ }
808
+ deleteSMS(token, recordIds, dtModel) {
809
+ const params = {
810
+ 'Content-Type': 'application/json',
811
+ 'Auth-Key': "Bearer " + token
812
+ };
813
+ const httpOptions = { headers: new HttpHeaders(params) };
814
+ return this.http.post(environment.apiUrl + `/utilities/sms/delete/${recordIds}`, dtModel, httpOptions);
815
+ }
816
+ // inboxSMS(token: string) {
817
+ // const params = {
818
+ // 'Content-Type': 'application/json',
819
+ // 'Auth-Key': "Bearer " + token
820
+ // }
821
+ // const httpOptions = { headers: new HttpHeaders(params) };
822
+ // return this.http.get<[]>(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
823
+ // }
824
+ inboxSMS(token, page, size) {
825
+ const params = new HttpParams()
826
+ .set('page', page.toString())
827
+ .set('size', size.toString());
828
+ const httpOptions = {
829
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
830
+ params: params
831
+ };
832
+ return this.http.get(environment.apiUrl + '/utilities/sms/inbox', httpOptions);
833
+ }
834
+ readInboxStatus(token, recordId, dtModel) {
835
+ const params = {
836
+ 'Content-Type': 'application/json',
837
+ 'Auth-Key': "Bearer " + token
838
+ };
839
+ const httpOptions = { headers: new HttpHeaders(params) };
840
+ return this.http.post(environment.apiUrl + `/utilities/sms/markas/read/${recordId}`, dtModel, httpOptions);
841
+ }
842
+ markAsFavourite(token, recordIds, dtModel) {
843
+ const params = {
844
+ 'Content-Type': 'application/json',
845
+ 'Auth-Key': "Bearer " + token
846
+ };
847
+ const httpOptions = { headers: new HttpHeaders(params) };
848
+ return this.http.post(environment.apiUrl + `/utilities/sms/mark/favourite/${recordIds}`, dtModel, httpOptions);
849
+ }
850
+ markAsUnFavourite(token, recordIds, dtModel) {
851
+ const params = {
852
+ 'Content-Type': 'application/json',
853
+ 'Auth-Key': "Bearer " + token
854
+ };
855
+ const httpOptions = { headers: new HttpHeaders(params) };
856
+ return this.http.post(environment.apiUrl + `/utilities/sms/mark/unfavourite/${recordIds}`, dtModel, httpOptions);
857
+ }
858
+ viewfavouriteSMS(token, page, size) {
859
+ const params = new HttpParams()
860
+ .set('page', page.toString())
861
+ .set('size', size.toString());
862
+ const httpOptions = {
863
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
864
+ params: params
865
+ };
866
+ return this.http.get(environment.apiUrl + '/utilities/sms/view/favourite', httpOptions);
867
+ }
868
+ saveDraft(token, dtModel) {
869
+ const params = {
870
+ 'Content-Type': 'application/json',
871
+ 'Auth-Key': "Bearer " + token
872
+ };
873
+ const httpOptions = { headers: new HttpHeaders(params) };
874
+ return this.http.post(environment.apiUrl + '/utilities/sms/save/draft', dtModel, httpOptions);
875
+ }
876
+ viewDraft(token, page, size) {
877
+ const params = new HttpParams()
878
+ .set('page', page.toString())
879
+ .set('size', size.toString());
880
+ const httpOptions = {
881
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
882
+ params: params
883
+ };
884
+ return this.http.get(environment.apiUrl + '/utilities/sms/view/draft', httpOptions);
885
+ }
886
+ deleteDraftSMS(token, draftIds, dtModel) {
887
+ const params = {
888
+ 'Content-Type': 'application/json',
889
+ 'Auth-Key': "Bearer " + token
890
+ };
891
+ const httpOptions = { headers: new HttpHeaders(params) };
892
+ return this.http.post(environment.apiUrl + `/utilities/sms/delete/draft/${draftIds}`, dtModel, httpOptions);
893
+ }
894
+ //Address Book
895
+ viewContactLists(token) {
896
+ const params = {
897
+ 'Content-Type': 'application/json',
898
+ 'Auth-Key': "Bearer " + token
899
+ };
900
+ const httpOptions = { headers: new HttpHeaders(params) };
901
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/read/contacts', httpOptions);
902
+ }
903
+ deleteContact(token, phonebookid, dtModel) {
904
+ const params = {
905
+ 'Content-Type': 'application/json',
906
+ 'Auth-Key': "Bearer " + token
907
+ };
908
+ const httpOptions = { headers: new HttpHeaders(params) };
909
+ return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/contact/${phonebookid}`, dtModel, httpOptions);
910
+ }
911
+ updateFavContacts(token, dtModel) {
912
+ const params = {
913
+ 'Content-Type': 'application/json',
914
+ 'Auth-Key': "Bearer " + token
915
+ };
916
+ const httpOptions = { headers: new HttpHeaders(params) };
917
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/update/favourite', dtModel, httpOptions);
918
+ }
919
+ // saveContacts(token: string, dtModel: any){
920
+ // const params = {
921
+ // 'Content-Type': 'application/json',
922
+ // 'Auth-Key': "Bearer " + token
923
+ // }
924
+ // const httpOptions = { headers: new HttpHeaders(params) };
925
+ // return this.http.post<[]>(environment.apiUrl + '/utilities/phonebook/add/contacts/manually',dtModel, httpOptions);
926
+ // }
927
+ uploadImage(token, dtModel) {
928
+ const params = {
929
+ //'Content-Type': 'multipart/form-data',
930
+ 'Auth-Key': "Bearer " + token
931
+ };
932
+ const httpOptions = { headers: new HttpHeaders(params) };
933
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', dtModel, httpOptions);
934
+ }
935
+ //Call Histroy
936
+ recentCallHistory(token, page, size) {
937
+ const params = new HttpParams()
938
+ .set('page', page.toString())
939
+ .set('size', size.toString());
940
+ const httpOptions = {
941
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
942
+ params: params
943
+ };
944
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/recent/calls', httpOptions);
945
+ }
946
+ deleteCalls(token, recordId, dtModel) {
947
+ const params = {
948
+ 'Content-Type': 'application/json',
949
+ 'Auth-Key': "Bearer " + token
950
+ };
951
+ const httpOptions = { headers: new HttpHeaders(params) };
952
+ return this.http.post(environment.apiUrl + `/utilities/phonebook/delete/calls/${recordId}`, dtModel, httpOptions);
953
+ }
954
+ //SMS History
955
+ recentSMSHistory(token, page, size) {
956
+ const params = new HttpParams()
957
+ .set('page', page.toString())
958
+ .set('size', size.toString());
959
+ const httpOptions = {
960
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
961
+ params: params
962
+ };
963
+ return this.http.get(environment.apiUrl + '/utilities/sms/history', httpOptions);
964
+ }
965
+ getRecentVoiceRecordingData(token, filterData, page, size) {
966
+ const params = new HttpParams()
967
+ .set('page', page.toString())
968
+ .set('size', size.toString());
969
+ const httpOptions = {
970
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
971
+ params: params
972
+ };
973
+ const filterObj = {};
974
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/recent/voicerecording', filterData, httpOptions);
975
+ }
976
+ // save voice mail recording
977
+ saveVoiceMailReocrding(token, recordingData) {
978
+ const httpOptions = {
979
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
980
+ // params: params
981
+ };
982
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/update/recording', recordingData, httpOptions);
983
+ }
984
+ deleteVoiceRecording(token, recordingId) {
985
+ const httpOptions = {
986
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
987
+ // params: params
988
+ };
989
+ return this.http.delete(environment.apiUrl + `/utilities/phonebook/delete/voicerecordings/${recordingId}`, httpOptions);
990
+ }
991
+ markAsVoiceRecording(token, recordingId, dtModel) {
992
+ const httpOptions = {
993
+ headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + token }),
994
+ };
995
+ return this.http.post(environment.apiUrl + `/utilities/phonebook/markas/voicemail/read/${recordingId}`, dtModel, httpOptions);
996
+ }
997
+ editContactById(token, id) {
998
+ const params = {
999
+ 'Content-Type': 'application/json',
1000
+ 'Auth-Key': "Bearer " + token
1001
+ };
1002
+ const httpOptions = { headers: new HttpHeaders(params) };
1003
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/search/contactid/' + id, httpOptions);
1004
+ }
1005
+ updateContacts(token, dtModel) {
1006
+ const params = {
1007
+ 'Content-Type': 'application/json',
1008
+ 'Auth-Key': "Bearer " + token
1009
+ };
1010
+ const httpOptions = { headers: new HttpHeaders(params) };
1011
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/update/contact', dtModel, httpOptions);
1012
+ }
1013
+ uploadPhoto(payload) {
1014
+ let httpOptions = {
1015
+ headers: new HttpHeaders({
1016
+ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token')
1017
+ })
1018
+ };
1019
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/upload/photo', payload, httpOptions);
1020
+ }
1021
+ saveContacts(token, payload) {
1022
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + token }) };
1023
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts/manually', payload, httpOptions);
1024
+ }
1025
+ //Dowload csv template
1026
+ downloadCsvTemplate(token) {
1027
+ const params = {
1028
+ 'Content-Type': 'application/json',
1029
+ 'Auth-Key': "Bearer " + token
1030
+ };
1031
+ const httpOptions = { headers: new HttpHeaders(params) };
1032
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/download/csv', httpOptions);
1033
+ }
1034
+ //Upload csv contacts
1035
+ updateCSVContacts(token, dtModel) {
1036
+ const params = {
1037
+ 'Content-Type': 'application/json',
1038
+ 'Auth-Key': "Bearer " + token
1039
+ };
1040
+ const httpOptions = { headers: new HttpHeaders(params) };
1041
+ return this.http.post(environment.apiUrl + '/utilities/phonebook/add/contacts', dtModel, httpOptions);
1042
+ }
1043
+ //City list
1044
+ GetAllCityList(_countryId, _stateName) {
1045
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1046
+ return this.http.get(environment.apiUrl + '/global/master/ur/citylist/' + _countryId + '/' + _stateName, httpOptions);
1047
+ }
1048
+ //zip list
1049
+ GetAllZipList(dataModel) {
1050
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1051
+ return this.http.post(environment.apiUrl + '/global/master/ur/postalcodes', dataModel, httpOptions);
1052
+ }
1053
+ //Get all invoices
1054
+ GetInvoices(viewType, token) {
1055
+ const params = {
1056
+ 'Content-Type': 'application/json',
1057
+ 'Auth-Key': "Bearer " + token
1058
+ };
1059
+ const httpOptions = { headers: new HttpHeaders(params) };
1060
+ return this.http.get(environment.apiUrl + '/utilities/billing/invoices/' + viewType, httpOptions);
1061
+ }
1062
+ DownloadInvoice(invoiceId, token) {
1063
+ const httpOptions = {
1064
+ responseType: 'blob',
1065
+ headers: new HttpHeaders({
1066
+ 'Content-Type': 'application/json',
1067
+ 'Auth-Key': "Bearer " + token
1068
+ })
1069
+ };
1070
+ return this.http.get(environment.apiUrl + '/utilities/billing/invoice/file/' + invoiceId, httpOptions);
1071
+ }
1072
+ GetInvoice(invoiceId) {
1073
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1074
+ return this.http.get(environment.apiUrl + '/utilities/billing/invoice/' + invoiceId, httpOptions);
1075
+ }
1076
+ //Billing summary
1077
+ GetBillingSummary(token) {
1078
+ const params = {
1079
+ 'Content-Type': 'application/json',
1080
+ 'Auth-Key': "Bearer " + token
1081
+ };
1082
+ const httpOptions = { headers: new HttpHeaders(params) };
1083
+ return this.http.get(environment.apiUrl + '/utilities/billing/summary', httpOptions);
1084
+ }
1085
+ //Billing Plan & Pricing
1086
+ GetAllPlans(token) {
1087
+ const params = {
1088
+ 'Content-Type': 'application/json',
1089
+ 'Auth-Key': "Bearer " + token
1090
+ };
1091
+ const httpOptions = { headers: new HttpHeaders(params) };
1092
+ return this.http.get(environment.apiUrl + '/utilities/billing/tiers', httpOptions);
1093
+ }
1094
+ //Pay Now
1095
+ payNow(invoiceId, cardId, token) {
1096
+ const params = {
1097
+ 'Content-Type': 'application/json',
1098
+ 'Auth-Key': "Bearer " + token
1099
+ };
1100
+ const data = {
1101
+ "invoiceId": invoiceId,
1102
+ "cardId": cardId
1103
+ };
1104
+ const httpOptions = { headers: new HttpHeaders(params) };
1105
+ return this.http.post(environment.apiUrl + `/utilities/billing/pay/invoice/${invoiceId}/${cardId}`, data, httpOptions);
1106
+ }
1107
+ confirmInvoicePayment(customerId, token) {
1108
+ const params = {
1109
+ 'Content-Type': 'application/json',
1110
+ 'Auth-Key': "Bearer " + token
1111
+ };
1112
+ const httpOptions = { headers: new HttpHeaders(params) };
1113
+ return this.http.post(environment.apiUrl + `/utilities/billing/invoice/confirmation/${customerId}`, {}, httpOptions);
1114
+ }
1115
+ loadStripeMethods(sessionid, token) {
1116
+ const params = {
1117
+ 'Content-Type': 'application/json',
1118
+ 'Auth-Key': "Bearer " + token
1119
+ };
1120
+ const httpOptions = { headers: new HttpHeaders(params) };
1121
+ return this.http.get(environment.apiUrl + '/utilities/ext/duplicate/card/' + sessionid, httpOptions);
1122
+ }
1123
+ logOut(authKey) {
1124
+ const auth = { "Auth-Key": authKey };
1125
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + authKey }) };
1126
+ return this.http.post(environment.apiUrl + '/utilities/ext/logout', {}, httpOptions);
1127
+ }
1128
+ registerFCMToken(payload) {
1129
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1130
+ return this.http.post(environment.apiUrl + '/firebase/register/device', payload, httpOptions);
1131
+ }
1132
+ getNotificationList(pageIndex, pageSize) {
1133
+ let params = new HttpParams();
1134
+ params = params.set('size', pageSize || '10');
1135
+ params = params.set('page', pageIndex || '1');
1136
+ const headers = { 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') };
1137
+ const httpOptions = { headers, params };
1138
+ return this.http.get(environment.apiUrl + '/utilities/sms/stored/notification', httpOptions);
1139
+ }
1140
+ getTotalUnreadCount() {
1141
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1142
+ return this.http.get(environment.apiUrl + '/utilities/sms/notification/count', httpOptions);
1143
+ }
1144
+ markNotification(payload) {
1145
+ //const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1146
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1147
+ return this.http.post(environment.apiUrl + '/firebase/ur/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
1148
+ }
1149
+ deleteNotification(payload) {
1150
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1151
+ return this.http.post(environment.apiUrl + '/firebase/markas/seen/' + payload.notificationId + '/' + payload.status, {}, httpOptions);
1152
+ }
1153
+ getVoicemailDetails(recordId, token) {
1154
+ const params = {
1155
+ 'Content-Type': 'application/json',
1156
+ 'Auth-Key': "Bearer " + token
1157
+ };
1158
+ const httpOptions = { headers: new HttpHeaders(params) };
1159
+ return this.http.get(environment.apiUrl + `/utilities/phonebook/play/voicerecordings/${recordId}`, httpOptions);
1160
+ }
1161
+ deleteNotifications(token, notificationIds) {
1162
+ const params = {
1163
+ 'Content-Type': 'application/json',
1164
+ 'Auth-Key': "Bearer " + token
1165
+ };
1166
+ const httpOptions = { headers: new HttpHeaders(params) };
1167
+ return this.http.get(environment.apiUrl + `/utilities/sms/delete/notification/${notificationIds}`, httpOptions);
1168
+ }
1169
+ getReports(filterData, pageIndex, pageSize) {
1170
+ const filterObj = {
1171
+ accountStatus: filterData.accountStatus || "",
1172
+ dateType: filterData.dateType || "",
1173
+ fieldType: filterData.fieldType || "",
1174
+ fieldValue: filterData.fieldValue || "",
1175
+ fromDate: filterData.fromDate || "",
1176
+ pendingDues: filterData.pendingDues,
1177
+ toDate: filterData.toDate || "",
1178
+ };
1179
+ const params = new HttpParams()
1180
+ .set('page', (pageIndex === null || pageIndex === void 0 ? void 0 : pageIndex.toString()) || '1')
1181
+ .set('size', (pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) || '10');
1182
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }),
1183
+ params: params };
1184
+ return this.http.post(environment.apiUrl + '/utilities/report/user/details', filterObj, httpOptions);
1185
+ }
1186
+ getReportsFilter() {
1187
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1188
+ return this.http.get(environment.apiUrl + '/utilities/report/dropdown', httpOptions);
1189
+ }
1190
+ getSyncReportData() {
1191
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1192
+ return this.http.post(environment.apiUrl + '/utilities/report/update/cache', {}, httpOptions);
1193
+ }
1194
+ getDownloadCSV(filterData, pageIndex, pageSize) {
1195
+ const filterObj = {
1196
+ accountStatus: filterData.accountStatus || "",
1197
+ dateType: filterData.dateType || "",
1198
+ fieldType: filterData.fieldType || "",
1199
+ fieldValue: filterData.fieldValue || "",
1200
+ fromDate: filterData.fromDate || "",
1201
+ pendingDues: filterData.pendingDues,
1202
+ toDate: filterData.toDate || "",
1203
+ };
1204
+ const params = new HttpParams()
1205
+ .set('page', pageIndex > 0 ? pageIndex.toString() : '1')
1206
+ .set('size', pageSize.toString());
1207
+ const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
1208
+ return this.http.post(environment.apiUrl + '/utilities/report/csv/download', filterObj, httpOptions);
1209
+ }
1210
+ getDeleteFile(filePathValue) {
1211
+ const httpOptions = {
1212
+ body: { filePath: filePathValue },
1213
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1214
+ };
1215
+ return this.http.post(environment.apiUrl + '/utilities/report/download/complete', httpOptions);
1216
+ }
1217
+ getDownloadPDF(filterData, pageIndex, pageSize) {
1218
+ const filterObj = {
1219
+ accountStatus: filterData.accountStatus || "",
1220
+ dateType: filterData.dateType || "",
1221
+ fieldType: filterData.fieldType || "",
1222
+ fieldValue: filterData.fieldValue || "",
1223
+ fromDate: filterData.fromDate || "",
1224
+ pendingDues: filterData.pendingDues,
1225
+ toDate: filterData.toDate || "",
1226
+ };
1227
+ const params = new HttpParams()
1228
+ .set('page', pageIndex > 0 ? pageIndex.toString() : '1')
1229
+ .set('size', pageSize.toString());
1230
+ const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }), params: params };
1231
+ return this.http.post(environment.apiUrl + '/utilities/report/pdf/download', filterObj, httpOptions);
1232
+ }
1233
+ getSuspendCategoriesData() {
1234
+ const httpOptions = {
1235
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1236
+ };
1237
+ return this.http.get(environment.apiUrl + '/utilities/report/suspend/category/dropdown', httpOptions);
1238
+ }
1239
+ getUserDetailsForSuspend(userIds) {
1240
+ const httpOptions = {
1241
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1242
+ };
1243
+ return this.http.post(`${environment.apiUrl}/admin/suspension/data/${encodeURIComponent(userIds)}`, null, httpOptions);
1244
+ }
1245
+ suspendUsers(userData) {
1246
+ const httpOptions = {
1247
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1248
+ };
1249
+ return this.http.post(`${environment.apiUrl}/admin/suspend/user`, userData, httpOptions);
1250
+ }
1251
+ resumeUser(userData) {
1252
+ const httpOptions = {
1253
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1254
+ };
1255
+ return this.http.post(`${environment.apiUrl}/admin/resume/user`, userData, httpOptions);
1256
+ }
1257
+ resumeUnpaidUsers(userData) {
1258
+ const httpOptions = {
1259
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1260
+ };
1261
+ return this.http.post(`${environment.apiUrl}/admin/resume/unpaid/user`, userData, httpOptions);
1262
+ }
1263
+ deleteUser(userData) {
1264
+ const httpOptions = {
1265
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1266
+ };
1267
+ return this.http.post(`${environment.apiUrl}/admin/delete/user`, userData, httpOptions);
1268
+ }
1269
+ deleteUserAccount() {
1270
+ const httpOptions = {
1271
+ headers: new HttpHeaders({ 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') })
1272
+ };
1273
+ // return this.http.post<any[]>(`${environment.apiUrl}/utilities/ext/delete/user/`, userData, httpOptions);
1274
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
1275
+ return this.http.post(`${environment.apiUrl}/utilities/ext/delete/user/${this.platform}/${ipAddressInfo.ip}`, null, httpOptions);
1276
+ }), catchError((error) => {
1277
+ // Properly catch errors
1278
+ return throwError(error);
1279
+ }));
1280
+ }
1281
+ getIPDetailsForCall(recordId, callStatus) {
1282
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
1283
+ const IpObj = {
1284
+ 'ipAddress': ipAddressInfo.ip,
1285
+ 'ipCountry': ipAddressInfo.address.country,
1286
+ 'recordId': recordId,
1287
+ 'callStatus': callStatus,
1288
+ };
1289
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1290
+ return this.http.post(environment.apiUrl + '/utilities/twilio/incoming/call/ip', IpObj, httpOptions).pipe(catchError(postError => {
1291
+ // console.log('Error during HTTP POST request:', postError);
1292
+ return throwError(postError);
1293
+ }));
1294
+ }), catchError(ipError => {
1295
+ // console.log('Error fetching IP address info:', ipError);
1296
+ return throwError(ipError);
1297
+ }));
1298
+ }
1299
+ getIPDetailsForSMS(recordId) {
1300
+ return this.ipAddressService.getIpAddressInfo().pipe(switchMap((ipAddressInfo) => {
1301
+ const IpObj = {
1302
+ 'ipAddress': ipAddressInfo.ip,
1303
+ 'ipCountry': ipAddressInfo.address.country,
1304
+ 'recordId': recordId,
1305
+ };
1306
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1307
+ return this.http.post(environment.apiUrl + '/utilities/twilio/inbound/sms/ip', IpObj, httpOptions);
1308
+ }, catchError(error => {
1309
+ // Catch error from getIpAddressInfo
1310
+ return throwError(error);
1311
+ })));
1312
+ }
1313
+ GetAllAvailableCountryList() {
1314
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1315
+ return this.http.get(environment.apiUrl + '/global/master/ur/dedicated/countrylist');
1316
+ // return this.http.get<string>(environment.apiUrl + '/global/master/ur/countrylist', httpOptions);
1317
+ }
1318
+ getUserSettings() {
1319
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1320
+ return this.http.get(environment.apiUrl + '/utilities/ext/settings', httpOptions);
1321
+ }
1322
+ updateDialCodePreference(settings) {
1323
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1324
+ return this.http.put(environment.apiUrl + '/utilities/ext/update/settings', settings, httpOptions);
1325
+ }
1326
+ updateLongPressTime(time) {
1327
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1328
+ return this.http.put(environment.apiUrl + '/utilities/ext/update/longpress/' + time, {}, httpOptions);
1329
+ }
1330
+ exportToCSV() {
1331
+ const httpOptions = { headers: new HttpHeaders({ 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }), responseType: 'blob' };
1332
+ return this.http.get(environment.apiUrl + '/utilities/phonebook/download/contacts', httpOptions);
1333
+ }
1334
+ getDialPreferenceNums() {
1335
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1336
+ return this.http.get(environment.apiUrl + '/utilities/ext/dial/preference/dropdown', httpOptions);
1337
+ }
1338
+ updateVASSettings(token, dtModel) {
1339
+ const params = {
1340
+ 'Content-Type': 'application/json',
1341
+ 'Auth-Key': "Bearer " + token
1342
+ };
1343
+ const httpOptions = { headers: new HttpHeaders(params) };
1344
+ return this.http.post(environment.apiUrl + '/utilities/ext/value/added/service', dtModel, httpOptions);
1345
+ }
1346
+ updateVoiceMailSettings(token, dtModel) {
1347
+ const params = {
1348
+ 'Content-Type': 'application/json',
1349
+ 'Auth-Key': "Bearer " + token
1350
+ };
1351
+ const httpOptions = { headers: new HttpHeaders(params) };
1352
+ return this.http.post(environment.apiUrl + '/utilities/ext/update/voicemail/setting', dtModel, httpOptions);
1353
+ }
1354
+ updateVoiceRecordSettings(token, dtModel) {
1355
+ const params = {
1356
+ 'Content-Type': 'application/json',
1357
+ 'Auth-Key': "Bearer " + token
1358
+ };
1359
+ const httpOptions = { headers: new HttpHeaders(params) };
1360
+ return this.http.post(environment.apiUrl + '/utilities/ext/update/call/recording/setting', dtModel, httpOptions);
1361
+ }
1362
+ getManualLinks(deviceType) {
1363
+ return `${environment.apiUrl}/landing/support/ur/user/manual/${deviceType}`;
1364
+ }
1365
+ updateSignupProfile(body) {
1366
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': 'Bearer ' + localStorage.getItem('ext_token') }) };
1367
+ return this.http.put(environment.apiUrl + '/utilities/ext/ur/update/signup/profile', body, httpOptions);
1368
+ }
1369
+ getAdminSettings() {
1370
+ const httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Auth-Key': "Bearer " + localStorage.getItem('ext_token') }) };
1371
+ return this.http.get(environment.apiUrl + '/admin/settings', httpOptions);
1372
+ }
1373
+ updateActions(token, dtModel) {
1374
+ const params = {
1375
+ 'Content-Type': 'application/json',
1376
+ 'Auth-Key': "Bearer " + token
1377
+ };
1378
+ const httpOptions = { headers: new HttpHeaders(params) };
1379
+ return this.http.post(environment.apiUrl + '/admin/change/settings', dtModel, httpOptions);
1380
+ }
1381
+ updateValueAddedServices(token, dtModel) {
1382
+ const params = {
1383
+ 'Content-Type': 'application/json',
1384
+ 'Auth-Key': "Bearer " + token
1385
+ };
1386
+ const httpOptions = { headers: new HttpHeaders(params) };
1387
+ return this.http.post(environment.apiUrl + '/admin/value/added/service', dtModel, httpOptions);
1388
+ }
1389
+ deleteAdminUsers(token, userIds) {
1390
+ const httpOptions = {
1391
+ headers: new HttpHeaders({
1392
+ 'Content-Type': 'application/json',
1393
+ 'Auth-Key': 'Bearer ' + token
1394
+ })
1395
+ };
1396
+ return this.http.delete(environment.apiUrl + `/admin/delete/value/usage/${userIds}`, httpOptions);
1397
+ }
1398
+ getUserInformation(twilioAuthId) {
1399
+ const httpOptions = {
1400
+ headers: new HttpHeaders({
1401
+ 'Content-Type': 'application/json',
1402
+ 'Auth-Key': 'Bearer ' + this.token
1403
+ })
1404
+ };
1405
+ return this.http.get(environment.apiUrl + '/utilities/twilio/c2c/information/' + twilioAuthId, httpOptions);
1406
+ }
1407
+ }
1408
+ ExtensionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, deps: [{ token: i1.HttpClient }, { token: IpAddressService }], target: i0.ɵɵFactoryTarget.Injectable });
1409
+ ExtensionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, providedIn: 'root' });
1410
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExtensionService, decorators: [{
1411
+ type: Injectable,
1412
+ args: [{
1413
+ providedIn: 'root'
1414
+ }]
1415
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: IpAddressService }]; } });
3
1416
 
4
1417
  class DialboxComponent {
1418
+ constructor(twilioService, extService,
1419
+ // private dialog: MatDialog,
1420
+ ipService, extensionService, router) {
1421
+ this.twilioService = twilioService;
1422
+ this.extService = extService;
1423
+ this.ipService = ipService;
1424
+ this.extensionService = extensionService;
1425
+ this.router = router;
1426
+ this.isDialpadHidden = false;
1427
+ this.closeDialpadEvent = new EventEmitter();
1428
+ this.callInitiated = new EventEmitter();
1429
+ this.endCallEvent = new EventEmitter();
1430
+ this.minimiseEvent = new EventEmitter();
1431
+ this.incomingCallsNewInfoEvent = new EventEmitter();
1432
+ this.incomingCallInitiated = new EventEmitter();
1433
+ this.numberDialed = new EventEmitter();
1434
+ this.isCallInProgress = false;
1435
+ this.keypadVal = keypad;
1436
+ this.showInputClearBtn = false;
1437
+ this.dialedNumber = '';
1438
+ this.contactList = [];
1439
+ this.filteredContactList = [];
1440
+ this.callerIdList = [];
1441
+ this.isCallerIdHidden = true;
1442
+ this.isTrialPeriodOver = false;
1443
+ this.isPaymentDue = false;
1444
+ this.terminateCall = false;
1445
+ this.toastTimeout = 7000;
1446
+ this.callNumberToast = {
1447
+ show: false,
1448
+ type: 'alert-success',
1449
+ number: '',
1450
+ displayNum: ''
1451
+ };
1452
+ this.callData = {
1453
+ phone: '',
1454
+ displayNum: '',
1455
+ dial: false,
1456
+ name: '',
1457
+ img: 'assets/images/user.jpg',
1458
+ isIncomingCall: false,
1459
+ extNum: ''
1460
+ };
1461
+ this.lastDialed = null;
1462
+ this.dialAlert = {
1463
+ msg: '',
1464
+ show: false
1465
+ };
1466
+ this.showDedicatedPopup = false;
1467
+ this.newIncomingCalls = [];
1468
+ this.incomingCallsList = [];
1469
+ this.subscriptions = new Subscription();
1470
+ this.shakeDedicatedBtn = false;
1471
+ this.isSmartDialCall = false;
1472
+ this.isMinimised = false;
1473
+ }
1474
+ ngOnInit() {
1475
+ try {
1476
+ this.token = localStorage.getItem('ext_token');
1477
+ //this.isCallInProgress = true;
1478
+ this.getContactList();
1479
+ // this.getUserCallSetting();
1480
+ const sub1 = this.twilioService.dialNumberFromOtherModule.subscribe((contact) => {
1481
+ if (contact.number) {
1482
+ this.isSmartDialCall = false;
1483
+ if (contact.isDialFromHistory) {
1484
+ //handle dialing from history page
1485
+ if (contact.callerId == 'smartDialing') {
1486
+ this.selectedCallerId = { number: contact.from };
1487
+ this.isSmartDialCall = true;
1488
+ setTimeout(() => {
1489
+ this.isDialpadHidden = false;
1490
+ }, 2000);
1491
+ this.callData.phone = contact.number;
1492
+ this.callData.name = contact.name;
1493
+ this.callData.img = contact.img;
1494
+ this.callData.from = contact.from;
1495
+ this.sanitizedNum = contact.number;
1496
+ // this.getUserInformation(contact);
1497
+ // this.incomingCallsList.push(contact)
1498
+ this.initiateCall();
1499
+ }
1500
+ else {
1501
+ // this.getUserCallSetting();
1502
+ setTimeout(() => {
1503
+ this.isDialpadHidden = false;
1504
+ }, 1000);
1505
+ // this.getUserInformation(contact);
1506
+ // this.incomingCallsList.push(contact)
1507
+ this.dialedNumber = contact.number;
1508
+ this.sanitizedNum = contact.number;
1509
+ }
1510
+ }
1511
+ else {
1512
+ if (contact.callerId == 'alwaysAsk' || contact.callerId == 'smartDialing') {
1513
+ // this.getUserCallSetting();
1514
+ setTimeout(() => {
1515
+ this.isDialpadHidden = false;
1516
+ }, 1000);
1517
+ this.dialedNumber = contact.number;
1518
+ this.sanitizedNum = contact.number;
1519
+ }
1520
+ else {
1521
+ setTimeout(() => {
1522
+ this.isDialpadHidden = false;
1523
+ }, 2000);
1524
+ this.callData.phone = contact.number;
1525
+ this.callData.name = contact.name;
1526
+ this.callData.img = contact.img;
1527
+ this.sanitizedNum = contact.number;
1528
+ this.initiateCall();
1529
+ }
1530
+ }
1531
+ }
1532
+ });
1533
+ // handle incoming call
1534
+ const sub2 = this.twilioService.currentCall.subscribe(incomingCallData => {
1535
+ // if (incomingCallData) {
1536
+ // this.isCallInProgress = true;
1537
+ // this.isDialpadHidden = false;
1538
+ // this.callData.phone = incomingCallData.parameters.From;
1539
+ // this.callData.name = incomingCallData.customParameters.get('name');
1540
+ // this.callData.img = incomingCallData.customParameters.get('image');
1541
+ // this.callData.isIncomingCall = true;
1542
+ // }
1543
+ if (incomingCallData) {
1544
+ if (this.isCallInProgress) {
1545
+ this.newIncomingCalls.push(incomingCallData);
1546
+ // this.getUserInformation(incomingCallData);
1547
+ }
1548
+ else {
1549
+ this.isCallInProgress = true;
1550
+ this.isDialpadHidden = false;
1551
+ this.callData.phone = incomingCallData.parameters['From'];
1552
+ // this.getUserInformation(incomingCallData);
1553
+ this.callData.name = incomingCallData.customParameters.get('name');
1554
+ this.callData.img = incomingCallData.customParameters.get('image') || 'assets/images/user.jpg';
1555
+ this.callData.isIncomingCall = true;
1556
+ }
1557
+ incomingCallData.on('cancel', () => {
1558
+ // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
1559
+ if (this.incomingCallsList.length == 0) {
1560
+ this.isCallInProgress = false;
1561
+ }
1562
+ });
1563
+ incomingCallData.on('disconnect', () => {
1564
+ // this.incomingCallsList = this.incomingCallsList.filter((item:any) => item.parameters.CallSid !== incomingCallData.parameters.CallSid);
1565
+ if (this.incomingCallsList.length == 0) {
1566
+ this.isCallInProgress = false;
1567
+ }
1568
+ });
1569
+ }
1570
+ });
1571
+ this.subscriptions.add(sub1);
1572
+ this.subscriptions.add(sub2);
1573
+ }
1574
+ catch (e) {
1575
+ console.log(e);
1576
+ }
1577
+ }
1578
+ // getUserInformation(incomingCallData: any) {
1579
+ // let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
1580
+ // this.extensionService.getUserInformation(data.twilioAuthId).subscribe(
1581
+ // response => {
1582
+ // incomingCallData['userInfo']=response
1583
+ // this.incomingCallsList.push(incomingCallData);
1584
+ // }, error => {
1585
+ // console.error('Error starting recording', error);
1586
+ // });
1587
+ // }
1588
+ fromEntries(entries) {
1589
+ return entries.reduce((acc, [key, value]) => {
1590
+ acc[key] = value;
1591
+ return acc;
1592
+ }, {});
1593
+ }
1594
+ ngAfterViewInit() {
1595
+ this.registerDragElement();
1596
+ }
1597
+ ngOnChanges(changes) {
1598
+ if (changes['isDialpadHidden'] && !this.isDialpadHidden) {
1599
+ this.getContactList();
1600
+ // this.getUserCallSetting();
1601
+ setTimeout(() => {
1602
+ this.dialInputElement.nativeElement.focus();
1603
+ }, 0);
1604
+ }
1605
+ }
1606
+ registerDragElement() {
1607
+ try {
1608
+ const elmnt = document.getElementById('dragparent1');
1609
+ let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
1610
+ const dragMouseDown = (e) => {
1611
+ // If the target is an input, return and don't initiate dragging
1612
+ if (e.target.tagName.toLowerCase() === 'input') {
1613
+ return;
1614
+ }
1615
+ e = e || window.event;
1616
+ // get the mouse cursor position at startup:
1617
+ pos3 = e.clientX;
1618
+ pos4 = e.clientY;
1619
+ document.onmouseup = closeDragElement;
1620
+ // call a function whenever the cursor moves:
1621
+ document.onmousemove = elementDrag;
1622
+ };
1623
+ const elementDrag = (e) => {
1624
+ e = e || window.event;
1625
+ // calculate the new cursor position:
1626
+ pos1 = pos3 - e.clientX;
1627
+ pos2 = pos4 - e.clientY;
1628
+ pos3 = e.clientX;
1629
+ pos4 = e.clientY;
1630
+ // set the element's new position:
1631
+ // elmnt.style.top = elmnt.offsetTop - pos2 + 'px';
1632
+ // elmnt.style.left = elmnt.offsetLeft - pos1 + 'px';
1633
+ };
1634
+ const closeDragElement = () => {
1635
+ /* stop moving when mouse button is released:*/
1636
+ document.onmouseup = null;
1637
+ document.onmousemove = null;
1638
+ };
1639
+ // if (document.getElementById(elmnt.id + 'header')) {
1640
+ // /* if present, the header is where you move the DIV from:*/
1641
+ // document.getElementById(elmnt.id + 'header').onmousedown = dragMouseDown;
1642
+ // } else {
1643
+ // /* otherwise, move the DIV from anywhere inside the DIV:*/
1644
+ // elmnt.onmousedown = dragMouseDown;
1645
+ // }
1646
+ }
1647
+ catch (e) {
1648
+ console.log(e);
1649
+ }
1650
+ }
1651
+ addNumber(num) {
1652
+ if (num == '#' || num == '*' || num == '+' || Number.isInteger(num)) {
1653
+ if (num == '#') {
1654
+ new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
1655
+ }
1656
+ else if (num == '*') {
1657
+ new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
1658
+ }
1659
+ else {
1660
+ new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
1661
+ }
1662
+ this.dialedNumber += num;
1663
+ this.showInputClearBtn = true;
1664
+ this.numberDialed.emit(this.dialedNumber);
1665
+ this.onDialInputChange(this.dialedNumber);
1666
+ // this.dialInputRef.nativeElement.focus();
1667
+ }
1668
+ else if (num === 'voicemail') {
1669
+ // this.showDedicatedPopup = true;
1670
+ this.router.navigate(['extension/voicemail/' + this.token]);
1671
+ }
1672
+ }
1673
+ hideDialpad() {
1674
+ this.isDialpadHidden = true;
1675
+ this.closeDialpadEvent.emit();
1676
+ this.clearAllDialed();
1677
+ this.filteredContactList = [];
1678
+ }
1679
+ onDialInputChange(inputVal) {
1680
+ try {
1681
+ // Updated regex to include x, X, ext., Ext., and ,
1682
+ const isNumericInput = /^[\d\s+\-]+$/.test(inputVal);
1683
+ let mainNumber = inputVal;
1684
+ // Check for extension indicators and split the input
1685
+ const extMatch = inputVal.match(/(x|X|ext\.|Ext\.|,)(.*)/);
1686
+ if (extMatch) {
1687
+ mainNumber = inputVal.substring(0, extMatch.index).trim();
1688
+ this.callData.extNum = extMatch[2].trim();
1689
+ }
1690
+ this.sanitizedNum = isNumericInput ? mainNumber.replace(/[\s\-]+/g, '') : mainNumber;
1691
+ this.callData.phone = isNumericInput ? this.sanitizedNum : '';
1692
+ this.showInputClearBtn = inputVal.length > 0;
1693
+ if (isNumericInput) {
1694
+ this.dialedNumber = new AsYouType().input(this.sanitizedNum);
1695
+ }
1696
+ // emit current number whenever input changes
1697
+ this.numberDialed.emit(this.dialedNumber);
1698
+ if (inputVal.length > 2) {
1699
+ this.filteredContactList = this.contactList.filter(contact => {
1700
+ const fullName = `${contact.firstName} ${contact.middleName} ${contact.lastName}`.toLowerCase();
1701
+ // return fullName.includes(this.sanitizedNum.toLowerCase()) || contact.numbersList.some(num => num.number.includes(this.sanitizedNum));
1702
+ }).slice(0, 2);
1703
+ }
1704
+ else {
1705
+ this.filteredContactList = [];
1706
+ }
1707
+ }
1708
+ catch (e) {
1709
+ console.log(e);
1710
+ }
1711
+ }
1712
+ getFirstLetter(name) {
1713
+ return name ? name.charAt(0).toUpperCase() : '';
1714
+ }
1715
+ clearInput() {
1716
+ if (this.dialedNumber.length > 0) {
1717
+ this.dialedNumber = this.dialedNumber.slice(0, -1);
1718
+ this.showInputClearBtn = this.dialedNumber.length !== 0;
1719
+ this.onDialInputChange(this.dialedNumber);
1720
+ }
1721
+ }
1722
+ clearAllDialed() {
1723
+ this.dialedNumber = '';
1724
+ this.sanitizedNum = '';
1725
+ this.showInputClearBtn = false;
1726
+ }
1727
+ getCallerIdList() {
1728
+ this.extService.displayID(this.token || '').subscribe((res) => {
1729
+ //this.callerIdList = res.callerIdList.filter(item => item.type === "C2C Softphone Number");
1730
+ this.callerIdList = res.callerIdList.filter((item) => item.voiceFeature === true);
1731
+ // this.callerIdList = res.callerIdList;
1732
+ if (this.callerIdList.length == 1) {
1733
+ this.selectedCallerId = this.callerIdList[0];
1734
+ }
1735
+ else {
1736
+ if (this.callPreference === 'alwaysAsk' || this.callPreference === 'smartDialing') {
1737
+ this.selectedCallerId = null;
1738
+ }
1739
+ else {
1740
+ this.selectedCallerId = this.callerIdList.find(item => (item.number == this.callPreference));
1741
+ }
1742
+ }
1743
+ });
1744
+ }
1745
+ getContactList() {
1746
+ this.twilioService.getContactList().subscribe((resp) => {
1747
+ if (resp.response == 'Success') {
1748
+ this.contactList = resp.phoneBook;
1749
+ }
1750
+ }, err => {
1751
+ console.log(err);
1752
+ });
1753
+ }
1754
+ getFullName(contact) {
1755
+ let fullName = contact.firstName || '';
1756
+ if (contact.middleName) {
1757
+ fullName += ` ${contact.middleName}`;
1758
+ }
1759
+ if (contact.lastName) {
1760
+ fullName += ` ${contact.lastName}`;
1761
+ }
1762
+ return fullName.trim();
1763
+ }
1764
+ toggleCallerIdDiv() {
1765
+ this.isCallerIdHidden = !this.isCallerIdHidden;
1766
+ }
1767
+ onContactSelect(contact) {
1768
+ this.dialedNumber = contact.numbersList[0].number;
1769
+ this.callData.name = this.getFullName(contact);
1770
+ this.callData.img = contact.image || 'assets/images/user.jpg';
1771
+ this.onDialInputChange(this.dialedNumber);
1772
+ this.filteredContactList = [];
1773
+ }
1774
+ endCall() {
1775
+ try {
1776
+ console.log('Ending call');
1777
+ this.isCallInProgress = false;
1778
+ this.filteredContactList = [];
1779
+ // Reset call data
1780
+ this.callData = {
1781
+ phone: '',
1782
+ name: '',
1783
+ img: 'assets/images/user.jpg',
1784
+ isIncomingCall: false,
1785
+ dial: false,
1786
+ displayNum: '',
1787
+ extNum: ''
1788
+ };
1789
+ // Reset dialed number
1790
+ this.dialedNumber = '';
1791
+ this.sanitizedNum = '';
1792
+ // Emit end call event
1793
+ this.endCallEvent.emit();
1794
+ console.log('Call ended successfully');
1795
+ }
1796
+ catch (error) {
1797
+ console.error('Error in endCall:', error);
1798
+ // Even if there's an error, try to reset the state
1799
+ this.isCallInProgress = false;
1800
+ this.callData = {
1801
+ phone: '',
1802
+ name: '',
1803
+ img: 'assets/images/user.jpg',
1804
+ isIncomingCall: false,
1805
+ dial: false,
1806
+ displayNum: '',
1807
+ extNum: ''
1808
+ };
1809
+ this.endCallEvent.emit();
1810
+ }
1811
+ }
1812
+ // async initiateCall() {
1813
+ // try {
1814
+ // console.log('Initiating call with number:', this.dialedNumber);
1815
+ // if (!this.dialedNumber && this.lastDialed) {
1816
+ // console.log('Using last dialed number:', this.lastDialed.number);
1817
+ // this.sanitizedNum = this.lastDialed.number;
1818
+ // }
1819
+ // const isInvalid = await this.isInvalidNumber();
1820
+ // if (isInvalid) {
1821
+ // console.error('Invalid number format');
1822
+ // return false;
1823
+ // }
1824
+ // this.saveLastDialed();
1825
+ // this.isSavedContactDialled();
1826
+ // // Check payment status
1827
+ // this.isPaymentDue = localStorage.getItem('paymentDue') === 'true';
1828
+ // if (this.isPaymentDue) {
1829
+ // console.warn('Payment is due');
1830
+ // swal('Warning', 'Please note that your payment is due. To continue using our services, kindly subscribe to avoid interruptions.');
1831
+ // return false;
1832
+ // }
1833
+ // // Check if dialing own number
1834
+ // if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
1835
+ // console.error('Attempted to dial own number');
1836
+ // swal('Error', 'You cannot dial your own number');
1837
+ // return false;
1838
+ // }
1839
+ // // Check microphone permissions
1840
+ // const hasPermission = await this.checkMicrophonePermission();
1841
+ // if (!hasPermission) {
1842
+ // console.warn('Microphone permission not granted');
1843
+ // await this.askForMicrophonePermission();
1844
+ // return false;
1845
+ // }
1846
+ // if (!this.selectedCallerId) {
1847
+ // console.error('No caller ID selected');
1848
+ // this.shakeDedicatedBtn = true;
1849
+ // this.showDialAlert('Please select a C2C number to call from');
1850
+ // setTimeout(() => {
1851
+ // this.shakeDedicatedBtn = false;
1852
+ // }, 3000);
1853
+ // return false;
1854
+ // }
1855
+ // console.log('Getting number with country code...');
1856
+ // this.callData.displayNum = '';
1857
+ // try {
1858
+ // await this.getToNumber(this.sanitizedNum);
1859
+ // } catch (error) {
1860
+ // console.error('Error getting number with country code:', error);
1861
+ // this.showDialAlert('Error processing number. Please try again.');
1862
+ // return false;
1863
+ // }
1864
+ // if (this.terminateCall) {
1865
+ // console.log('Call terminated by user');
1866
+ // this.terminateCall = false;
1867
+ // return false;
1868
+ // }
1869
+ // // Prepare call data
1870
+ // this.callData = {
1871
+ // ...this.callData,
1872
+ // phone: this.sanitizedNum,
1873
+ // isIncomingCall: false,
1874
+ // dial: true,
1875
+ // from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
1876
+ // timestamp: new Date().toISOString()
1877
+ // };
1878
+ // console.log('Initiating call with data:', this.callData);
1879
+ // this.isCallInProgress = true;
1880
+ // this.callInitiated.emit({ ...this.callData });
1881
+ // return true;
1882
+ // } catch (error) {
1883
+ // console.error('Error in initiateCall:', error);
1884
+ // this.showDialAlert('Failed to initiate call. Please try again.');
1885
+ // this.isCallInProgress = false;
1886
+ // return false;
1887
+ // }
1888
+ // //this.clearAllDialed();
1889
+ // // } else {
1890
+ // // swal('Error', 'Trial period is over. Please setup payment method to continue services')
1891
+ // // }
1892
+ // }
1893
+ // async initiateCall() {
1894
+ // if (!this.dialedNumber && this.lastDialed) {
1895
+ // this.sanitizedNum = this.lastDialed.number;
1896
+ // }
1897
+ // const isInvalid = await this.isInvalidNumber();
1898
+ // if (isInvalid) {
1899
+ // return false;
1900
+ // }
1901
+ // this.saveLastDialed();
1902
+ // this.isSavedContactDialled();
1903
+ // //let isCallerIdSet = await this.isCallerIdSet();
1904
+ // this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
1905
+ // if (this.isPaymentDue) {
1906
+ // swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
1907
+ // return;
1908
+ // }
1909
+ // this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
1910
+ // // if (!this.isTrialPeriodOver) {
1911
+ // if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
1912
+ // swal('Error', 'You can not dial this number');
1913
+ // return;
1914
+ // }
1915
+ // const hasPermission = await this.checkMicrophonePermission();
1916
+ // if (hasPermission) {
1917
+ // if (this.selectedCallerId) {
1918
+ // //clear displayNum if value is binded from previous call
1919
+ // this.callData.displayNum = '';
1920
+ // // get number to be dialled from backend
1921
+ // await this.getToNumber(this.sanitizedNum);
1922
+ // if (this.terminateCall) {
1923
+ // this.terminateCall = false;
1924
+ // return;
1925
+ // }
1926
+ // this.callData.phone = this.sanitizedNum;
1927
+ // this.callData.isIncomingCall = false;
1928
+ // this.callData.dial = true;
1929
+ // if (!this.isSmartDialCall) {
1930
+ // this.callData.from = this.selectedCallerId.number;
1931
+ // }
1932
+ // this.isCallInProgress = true;
1933
+ // this.callData = {
1934
+ // ...this.callData,
1935
+ // phone: this.sanitizedNum,
1936
+ // isIncomingCall: false,
1937
+ // dial: true,
1938
+ // from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
1939
+ // timestamp: new Date().toISOString()
1940
+ // };
1941
+ // console.log('Initiating call with data:', this.callData);
1942
+ // this.isCallInProgress = true;
1943
+ // this.callInitiated.emit({ ...this.callData });
1944
+ // return true;
1945
+ // } else {
1946
+ // this.shakeDedicatedBtn = true;
1947
+ // this.showDialAlert('Select a C2C number to call');
1948
+ // setTimeout(() => {
1949
+ // this.shakeDedicatedBtn = false;
1950
+ // }, 3000);
1951
+ // return false;
1952
+ // }
1953
+ // //this.callingOpenEvent.emit({ phone: this.dialedNumber });
1954
+ // } else {
1955
+ // await this.askForMicrophonePermission();
1956
+ // }
1957
+ // //this.clearAllDialed();
1958
+ // // } else {
1959
+ // // swal('Error', 'Trial period is over. Please setup payment method to continue services')
1960
+ // // }
1961
+ // }
1962
+ // async initiateCall() {
1963
+ // try{
1964
+ // if (!this.dialedNumber && this.lastDialed) {
1965
+ // this.sanitizedNum = this.lastDialed.number;
1966
+ // }
1967
+ // const isInvalid = await this.isInvalidNumber();
1968
+ // if (isInvalid) {
1969
+ // return false;
1970
+ // }
1971
+ // this.saveLastDialed();
1972
+ // this.isSavedContactDialled();
1973
+ // //let isCallerIdSet = await this.isCallerIdSet();
1974
+ // this.isPaymentDue = localStorage.getItem('paymentDue') == 'false' ? false : true;
1975
+ // if (this.isPaymentDue) {
1976
+ // swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
1977
+ // return false;
1978
+ // }
1979
+ // this.isTrialPeriodOver = localStorage.getItem('trialOver') == 'false' ? false : true;
1980
+ // // if (!this.isTrialPeriodOver) {
1981
+ // if (this.sanitizedNum == localStorage.getItem('twilioNumber')) {
1982
+ // swal('Error', 'You can not dial this number');
1983
+ // return false;
1984
+ // }
1985
+ // const hasPermission = await this.checkMicrophonePermission();
1986
+ // if (hasPermission) {
1987
+ // if (this.selectedCallerId) {
1988
+ // //clear displayNum if value is binded from previous call
1989
+ // this.callData.displayNum = '';
1990
+ // // get number to be dialled from backend
1991
+ // await this.getToNumber(this.sanitizedNum);
1992
+ // if (this.terminateCall) {
1993
+ // this.terminateCall = false;
1994
+ // return;
1995
+ // }
1996
+ // this.callData.phone = this.sanitizedNum;
1997
+ // this.callData.isIncomingCall = false;
1998
+ // this.callData.dial = true;
1999
+ // if (!this.isSmartDialCall) {
2000
+ // this.callData.from = this.selectedCallerId.number;
2001
+ // }
2002
+ // this.isCallInProgress = true;
2003
+ // this.callData = {
2004
+ // ...this.callData,
2005
+ // phone: this.sanitizedNum,
2006
+ // isIncomingCall: false,
2007
+ // dial: true,
2008
+ // from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number,
2009
+ // timestamp: new Date().toISOString()
2010
+ // };
2011
+ // console.log('Initiating call with data:', this.callData);
2012
+ // this.isCallInProgress = true;
2013
+ // this.callInitiated.emit({ ...this.callData });
2014
+ // return true;
2015
+ // } else {
2016
+ // this.shakeDedicatedBtn = true;
2017
+ // this.showDialAlert('Select a C2C number to call');
2018
+ // setTimeout(() => {
2019
+ // this.shakeDedicatedBtn = false;
2020
+ // }, 3000);
2021
+ // return false;
2022
+ // }
2023
+ // //this.callingOpenEvent.emit({ phone: this.dialedNumber });
2024
+ // } else {
2025
+ // await this.askForMicrophonePermission();
2026
+ // }
2027
+ // //this.clearAllDialed();
2028
+ // // } else {
2029
+ // // swal('Error', 'Trial period is over. Please setup payment method to continue services')
2030
+ // // }
2031
+ // }catch(e){
2032
+ // console.error('Error in initiateCall:', e);
2033
+ // this.showDialAlert('Failed to initiate call. Please try again.');
2034
+ // this.isCallInProgress = false;
2035
+ // return false;
2036
+ // }
2037
+ // }
2038
+ initiateCall() {
2039
+ return __awaiter(this, void 0, void 0, function* () {
2040
+ try {
2041
+ if (!this.dialedNumber && this.lastDialed) {
2042
+ this.sanitizedNum = this.lastDialed.number;
2043
+ }
2044
+ const isInvalid = yield this.isInvalidNumber();
2045
+ if (isInvalid) {
2046
+ return false;
2047
+ }
2048
+ // this.saveLastDialed();
2049
+ this.isSavedContactDialled();
2050
+ this.isPaymentDue = localStorage.getItem('paymentDue') === 'false' ? false : true;
2051
+ if (this.isPaymentDue) {
2052
+ // swal('Warning', 'Please note that your payment is due, To continue on your services kindly subscribe to use uninterrupted services.');
2053
+ return false;
2054
+ }
2055
+ this.isTrialPeriodOver = localStorage.getItem('trialOver') === 'false' ? false : true;
2056
+ if (this.sanitizedNum === localStorage.getItem('twilioNumber')) {
2057
+ // swal('Error', 'You can not dial this number');
2058
+ return false;
2059
+ }
2060
+ // const hasPermission = await this.checkMicrophonePermission();
2061
+ // if (!hasPermission) {
2062
+ // await this.askForMicrophonePermission();
2063
+ // return false;
2064
+ // }
2065
+ if (!this.selectedCallerId) {
2066
+ this.shakeDedicatedBtn = true;
2067
+ this.showDialAlert('Select a C2C number to call');
2068
+ setTimeout(() => {
2069
+ this.shakeDedicatedBtn = false;
2070
+ }, 3000);
2071
+ return false;
2072
+ }
2073
+ // Clear displayNum if value is bound from previous call
2074
+ this.callData.displayNum = '';
2075
+ // Get number to be dialed from backend
2076
+ // await this.getToNumber(this.sanitizedNum);
2077
+ if (this.terminateCall) {
2078
+ this.terminateCall = false;
2079
+ return;
2080
+ }
2081
+ // Update call data in a single operation
2082
+ this.callData = Object.assign(Object.assign({}, this.callData), { phone: this.sanitizedNum, isIncomingCall: false, dial: true, from: this.isSmartDialCall ? this.callData.from : this.selectedCallerId.number, timestamp: new Date().toISOString() });
2083
+ console.log('Initiating call with data:', this.callData);
2084
+ this.isCallInProgress = true;
2085
+ this.callInitiated.emit(Object.assign({}, this.callData));
2086
+ return true;
2087
+ }
2088
+ catch (e) {
2089
+ console.error('Error in initiateCall:', e);
2090
+ this.showDialAlert('Failed to initiate call. Please try again.');
2091
+ this.isCallInProgress = false;
2092
+ return false;
2093
+ }
2094
+ });
2095
+ }
2096
+ isInvalidNumber() {
2097
+ return __awaiter(this, void 0, void 0, function* () {
2098
+ try {
2099
+ if (this.sanitizedNum == '') {
2100
+ this.showDialAlert('Invalid Number');
2101
+ return true;
2102
+ }
2103
+ const validNumberPattern = /^[+\d\s()-]*$/; // Regular expression to match valid characters
2104
+ const phoneNumber = this.sanitizedNum;
2105
+ if (!validNumberPattern.test(phoneNumber)) {
2106
+ this.showDialAlert('Invalid Number');
2107
+ return true;
2108
+ }
2109
+ return false;
2110
+ }
2111
+ catch (error) {
2112
+ this.showDialAlert('Invalid Number');
2113
+ return true; // Return true if an error occurred, meaning the number is invalid
2114
+ }
2115
+ });
2116
+ }
2117
+ // saveLastDialed() {
2118
+ // const contact = this.filteredContactList.find(c => c.numbersList.some(n => n.number === this.dialedNumber));
2119
+ // if (contact) {
2120
+ // this.lastDialed = {
2121
+ // name: contact.name,
2122
+ // image: contact.image,
2123
+ // number: this.dialedNumber
2124
+ // };
2125
+ // } else {
2126
+ // if(this.dialedNumber){
2127
+ // this.lastDialed = { number: this.dialedNumber };
2128
+ // }
2129
+ // }
2130
+ // }
2131
+ isSavedContactDialled() {
2132
+ let phoneNum = this.sanitizedNum.replace(/\s+/g, '');
2133
+ let contact = this.contactList.filter(contact => {
2134
+ // return contact.numbersList.some(num => num.number === phoneNum)
2135
+ });
2136
+ if (contact.length) {
2137
+ this.callData.name = `${contact[0].firstName} ${contact[0].middleName} ${contact[0].lastName}`.toLowerCase();
2138
+ this.callData.img = contact[0].image || 'assets/images/user.jpg';
2139
+ this.callData.phone = this.sanitizedNum;
2140
+ return true;
2141
+ }
2142
+ return false;
2143
+ }
2144
+ showDialAlert(message) {
2145
+ this.dialAlert = {
2146
+ msg: message,
2147
+ show: true
2148
+ };
2149
+ setTimeout(() => {
2150
+ this.dialAlert.show = false;
2151
+ }, 3000);
2152
+ }
2153
+ isCallerIdSet() {
2154
+ return __awaiter(this, void 0, void 0, function* () {
2155
+ try {
2156
+ const tkn = localStorage.getItem('ext_token');
2157
+ const res = yield this.extService.fetchCallerId(tkn || '').toPromise();
2158
+ if (res.status == 200) {
2159
+ localStorage.setItem('trialOver', res.trialOver);
2160
+ this.twilioService.isTrialOver.next(res.trialOver);
2161
+ localStorage.setItem('paymentDue', res.paymentDue);
2162
+ this.twilioService.isPaymentDue.next(res.paymentDue);
2163
+ }
2164
+ if (res.callerid) {
2165
+ localStorage.setItem('callerID', res.callerid);
2166
+ this.extService.changeMessage(res.callerid);
2167
+ }
2168
+ else {
2169
+ localStorage.setItem('callerID', 'Not set');
2170
+ this.extService.changeMessage('Not set');
2171
+ }
2172
+ return (localStorage.getItem('callerID') !== 'Not set');
2173
+ }
2174
+ catch (e) {
2175
+ console.log(e);
2176
+ return false;
2177
+ }
2178
+ });
2179
+ }
2180
+ checkMicrophonePermission() {
2181
+ return __awaiter(this, void 0, void 0, function* () {
2182
+ try {
2183
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2184
+ stream.getTracks().forEach(track => track.stop());
2185
+ return true;
2186
+ }
2187
+ catch (error) {
2188
+ if (error instanceof DOMException && error.name === 'NotAllowedError') {
2189
+ return false;
2190
+ }
2191
+ else {
2192
+ return false;
2193
+ }
2194
+ }
2195
+ });
2196
+ }
2197
+ askForMicrophonePermission() {
2198
+ return __awaiter(this, void 0, void 0, function* () {
2199
+ try {
2200
+ const stream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2201
+ stream.getTracks().forEach(track => track.stop());
2202
+ }
2203
+ catch (error) {
2204
+ console.error('User denied microphone permission:', error);
2205
+ }
2206
+ });
2207
+ }
2208
+ // below function is to get the country code with number from server
2209
+ getToNumber(dialedNumber) {
2210
+ return __awaiter(this, void 0, void 0, function* () {
2211
+ if (dialedNumber[0] !== '+') {
2212
+ // this is case when user geolocation dial code is on
2213
+ let ipAddress = yield this.ipService.getIpAddressInfo().toPromise();
2214
+ const res = yield this.twilioService.getToNumber(dialedNumber, ipAddress.address.countryCode).toPromise();
2215
+ if (res.status == 200) {
2216
+ this.toastTimeout = res.timeInterval * 1000;
2217
+ yield this.showNumberToast(res);
2218
+ }
2219
+ }
2220
+ });
2221
+ }
2222
+ isAlertEnable() {
2223
+ return localStorage.getItem('isAlertEnable');
2224
+ }
2225
+ showNumberToast(data) {
2226
+ return __awaiter(this, void 0, void 0, function* () {
2227
+ const isAlertOn = (localStorage.getItem('isCountryCodeToastOn'));
2228
+ if (isAlertOn == 'true') {
2229
+ this.callNumberToast.show = true;
2230
+ this.callNumberToast.number = data.toNumber;
2231
+ this.callNumberToast.displayNum = data.displayNumber;
2232
+ }
2233
+ this.callData.displayNum = data.displayNumber;
2234
+ //this.callData.phone = data.toNumber;
2235
+ yield this.delay(this.toastTimeout);
2236
+ this.dialedNumber = data.toNumber;
2237
+ this.sanitizedNum = data.toNumber;
2238
+ this.callNumberToast.show = false;
2239
+ this.callNumberToast.number = '';
2240
+ this.callNumberToast.displayNum = '';
2241
+ });
2242
+ }
2243
+ delay(ms) {
2244
+ return new Promise(resolve => setTimeout(resolve, ms));
2245
+ }
2246
+ onMinimise(isMinimised) {
2247
+ this.isMinimised = isMinimised;
2248
+ this.minimiseEvent.emit(isMinimised);
2249
+ }
2250
+ handleNumberPaste(event) {
2251
+ event.preventDefault();
2252
+ const clipboardData = event.clipboardData || window.clipboardData;
2253
+ const pastedData = clipboardData.getData('text');
2254
+ // Log the pasted content to the console
2255
+ if (pastedData) {
2256
+ this.dialedNumber = pastedData;
2257
+ this.sanitizedNum = pastedData;
2258
+ }
2259
+ }
2260
+ onEnter(num) {
2261
+ console.log(num, 'number fn');
2262
+ this.dialedNumber = this.dialedNumber + num;
2263
+ this.sanitizedNum = this.dialedNumber;
2264
+ this.showInputClearBtn = true;
2265
+ this.numberDialed.emit(this.dialedNumber);
2266
+ }
2267
+ getUserCallSetting() {
2268
+ const tkn = localStorage.getItem('ext_token');
2269
+ this.extService.fetchCallerId(tkn || '').subscribe((resp) => {
2270
+ if (resp.status == 200) {
2271
+ //this.callPrefernce = resp.userSetting;
2272
+ this.callPreference = resp.callerid;
2273
+ this.getCallerIdList();
2274
+ }
2275
+ });
2276
+ }
2277
+ onDedicatedNumSelect(id) {
2278
+ this.selectedCallerId = id;
2279
+ this.isCallerIdHidden = true;
2280
+ this.extService.setCallerId(id);
2281
+ }
2282
+ cancelDialNumber() {
2283
+ this.terminateCall = true;
2284
+ this.callNumberToast.show = false;
2285
+ }
2286
+ handleDivKeydown(ev) {
2287
+ if (this.dialedNumber.length == 0) {
2288
+ this.dialInputElement.nativeElement.focus();
2289
+ }
2290
+ if (ev.key === 'Enter') {
2291
+ // Check if the dialpad is open
2292
+ if (!this.isDialpadHidden) {
2293
+ if (this.dialedNumber.length > 2 && this.selectedCallerId) {
2294
+ this.initiateCall();
2295
+ }
2296
+ if (!this.selectedCallerId) {
2297
+ this.shakeDedicatedBtn = true;
2298
+ setTimeout(() => {
2299
+ this.shakeDedicatedBtn = false;
2300
+ }, 10000);
2301
+ }
2302
+ }
2303
+ }
2304
+ }
2305
+ onCallBtnMouseEnter(ev) {
2306
+ if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2307
+ this.shakeDedicatedBtn = true;
2308
+ }
2309
+ }
2310
+ onCallBtnMouseLeave(ev) {
2311
+ if (!this.selectedCallerId || (this.selectedCallerId == 'alwaysAsk') || (this.selectedCallerId == 'smartDialing')) {
2312
+ this.shakeDedicatedBtn = false;
2313
+ }
2314
+ }
2315
+ acceptNewIncomingCall(call) {
2316
+ //first cut the current call
2317
+ //this.callData = call;
2318
+ this.newIncomingCallData = call;
2319
+ }
2320
+ // rejectNewIncomingCall(call: Call) {
2321
+ // call.reject();
2322
+ // this.newIncomingCalls = this.newIncomingCalls.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
2323
+ // this.incomingCallsList = this.incomingCallsList.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
2324
+ // }
2325
+ newIncomingCallInitiated() {
2326
+ this.isCallInProgress = true;
2327
+ this.newIncomingCalls = [];
2328
+ this.incomingCallInitiated.emit();
2329
+ }
2330
+ incomingCallsNewInfo(data) {
2331
+ this.incomingCallsList = data;
2332
+ this.incomingCallsNewInfoEvent.emit(data);
2333
+ }
2334
+ ngOnDestroy() {
2335
+ try {
2336
+ console.log('Cleaning up C2cDialpadComponent');
2337
+ // Unsubscribe from all subscriptions
2338
+ if (this.subscriptions) {
2339
+ this.subscriptions.unsubscribe();
2340
+ }
2341
+ // End any active call
2342
+ if (this.isCallInProgress) {
2343
+ this.endCall();
2344
+ }
2345
+ // Clear any timeouts or intervals if they exist
2346
+ if (this.toastTimeout) {
2347
+ clearTimeout(this.toastTimeout);
2348
+ }
2349
+ console.log('C2cDialpadComponent cleanup complete');
2350
+ }
2351
+ catch (error) {
2352
+ console.error('Error during component cleanup:', error);
2353
+ }
2354
+ }
5
2355
  }
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"] });
2356
+ DialboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, deps: [{ token: TwilioService }, { token: ExtensionService }, { token: IpAddressService }, { token: ExtensionService }, { token: i4.Router }], target: i0.ɵɵFactoryTarget.Component });
2357
+ DialboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialboxComponent, selector: "lib-dialbox", inputs: { isDialpadHidden: "isDialpadHidden" }, outputs: { closeDialpadEvent: "closeDialpadEvent", callInitiated: "callInitiated", endCallEvent: "endCallEvent", minimiseEvent: "minimiseEvent", incomingCallsNewInfoEvent: "incomingCallsNewInfoEvent", incomingCallInitiated: "incomingCallInitiated", numberDialed: "numberDialed" }, viewQueries: [{ propertyName: "dialInputElement", first: true, predicate: ["dialInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : '&nbsp;'}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <!-- <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li> -->\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <!-- <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n ", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px;height:600px;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
15
2358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxComponent, decorators: [{
16
2359
  type: Component,
17
- args: [{ selector: 'lib-dialbox', template: `
18
- <div style="padding: 20px; border: 1px solid #ccc; border-radius: 4px;">
19
- <h3>Dialbox Component</h3>
20
- <p>
21
- Dialbox is working!
22
- </p>
23
- </div>
24
- `, styles: [":host{display:block}\n"] }]
25
- }] });
2360
+ args: [{ selector: 'lib-dialbox', template: "<div id=\"dragparent1\" [ngStyle]=\"{'display':isDialpadHidden ? 'none': 'block'}\">\r\n <!-- <app-call-progress *ngIf=\"isCallInProgress\"\r\n (endCallEvent)=\"endCall()\"\r\n (minimiseEvent) = \"onMinimise($event)\"\r\n (incomingCallInitiated)=\"newIncomingCallInitiated()\"\r\n [newIncomingCallData]=\"newIncomingCallData\"\r\n [newIncomingCallsList]=\"incomingCallsList\"\r\n (incomingCallsNewInfo)=\"incomingCallsNewInfo($event)\"\r\n [callData]=\"callData\"></app-call-progress> -->\r\n <div class=\"dialpad-container\" [ngClass]=\"{'mini-dialpad': isMinimised}\" tabindex=\"0\" (keydown)=\"handleDivKeydown($event)\">\r\n <div id=\"topPanel\" [ngStyle]=\"{'height': callerIdList.length ? '40%' : '39%'}\">\r\n <div class=\"dialpad-alerts\" *ngIf=\"dialAlert.show\">\r\n <div class=\"no-selection-alert\">\r\n <!-- <p class=\"mb-0\">Select C2C number to call</p> -->\r\n <p class=\"mb-0\">{{dialAlert.msg}}</p>\r\n <span class=\"fa fa-times\" (click)=\"shakeDedicatedBtn = false\"></span>\r\n </div>\r\n </div>\r\n <div class=\"dialpad-alerts\" *ngIf=\"callNumberToast.show\">\r\n <div class=\"dialbox-pop1 alert fade show\" [ngClass]=\"callNumberToast.type\" role=\"alert\">\r\n <div class=\"d-flex justify-content-between\">\r\n <div class=\"flex-grow-1 my-auto text-left\">\r\n You'r calling <strong>{{callNumberToast.displayNum}}</strong>\r\n </div>\r\n <div class=\"text-right\">\r\n <button class=\"btn btn-link btn-disc p-0 px-1\" (click)=\"cancelDialNumber()\">Cancel Call</button>\r\n <!-- <button class=\"btn btn-link btn-success btn-disc p-0 px-2\">Continue</button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding: 0 18px\" (paste)=\"handleNumberPaste($event)\">\r\n <div class=\"d-flex justify-content-between mt-2\">\r\n <p></p>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"hideDialpad()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#ffffff\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>\r\n </span>\r\n </div>\r\n <div class=\"input-box\">\r\n <input type=\"text\" #dialInput placeholder=\"Enter a name or number\" tabindex=\"1\" [(ngModel)]=\"dialedNumber\" (ngModelChange)=\"onDialInputChange($event)\"/>\r\n <span class=\"\" id=\"input-clear-btn\" (click)=\"clearInput()\" *ngIf=\"showInputClearBtn\">\r\n <svg width=\"50px\" height=\"30px\" viewBox=\"0 10 40 60\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" baseProfile=\"full\" enable-background=\"new 0 0 76.00 76.00\" xml:space=\"preserve\">\r\n <path fill=\"#5d6061\" fill-opacity=\"1\" stroke-width=\"0.2\" stroke-linejoin=\"round\" d=\"M 47.5282,42.9497L 42.5784,38L 47.5282,33.0502L 44.9497,30.4718L 40,35.4216L 35.0502,30.4718L 32.4718,33.0502L 37.4216,38L 32.4718,42.9497L 35.0502,45.5282L 40,40.5784L 44.9497,45.5282L 47.5282,42.9497 Z M 18.0147,41.5355L 26.9646,50.4854C 28.0683,51.589 29,52 31,52L 52,52C 54.7614,52 57,49.7614 57,47L 57,29C 57,26.2386 54.7614,24 52,24L 31,24C 29,24 28.0683,24.4113 26.9646,25.5149L 18.0147,34.4645C 16.0621,36.4171 16.0621,39.5829 18.0147,41.5355 Z M 31,49C 30,49 29.6048,48.8828 29.086,48.3641L 20.1361,39.4142C 19.355,38.6332 19.355,37.3669 20.1361,36.5858L 29.086,27.6362C 29.6048,27.1175 30,27 31,27.0001L 52,27.0001C 53.1046,27.0001 54,27.8955 54,29.0001L 54,47.0001C 54,48.1046 53.1046,49.0001 52,49.0001L 31,49 Z \"/>\r\n </svg> \r\n </span>\r\n <span class=\"input-info-icon\" placement=\"bottom-right\" tooltipClass=\"input-tooltip\" ngbTooltip=\"For extension dialing, use formats like +12345678910 x123,+12345678910 ext.123, +12345678910,123\"><i class=\"fa fa-info-circle\"></i></span>\r\n </div>\r\n <div class=\"guide\" *ngIf=\"callerIdList.length && !(dialedNumber.length > 2)\">\r\n <span class=\"guidetext\">Please enter a number or select a saved contact</span>\r\n </div>\r\n <!-- <div class=\"input-error\" *ngIf=\"dialAlert.show\">\r\n <span>{{dialAlert.msg}}</span>\r\n </div> -->\r\n <div>\r\n <div class=\"contact-card\" *ngFor=\"let contact of filteredContactList\" (click)=\"onContactSelect(contact)\">\r\n <div class=\"contact-img\">\r\n <img [src]=\"contact.image\" alt=\"user image\" loading=\"lazy\" *ngIf=\"contact.image else alphaName\"/>\r\n <ng-template #alphaName>\r\n <span class=\"contact-alpha-img\">{{getFirstLetter(contact.firstName)}}</span>\r\n </ng-template>\r\n </div>\r\n <div class=\"contact-details\">\r\n <p style=\"margin-bottom: 4px\" class=\"contact-name\">{{getFullName(contact) }}</p>\r\n <p>{{contact.numbersList[0].number}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"wave-container\">\r\n <svg\r\n class=\"waves\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n viewBox=\"0 24 150 28\"\r\n preserveAspectRatio=\"none\"\r\n shape-rendering=\"auto\"\r\n >\r\n <defs>\r\n <path\r\n id=\"gentle-wave\"\r\n d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\"\r\n />\r\n </defs>\r\n <g class=\"parallax\">\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"0\"\r\n fill=\"rgba(255,255,255,0.7)\"\r\n />\r\n <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"3\"\r\n fill=\"rgba(255,255,255,0.5)\"\r\n />\r\n <!-- <use\r\n xlink:href=\"#gentle-wave\"\r\n x=\"48\"\r\n y=\"5\"\r\n fill=\"rgba(255,255,255,0.3)\"\r\n /> -->\r\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\r\n </g>\r\n </svg>\r\n </div>\r\n </div>\r\n <div class=\"btn-container\" *ngIf=\"!isMinimised\">\r\n <button class=\"dial-btn\" *ngFor=\"let key of keypadVal;let i = index\"\r\n (keydown.enter)=\"onEnter(key.num)\" (click)=\"addNumber(key.num)\"\r\n [ngStyle]=\"{'margin-top': key.text === '+' ? '3px' : '0'}\"\r\n [tabindex]=\"dialedNumber.length ? '0': i+2\" longPress (longPress)=\"addNumber(key.text)\" shortPress (shortPress)=\"addNumber(key.num)\">\r\n {{key.num}} \r\n <span *ngIf=\"key.num == 1;else otherThanOne\" class=\"material-symbols-outlined voicemail\">\r\n voicemail\r\n </span>\r\n <ng-template #otherThanOne>\r\n <span class=\"btn-albhabets\" [ngClass]=\"{'plusSign': key.text === '+'}\">{{key.text ? key.text : '&nbsp;'}}</span>\r\n </ng-template>\r\n </button>\r\n </div>\r\n <div class=\"call-btn-container\" *ngIf=\"!isMinimised\" (mouseenter)=\"onCallBtnMouseEnter($event)\" (mouseleave)=\"onCallBtnMouseLeave($event)\">\r\n <div class=\"call-btn\" (click)=\"initiateCall()\" [tabindex]=\"dialedNumber.length ? '2': '15'\"\r\n [ngStyle]=\"{'pointer-events': dialedNumber.length && selectedCallerId ? 'auto' : 'none', 'opacity': dialedNumber.length && selectedCallerId ? '1' : '0.5'}\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngIf=\"callerIdList.length && !isMinimised\" class=\"position-relative\">\r\n <div class=\"shownCallerId\" *ngIf=\"selectedCallerId; else askBlock\" (click)=\"toggleCallerIdDiv()\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + selectedCallerId?.isoCode?.toLowerCase()\"></span>\r\n {{selectedCallerId?.number}}\r\n </div>\r\n </div>\r\n <ng-template #askBlock>\r\n <div class=\"shownCallerId\" (click)=\"toggleCallerIdDiv()\" [ngClass]=\"{ 'tilt-shaking': shakeDedicatedBtn }\">\r\n <div class=\"d-flex justify-content-center\">\r\n <h5 class=\"mb-0\">Select C2C number</h5>\r\n <!-- <span class=\"ml-2\" style=\"opacity:.8;margin-top:2px\">\r\n <img src=\"assets/images/icon_down_arrow.svg\" alt=\"down\" width=\"10px\">\r\n </span> -->\r\n <span class=\"fa fa-angle-down ml-2 text-blue\" style=\"margin-top:2px\"></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <div class=\"guide2\" *ngIf=\"shakeDedicatedBtn\">\r\n <span class=\"guidetext\">Please select a number from below dropdown</span>\r\n </div>\r\n </div>\r\n \r\n <div *ngIf=\"callerIdList.length; else noCallerIdMessage\">\r\n <div class=\"caller-id-list-container\" *ngIf=\"callerIdList.length && !isMinimised\" id=\"callerIdContainer\" [ngClass]=\"{'visible': !isCallerIdHidden}\" >\r\n <div style=\"display: flex; justify-content: space-between\">\r\n <!-- <h4>Select C2C Softphone Number</h4> -->\r\n <h4>Make outgoing call using</h4>\r\n <span\r\n class=\"material-symbols-outlined\"\r\n style=\"cursor: pointer\"\r\n (click)=\"isCallerIdHidden = true\"\r\n >\r\n close\r\n </span>\r\n </div>\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <!-- <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"onDedicatedNumSelect(callerId)\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li> -->\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n <ng-template #noCallerIdMessage>\r\n <span class=\"no-caller-id-message\">To make any voice calls, please <a routerLink=\"/extension/dedicatednumber/{{token}}\" class=\"click-here-link\" title=\"Settings > C2C Number\">subscribe</a> to a voice capable C2C Number.\r\n </span>\r\n </ng-template>\r\n <div class=\"dedicated-overlay\" *ngIf=\"showDedicatedPopup\">\r\n <div class=\"card dedicatedNumPopup\">\r\n <div class=\"card-header chooseDedicatedHeader\">\r\n <h5>Choose C2C Number</h5>\r\n <span class=\"material-symbols-outlined dial-close-btn\" (click)=\"showDedicatedPopup = false\">close</span>\r\n </div>\r\n <div class=\"card-body dedicatedNumList\">\r\n <ul>\r\n <ng-container *ngFor=\"let callerId of callerIdList\">\r\n <li [ngClass]=\"{'selectedCallerIdClass': callerId?.number == selectedCallerId?.number}\" (click)=\"showDedicatedPopup = false\">\r\n <div>\r\n <span [ngClass]=\"'fi fi-' + callerId?.isoCode?.toLowerCase()\"></span>\r\n {{callerId?.number}}\r\n </div>\r\n <span>{{callerId?.countryName}}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"incoming-call-widget\" *ngFor=\"let call of newIncomingCalls;let i = index\" [ngStyle]=\"{'top': (30 + i * 72) + 'px'}\">\r\n <div>\r\n <div class=\"inc-user-img\">\r\n <img src=\"assets/images/user.jpg\" alt=\"user image\">\r\n </div>\r\n \r\n </div>\r\n <div class=\"flex-grow-1\">\r\n <!-- <h6 class=\"mb-1 font-weight-bold\">Incoming Call</h6> -->\r\n <p class=\"inc-user-name\">{{call.customParameters.get('name')}}</p>\r\n <p>{{call.parameters.From}}</p>\r\n \r\n <!-- <p class=\"inc-user-name\">John Doe</p> \r\n <p>+12337472489</p>\r\n <p style=\"font-size: 12px;color:#d5d5d5 !important;margin-top:2px\">Call on +12264584100</p> -->\r\n \r\n </div>\r\n <div class=\"d-flex\">\r\n <button class=\"inc-call-btn inc-accept-btn mr-2\" (click)=\"acceptNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call\r\n </span>\r\n </button>\r\n <!-- <button class=\"inc-call-btn inc-reject-btn\" (click)=\"rejectNewIncomingCall(call)\">\r\n <span class=\"material-symbols-outlined\" style=\"color: white\">\r\n call_end\r\n </span>\r\n </button> -->\r\n </div>\r\n \r\n </div>\r\n </div>\r\n </div>\r\n ", styles: ["#dragparent1{position:fixed;left:100px;z-index:9999999;font-family:Lato,sans-serif;display:none}.dialpad-container{width:320px;height:600px;background:white;margin:auto;border-radius:30px;box-shadow:#00000040 0 54px 55px,#0000001f 0 -12px 30px,#0000001f 0 4px 6px,#0000002b 0 12px 13px,#00000017 0 -3px 5px;display:flex;flex-direction:column;box-sizing:border-box;position:relative;line-height:1.1}.dialpad-alerts{position:absolute;width:calc(100% - 28px);left:14px;top:8px;z-index:1200}.btn-disc{font-size:12px}.dialbox-pop1{font-size:.8rem;z-index:9;padding:8px}.input-error>span{color:#dfdfdf;margin-bottom:2px}.dial-close-btn{cursor:pointer;opacity:.6}.dial-close-btn:hover{opacity:1}.btn-container{display:flex;flex-wrap:wrap;padding:0 18px}.dial-btn{width:50px;height:50px;background-color:#fff;border-radius:4px;text-align:center;box-sizing:border-box;margin:4px 22px;font-size:28px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#2b434d;cursor:pointer;opacity:.8;border:none}.dial-btn:hover{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:focus{opacity:1;box-shadow:#00000026 0 2px 8px}.dial-btn:active{box-shadow:#32325d40 0 30px 60px -12px inset,#0000004d 0 18px 36px -18px inset}.call-btn-container{display:flex;margin-top:8px;justify-content:center;position:relative}.call-btn{display:flex;align-items:center;justify-content:center;width:54px;height:54px;border-radius:27px;background-color:#2ecc71;outline:none;border:none;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;opacity:.8;cursor:pointer}.call-btn:hover{opacity:1}.call-btn:focus{opacity:1}.caller-id-list-container{width:100%;height:auto;position:absolute;bottom:-100%;left:0;border-radius:0 0 30px 30px/0px 0px 30px 30px;padding:8px 12px 32px;box-sizing:border-box;color:#8a8a8a}.visible{animation:slideUp .8s forwards}#callerIdContainer ul{list-style:none;padding-left:0;margin:0}.dialpad-container h4{font-family:Lato,sans-serif;margin:0 0 8px}#callerIdContainer ul li{background-color:#fff;padding:8px;margin-top:7px;display:flex;border-radius:4px;justify-content:space-between;font-size:14px;cursor:pointer}.fi{border-radius:2px;margin-right:2px}@keyframes slideUp{0%{bottom:-100%}to{bottom:0}}.selectedCallerIdClass{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;border:1px solid #e0e0e0;color:#3a3a3a}.toggleBtn{color:gray;border:none;background-color:#e5eef1}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.plusSign{font-weight:600;font-size:14px}.shownCallerId{text-align:center;padding:8px 10px;font-family:Lato,sans-serif;color:#2ecc71;border:1px solid #d7d7d7;background-color:#fff;width:80%;margin:12px auto auto;border-radius:12px;position:relative;cursor:pointer}.input-box{width:100%;background-color:#fff;padding:4px 10px;border:1px solid rgb(197,197,197);box-sizing:border-box;border-radius:24px;margin-top:12px;display:flex;justify-content:space-between}.input-box:focus-within{box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026}.input-box input{font-size:18px;padding:8px 6px;width:100%;box-sizing:border-box;border:none;outline:none;font-weight:600;color:#2b434d}.input-box input::placeholder{font-size:16px;font-weight:500}#input-clear-btn{color:gray;display:flex;align-items:center;cursor:pointer}.contact-card{width:100%;height:54px;display:flex;border-radius:12px;overflow:hidden;margin-top:4px;box-shadow:6px 6px 10px -1px #e6eefc26;cursor:pointer;opacity:0;transform:translateY(20px);animation:slideIn .5s forwards}@keyframes slideIn{to{opacity:1;transform:translateY(0)}}.contact-img{width:50px;display:flex;align-items:center;justify-content:center;border-right:1px solid #bebebe;background-color:#fff}.contact-img img{max-width:50px}.contact-alpha-img{width:50px;display:flex;justify-content:center;align-items:center;font-size:38px;font-weight:600}.contact-details{padding:4px 8px;display:flex;flex-direction:column;justify-content:center}.contact-details p{margin:0;line-height:1;color:#fff}.contact-name{font-weight:600}#topPanel{height:39%;position:relative;margin-bottom:4px;padding:0;border-top-right-radius:30px;border-top-left-radius:30px}.wave-container{position:absolute;bottom:2px}.waves{width:320px;position:relative;margin-bottom:-7px;height:31px;min-height:31px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}app-call-progress{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1000}.mini-dialpad{height:124px!important}.voicemail{line-height:.7;font-size:18px}.dedicated-overlay{position:absolute;width:100%;height:100%;background-color:#2b434d99;display:flex;align-items:center;justify-content:center}.dedicatedNumPopup{width:90%;height:auto;box-sizing:border-box;color:#8a8a8a;background-color:#cbe7df}.chooseDedicatedHeader{padding:.75rem;display:flex;justify-content:space-between}.chooseDedicatedHeader h5{margin-bottom:0}.dedicatedNumList>ul{list-style-type:none;padding:0}.dedicatedNumList>ul li{background-color:#fff;padding:4px;cursor:pointer}@keyframes tilt-shaking{0%{transform:rotate(0)}25%{transform:rotate(5deg)}50%{transform:rotate(0)}75%{transform:rotate(-5deg)}to{transform:rotate(0)}}.tilt-shaking{background-color:#d45858;animation:tilt-shaking .5s infinite;color:#fff}.tilt-shaking h5,.dark .tilt-shaking span,.tilt-shaking span{color:#fff}.no-caller-id-message{display:inline-block;text-align:center;height:10vh;background-color:#fff3cd;color:#000;font-size:.9rem;line-height:1.5;padding:8px}.click-here-link{color:#0f9aee;text-decoration:underline;font-weight:700}.input-info-icon{margin-top:9px;cursor:pointer;color:#2b434d;opacity:.7}::ng-deep .input-tooltip .tooltip-inner{background-color:#000!important}.no-selection-alert{padding:3px 11px;border:1px solid;border-radius:4px;display:flex;justify-content:space-between;color:#721c24;background-color:#f8d7da;border-color:#f5c6cb;align-items:center}.guide{position:relative;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px}.guide:before{content:\"\";position:absolute;top:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #303030}.guide2{position:absolute;top:-32px;left:24px;padding:8px;background-color:#303030;color:#fff;border-radius:8px;margin-top:8px;font-size:12px;pointer-events:none}.guide2:before{content:\"\";position:absolute;bottom:-8px;left:8px;width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #303030}.incoming-call-widget{position:absolute;right:-320px;top:30px;width:320px;height:68px;background-color:#3052cd;border-top-right-radius:8px;border-bottom-right-radius:8px;display:flex;align-items:center;padding:4px 12px}.incoming-call-widget h6,.incoming-call-widget p{margin-bottom:0;line-height:1.2;color:#fff}.inc-user-img{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:8px}.inc-user-img img{width:100%}.inc-call-btn{width:40px;height:40px;border-radius:50%;outline:none;border-width:0;display:flex;align-items:center;justify-content:center}.inc-call-btn span{font-size:16px}.inc-accept-btn{background-color:#2ecc71;color:#fff}.inc-reject-btn{background-color:#e14e4e;color:#fff}.inc-user-name{font-weight:600}\n"] }]
2361
+ }], ctorParameters: function () { return [{ type: TwilioService }, { type: ExtensionService }, { type: IpAddressService }, { type: ExtensionService }, { type: i4.Router }]; }, propDecorators: { isDialpadHidden: [{
2362
+ type: Input
2363
+ }], closeDialpadEvent: [{
2364
+ type: Output
2365
+ }], callInitiated: [{
2366
+ type: Output
2367
+ }], endCallEvent: [{
2368
+ type: Output
2369
+ }], minimiseEvent: [{
2370
+ type: Output
2371
+ }], incomingCallsNewInfoEvent: [{
2372
+ type: Output
2373
+ }], incomingCallInitiated: [{
2374
+ type: Output
2375
+ }], dialInputElement: [{
2376
+ type: ViewChild,
2377
+ args: ['dialInput']
2378
+ }], numberDialed: [{
2379
+ type: Output
2380
+ }] } });
26
2381
 
27
2382
  class DialboxModule {
28
2383
  }
29
2384
  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], exports: [DialboxComponent] });
31
- DialboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule });
2385
+ DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, declarations: [DialboxComponent], imports: [CommonModule,
2386
+ FormsModule,
2387
+ ReactiveFormsModule,
2388
+ HttpClientModule,
2389
+ RouterLink], exports: [DialboxComponent] });
2390
+ DialboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, imports: [CommonModule,
2391
+ FormsModule,
2392
+ ReactiveFormsModule,
2393
+ HttpClientModule] });
32
2394
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, decorators: [{
33
2395
  type: NgModule,
34
2396
  args: [{
35
2397
  declarations: [
36
- DialboxComponent
2398
+ DialboxComponent,
2399
+ ],
2400
+ imports: [
2401
+ CommonModule,
2402
+ FormsModule,
2403
+ ReactiveFormsModule,
2404
+ HttpClientModule,
2405
+ RouterLink,
37
2406
  ],
38
- imports: [],
39
2407
  exports: [
40
- DialboxComponent
2408
+ DialboxComponent,
41
2409
  ]
42
2410
  }]
43
2411
  }] });
44
2412
 
45
2413
  /*
46
2414
  * Public API Surface of dialbox
47
- */
2415
+ */
2416
+ // Components
2417
+ // export * from './lib/components/dialpad/dialpad.component';
2418
+ // export * from './lib/components/dial-button/dial-button.component';
2419
+ // // Services
2420
+ // export * from './lib/components/services/dialer.service';
2421
+ // export * from './lib/components/services/call-handler.service';
2422
+ // // Models
2423
+ // export * from './lib/components/models/call.interface';
2424
+ // export * from './lib/components/models/dialer-options.interface';
2425
+ // // Utils
2426
+ // export * from './lib/components/utils/phone-validator.util';
2427
+ // export * from './lib/components/utils/format-phone.util';
2428
+ // // Module
2429
+ // export * from './lib/dialbox.module';
48
2430
 
49
2431
  /**
50
2432
  * Generated bundle index. Do not edit.