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