@vgroup/dialbox 0.0.4 → 0.0.6

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,8 +1,8 @@
1
1
  import { __awaiter } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
3
+ import { Injectable, EventEmitter, Component, Input, Output, ViewChild, Inject, NgModule } from '@angular/core';
4
4
  import { AsYouType } from 'libphonenumber-js';
5
- import { BehaviorSubject, throwError, Subscription } from 'rxjs';
5
+ import { BehaviorSubject, throwError, Subscription, interval } from 'rxjs';
6
6
  import * as i1 from '@angular/common/http';
7
7
  import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
8
8
  import { catchError, switchMap, map } from 'rxjs/operators';
@@ -12,6 +12,10 @@ import * as i5 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
13
  import * as i6 from '@angular/forms';
14
14
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
15
+ import { Device } from '@twilio/voice-sdk';
16
+ import swal from 'sweetalert2';
17
+ import * as i3 from '@angular/material/dialog';
18
+ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
15
19
 
16
20
  const keypad = [
17
21
  {
@@ -2317,11 +2321,11 @@ class DialboxComponent {
2317
2321
  //this.callData = call;
2318
2322
  this.newIncomingCallData = call;
2319
2323
  }
2320
- // rejectNewIncomingCall(call: Call) {
2321
- // call.reject();
2322
- // this.newIncomingCalls = this.newIncomingCalls.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
2323
- // this.incomingCallsList = this.incomingCallsList.filter(item => item.parameters.CallSid !== call.parameters.CallSid);
2324
- // }
2324
+ rejectNewIncomingCall(call) {
2325
+ call.reject();
2326
+ this.newIncomingCalls = this.newIncomingCalls.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2327
+ this.incomingCallsList = this.incomingCallsList.filter((item) => item.parameters['CallSid'] !== call.parameters['CallSid']);
2328
+ }
2325
2329
  newIncomingCallInitiated() {
2326
2330
  this.isCallInProgress = true;
2327
2331
  this.newIncomingCalls = [];
@@ -2379,14 +2383,698 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2379
2383
  type: Output
2380
2384
  }] } });
2381
2385
 
2386
+ class CallProgressComponent {
2387
+ constructor(extensionService, cdr) {
2388
+ this.extensionService = extensionService;
2389
+ this.cdr = cdr;
2390
+ this.endCallEvent = new EventEmitter();
2391
+ this.incomingCallsNewInfo = new EventEmitter();
2392
+ this.minimiseEvent = new EventEmitter();
2393
+ this.showRingAnimation = false;
2394
+ this.timer = '00:00';
2395
+ this.showKeypad = false;
2396
+ this.keypadVal = keypad;
2397
+ this.callInput = '';
2398
+ this.isMute = false;
2399
+ this.disbaleEndCallBtn = true;
2400
+ this.showClearBtn = false;
2401
+ this.isCollops = false;
2402
+ // Incoming call variables
2403
+ this.incomingCallDiv = false;
2404
+ //@Output() showCallProgressEvent: EventEmitter<void> = new EventEmitter<void>();
2405
+ this.incomingCallInitiated = new EventEmitter();
2406
+ this.isRecording = false;
2407
+ this.isPaused = false;
2408
+ this.timeElapsed = 0; // in seconds
2409
+ this.recordCall = false;
2410
+ this.callStatus = 'ringing';
2411
+ this.isMinimised = false;
2412
+ }
2413
+ ngOnInit() {
2414
+ console.log('Call Progress Component');
2415
+ }
2416
+ ngOnChanges(changes) {
2417
+ var _a, _b, _c, _d;
2418
+ console.log('Call Progress Component ngOnChanges');
2419
+ if (changes['callData']) {
2420
+ console.log('Call Progress Component ngOnChanges callData', changes['callData']);
2421
+ if (changes['callData'].currentValue.isIncomingCall) {
2422
+ this.incomingCallDiv = true;
2423
+ }
2424
+ else {
2425
+ //for outgoing call
2426
+ this.startCall(changes['callData'].currentValue);
2427
+ }
2428
+ }
2429
+ if (changes['newIncomingCallData']) {
2430
+ try {
2431
+ if (changes['newIncomingCallData'].currentValue) {
2432
+ if (this.call && (this.call.status() == 'open')) {
2433
+ this.call.disconnect();
2434
+ this.call = changes['newIncomingCallData'].currentValue;
2435
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.accept();
2436
+ this.callData.phone = (_b = this.call) === null || _b === void 0 ? void 0 : _b.parameters['From'];
2437
+ this.callData.name = (_c = this.call) === null || _c === void 0 ? void 0 : _c.customParameters.get('name');
2438
+ this.callData.img = ((_d = this.call) === null || _d === void 0 ? void 0 : _d.customParameters.get('image')) || 'assets/images/user.jpg';
2439
+ this.incomingCallInitiated.emit();
2440
+ this.startTimer();
2441
+ }
2442
+ }
2443
+ }
2444
+ catch (e) {
2445
+ console.log(e);
2446
+ }
2447
+ }
2448
+ }
2449
+ ngAfterViewInit() { }
2450
+ startCall(callData) {
2451
+ return __awaiter(this, void 0, void 0, function* () {
2452
+ try {
2453
+ this.showRingAnimation = true;
2454
+ const payload = {
2455
+ channelId: environment.channelId,
2456
+ userId: localStorage.getItem('userId'),
2457
+ to: callData.phone,
2458
+ scope: 'local',
2459
+ fromNumber: callData.from
2460
+ };
2461
+ const response = yield this.initiateCall(payload);
2462
+ if (response.status == 200) {
2463
+ const { id: callAuthId, recordCall } = yield this.getCallAuthId(response);
2464
+ this.getUserInformation(callAuthId);
2465
+ this.recordCall = recordCall; // Store the recordCall value
2466
+ const tokenData = yield this.getOutgoingCallToken(callAuthId);
2467
+ yield this.connectToDevice(tokenData.token, callData);
2468
+ // Poll the status for 30-45 seconds
2469
+ this.pollCallStatus(callAuthId);
2470
+ }
2471
+ else if (response.status == 201) {
2472
+ swal("Error", response.message.join("<br/>"), "error");
2473
+ this.endCall();
2474
+ }
2475
+ }
2476
+ catch (error) {
2477
+ this.showRingAnimation = false;
2478
+ this.handleError(error);
2479
+ this.endCall();
2480
+ }
2481
+ });
2482
+ }
2483
+ initiateCall(payload) {
2484
+ return __awaiter(this, void 0, void 0, function* () {
2485
+ return yield this.extensionService.initiateCall(payload).toPromise();
2486
+ });
2487
+ }
2488
+ getCallAuthId(response) {
2489
+ return __awaiter(this, void 0, void 0, function* () {
2490
+ return {
2491
+ id: response.callauth.id,
2492
+ recordCall: response.callauth.recordCall
2493
+ };
2494
+ });
2495
+ }
2496
+ getOutgoingCallToken(callAuthId) {
2497
+ return __awaiter(this, void 0, void 0, function* () {
2498
+ return yield this.extensionService.getOutgoingCallToken({ authId: callAuthId }).toPromise();
2499
+ });
2500
+ }
2501
+ connectToDevice(token, callData) {
2502
+ return __awaiter(this, void 0, void 0, function* () {
2503
+ const options = {
2504
+ codecPreferences: ['opus', 'pcmu'],
2505
+ closeProtection: true,
2506
+ };
2507
+ this.device = new Device(token.value, options);
2508
+ this.call = yield this.device.connect({
2509
+ params: {
2510
+ From: callData.from,
2511
+ To: callData.phone,
2512
+ Env: environment.abb,
2513
+ Token: token.id,
2514
+ Ext: callData.extNum
2515
+ },
2516
+ rtcConstraints: { audio: { deviceId: 'default' } },
2517
+ });
2518
+ this.setupEventListeners();
2519
+ });
2520
+ }
2521
+ setupEventListeners() {
2522
+ var _a, _b, _c, _d, _e, _f, _g;
2523
+ this.startTimer();
2524
+ (_a = this.device) === null || _a === void 0 ? void 0 : _a.on('error', (err) => {
2525
+ console.log(err);
2526
+ this.showRingAnimation = false;
2527
+ this.stopTimer();
2528
+ });
2529
+ (_b = this.call) === null || _b === void 0 ? void 0 : _b.on('error', (error) => {
2530
+ this.showRingAnimation = false;
2531
+ this.stopTimer();
2532
+ });
2533
+ (_c = this.call) === null || _c === void 0 ? void 0 : _c.on('disconnect', () => {
2534
+ this.endCall();
2535
+ });
2536
+ (_d = this.call) === null || _d === void 0 ? void 0 : _d.on('ringing', () => {
2537
+ });
2538
+ (_e = this.call) === null || _e === void 0 ? void 0 : _e.on('reject', () => {
2539
+ this.endCall();
2540
+ });
2541
+ (_f = this.call) === null || _f === void 0 ? void 0 : _f.on('accept', () => {
2542
+ this.showRingAnimation = false;
2543
+ this.disbaleEndCallBtn = false;
2544
+ // Start recording if recordCall is true and call is accepted for 30 seconds
2545
+ // if (this.recordCall) {
2546
+ // setTimeout(() => {
2547
+ // if (this.isRecording) return; // If already recording, skip
2548
+ // this.startRecording();
2549
+ // }, 30000);
2550
+ // } else {
2551
+ // this.stopRecording();
2552
+ // }
2553
+ });
2554
+ (_g = this.call) === null || _g === void 0 ? void 0 : _g.on('messageReceived', (message) => {
2555
+ });
2556
+ }
2557
+ startTimer() {
2558
+ let seconds = 0;
2559
+ this.intervalId = setInterval(() => {
2560
+ seconds++;
2561
+ this.timer = this.formatTime(seconds);
2562
+ }, 1000);
2563
+ }
2564
+ stopTimer() {
2565
+ clearInterval(this.intervalId);
2566
+ this.timer = '00:00';
2567
+ }
2568
+ formatTime(totalSeconds) {
2569
+ const minutes = Math.floor(totalSeconds / 60);
2570
+ const seconds = totalSeconds % 60;
2571
+ return `${this.pad(minutes)}:${this.pad(seconds)}`;
2572
+ }
2573
+ pad(value) {
2574
+ return value < 10 ? `0${value}` : `${value}`;
2575
+ }
2576
+ handleError(error) {
2577
+ swal("Error", error, "error");
2578
+ }
2579
+ endCall() {
2580
+ this.endCallEvent.emit();
2581
+ if (this.call) {
2582
+ this.call.disconnect();
2583
+ }
2584
+ this.showRingAnimation = false;
2585
+ this.stopTimer();
2586
+ this.maximiseDialpad();
2587
+ }
2588
+ toggleMute() {
2589
+ var _a;
2590
+ this.isMute = !this.isMute;
2591
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.mute(this.isMute);
2592
+ }
2593
+ toggleKeypad() {
2594
+ this.showKeypad = !this.showKeypad;
2595
+ this.callInput = '';
2596
+ }
2597
+ onCallInputs(num) {
2598
+ var _a;
2599
+ try {
2600
+ if (Number.isInteger(num) || num == '+' || num == '*' || num == '#') {
2601
+ if (num == '#') {
2602
+ new Audio(`/assets/dial-tones/dtmf/dtmf-hash-.mp3`).play();
2603
+ }
2604
+ else if (num == '*') {
2605
+ new Audio(`/assets/dial-tones/dtmf/dtmf-star-.mp3`).play();
2606
+ }
2607
+ else {
2608
+ new Audio(`/assets/dial-tones/dtmf/dtmf-${num}-.mp3`).play();
2609
+ }
2610
+ this.callInput = this.callInput + String(num);
2611
+ this.showClearBtn = true;
2612
+ }
2613
+ let str = String(num);
2614
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(str);
2615
+ }
2616
+ catch (e) {
2617
+ console.log(e);
2618
+ }
2619
+ }
2620
+ onCallInputEnter(ev) {
2621
+ var _a;
2622
+ try {
2623
+ (_a = this.call) === null || _a === void 0 ? void 0 : _a.sendDigits(String(ev.key));
2624
+ }
2625
+ catch (e) {
2626
+ console.log(e);
2627
+ }
2628
+ }
2629
+ closeIncomingCall(data) {
2630
+ // this.incomingCallDiv = false;
2631
+ if (data.show) {
2632
+ //this.showCallProgressEvent.emit()
2633
+ // handle incoming call accepted
2634
+ this.startTimer();
2635
+ this.disbaleEndCallBtn = false;
2636
+ this.call = data.call;
2637
+ const incomingDetail = this.extensionService.getCallSid();
2638
+ this.incomingRecordCall = incomingDetail.recordCall;
2639
+ // Start recording if the call is answered and recording is enabled
2640
+ if (this.incomingRecordCall) {
2641
+ this.startRecording();
2642
+ }
2643
+ else {
2644
+ this.isRecording = false;
2645
+ }
2646
+ this.cdr.detectChanges();
2647
+ }
2648
+ else {
2649
+ // incoming call rejected
2650
+ this.endCallEvent.emit();
2651
+ }
2652
+ }
2653
+ clearInputs() {
2654
+ this.callInput = this.callInput.slice(0, -1);
2655
+ }
2656
+ minimiseDialpad() {
2657
+ this.minimiseEvent.emit(true);
2658
+ this.isMinimised = true;
2659
+ }
2660
+ maximiseDialpad() {
2661
+ this.minimiseEvent.emit(false);
2662
+ this.isMinimised = false;
2663
+ }
2664
+ toggleRecording() {
2665
+ if (this.isRecording) {
2666
+ this.stopRecording();
2667
+ }
2668
+ else {
2669
+ this.startRecording();
2670
+ }
2671
+ }
2672
+ startRecording() {
2673
+ let sid;
2674
+ const details = this.extensionService.getCallSid();
2675
+ this.incomingCallSid = details.callSid;
2676
+ this.incomingRecordCall = details.recordCall;
2677
+ sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2678
+ // if (!this.incomingRecordCall && !this.recordCall) {
2679
+ // return;
2680
+ // }
2681
+ this.extensionService.getCallRecording(sid).subscribe(response => {
2682
+ this.isRecording = true;
2683
+ this.isPaused = false;
2684
+ this.timeElapsed = 0;
2685
+ this.startTimer1();
2686
+ }, error => {
2687
+ console.error('Error starting recording', error);
2688
+ });
2689
+ }
2690
+ stopRecording() {
2691
+ // if (!this.incomingRecordCall && !this.recordCall) {
2692
+ // return;
2693
+ // }
2694
+ this.isRecording = false;
2695
+ this.isPaused = false;
2696
+ if (this.timerSubscription) {
2697
+ this.timerSubscription.unsubscribe();
2698
+ }
2699
+ }
2700
+ pauseRecording() {
2701
+ const details = this.extensionService.getCallSid();
2702
+ this.incomingCallSid = details.callSid;
2703
+ this.incomingRecordCall = details.recordCall;
2704
+ const sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2705
+ // if (!this.incomingRecordCall && !this.recordCall) {
2706
+ // return;
2707
+ // }
2708
+ this.extensionService.pauseOrResumeRecording(sid, 'pause').subscribe(response => {
2709
+ this.stopRecordingTimer();
2710
+ this.isPaused = true;
2711
+ }, error => {
2712
+ console.error('Error pausing recording:', error);
2713
+ // Consider updating the UI to show the error state
2714
+ });
2715
+ }
2716
+ resumeRecording() {
2717
+ let sid;
2718
+ const details = this.extensionService.getCallSid();
2719
+ this.incomingCallSid = details.callSid;
2720
+ this.incomingRecordCall = details.recordCall;
2721
+ sid = this.incomingCallSid ? this.incomingCallSid : this.callSid;
2722
+ // if (!this.incomingRecordCall && !this.recordCall) {
2723
+ // return; // Skip if recording is not enabled
2724
+ // }
2725
+ this.extensionService.pauseOrResumeRecording(sid, 'resume').subscribe(response => {
2726
+ this.isPaused = false;
2727
+ this.startTimer1();
2728
+ }, error => {
2729
+ console.error('Error resuming recording', error);
2730
+ });
2731
+ }
2732
+ startTimer1() {
2733
+ this.timerSubscription = interval(1000).subscribe(() => {
2734
+ this.timeElapsed++;
2735
+ });
2736
+ }
2737
+ stopRecordingTimer() {
2738
+ if (this.timerSubscription) {
2739
+ this.timerSubscription.unsubscribe(); // Pause the timer
2740
+ this.timerSubscription = undefined; // Optionally reset the subscription
2741
+ }
2742
+ }
2743
+ getFormattedTime() {
2744
+ const minutes = Math.floor(this.timeElapsed / 60);
2745
+ const seconds = this.timeElapsed % 60;
2746
+ return `${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
2747
+ }
2748
+ pollCallStatus(callAuthId) {
2749
+ const maxTime = 30000; // Poll for up to 30 seconds
2750
+ const pollInterval = 3000; // Poll every 3 seconds
2751
+ let elapsedTime = 0;
2752
+ const intervalId = setInterval(() => __awaiter(this, void 0, void 0, function* () {
2753
+ elapsedTime += pollInterval;
2754
+ try {
2755
+ const statusResponse = yield this.extensionService.getCallStatus(callAuthId).toPromise();
2756
+ if (statusResponse && statusResponse.callDetails) {
2757
+ this.callStatus = statusResponse.callDetails.callStatus;
2758
+ if (this.callStatus === 'in-progress') {
2759
+ this.callSid = statusResponse.callDetails.callSid;
2760
+ if (this.recordCall && !this.isRecording) {
2761
+ this.startRecording();
2762
+ }
2763
+ clearInterval(intervalId);
2764
+ }
2765
+ else if (this.callStatus === 'completed') {
2766
+ clearInterval(intervalId);
2767
+ this.endCall();
2768
+ this.stopRecording();
2769
+ }
2770
+ else if (this.callStatus === 'ringing') {
2771
+ // Continue polling; do not clear the interval yet
2772
+ }
2773
+ }
2774
+ }
2775
+ catch (error) {
2776
+ clearInterval(intervalId);
2777
+ }
2778
+ if (elapsedTime >= maxTime) {
2779
+ // console.log('Max polling time reached. Stopping poll.');
2780
+ clearInterval(intervalId);
2781
+ }
2782
+ }), pollInterval);
2783
+ }
2784
+ getUserInformation(id) {
2785
+ this.extensionService.getUserInformation(id).subscribe(response => {
2786
+ console.log(response);
2787
+ }, error => {
2788
+ console.error('Error starting recording', error);
2789
+ });
2790
+ }
2791
+ incomingCallsNewList(data) {
2792
+ this.newIncomingCallsList = data;
2793
+ this.incomingCallsNewInfo.emit(this.newIncomingCallsList);
2794
+ }
2795
+ selectedIncomingCallInfo(data) {
2796
+ this.selectedIncomingCall = data;
2797
+ }
2798
+ ngOnDestroy() {
2799
+ this.callData.dial = false;
2800
+ if (this.timerSubscription) {
2801
+ this.timerSubscription.unsubscribe();
2802
+ }
2803
+ }
2804
+ }
2805
+ CallProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, deps: [{ token: ExtensionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2806
+ CallProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallProgressComponent, selector: "lib-call-progress", inputs: { callData: "callData", newIncomingCallData: "newIncomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { endCallEvent: "endCallEvent", incomingCallsNewInfo: "incomingCallsNewInfo", minimiseEvent: "minimiseEvent", incomingCallInitiated: "incomingCallInitiated" }, usesOnChanges: true, ngImport: i0, template: "<p>call-progress works!</p>\n", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] });
2807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallProgressComponent, decorators: [{
2808
+ type: Component,
2809
+ args: [{ selector: 'lib-call-progress', template: "<p>call-progress works!</p>\n", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{height:660px!important}.incoming-call-container{width:752px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto 0;border-radius:100%;border:solid 4px #fff;display:flex;align-items:center;justify-content:center}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.call-animation-play{animation:play 3s linear infinite}.call-info-wrapper{height:20px;overflow-y:auto;background:white;transition:height 1s}.open-collops{height:180px!important}.avatar-img{width:94px;height:94px;border-radius:100%}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:12px 0 0;color:#fff;text-transform:capitalize;text-align:center}.callerDetails h4{margin:0;color:#fff}.callerDetails p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:60px;height:60px;background-color:#fff;border-radius:30px;box-sizing:border-box;border:2px solid white;margin:0 16px}.end-call-btn{background-color:#e14e4e}.end-call-btn span{color:#fff!important}.call-btn span{color:#234de8}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.call-action-btns{text-align:center}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.sendDigit{position:relative;text-align:center;width:80%;margin:auto;background-color:#ffffff1a;padding:2px 0;border-radius:3px}.input-clear-btn{position:absolute;right:6px;color:#fff;cursor:pointer}#minimize-btn-div{position:absolute;right:14px;top:12px;z-index:10}.minimize-btn{color:#fff;cursor:pointer}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}app-incoming-call{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1001}.min-call-container{width:320px;height:124px;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;flex-direction:column;box-sizing:border-box;position:relative;overflow:hidden;margin:auto;align-items:center;padding:12px 16px;color:#fff}.min-call-animation{background:#fff;width:48px;height:48px;position:relative;margin:0 12px 0 auto;border-radius:100%;border:solid 2px #fff}.min-avatar-img{width:46px;height:46px;border-radius:100%;position:absolute;left:0;top:0}.min-callerDetails{color:#fff;display:flex;flex-direction:column;align-items:flex-start}.name{width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px;margin:0;color:#fff}.min-callerDetails p{margin:0;color:#fff}.min-btn-container{position:relative;display:flex;width:100%;justify-content:flex-start;align-items:center;margin-top:6px}.min-call-sec-btn{width:40px;height:40px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:20px;display:flex;align-items:center;justify-content:center;margin-right:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.min-call-sec-btn span{color:#cccbcb}.min-call-btn{width:40px;height:40px;border-radius:20px;box-sizing:border-box;border:2px solid white;display:flex;align-items:center;justify-content:center}.fullscreen{position:absolute;right:18px;top:14px;color:#e8e8e8;font-size:18px;cursor:pointer}.btn-container{display:flex;flex-wrap:wrap;padding:0 24px}.dial-btn{width:40px;height:40px;background-color:transparent;text-align:center;box-sizing:border-box;margin:4px 25px;font-size:24px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#b5b5b5;cursor:pointer}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.min-timer{width:50px;font-size:18px;margin-right:10px;border-radius:4px;height:35px;display:flex;align-items:center}.record-action-btns{display:flex;flex-direction:column;align-items:center}.record-btn-container{position:relative}.record-btn{border:none;border-radius:50%;width:50px;height:50px;display:flex;align-items:center;justify-content:center;cursor:pointer;margin:0 5px;position:relative;overflow:hidden}.record-btn.start-stop .recording-icon{width:50%;height:50%;border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.record-btn.start-stop.recording .recording-icon{background-color:#000}.record-btn.start-stop.recording{border:3px solid #000}.record-btn.start-stop.stopped .recording-icon{background-color:red;border:3px solid #ff0000;border-radius:50%;position:absolute}.record-btn.start-stop.stopped{border:3px solid #ff0000}.record-btn.start-stop.stopped .recording-icon{width:40%;height:40%;border-radius:0;background-color:red}.pause-resume-btns{display:flex;flex-direction:column;align-items:center;margin-top:10px}.record-btn.pause-resume{border:none;border-radius:50%;width:50px;height:50px;background:white;display:flex;align-items:center;justify-content:center;margin:5px 0}.record-btn.pause-resume .material-symbols-outlined{font-size:20px;color:#000}.timer-display{font-size:1.2em;margin-top:10px;color:#000}.w-40{width:40%}.w-60{width:60%}\n"] }]
2810
+ }], ctorParameters: function () { return [{ type: ExtensionService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { callData: [{
2811
+ type: Input
2812
+ }], newIncomingCallData: [{
2813
+ type: Input
2814
+ }], newIncomingCallsList: [{
2815
+ type: Input
2816
+ }], endCallEvent: [{
2817
+ type: Output
2818
+ }], incomingCallsNewInfo: [{
2819
+ type: Output
2820
+ }], minimiseEvent: [{
2821
+ type: Output
2822
+ }], incomingCallInitiated: [{
2823
+ type: Output
2824
+ }] } });
2825
+
2826
+ const GlobalConstant = {
2827
+ ErrorMsg500: "Unable to process request. Please try again later.",
2828
+ isSMSVisible: true,
2829
+ dedicatedNumText: 'C2C Number'
2830
+ };
2831
+
2832
+ class IncomingCallComponent {
2833
+ constructor(extensionService, twilioService) {
2834
+ this.extensionService = extensionService;
2835
+ this.twilioService = twilioService;
2836
+ this.showRingAnimation = true;
2837
+ this.selectedIncomingCall = {};
2838
+ this.twilioAuthId = '';
2839
+ this.dedicatedNum = '';
2840
+ this.recordCall = false;
2841
+ this.shouldRecordCall = false;
2842
+ this.isClickExpand = false;
2843
+ this.disbaleEndCallBtn = true;
2844
+ this.closeIncomingCallDiv = new EventEmitter();
2845
+ this.incomingCallsNewList = new EventEmitter();
2846
+ this.selectedIncomingCallInfo = new EventEmitter();
2847
+ this.isMute = false;
2848
+ }
2849
+ ngOnInit() {
2850
+ try {
2851
+ this.twilioService.currentCall.subscribe(call => {
2852
+ if (call) {
2853
+ this.twilioCallData = call;
2854
+ this.twilioAuthId = call.customParameters.get('twilioAuthId') || '';
2855
+ if (!call.parameters) {
2856
+ call.parameters = {};
2857
+ }
2858
+ this.sendIPforIncomingCall(this.twilioAuthId, '');
2859
+ call.on('cancel', () => {
2860
+ if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
2861
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
2862
+ }
2863
+ this.rejectCallFromList(call);
2864
+ });
2865
+ call.on('disconnect', () => {
2866
+ if (this.incomingCallData && this.incomingCallData.parameters && this.incomingCallData.parameters.CallSid) {
2867
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== this.incomingCallData.parameters.CallSid);
2868
+ }
2869
+ this.rejectCallFromList(call);
2870
+ });
2871
+ }
2872
+ });
2873
+ }
2874
+ catch (e) {
2875
+ console.log(e);
2876
+ }
2877
+ }
2878
+ acceptCallFromList(data) {
2879
+ console.log(data, 'checking dii');
2880
+ data.accept();
2881
+ // data.parameters['isCallConnected'] = true;
2882
+ data.isCallConnected = true;
2883
+ this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered').then(() => {
2884
+ if (this.shouldRecordCall) { // default recording
2885
+ this.extensionService.setCallSid(this.CallSid, this.recordCall);
2886
+ this.closeIncomingCallWrapper(1);
2887
+ }
2888
+ else { // manual recording
2889
+ this.extensionService.setCallSid(this.CallSid, this.recordCall);
2890
+ this.closeIncomingCallWrapper(1);
2891
+ }
2892
+ });
2893
+ }
2894
+ rejectCallFromList(data) {
2895
+ if (!data)
2896
+ return;
2897
+ if (data.reject)
2898
+ data.reject();
2899
+ if (data.disconnect)
2900
+ data.disconnect();
2901
+ if (data.parameters) {
2902
+ data.parameters['isCallConnected'] = false; // Should be false when rejecting
2903
+ }
2904
+ if (data.customParameters) {
2905
+ this.sendIPforIncomingCall(data.customParameters.get('twilioAuthId'), 'answered');
2906
+ }
2907
+ if (this.newIncomingCallsList && data && data.parameters && data.parameters.CallSid) {
2908
+ this.newIncomingCallsList = this.newIncomingCallsList.filter((item) => item.parameters && item.parameters.CallSid !== data.parameters.CallSid);
2909
+ this.incomingCallsNewList.emit(this.newIncomingCallsList);
2910
+ if (this.newIncomingCallsList.length == 0) {
2911
+ this.closeIncomingCallDiv.emit({ show: 0, call: data });
2912
+ }
2913
+ }
2914
+ }
2915
+ closeIncomingCallWrapper(val) {
2916
+ this.closeIncomingCallDiv.emit({ show: val, call: this.twilioCallData });
2917
+ }
2918
+ toggleMute(data) {
2919
+ this.isMute = !this.isMute;
2920
+ data.mute(this.isMute);
2921
+ }
2922
+ sendIPforIncomingCall(recordId, callstatus) {
2923
+ return new Promise((resolve, reject) => {
2924
+ this.extensionService.getIPDetailsForCall(recordId, callstatus).subscribe((res) => {
2925
+ const resp = res;
2926
+ if (res.status == 200) {
2927
+ if (resp.callAuth) {
2928
+ this.CallSid = resp.callAuth.callSid;
2929
+ this.recordCall = resp.callAuth.recordCall;
2930
+ // Handle the recordCall flag
2931
+ if (resp.callAuth.recordCall) {
2932
+ this.shouldRecordCall = true;
2933
+ }
2934
+ else {
2935
+ this.shouldRecordCall = false;
2936
+ }
2937
+ }
2938
+ else {
2939
+ // swal("Error", "Missing call authentication details.", "error");
2940
+ }
2941
+ resolve();
2942
+ }
2943
+ else {
2944
+ swal("Error", resp.message.join("<br/>"), "error");
2945
+ resolve();
2946
+ }
2947
+ }, (error) => {
2948
+ swal("Error", GlobalConstant.ErrorMsg500, "error");
2949
+ resolve();
2950
+ });
2951
+ });
2952
+ }
2953
+ onUserInfoByCallSid() {
2954
+ if (this.selectedIncomingCall && this.selectedIncomingCall.userInfo) {
2955
+ }
2956
+ return this.selectedIncomingCall ? Object.keys(this.selectedIncomingCall).length ? true : false : false;
2957
+ }
2958
+ onClickExpand(data) {
2959
+ if (this.selectedIncomingCall === data && this.isClickExpand) {
2960
+ this.isClickExpand = false;
2961
+ this.selectedIncomingCall = null;
2962
+ this.selectedIncomingCallInfo.emit({});
2963
+ return;
2964
+ }
2965
+ this.isClickExpand = true;
2966
+ this.selectedIncomingCall = data;
2967
+ if (this.selectedIncomingCall) {
2968
+ this.selectedIncomingCall['isClickExpand'] = true;
2969
+ if (this.newIncomingCallsList && this.newIncomingCallsList.length > 0) {
2970
+ this.newIncomingCallsList.forEach((call) => {
2971
+ if (call !== this.selectedIncomingCall) {
2972
+ call['isClickExpand'] = false;
2973
+ }
2974
+ });
2975
+ }
2976
+ this.selectedIncomingCallInfo.emit(this.selectedIncomingCall);
2977
+ if (!this.selectedIncomingCall.userInfo || this.selectedIncomingCall.userInfo.status == 201) {
2978
+ this.getUserInformation(this.selectedIncomingCall);
2979
+ }
2980
+ }
2981
+ }
2982
+ getUserInformation(incomingCallData) {
2983
+ let data = this.fromEntries(Array.from(incomingCallData.customParameters.entries()));
2984
+ this.extensionService.getUserInformation(data['twilioAuthId']).subscribe(response => {
2985
+ setTimeout(() => {
2986
+ incomingCallData['userInfo'] = response;
2987
+ }, 5000);
2988
+ }, error => {
2989
+ console.error('Error starting recording', error);
2990
+ });
2991
+ }
2992
+ fromEntries(entries) {
2993
+ return entries.reduce((acc, [key, value]) => {
2994
+ acc[key] = value;
2995
+ return acc;
2996
+ }, {});
2997
+ }
2998
+ }
2999
+ IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }], target: i0.ɵɵFactoryTarget.Component });
3000
+ IncomingCallComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: IncomingCallComponent, selector: "lib-incoming-call", inputs: { incomingCallData: "incomingCallData", newIncomingCallsList: "newIncomingCallsList" }, outputs: { closeIncomingCallDiv: "closeIncomingCallDiv", incomingCallsNewList: "incomingCallsNewList", selectedIncomingCallInfo: "selectedIncomingCallInfo" }, ngImport: i0, template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"], dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
3001
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, decorators: [{
3002
+ type: Component,
3003
+ args: [{ selector: 'lib-incoming-call', template: "<div class=\"call-container\" style=\"width: 100%;\" *ngIf=\"newIncomingCallsList.length > 0\">\n <div class=\"collops\">\n <div class=\"d-flex w-100\">\n <div class=\"d-flex flex-column container-fluid\">\n <div class=\"callToNum\">Incoming call <br/><span>{{dedicatedNum}}</span></div>\n <ng-container *ngFor=\"let data of newIncomingCallsList\">\n <div class=\"p-2 \">\n <div class=\"call-info-wrapper w-100 d-flex align-items-center\">\n <div class=\"img\">\n <img class=\"avatar-img-wrapper\" [src]=\"incomingCallData.img\" alt=\"\" width=\"45\" />\n </div>\n <div class=\"d-flex justify-content-between w-100 align-items-center mr-2\">\n <div class=\"callerDetails-wrapper\">\n <h5 class=\"break-word\">{{data?.userInfo?.c2cInformation?.name || '-'}}</h5>\n <p class=\"break-word\">{{data.userInfo?.displayNum ? data.userInfo?.c2cInformation.number : data.userInfo?.c2cInformation.number }}</p>\n </div> \n <div class=\"d-flex align-items-center\">\n <button class=\"call-btn-wrapper receive-btn\" [disabled]=\"!data?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(data)\"> call </span>\n </button>\n <button class=\"call-btn-wrapper mute-btn\" *ngIf=\"data?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(data)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn-wrapper reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(data)\"> call_end </span>\n </button>\n <div class=\"togglearrow-arrow me-2\" id=\"togglearrow\" (click)=\"onClickExpand(data)\"><i class=\"fa fa-angle-right\"></i></div>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n <div class=\"call-container p-3 text-white model-content\" *ngIf=\"isClickExpand\"> \n <div class=\"mb-2\" style=\"width: 100%; height: 100%;\">\n <div class=\"call-animation\" [ngClass]=\"{'call-animation-play': showRingAnimation}\">\n <img class=\"avatar-img\" [src]=\"incomingCallData.img\" alt=\"\" width=\"100\" />\n </div>\n <div class=\"text-center\">\n <h3 class=\"text-white\">{{selectedIncomingCall?.userInfo?.c2cInformation?.name || '-'}}</h3>\n </div>\n <div class=\"f-13\">\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Subject:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.subject || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Email:</div>\n <div>{{selectedIncomingCall?.userInfo?.c2cInformation?.email || '-'}}</div>\n </div> \n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Number:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.number}}</div>\n </div>\n <div class=\"col-6\">\n <div class=\"\">Language:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.language || '-'}}</div>\n </div>\n </div>\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Extension:</div>\n <div class=\"ml-2\">{{selectedIncomingCall?.userInfo?.c2cInformation?.extension || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-3\">\n <div class=\"col-12 d-flex align-items-center mb-2\">\n <div class=\"me-2\">Image:</div>\n <div class=\"text-ellipsis\">\n <ng-container *ngIf=\"selectedIncomingCall?.userInfo?.c2cInformation?.image && selectedIncomingCall?.userInfo?.c2cInformation?.image !== '-'; else noImage\">\n <img src=\"{{selectedIncomingCall?.userInfo?.c2cInformation?.image}}\" alt=\"\" width=\"42\" height=\"42\" class=\"ml-2\"/>\n </ng-container>\n <ng-template #noImage>\n <span class=\"ml-2\">No Image Available</span>\n </ng-template>\n </div>\n </div> \n </div>\n\n <div class=\" mb-4\">\n <div class=\"\">\n <div class=\"\">Message:</div>\n <div class=\"text-ellipsis\">{{selectedIncomingCall?.userInfo?.c2cInformation?.message || '-'}}</div>\n </div>\n </div>\n\n <div class=\"row mb-2\">\n <div class=\"col-6 mb-2\">\n <div class=\"\">Point Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.pointName || '-'}}</div>\n </div>\n <div class=\"col-6 mb-2\">\n <div class=\"\">Source Name:</div>\n <div class=\"\">{{selectedIncomingCall?.userInfo?.c2cInformation?.sourceName || '-'}}</div>\n </div>\n </div>\n </div>\n <div class=\"call-action-btns mt-0\">\n <button class=\"call-btn receive-btn\" *ngIf=\"!selectedIncomingCall?.parameters?.isCallConnected\">\n <span class=\"material-symbols-outlined\" (click)=\"acceptCallFromList(selectedIncomingCall)\"> call </span>\n </button>\n <button class=\"call-btn mute-btn\" *ngIf=\"selectedIncomingCall?.parameters?.isCallConnected\" [disabled]=\"disbaleEndCallBtn\" (click)=\"toggleMute(selectedIncomingCall)\" [ngClass]=\"{'active-mute': isMute}\">\n <span class=\"material-symbols-outlined\" *ngIf=\"isMute\"> mic_off </span>\n <span class=\"material-symbols-outlined\" *ngIf=\"!isMute\"> mic </span>\n </button>\n <button class=\"call-btn reject-btn\">\n <span class=\"material-symbols-outlined\" (click)=\"rejectCallFromList(selectedIncomingCall)\"> call_end </span>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"wave-container\">\n <svg class=\"waves\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 24 150 28\" preserveAspectRatio=\"none\" shape-rendering=\"auto\" [ngStyle]=\"{'width': '756px'}\">\n <defs>\n <path id=\"gentle-wave\" d=\"M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z\" />\n </defs>\n <g class=\"parallax\">\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"0\" fill=\"rgba(255,255,255,0.7)\" />\n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"3\" fill=\"rgba(255,255,255,0.5)\" /> \n <use xlink:href=\"#gentle-wave\" x=\"48\" y=\"7\" fill=\"#fff\" />\n </g>\n </svg>\n </div>\n</div>", styles: [".call-container{width:385px;height:646px;margin:auto;border-radius:30px;box-shadow:6px 6px 10px -1px #00000026,-5px -4px 10px -1px #00000026;display:flex;box-sizing:border-box;position:relative;overflow:hidden;justify-content:center;align-items:center}.collops{display:flex;flex-direction:column;width:100%;height:100%}.container-fluid{width:680px;height:100%;margin-top:10px}.model-content{background-color:#0d6efd;border-radius:20px;width:645px}.calls-side-by-side{position:fixed;top:0;width:30%;height:498px;z-index:1050;pointer-events:auto;display:flex;align-items:flex-start;left:-10rem;transform:translate(.2rem);transition:left 1s ease-in-out}.move{left:41vw!important}.f-13{font-size:13px!important}.call-animation{background:#fff;width:100px;height:100px;position:relative;margin:20px auto;border-radius:100%;border:solid 4px #fff}.call-animation:before{position:absolute;content:\"\";top:0;left:0;width:100%;height:100%;backface-visibility:hidden;border-radius:50%}.avatar-img-wrapper{border-radius:100%;margin:0 5px}.call-btn-wrapper{height:38px;background-color:#fff;border-radius:30px;margin:0 4px;opacity:.9;width:40px;span {color: white; line-height: unset !important;}}.hold-btn{background-color:#bebebe26;border:none}.hold-btn span,.mute-btn span{color:#fff!important}.active-hold{background-color:#fff!important}.active-hold span{color:#000!important}.active-mute{background-color:transparent}.call-info-wrapper{border:1px solid white;border-radius:7px;padding:8px 1px!important;word-break:break-all}.call-animation-play{animation:play 3s linear infinite}.avatar-img{width:94px;height:94px;border-radius:100%;position:absolute;left:0;top:0}@keyframes play{0%{transform:scale(1)}15%{box-shadow:0 0 0 2px #fff6}25%{box-shadow:0 0 0 4px #fff6,0 0 0 8px #fff3}25%{box-shadow:0 0 0 8px #fff6,0 0 0 16px #fff3}50%{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3}to{box-shadow:0 0 0 10px #fff6,0 0 0 20px #fff3;transform:scale(1.1);opacity:0}}.callerDetails{margin-top:8px;color:#fff;display:flex;flex-direction:column;align-items:center}.callerDetails h1{margin:12px 0 0;color:#fff}.callerDetails-wrapper{margin:0 5px;color:#fff;display:flex;flex-direction:column}.callerDetails-wrapper h3,.callerDetails-wrapper h5{margin:0;color:#fff}.togglearrow-arrow{left:100%;background-color:#fff;width:25px;height:25px;text-align:center;cursor:pointer;border:1px solid #ccc;border-radius:50%;line-height:22px}.callerDetails h4{margin:0;color:#fff}.callerDetails p,.callerDetails-wrapper p{margin-top:-3px;margin-bottom:0;color:#fff}.call-sec-btn{position:relative;width:50px;height:50px;box-sizing:border-box;border:1px solid #cccbcb;background-color:transparent;border-radius:25px;padding:12px;box-shadow:6px 6px 10px -1px #bebebe26,-5px -4px 10px -1px #d2d2d226}.call-sec-btn span{color:#cccbcb}.call-btn{width:48px;height:45px;background-color:#fff;border-radius:30px;box-sizing:border-box;margin:0 8px;opacity:.9}.call-btn:hover{opacity:1}.call-btn span{color:#fff;line-height:unset!important}.receive-btn{background-color:#28a745;border:2px solid #28a745}.mute-btn{position:relative;border:none;background-color:#bebebe26}.reject-btn{background-color:#e03131;border:2px solid #e03131}.btn-container{display:flex;flex-wrap:wrap;padding:0 30px}.key-btn{width:50px;height:50px;background-color:transparent;text-align:center;box-sizing:border-box;margin:0 18px;font-size:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-weight:900;font-style:normal;color:#d3d3d3;cursor:pointer;opacity:.8}.btn-albhabets{font-family:Lato,sans-serif;font-size:12px;font-weight:400}.call-action-btns{text-align:center;margin-top:240px}#call-input{background-color:transparent;border:none;outline:none;text-align:center;color:#fff}.wave-container{position:absolute;bottom:0}.waves{width:660px;position:relative;margin-bottom:-7px;height:40px;min-height:40px}.parallax>use{animation:move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite}.parallax>use:nth-child(1){animation-delay:-2s;animation-duration:7s}.parallax>use:nth-child(2){animation-delay:-3s;animation-duration:10s}.parallax>use:nth-child(3){animation-delay:-4s;animation-duration:13s}.parallax>use:nth-child(4){animation-delay:-5s;animation-duration:20s}@keyframes move-forever{0%{transform:translate3d(-90px,0,0)}to{transform:translate3d(85px,0,0)}}.animated-margin{transition:margin-top .5s ease}.callToNum{color:#fff;font-weight:400;text-align:center}.callToNum span{font-weight:600}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}\n"] }]
3004
+ }], ctorParameters: function () { return [{ type: ExtensionService }, { type: TwilioService }]; }, propDecorators: { incomingCallData: [{
3005
+ type: Input
3006
+ }], newIncomingCallsList: [{
3007
+ type: Input
3008
+ }], closeIncomingCallDiv: [{
3009
+ type: Output
3010
+ }], incomingCallsNewList: [{
3011
+ type: Output
3012
+ }], selectedIncomingCallInfo: [{
3013
+ type: Output
3014
+ }] } });
3015
+
3016
+ class CallerIdDialogComponent {
3017
+ constructor(router, twilServ, dialogRef, data) {
3018
+ this.router = router;
3019
+ this.twilServ = twilServ;
3020
+ this.dialogRef = dialogRef;
3021
+ this.data = data;
3022
+ this.storedTheme = localStorage.getItem('theme-color') || 'blue';
3023
+ this.alertToggle = true;
3024
+ this.token = '';
3025
+ }
3026
+ ngOnInit() {
3027
+ this.alertToggle = (localStorage.getItem('alertToggle') == 'true') ? true : false;
3028
+ this.token = localStorage.getItem('ext_token') || '';
3029
+ }
3030
+ onConfirm() {
3031
+ this.dialogRef.close(true);
3032
+ }
3033
+ onCancel() {
3034
+ this.dialogRef.close(false);
3035
+ }
3036
+ redirectToCallingPreference() {
3037
+ this.router.navigateByUrl('/extension/caller-id/' + this.token);
3038
+ this.dialogRef.close({ event: 'redirect', alertToggle: this.alertToggle });
3039
+ }
3040
+ proceed() {
3041
+ this.dialogRef.close({ event: 'proceed', alertToggle: this.alertToggle });
3042
+ }
3043
+ closeModal() {
3044
+ this.dialogRef.close();
3045
+ }
3046
+ hideMessage(ev) {
3047
+ this.twilServ.toggleCallerIdAlert.next(ev.target.checked);
3048
+ let val = ev.target.checked ? 'true' : 'false';
3049
+ localStorage.setItem('isAlertEnable', val);
3050
+ }
3051
+ }
3052
+ CallerIdDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, deps: [{ token: i4.Router }, { token: TwilioService }, { token: i3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
3053
+ CallerIdDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CallerIdDialogComponent, selector: "lib-caller-id-dialog", ngImport: i0, template: "<!-- <div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div> -->", styles: [""] });
3054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CallerIdDialogComponent, decorators: [{
3055
+ type: Component,
3056
+ args: [{ selector: 'lib-caller-id-dialog', template: "<!-- <div class=\"main-theme {{storedTheme}}\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\"> Caller ID Not Set</h5>\n <button class=\"close\" (click)=\"closeModal()\">\n <span>x</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <p class=\"mb-1\"><strong>There is no caller ID set in your account</strong> <br /></p>\n <p>The receiver will not be able to identify your call or call you back</p>\n <div class=\"d-flex align-items-center justify-content-center\">\n <input type=\"checkbox\" checked (change)=\"hideMessage($event)\" [(ngModel)]=\"alertToggle\" class=\"mr-2\">\n <label for=\"\" class=\"mb-0 text-muted\">I do not want to see this message again</label>\n </div>\n <button class=\"btn btn-black-outline\" (click)=\"doNotShowAgain()\">Do not show this message again</button>\n </div>\n <div class=\"modal-footer border-top d-flex justify-content-between\">\n <button class=\"btn btn-black-outline\" (click)=\"redirectToCallingPreference()\">Click to set caller ID</button>\n \n <button class=\"btn btn-blue ms-2\" (click)=\"proceed()\">Proceed without Caller ID</button>\n </div>\n</div> -->" }]
3057
+ }], ctorParameters: function () {
3058
+ return [{ type: i4.Router }, { type: TwilioService }, { type: i3.MatDialogRef }, { type: undefined, decorators: [{
3059
+ type: Inject,
3060
+ args: [MAT_DIALOG_DATA]
3061
+ }] }];
3062
+ } });
3063
+
2382
3064
  class DialboxModule {
2383
3065
  }
2384
3066
  DialboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2385
- DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, declarations: [DialboxComponent], imports: [CommonModule,
3067
+ DialboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, declarations: [DialboxComponent,
3068
+ CallProgressComponent,
3069
+ CallerIdDialogComponent,
3070
+ IncomingCallComponent], imports: [CommonModule,
2386
3071
  FormsModule,
2387
3072
  ReactiveFormsModule,
2388
3073
  HttpClientModule,
2389
- RouterLink], exports: [DialboxComponent] });
3074
+ RouterLink], exports: [DialboxComponent,
3075
+ CallProgressComponent,
3076
+ CallerIdDialogComponent,
3077
+ IncomingCallComponent] });
2390
3078
  DialboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialboxModule, imports: [CommonModule,
2391
3079
  FormsModule,
2392
3080
  ReactiveFormsModule,
@@ -2396,6 +3084,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2396
3084
  args: [{
2397
3085
  declarations: [
2398
3086
  DialboxComponent,
3087
+ CallProgressComponent,
3088
+ CallerIdDialogComponent,
3089
+ IncomingCallComponent,
2399
3090
  ],
2400
3091
  imports: [
2401
3092
  CommonModule,
@@ -2406,6 +3097,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2406
3097
  ],
2407
3098
  exports: [
2408
3099
  DialboxComponent,
3100
+ CallProgressComponent,
3101
+ CallerIdDialogComponent,
3102
+ IncomingCallComponent,
2409
3103
  ]
2410
3104
  }]
2411
3105
  }] });
@@ -2413,7 +3107,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2413
3107
  /*
2414
3108
  * Public API Surface of dialbox
2415
3109
  */
2416
- // Components
2417
3110
  // export * from './lib/components/dialpad/dialpad.component';
2418
3111
  // export * from './lib/components/dial-button/dial-button.component';
2419
3112
  // // Services
@@ -2432,5 +3125,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2432
3125
  * Generated bundle index. Do not edit.
2433
3126
  */
2434
3127
 
2435
- export { DialboxComponent, DialboxModule };
3128
+ export { CallProgressComponent, CallerIdDialogComponent, DialboxComponent, DialboxModule, IncomingCallComponent };
2436
3129
  //# sourceMappingURL=vgroup-dialbox.mjs.map