@phonghq/go-chat 1.0.33 → 1.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/App.vue.d.ts +2 -0
- package/dist/go-chat.es.js +824 -782
- package/dist/go-chat.umd.js +5 -5
- package/dist/test/chat/App.vue.js +109 -72
- package/dist/test/chat/page/home/Home.vue.js +2 -0
- package/dist/test/chat/page/home/HomeHeader.vue.js +18 -12
- package/dist/test/chat/page/setting/Setting.vue.js +0 -1
- package/dist/test/composable/usePlivo.js +4 -1
- package/dist/test/utils/chat/auth.js +2 -3
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ import '../style/index.scss';
|
|
|
18
18
|
import { useDebounce } from '../utils/debounce';
|
|
19
19
|
import { defineRootColor } from '../constant/color';
|
|
20
20
|
import { publicTopicConversationUpdate } from '../utils/chat/conversation';
|
|
21
|
+
import IconCloseCircle from '../assets/icons/IconCloseCircle.vue';
|
|
21
22
|
import Setting from '../chat/page/setting/Setting.vue';
|
|
22
23
|
import SettingSuccess from '../chat/page/setting/SettingSuccess.vue';
|
|
23
24
|
const routerConfig = [
|
|
@@ -313,6 +314,9 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
313
314
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
314
315
|
...{ class: "text-[#141B34] px-6 shrink-0" },
|
|
315
316
|
});
|
|
317
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
318
|
+
...{ class: "flex items-center justify-between" },
|
|
319
|
+
});
|
|
316
320
|
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
317
321
|
...{ onClick: (...[$event]) => {
|
|
318
322
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
@@ -343,39 +347,67 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
343
347
|
(__VLS_ctx.currentPageConfig.backTitle ?? '');
|
|
344
348
|
// @ts-ignore
|
|
345
349
|
[currentPageConfig,];
|
|
350
|
+
if (props.isLib) {
|
|
351
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
352
|
+
...{ onClick: (...[$event]) => {
|
|
353
|
+
if (!!(!__VLS_ctx.isRouterReady))
|
|
354
|
+
return;
|
|
355
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
|
|
356
|
+
return;
|
|
357
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
|
|
358
|
+
return;
|
|
359
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
|
|
360
|
+
return;
|
|
361
|
+
if (!(__VLS_ctx.responsiveRender == 'mobile'))
|
|
362
|
+
return;
|
|
363
|
+
if (!(__VLS_ctx.currentPageConfig?.backFunc && !__VLS_ctx.currentPageConfig.isHidden))
|
|
364
|
+
return;
|
|
365
|
+
if (!(props.isLib))
|
|
366
|
+
return;
|
|
367
|
+
__VLS_ctx.emit('close');
|
|
368
|
+
// @ts-ignore
|
|
369
|
+
[emit,];
|
|
370
|
+
} },
|
|
371
|
+
...{ class: "w-10 h-10" },
|
|
372
|
+
});
|
|
373
|
+
/** @type {[typeof IconCloseCircle, ]} */ ;
|
|
374
|
+
// @ts-ignore
|
|
375
|
+
const __VLS_30 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
|
|
376
|
+
const __VLS_31 = __VLS_30({}, ...__VLS_functionalComponentArgsRest(__VLS_30));
|
|
377
|
+
}
|
|
346
378
|
}
|
|
347
379
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
348
380
|
...{ class: "grow overflow-hidden" },
|
|
349
381
|
});
|
|
350
382
|
/** @type {[typeof ChatList, ]} */ ;
|
|
351
383
|
// @ts-ignore
|
|
352
|
-
const
|
|
384
|
+
const __VLS_34 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
353
385
|
...{ 'onSelectReceiver': {} },
|
|
354
386
|
ref: "chatListRef",
|
|
355
387
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
356
388
|
responsive: (__VLS_ctx.responsiveRender),
|
|
357
389
|
receiverId: (__VLS_ctx.receiverId),
|
|
358
390
|
}));
|
|
359
|
-
const
|
|
391
|
+
const __VLS_35 = __VLS_34({
|
|
360
392
|
...{ 'onSelectReceiver': {} },
|
|
361
393
|
ref: "chatListRef",
|
|
362
394
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
363
395
|
responsive: (__VLS_ctx.responsiveRender),
|
|
364
396
|
receiverId: (__VLS_ctx.receiverId),
|
|
365
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
366
|
-
let
|
|
367
|
-
let
|
|
368
|
-
const
|
|
397
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_34));
|
|
398
|
+
let __VLS_37;
|
|
399
|
+
let __VLS_38;
|
|
400
|
+
const __VLS_39 = ({ selectReceiver: {} },
|
|
369
401
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
370
402
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
|
|
371
403
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
372
|
-
var
|
|
404
|
+
var __VLS_40 = {};
|
|
373
405
|
// @ts-ignore
|
|
374
406
|
[currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
375
|
-
var
|
|
407
|
+
var __VLS_36;
|
|
376
408
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
377
409
|
// @ts-ignore
|
|
378
|
-
const
|
|
410
|
+
const __VLS_43 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
379
411
|
...{ 'onCall': {} },
|
|
380
412
|
...{ 'onBack': {} },
|
|
381
413
|
...{ 'onInputFocus': {} },
|
|
@@ -384,7 +416,7 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
384
416
|
...{ class: "h-full pt-4" },
|
|
385
417
|
responsive: (__VLS_ctx.responsiveRender),
|
|
386
418
|
}));
|
|
387
|
-
const
|
|
419
|
+
const __VLS_44 = __VLS_43({
|
|
388
420
|
...{ 'onCall': {} },
|
|
389
421
|
...{ 'onBack': {} },
|
|
390
422
|
...{ 'onInputFocus': {} },
|
|
@@ -392,12 +424,12 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
392
424
|
receiverId: (__VLS_ctx.receiverId),
|
|
393
425
|
...{ class: "h-full pt-4" },
|
|
394
426
|
responsive: (__VLS_ctx.responsiveRender),
|
|
395
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
396
|
-
let
|
|
397
|
-
let
|
|
398
|
-
const
|
|
427
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_43));
|
|
428
|
+
let __VLS_46;
|
|
429
|
+
let __VLS_47;
|
|
430
|
+
const __VLS_48 = ({ call: {} },
|
|
399
431
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
400
|
-
const
|
|
432
|
+
const __VLS_49 = ({ back: {} },
|
|
401
433
|
{ onBack: (...[$event]) => {
|
|
402
434
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
403
435
|
return;
|
|
@@ -413,72 +445,72 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
413
445
|
// @ts-ignore
|
|
414
446
|
[responsiveRender, currentPageConfig, receiverId, handleCall,];
|
|
415
447
|
} });
|
|
416
|
-
const
|
|
448
|
+
const __VLS_50 = ({ inputFocus: {} },
|
|
417
449
|
{ onInputFocus: (__VLS_ctx.handleReadMessage) });
|
|
418
450
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
419
451
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
420
|
-
var
|
|
452
|
+
var __VLS_51 = {};
|
|
421
453
|
// @ts-ignore
|
|
422
454
|
[currentPage, PAGE, handleReadMessage, homeComponentRef,];
|
|
423
|
-
var
|
|
455
|
+
var __VLS_45;
|
|
424
456
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
425
457
|
// @ts-ignore
|
|
426
458
|
[currentPage, PAGE,];
|
|
427
459
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
428
460
|
// @ts-ignore
|
|
429
|
-
const
|
|
461
|
+
const __VLS_54 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
430
462
|
ref: "customerDetailRef",
|
|
431
463
|
receiverId: (__VLS_ctx.receiverId),
|
|
432
464
|
...{ class: "w-full h-full" },
|
|
433
465
|
responsive: (__VLS_ctx.responsiveRender),
|
|
434
466
|
}));
|
|
435
|
-
const
|
|
467
|
+
const __VLS_55 = __VLS_54({
|
|
436
468
|
ref: "customerDetailRef",
|
|
437
469
|
receiverId: (__VLS_ctx.receiverId),
|
|
438
470
|
...{ class: "w-full h-full" },
|
|
439
471
|
responsive: (__VLS_ctx.responsiveRender),
|
|
440
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
472
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_54));
|
|
441
473
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
442
|
-
var
|
|
474
|
+
var __VLS_57 = {};
|
|
443
475
|
// @ts-ignore
|
|
444
476
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
445
|
-
var
|
|
477
|
+
var __VLS_56;
|
|
446
478
|
}
|
|
447
479
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
448
480
|
// @ts-ignore
|
|
449
481
|
[currentPage, PAGE,];
|
|
450
482
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
451
483
|
// @ts-ignore
|
|
452
|
-
const
|
|
484
|
+
const __VLS_60 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
453
485
|
...{ class: "w-full h-full" },
|
|
454
486
|
}));
|
|
455
|
-
const
|
|
487
|
+
const __VLS_61 = __VLS_60({
|
|
456
488
|
...{ class: "w-full h-full" },
|
|
457
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
489
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_60));
|
|
458
490
|
}
|
|
459
491
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
460
492
|
// @ts-ignore
|
|
461
493
|
[currentPage, PAGE,];
|
|
462
494
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
463
495
|
// @ts-ignore
|
|
464
|
-
const
|
|
496
|
+
const __VLS_64 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
465
497
|
...{ class: "w-full h-full" },
|
|
466
498
|
}));
|
|
467
|
-
const
|
|
499
|
+
const __VLS_65 = __VLS_64({
|
|
468
500
|
...{ class: "w-full h-full" },
|
|
469
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
501
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_64));
|
|
470
502
|
}
|
|
471
503
|
if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
|
|
472
504
|
// @ts-ignore
|
|
473
505
|
[currentPage, PAGE,];
|
|
474
506
|
/** @type {[typeof MobileFooter, ]} */ ;
|
|
475
507
|
// @ts-ignore
|
|
476
|
-
const
|
|
508
|
+
const __VLS_68 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
|
|
477
509
|
...{ class: "shrink-0" },
|
|
478
510
|
}));
|
|
479
|
-
const
|
|
511
|
+
const __VLS_69 = __VLS_68({
|
|
480
512
|
...{ class: "shrink-0" },
|
|
481
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
513
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_68));
|
|
482
514
|
}
|
|
483
515
|
}
|
|
484
516
|
else {
|
|
@@ -487,29 +519,29 @@ else {
|
|
|
487
519
|
});
|
|
488
520
|
/** @type {[typeof ChatList, ]} */ ;
|
|
489
521
|
// @ts-ignore
|
|
490
|
-
const
|
|
522
|
+
const __VLS_72 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
491
523
|
...{ 'onSelectReceiver': {} },
|
|
492
524
|
ref: "chatListRef",
|
|
493
525
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
494
526
|
responsive: (__VLS_ctx.responsiveRender),
|
|
495
527
|
receiverId: (__VLS_ctx.receiverId),
|
|
496
528
|
}));
|
|
497
|
-
const
|
|
529
|
+
const __VLS_73 = __VLS_72({
|
|
498
530
|
...{ 'onSelectReceiver': {} },
|
|
499
531
|
ref: "chatListRef",
|
|
500
532
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
501
533
|
responsive: (__VLS_ctx.responsiveRender),
|
|
502
534
|
receiverId: (__VLS_ctx.receiverId),
|
|
503
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
504
|
-
let
|
|
505
|
-
let
|
|
506
|
-
const
|
|
535
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_72));
|
|
536
|
+
let __VLS_75;
|
|
537
|
+
let __VLS_76;
|
|
538
|
+
const __VLS_77 = ({ selectReceiver: {} },
|
|
507
539
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
508
540
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
509
|
-
var
|
|
541
|
+
var __VLS_78 = {};
|
|
510
542
|
// @ts-ignore
|
|
511
543
|
[responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
512
|
-
var
|
|
544
|
+
var __VLS_74;
|
|
513
545
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
514
546
|
...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
|
|
515
547
|
});
|
|
@@ -541,8 +573,8 @@ else {
|
|
|
541
573
|
});
|
|
542
574
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
543
575
|
// @ts-ignore
|
|
544
|
-
const
|
|
545
|
-
const
|
|
576
|
+
const __VLS_81 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
577
|
+
const __VLS_82 = __VLS_81({}, ...__VLS_functionalComponentArgsRest(__VLS_81));
|
|
546
578
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
547
579
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
548
580
|
});
|
|
@@ -555,7 +587,7 @@ else {
|
|
|
555
587
|
});
|
|
556
588
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
557
589
|
// @ts-ignore
|
|
558
|
-
const
|
|
590
|
+
const __VLS_85 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
559
591
|
...{ 'onCall': {} },
|
|
560
592
|
...{ 'onInputFocus': {} },
|
|
561
593
|
ref: "homeComponentRef",
|
|
@@ -563,90 +595,90 @@ else {
|
|
|
563
595
|
...{ class: "h-full" },
|
|
564
596
|
responsive: (__VLS_ctx.responsiveRender),
|
|
565
597
|
}));
|
|
566
|
-
const
|
|
598
|
+
const __VLS_86 = __VLS_85({
|
|
567
599
|
...{ 'onCall': {} },
|
|
568
600
|
...{ 'onInputFocus': {} },
|
|
569
601
|
ref: "homeComponentRef",
|
|
570
602
|
receiverId: (__VLS_ctx.receiverId),
|
|
571
603
|
...{ class: "h-full" },
|
|
572
604
|
responsive: (__VLS_ctx.responsiveRender),
|
|
573
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
574
|
-
let
|
|
575
|
-
let
|
|
576
|
-
const
|
|
605
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_85));
|
|
606
|
+
let __VLS_88;
|
|
607
|
+
let __VLS_89;
|
|
608
|
+
const __VLS_90 = ({ call: {} },
|
|
577
609
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
578
|
-
const
|
|
610
|
+
const __VLS_91 = ({ inputFocus: {} },
|
|
579
611
|
{ onInputFocus: (__VLS_ctx.handleReadMessage) });
|
|
580
612
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
|
|
581
613
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
582
|
-
var
|
|
614
|
+
var __VLS_92 = {};
|
|
583
615
|
// @ts-ignore
|
|
584
616
|
[currentPage, PAGE, responsiveRender, receiverId, receiverId, handleCall, handleReadMessage, homeComponentRef,];
|
|
585
|
-
var
|
|
617
|
+
var __VLS_87;
|
|
586
618
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
587
619
|
// @ts-ignore
|
|
588
620
|
[currentPage, PAGE,];
|
|
589
621
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
590
622
|
// @ts-ignore
|
|
591
|
-
const
|
|
623
|
+
const __VLS_95 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
592
624
|
ref: "customerDetailRef",
|
|
593
625
|
receiverId: (__VLS_ctx.receiverId),
|
|
594
626
|
...{ class: "h-full" },
|
|
595
627
|
responsive: (__VLS_ctx.responsiveRender),
|
|
596
628
|
}));
|
|
597
|
-
const
|
|
629
|
+
const __VLS_96 = __VLS_95({
|
|
598
630
|
ref: "customerDetailRef",
|
|
599
631
|
receiverId: (__VLS_ctx.receiverId),
|
|
600
632
|
...{ class: "h-full" },
|
|
601
633
|
responsive: (__VLS_ctx.responsiveRender),
|
|
602
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
634
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_95));
|
|
603
635
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
604
|
-
var
|
|
636
|
+
var __VLS_98 = {};
|
|
605
637
|
// @ts-ignore
|
|
606
638
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
607
|
-
var
|
|
639
|
+
var __VLS_97;
|
|
608
640
|
}
|
|
609
641
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
610
642
|
// @ts-ignore
|
|
611
643
|
[currentPage, PAGE,];
|
|
612
644
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
613
645
|
// @ts-ignore
|
|
614
|
-
const
|
|
646
|
+
const __VLS_101 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
615
647
|
...{ class: "h-full" },
|
|
616
648
|
}));
|
|
617
|
-
const
|
|
649
|
+
const __VLS_102 = __VLS_101({
|
|
618
650
|
...{ class: "h-full" },
|
|
619
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
651
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_101));
|
|
620
652
|
}
|
|
621
653
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
622
654
|
// @ts-ignore
|
|
623
655
|
[currentPage, PAGE,];
|
|
624
656
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
625
657
|
// @ts-ignore
|
|
626
|
-
const
|
|
658
|
+
const __VLS_105 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
627
659
|
...{ class: "h-full" },
|
|
628
660
|
}));
|
|
629
|
-
const
|
|
661
|
+
const __VLS_106 = __VLS_105({
|
|
630
662
|
...{ class: "h-full" },
|
|
631
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
663
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_105));
|
|
632
664
|
}
|
|
633
665
|
/** @type {[typeof Calling, ]} */ ;
|
|
634
666
|
// @ts-ignore
|
|
635
|
-
const
|
|
667
|
+
const __VLS_109 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
636
668
|
...{ 'onUserCalling': {} },
|
|
637
669
|
...{ 'onEndCall': {} },
|
|
638
670
|
ref: "callingRef",
|
|
639
671
|
responsive: (__VLS_ctx.responsiveRender),
|
|
640
672
|
}));
|
|
641
|
-
const
|
|
673
|
+
const __VLS_110 = __VLS_109({
|
|
642
674
|
...{ 'onUserCalling': {} },
|
|
643
675
|
...{ 'onEndCall': {} },
|
|
644
676
|
ref: "callingRef",
|
|
645
677
|
responsive: (__VLS_ctx.responsiveRender),
|
|
646
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
647
|
-
let
|
|
648
|
-
let
|
|
649
|
-
const
|
|
678
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_109));
|
|
679
|
+
let __VLS_112;
|
|
680
|
+
let __VLS_113;
|
|
681
|
+
const __VLS_114 = ({ userCalling: {} },
|
|
650
682
|
{ onUserCalling: (...[$event]) => {
|
|
651
683
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
652
684
|
return;
|
|
@@ -662,13 +694,13 @@ else {
|
|
|
662
694
|
// @ts-ignore
|
|
663
695
|
[responsiveRender, emit,];
|
|
664
696
|
} });
|
|
665
|
-
const
|
|
697
|
+
const __VLS_115 = ({ endCall: {} },
|
|
666
698
|
{ onEndCall: (__VLS_ctx.handleEndCall) });
|
|
667
699
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
668
|
-
var
|
|
700
|
+
var __VLS_116 = {};
|
|
669
701
|
// @ts-ignore
|
|
670
702
|
[handleEndCall, callingRef,];
|
|
671
|
-
var
|
|
703
|
+
var __VLS_111;
|
|
672
704
|
}
|
|
673
705
|
/** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
|
|
674
706
|
/** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
|
|
@@ -693,10 +725,15 @@ else {
|
|
|
693
725
|
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
694
726
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
695
727
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
728
|
+
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
729
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
730
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
696
731
|
/** @type {__VLS_StyleScopedClasses['text-xl']} */ ;
|
|
697
732
|
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
698
733
|
/** @type {__VLS_StyleScopedClasses['text-chat-haze-900']} */ ;
|
|
699
734
|
/** @type {__VLS_StyleScopedClasses['ml-3']} */ ;
|
|
735
|
+
/** @type {__VLS_StyleScopedClasses['w-10']} */ ;
|
|
736
|
+
/** @type {__VLS_StyleScopedClasses['h-10']} */ ;
|
|
700
737
|
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
701
738
|
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
702
739
|
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
@@ -740,7 +777,7 @@ else {
|
|
|
740
777
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
741
778
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
742
779
|
// @ts-ignore
|
|
743
|
-
var __VLS_24 = __VLS_23,
|
|
780
|
+
var __VLS_24 = __VLS_23, __VLS_41 = __VLS_40, __VLS_52 = __VLS_51, __VLS_58 = __VLS_57, __VLS_79 = __VLS_78, __VLS_93 = __VLS_92, __VLS_99 = __VLS_98, __VLS_117 = __VLS_116;
|
|
744
781
|
const __VLS_export = (await import('vue')).defineComponent({
|
|
745
782
|
setup: () => (__VLS_exposed),
|
|
746
783
|
__typeEmits: {},
|
|
@@ -32,6 +32,8 @@ const handleConnectMqtt = async () => {
|
|
|
32
32
|
topic_plivo_chat = TOPIC_PLIVO_SMS + infoUser.value?.conversation_id;
|
|
33
33
|
subscribeToTopic(topic);
|
|
34
34
|
subscribeToTopic(topic_plivo_chat);
|
|
35
|
+
// console.log(topic)
|
|
36
|
+
// console.log(topic_plivo_chat)
|
|
35
37
|
addHandleMqttMessage('chat-home', topic, mqttMessageHandler);
|
|
36
38
|
}
|
|
37
39
|
catch (error) {
|
|
@@ -35,18 +35,24 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
|
35
35
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
36
36
|
...{ class: "flex items-center gap-2" },
|
|
37
37
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
if (__VLS_ctx.responsive == 'mobile') {
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
[responsive,];
|
|
41
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
42
|
+
...{ onClick: (...[$event]) => {
|
|
43
|
+
if (!(__VLS_ctx.responsive == 'mobile'))
|
|
44
|
+
return;
|
|
45
|
+
__VLS_ctx.emit('back');
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
[emit,];
|
|
48
|
+
} },
|
|
49
|
+
...{ class: "shrink-0 flex items-center" },
|
|
50
|
+
});
|
|
51
|
+
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
const __VLS_0 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
54
|
+
const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
55
|
+
}
|
|
50
56
|
/** @type {[typeof Avatar, ]} */ ;
|
|
51
57
|
// @ts-ignore
|
|
52
58
|
const __VLS_4 = __VLS_asFunctionalComponent(Avatar, new Avatar({
|
|
@@ -37,9 +37,12 @@ export function usePlivo(callback) {
|
|
|
37
37
|
plivoBrowserSdk?.client?.on?.('onLoginFailed', (e) => handleLoginFailed(e));
|
|
38
38
|
// plivoBrowserSdk?.client?.on?.('remoteAudioStatus', () => console.log('remoteAudioStatus'))
|
|
39
39
|
const payload = JSON.parse(atob(token.split('.')[1]));
|
|
40
|
-
|
|
40
|
+
console.log(payload);
|
|
41
|
+
// await plivoBrowserSdk?.client?.tokenLogin(payload.sub ?? '', token)
|
|
41
42
|
// await plivoBrowserSdk?.client?.login('webcall003079673454891827', '123456abcA!')
|
|
43
|
+
// await plivoBrowserSdk?.client?.login(payload.sub , null, token)
|
|
42
44
|
await plivoBrowserSdk?.client?.loginWithAccessToken(token);
|
|
45
|
+
// await plivoBrowserSdk?.client?.on?.(payload)
|
|
43
46
|
// console.log('Registered with token')
|
|
44
47
|
}
|
|
45
48
|
catch (err) {
|
|
@@ -43,9 +43,9 @@ export const checkTenantPhone = async () => {
|
|
|
43
43
|
const res = await axios.get(`/api/v1/message/tenant/get-info?tenant_name=${id}`);
|
|
44
44
|
if (res.error || !res?.data)
|
|
45
45
|
throw new Error(res.error);
|
|
46
|
-
// if(dataProfile.value) dataProfile.value.tenant_phone = res?.data?.go_chat_phone ?? ''
|
|
47
46
|
if (dataProfile.value)
|
|
48
|
-
dataProfile.value.tenant_phone = '';
|
|
47
|
+
dataProfile.value.tenant_phone = res?.data?.go_chat_phone ?? '';
|
|
48
|
+
// if(dataProfile.value) dataProfile.value.tenant_phone = ''
|
|
49
49
|
if (dataProfile.value)
|
|
50
50
|
dataProfile.value.tenant_phone_limit = Number(res?.data?.go_chat_phone_limit ?? 0);
|
|
51
51
|
return res;
|
|
@@ -53,7 +53,6 @@ export const checkTenantPhone = async () => {
|
|
|
53
53
|
export const submitTenantPhone = async (body) => {
|
|
54
54
|
const res = await axios.post('/api/v1/message/tenant/update-phone', body);
|
|
55
55
|
dataLoginLink.value = res;
|
|
56
|
-
console.log(res);
|
|
57
56
|
return res;
|
|
58
57
|
};
|
|
59
58
|
export const logout = async () => {
|