@phonghq/go-chat 1.0.72 → 1.0.74
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/assets/icons/call/IconClock.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconClock.vue.js +22 -0
- package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconClose.vue.js +26 -0
- package/dist/assets/icons/call/IconMic.vue.d.ts +14 -0
- package/dist/assets/icons/call/IconMic.vue.js +123 -0
- package/dist/assets/icons/call/IconPhone.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconPhone.vue.js +22 -0
- package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +14 -0
- package/dist/assets/icons/call/IconPhoneCancel.vue.js +46 -0
- package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconSoundDownload.vue.js +50 -0
- package/dist/assets/icons/call/IconSpeaker.vue.d.ts +14 -0
- package/dist/assets/icons/call/IconSpeaker.vue.js +62 -0
- package/dist/assets/icons/chat/IconCalendar.vue.d.ts +14 -0
- package/dist/assets/icons/chat/IconCalendar.vue.js +42 -0
- package/dist/assets/icons/chat/IconCheck.vue.d.ts +2 -0
- package/dist/assets/icons/chat/IconCheck.vue.js +22 -0
- package/dist/assets/icons/chat/IconInfo.vue.d.ts +2 -0
- package/dist/assets/icons/chat/IconInfo.vue.js +20 -0
- package/dist/assets/icons/chat/IconLink.vue.d.ts +14 -0
- package/dist/assets/icons/chat/IconLink.vue.js +42 -0
- package/dist/assets/icons/chat/IconMenuDot.vue.d.ts +2 -0
- package/dist/assets/icons/chat/IconMenuDot.vue.js +31 -0
- package/dist/assets/icons/customer-appointment/IconChevronRight.vue.d.ts +2 -0
- package/dist/assets/icons/customer-appointment/IconChevronRight.vue.js +22 -0
- package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +2 -0
- package/dist/assets/icons/customer-appointment/IconFilter.vue.js +53 -0
- package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconArrow.vue.js +22 -0
- package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconCheck.vue.js +27 -0
- package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconDate.vue.js +43 -0
- package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconGroup.vue.js +48 -0
- package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconMessage.vue.js +28 -0
- package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconNote.vue.js +29 -0
- package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +14 -0
- package/dist/assets/icons/customer-detail/IconPhone.vue.js +41 -0
- package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconPin.vue.js +29 -0
- package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +2 -0
- package/dist/assets/icons/customer-detail/IconSearch.vue.js +29 -0
- package/dist/assets/icons/global/IconAiCheck.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconAiCheck.vue.js +28 -0
- package/dist/assets/icons/global/IconArrowLeft.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconArrowLeft.vue.js +29 -0
- package/dist/assets/icons/global/IconBackspace.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconBackspace.vue.js +28 -0
- package/dist/assets/icons/global/IconCloseCircle.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconCloseCircle.vue.js +36 -0
- package/dist/assets/icons/global/IconMessageOutline.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconMessageOutline.vue.js +22 -0
- package/dist/assets/icons/global/IconPhone.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconPhone.vue.js +19 -0
- package/dist/assets/icons/global/IconPlan.vue.d.ts +14 -0
- package/dist/assets/icons/global/IconPlan.vue.js +39 -0
- package/dist/assets/icons/global/IconPlus.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconPlus.vue.js +22 -0
- package/dist/assets/icons/global/IconSearch.vue.d.ts +32 -0
- package/dist/assets/icons/global/IconSearch.vue.js +68 -0
- package/dist/assets/icons/global/IconSms.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconSms.vue.js +22 -0
- package/dist/assets/icons/global/IconUser.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconUser.vue.js +25 -0
- package/dist/assets/icons/lib/IconZoomOut.vue.d.ts +5 -0
- package/dist/assets/icons/lib/IconZoomOut.vue.js +52 -0
- package/dist/chat/App.vue.d.ts +26 -0
- package/dist/chat/App.vue.js +928 -0
- package/dist/chat/ChatHeader.vue.d.ts +15 -0
- package/dist/chat/ChatHeader.vue.js +218 -0
- package/dist/chat/main.d.ts +7 -0
- package/dist/chat/main.js +7 -0
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +9 -0
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +262 -0
- package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +12 -0
- package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.js +80 -0
- package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +2 -0
- package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.js +138 -0
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +7 -0
- package/dist/chat/page/customer-detail/CustomerDetail.vue.js +234 -0
- package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +16 -0
- package/dist/chat/page/customer-detail/SubInformation.vue.js +134 -0
- package/dist/chat/page/error/Error.vue.d.ts +2 -0
- package/dist/chat/page/error/Error.vue.js +64 -0
- package/dist/chat/page/home/ChatList.vue.d.ts +104 -0
- package/dist/chat/page/home/ChatList.vue.js +654 -0
- package/dist/chat/page/home/ChatMessage.vue.d.ts +21 -0
- package/dist/chat/page/home/ChatMessage.vue.js +210 -0
- package/dist/chat/page/home/ChatMessageItem.vue.d.ts +20 -0
- package/dist/chat/page/home/ChatMessageItem.vue.js +397 -0
- package/dist/chat/page/home/ChatMessageItem2.vue.d.ts +19 -0
- package/dist/chat/page/home/ChatMessageItem2.vue.js +351 -0
- package/dist/chat/page/home/DropZone.vue.d.ts +13 -0
- package/dist/chat/page/home/DropZone.vue.js +130 -0
- package/dist/chat/page/home/Home.vue.d.ts +29 -0
- package/dist/chat/page/home/Home.vue.js +472 -0
- package/dist/chat/page/home/HomeHeader.vue.d.ts +18 -0
- package/dist/chat/page/home/HomeHeader.vue.js +514 -0
- package/dist/chat/page/home/InputChat.vue.d.ts +27 -0
- package/dist/chat/page/home/InputChat.vue.js +412 -0
- package/dist/chat/page/home/NewCustomer.vue.d.ts +7 -0
- package/dist/chat/page/home/NewCustomer.vue.js +83 -0
- package/dist/chat/page/home/PhoneNumpad.vue.d.ts +22 -0
- package/dist/chat/page/home/PhoneNumpad.vue.js +161 -0
- package/dist/chat/page/setting/Setting.vue.d.ts +2 -0
- package/dist/chat/page/setting/Setting.vue.js +277 -0
- package/dist/chat/page/setting/SettingSuccess.vue.d.ts +2 -0
- package/dist/chat/page/setting/SettingSuccess.vue.js +33 -0
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +24 -0
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +207 -0
- package/dist/components/chat/call/Calling.vue.d.ts +17 -0
- package/dist/components/chat/call/Calling.vue.js +594 -0
- package/dist/components/chat/call/TimeLeft.vue.d.ts +5 -0
- package/dist/components/chat/call/TimeLeft.vue.js +59 -0
- package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +13 -0
- package/dist/components/chat/card/CardCustomerDetail.vue.js +28 -0
- package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +20 -0
- package/dist/components/chat/common/collapse/CollapseBase.vue.js +59 -0
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +16 -0
- package/dist/components/chat/common/input/InputSearch.vue.js +71 -0
- package/dist/components/chat/common/modal/Modal.vue.d.ts +94 -0
- package/dist/components/chat/common/modal/Modal.vue.js +260 -0
- package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +35 -0
- package/dist/components/chat/common/popover/PopoverBase.vue.js +148 -0
- package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +10 -0
- package/dist/components/chat/common/spin/BaseSpin.vue.js +43 -0
- package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +17 -0
- package/dist/components/chat/common/switch/SwitchBase.vue.js +76 -0
- package/dist/components/chat/common/tab/TabBase.vue.d.ts +30 -0
- package/dist/components/chat/common/tab/TabBase.vue.js +86 -0
- package/dist/components/chat/common/tabs/TabBase.vue.d.ts +18 -0
- package/dist/components/chat/common/tabs/TabBase.vue.js +93 -0
- package/dist/components/chat/customer/Avatar.vue.d.ts +12 -0
- package/dist/components/chat/customer/Avatar.vue.js +127 -0
- package/dist/components/chat/layout/mobile/Footer.vue.d.ts +2 -0
- package/dist/components/chat/layout/mobile/Footer.vue.js +114 -0
- package/dist/components/chat/select/SelectBase.vue.d.ts +24 -0
- package/dist/components/chat/select/SelectBase.vue.js +105 -0
- package/dist/components/common/CustomLoading.vue.d.ts +2 -0
- package/dist/components/common/CustomLoading.vue.js +19 -0
- package/dist/components/common/Notification/NotificationDescription.vue.d.ts +7 -0
- package/dist/components/common/Notification/NotificationDescription.vue.js +38 -0
- package/dist/components/common/button/ButtonBase.vue.d.ts +22 -0
- package/dist/components/common/button/ButtonBase.vue.js +78 -0
- package/dist/components/common/button/ButtonToggle.vue.d.ts +20 -0
- package/dist/components/common/button/ButtonToggle.vue.js +70 -0
- package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +16 -0
- package/dist/components/common/checkbox/CCheckboxNumber.vue.js +48 -0
- package/dist/components/common/collapse/BaseCollapse.vue.d.ts +12 -0
- package/dist/components/common/collapse/BaseCollapse.vue.js +36 -0
- package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +4 -0
- package/dist/components/common/collapse/BaseCollapseItem.vue.js +22 -0
- package/dist/components/common/drawer/DrawerBase.vue.d.ts +39 -0
- package/dist/components/common/drawer/DrawerBase.vue.js +126 -0
- package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +33 -0
- package/dist/components/common/drawer/DrawerBaseCustom.vue.js +135 -0
- package/dist/components/common/dropdown/DropdownBase.vue.d.ts +21 -0
- package/dist/components/common/dropdown/DropdownBase.vue.js +93 -0
- package/dist/components/common/input/CInputSearch.vue.d.ts +14 -0
- package/dist/components/common/input/CInputSearch.vue.js +62 -0
- package/dist/components/common/modal/ModalBase.vue.d.ts +35 -0
- package/dist/components/common/modal/ModalBase.vue.js +187 -0
- package/dist/components/common/popover/PopoverBase.vue.d.ts +3 -0
- package/dist/components/common/popover/PopoverBase.vue.js +36 -0
- package/dist/components/common/select/SelectBase.vue.d.ts +33 -0
- package/dist/components/common/select/SelectBase.vue.js +120 -0
- package/dist/components/common/slider/BaseSlider.vue.d.ts +11 -0
- package/dist/components/common/slider/BaseSlider.vue.js +70 -0
- package/dist/components/common/spin/CSpin.vue.d.ts +9 -0
- package/dist/components/common/spin/CSpin.vue.js +41 -0
- package/dist/components/common/tooltip/TooltipBase.vue.d.ts +2 -0
- package/dist/components/common/tooltip/TooltipBase.vue.js +8 -0
- package/dist/components/layout/PageError.vue.d.ts +2 -0
- package/dist/components/layout/PageError.vue.js +91 -0
- package/dist/components/ui/button/CButton.vue.d.ts +19 -0
- package/dist/components/ui/button/CButton.vue.js +49 -0
- package/dist/components/ui/button/c-button.d.ts +7 -0
- package/dist/components/ui/button/c-button.js +26 -0
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +18 -0
- package/dist/components/ui/checkbox/Checkbox.vue.js +79 -0
- package/dist/components/ui/checkbox/index.d.ts +1 -0
- package/dist/components/ui/checkbox/index.js +1 -0
- package/dist/components/ui/collapsible/Collapsible.vue.d.ts +16 -0
- package/dist/components/ui/collapsible/Collapsible.vue.js +47 -0
- package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +10 -0
- package/dist/components/ui/collapsible/CollapsibleContent.vue.js +41 -0
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +10 -0
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.js +35 -0
- package/dist/components/ui/collapsible/index.d.ts +3 -0
- package/dist/components/ui/collapsible/index.js +3 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +14 -0
- package/dist/components/ui/dialog/Dialog.vue.js +42 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +10 -0
- package/dist/components/ui/dialog/DialogClose.vue.js +35 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +29 -0
- package/dist/components/ui/dialog/DialogContent.vue.js +84 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +14 -0
- package/dist/components/ui/dialog/DialogDescription.vue.js +43 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +13 -0
- package/dist/components/ui/dialog/DialogFooter.vue.js +26 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +13 -0
- package/dist/components/ui/dialog/DialogHeader.vue.js +26 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +30 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.js +99 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +14 -0
- package/dist/components/ui/dialog/DialogTitle.vue.js +43 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +10 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.js +35 -0
- package/dist/components/ui/dialog/index.d.ts +9 -0
- package/dist/components/ui/dialog/index.js +9 -0
- package/dist/components/ui/drawer/Drawer.vue.d.ts +26 -0
- package/dist/components/ui/drawer/Drawer.vue.js +48 -0
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +33 -0
- package/dist/components/ui/drawer/DrawerContent.vue.js +81 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +14 -0
- package/dist/components/ui/drawer/DrawerDescription.vue.js +42 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +13 -0
- package/dist/components/ui/drawer/DrawerFooter.vue.js +26 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +13 -0
- package/dist/components/ui/drawer/DrawerHeader.vue.js +26 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +7 -0
- package/dist/components/ui/drawer/DrawerOverlay.vue.js +37 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +14 -0
- package/dist/components/ui/drawer/DrawerTitle.vue.js +42 -0
- package/dist/components/ui/drawer/index.d.ts +8 -0
- package/dist/components/ui/drawer/index.js +8 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.js +41 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +20 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +79 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +28 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +66 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +10 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +35 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +15 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.js +43 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +15 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +43 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +41 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +80 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +37 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +13 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.js +41 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +30 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +46 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +14 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +58 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +10 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +41 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/components/ui/dropdown-menu/index.js +15 -0
- package/dist/components/ui/popover/Popover.vue.d.ts +14 -0
- package/dist/components/ui/popover/Popover.vue.js +41 -0
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +28 -0
- package/dist/components/ui/popover/PopoverContent.vue.js +60 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +10 -0
- package/dist/components/ui/popover/PopoverTrigger.vue.js +35 -0
- package/dist/components/ui/popover/index.d.ts +3 -0
- package/dist/components/ui/popover/index.js +3 -0
- package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +18 -0
- package/dist/components/ui/radio-group/RadioGroup.vue.js +46 -0
- package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +7 -0
- package/dist/components/ui/radio-group/RadioGroupItem.vue.js +71 -0
- package/dist/components/ui/radio-group/index.d.ts +2 -0
- package/dist/components/ui/radio-group/index.js +2 -0
- package/dist/components/ui/select/Select.vue.d.ts +20 -0
- package/dist/components/ui/select/Select.vue.js +49 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +24 -0
- package/dist/components/ui/select/SelectContent.vue.js +103 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +10 -0
- package/dist/components/ui/select/SelectGroup.vue.js +37 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.js +73 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +10 -0
- package/dist/components/ui/select/SelectItemText.vue.js +37 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +14 -0
- package/dist/components/ui/select/SelectLabel.vue.js +40 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +14 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.js +58 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +14 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.js +58 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectSeparator.vue.js +39 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +17 -0
- package/dist/components/ui/select/SelectTrigger.vue.js +49 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +10 -0
- package/dist/components/ui/select/SelectValue.vue.js +37 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +11 -0
- package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
- package/dist/components/ui/slider/Slider.vue.js +155 -0
- package/dist/components/ui/slider/index.d.ts +1 -0
- package/dist/components/ui/slider/index.js +1 -0
- package/dist/components/ui/switch/Switch.vue.d.ts +18 -0
- package/dist/components/ui/switch/Switch.vue.js +61 -0
- package/dist/components/ui/switch/index.d.ts +1 -0
- package/dist/components/ui/switch/index.js +1 -0
- package/dist/components/ui/tabs/Tabs.vue.d.ts +20 -0
- package/dist/components/ui/tabs/Tabs.vue.js +54 -0
- package/dist/components/ui/tabs/TabsContent.vue.d.ts +14 -0
- package/dist/components/ui/tabs/TabsContent.vue.js +44 -0
- package/dist/components/ui/tabs/TabsList.vue.d.ts +14 -0
- package/dist/components/ui/tabs/TabsList.vue.js +44 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +14 -0
- package/dist/components/ui/tabs/TabsTrigger.vue.js +45 -0
- package/dist/components/ui/tabs/index.d.ts +4 -0
- package/dist/components/ui/tabs/index.js +4 -0
- package/dist/composable/useDigibot.d.ts +7 -0
- package/dist/composable/useDigibot.js +23 -0
- package/dist/composable/useInitData.d.ts +12 -0
- package/dist/composable/useInitData.js +101 -0
- package/dist/composable/useListConversations.d.ts +59 -0
- package/dist/composable/useListConversations.js +220 -0
- package/dist/composable/useListentEvent.d.ts +5 -0
- package/dist/composable/useListentEvent.js +69 -0
- package/dist/composable/usePlivo.d.ts +15 -0
- package/dist/composable/usePlivo.js +201 -0
- package/dist/constant/color.d.ts +22 -0
- package/dist/constant/color.js +47 -0
- package/dist/constant/datetime.d.ts +7 -0
- package/dist/constant/datetime.js +7 -0
- package/dist/constant/general.d.ts +11 -0
- package/dist/constant/general.js +12 -0
- package/dist/constant/message.d.ts +8 -0
- package/dist/constant/message.js +8 -0
- package/dist/constant/mqtt.d.ts +7 -0
- package/dist/constant/mqtt.js +18 -0
- package/dist/constant/user.d.ts +8 -0
- package/dist/constant/user.js +9 -0
- package/dist/go-chat.es.js +18766 -17073
- package/dist/go-chat.umd.js +23 -23
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/dist/plugins/axios-gci.d.ts +3 -0
- package/dist/plugins/axios-gci.js +25 -0
- package/dist/plugins/axios.d.ts +3 -0
- package/dist/plugins/axios.js +84 -0
- package/dist/plugins/mqtt.d.ts +8 -0
- package/dist/plugins/mqtt.js +189 -0
- package/dist/plugins/pocketbase.d.ts +5 -0
- package/dist/plugins/pocketbase.js +15 -0
- package/dist/plugins/sdk.d.ts +18 -0
- package/dist/plugins/sdk.js +73 -0
- package/dist/plugins/websocket.d.ts +15 -0
- package/dist/plugins/websocket.js +151 -0
- package/dist/style.css +1 -1
- package/dist/types/chat/auth.d.ts +41 -0
- package/dist/types/chat/auth.js +1 -0
- package/dist/types/chat/call.d.ts +19 -0
- package/dist/types/chat/call.js +23 -0
- package/dist/types/chat/global.d.ts +58 -0
- package/dist/types/chat/global.js +1 -0
- package/dist/types/chat/promise.d.ts +17 -0
- package/dist/types/chat/promise.js +1 -0
- package/dist/types/chat/user.d.ts +88 -0
- package/dist/types/chat/user.js +1 -0
- package/dist/types/conversation.d.ts +23 -0
- package/dist/types/conversation.js +1 -0
- package/dist/types/global.d.ts +11 -0
- package/dist/types/global.js +15 -0
- package/dist/types/message.d.ts +52 -0
- package/dist/types/message.js +1 -0
- package/dist/utils/chat/cache.d.ts +7 -0
- package/dist/utils/chat/cache.js +63 -0
- package/dist/utils/chat/chat-router.d.ts +5 -0
- package/dist/utils/chat/chat-router.js +14 -0
- package/dist/utils/chat/page-error.d.ts +4 -0
- package/dist/utils/chat/page-error.js +25 -0
- package/dist/utils/chat/phone-string.d.ts +1 -0
- package/dist/utils/chat/phone-string.js +4 -0
- package/dist/utils/chat/queue.d.ts +7 -0
- package/dist/utils/chat/queue.js +30 -0
- package/dist/utils/chat/store/auth.d.ts +62 -0
- package/dist/utils/chat/store/auth.js +93 -0
- package/dist/utils/chat/store/call.d.ts +15 -0
- package/dist/utils/chat/store/call.js +160 -0
- package/dist/utils/chat/store/conversation.d.ts +14 -0
- package/dist/utils/chat/store/conversation.js +73 -0
- package/dist/utils/chat/store/message.d.ts +27 -0
- package/dist/utils/chat/store/message.js +70 -0
- package/dist/utils/chat/store/time-limit.d.ts +5 -0
- package/dist/utils/chat/store/time-limit.js +8 -0
- package/dist/utils/chat/store/user.d.ts +200 -0
- package/dist/utils/chat/store/user.js +44 -0
- package/dist/utils/dayjs-helper.d.ts +3 -0
- package/dist/utils/dayjs-helper.js +8 -0
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/debounce.js +9 -0
- package/dist/utils/json.d.ts +2 -0
- package/dist/utils/json.js +18 -0
- package/dist/utils/logger.d.ts +3 -0
- package/dist/utils/logger.js +5 -0
- package/dist/utils/string-helper.d.ts +3 -0
- package/dist/utils/string-helper.js +43 -0
- package/dist/views/NotTenantPhone.vue.d.ts +9 -0
- package/dist/views/NotTenantPhone.vue.js +99 -0
- package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +19 -0
- package/dist/views/home/phone-numpad/ConvercationList.vue.js +177 -0
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +32 -0
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.js +403 -0
- package/package.json +1 -1
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
+
import HomeHeader from '../../../chat/page/home/HomeHeader.vue';
|
|
3
|
+
import NewCustomer from '../../../chat/page/home/NewCustomer.vue';
|
|
4
|
+
import InputChat from '../../../chat/page/home/InputChat.vue';
|
|
5
|
+
import { getMessage, sendMessage, upLoadImage } from '../../../utils/chat/store/message';
|
|
6
|
+
import { computed, nextTick, onMounted, onUnmounted, ref, shallowRef } from 'vue';
|
|
7
|
+
import ChatMessage from '../../../chat/page/home/ChatMessage.vue';
|
|
8
|
+
import { addHandleMqttMessage, connectMqtt, publishMessage, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt';
|
|
9
|
+
import { TOPIC_PLIVO_CALL, TOPIC_PLIVO_SMS } from '../../../constant/mqtt';
|
|
10
|
+
import { MessageState } from '../../../constant/message';
|
|
11
|
+
import { publicTopicConversationUpdate } from '../../../utils/chat/store/conversation';
|
|
12
|
+
import { getCache, removeOldestCache, setCache } from '../../../utils/chat/cache';
|
|
13
|
+
import { digibotId } from '../../../composable/useDigibot';
|
|
14
|
+
import dayjs from 'dayjs';
|
|
15
|
+
import { useDebounce } from '../../../utils/debounce';
|
|
16
|
+
import { getUserHistory, userHistory } from '../../../utils/chat/store/user';
|
|
17
|
+
const props = withDefaults(defineProps(), {});
|
|
18
|
+
const emit = defineEmits();
|
|
19
|
+
const MESSAGE_STORAGE_KEY = 'chat-message-';
|
|
20
|
+
const reversedList = computed(() => listMessage.value.slice().reverse());
|
|
21
|
+
let page = 1;
|
|
22
|
+
let pageCount = 1;
|
|
23
|
+
let topic = '';
|
|
24
|
+
let topic_plivo_chat = '';
|
|
25
|
+
const isLoading = ref(false);
|
|
26
|
+
const infoUser = shallowRef(null);
|
|
27
|
+
const listMessage = ref([]);
|
|
28
|
+
const chatMessageRef = ref(null);
|
|
29
|
+
const inputChatRef = ref(null);
|
|
30
|
+
const customerLoading = ref(false);
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
document.addEventListener('visibilitychange', handleVisibilitychange);
|
|
33
|
+
});
|
|
34
|
+
onUnmounted(() => {
|
|
35
|
+
document.removeEventListener('visibilitychange', handleVisibilitychange);
|
|
36
|
+
handleDisconnectMqtt();
|
|
37
|
+
});
|
|
38
|
+
const handleVisibilitychange = () => {
|
|
39
|
+
if (document.visibilityState === 'visible') {
|
|
40
|
+
handleGetMessage({ is_mqtt: true });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const handleConnectMqtt = async () => {
|
|
44
|
+
try {
|
|
45
|
+
await connectMqtt();
|
|
46
|
+
topic = TOPIC_PLIVO_CALL + props.conversation?.id;
|
|
47
|
+
topic_plivo_chat = TOPIC_PLIVO_SMS + props.conversation?.id;
|
|
48
|
+
// subscribeToTopic(topic)
|
|
49
|
+
subscribeToTopic(topic_plivo_chat);
|
|
50
|
+
subscribeToTopic(topic);
|
|
51
|
+
// addHandleMqttMessage('chat-home', topic, mqttMessageHandler)
|
|
52
|
+
addHandleMqttMessage('chat-home-1', topic_plivo_chat, mqttMessageHandler);
|
|
53
|
+
addHandleMqttMessage('chat-home-2', topic, mqttMessageHandler);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error(error);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const handleDisconnectMqtt = async () => {
|
|
60
|
+
// unsubscribeFromTopic(topic)
|
|
61
|
+
await unsubscribeFromTopic(topic_plivo_chat);
|
|
62
|
+
await unsubscribeFromTopic(topic);
|
|
63
|
+
// removeHandleMqttMessage('chat-home')
|
|
64
|
+
removeHandleMqttMessage('chat-home-1');
|
|
65
|
+
removeHandleMqttMessage('chat-home-2');
|
|
66
|
+
};
|
|
67
|
+
const mqttMessageHandler = (topic, message) => {
|
|
68
|
+
if ((infoUser.value?.id && message?.sender_id?.toString() == infoUser.value?.id?.toString()) ||
|
|
69
|
+
(infoUser.value?.id && message?.receiver_id?.toString() == infoUser.value?.id?.toString())) {
|
|
70
|
+
handleGetListMqtt();
|
|
71
|
+
const index = listMessage.value.findIndex((item) => item.id === message?.id);
|
|
72
|
+
if (index < 0) {
|
|
73
|
+
// listMessage.value.unshift(data)
|
|
74
|
+
listMessage.value.unshift({ ...message, local_id: message?.id });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
let data = listMessage.value[index];
|
|
78
|
+
listMessage.value[index] = { ...data, ...message };
|
|
79
|
+
}
|
|
80
|
+
chatMessageRef.value?.scrollBottom();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const handleGetMessage = async (option) => {
|
|
84
|
+
try {
|
|
85
|
+
const id = props.receiverId;
|
|
86
|
+
const params = {
|
|
87
|
+
page: option?.resetList || option?.is_mqtt ? 1 : page,
|
|
88
|
+
receiver_id: props.receiverId
|
|
89
|
+
};
|
|
90
|
+
if (params.page <= 1 && !option?.is_mqtt) {
|
|
91
|
+
const cache = getCache(MESSAGE_STORAGE_KEY + id);
|
|
92
|
+
if (cache.data) {
|
|
93
|
+
listMessage.value = cache.data ?? [];
|
|
94
|
+
chatMessageRef.value?.scrollBottom();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let res = await getMessage(params);
|
|
98
|
+
if (option?.is_mqtt) {
|
|
99
|
+
reconcileAndSortMessages(res.items);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// res.items = res.items.reverse()
|
|
103
|
+
page = res._meta?.currentPage || 1;
|
|
104
|
+
pageCount = res._meta?.pageCount || 1;
|
|
105
|
+
const data = res.items?.map((e) => ({ ...e, local_id: e?.id }));
|
|
106
|
+
if (id == props.receiverId) {
|
|
107
|
+
if (page <= 1) {
|
|
108
|
+
listMessage.value = data;
|
|
109
|
+
chatMessageRef.value?.scrollBottom();
|
|
110
|
+
setCache(MESSAGE_STORAGE_KEY + id, data);
|
|
111
|
+
removeOldestCache(8, MESSAGE_STORAGE_KEY);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
listMessage.value.push(...data);
|
|
115
|
+
// listMessage.value.unshift(...res.items)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
console.error(error);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const handleScrollTop = async () => {
|
|
124
|
+
if (page >= pageCount) {
|
|
125
|
+
chatMessageRef.value?.hideScrollEvent();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
page = page + 1;
|
|
129
|
+
await handleGetMessage();
|
|
130
|
+
chatMessageRef.value?.hideScrollEvent();
|
|
131
|
+
chatMessageRef.value?.fixedScroll();
|
|
132
|
+
};
|
|
133
|
+
const handleGetDetailReceiverQuickly = (data) => {
|
|
134
|
+
if (data?.id == infoUser.value?.id)
|
|
135
|
+
infoUser.value = data;
|
|
136
|
+
};
|
|
137
|
+
const handleGetDetailReceiver = async (data) => {
|
|
138
|
+
const id = props.receiverId;
|
|
139
|
+
if (!data)
|
|
140
|
+
return;
|
|
141
|
+
infoUser.value = { ...data, conversation_id: data.id };
|
|
142
|
+
// const res = (await getDetailReceiver(props.receiverId)) ?? null
|
|
143
|
+
userHistory.value = null;
|
|
144
|
+
customerLoading.value = true;
|
|
145
|
+
handleGetUserHistoryDebounce(infoUser.value?.phone?.slice(1) ?? '');
|
|
146
|
+
if (id == props.receiverId) {
|
|
147
|
+
// infoUser.value = res
|
|
148
|
+
await handleDisconnectMqtt();
|
|
149
|
+
await handleConnectMqtt();
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const handleGetUserHistory = async (phone) => {
|
|
153
|
+
try {
|
|
154
|
+
// customerLoading.value = true
|
|
155
|
+
await getUserHistory(phone);
|
|
156
|
+
}
|
|
157
|
+
catch (e) {
|
|
158
|
+
console.log(e);
|
|
159
|
+
}
|
|
160
|
+
customerLoading.value = false;
|
|
161
|
+
};
|
|
162
|
+
const handleGetUserHistoryDebounce = useDebounce((phone) => handleGetUserHistory(phone), 500);
|
|
163
|
+
const getData = async (data) => {
|
|
164
|
+
try {
|
|
165
|
+
isLoading.value = true;
|
|
166
|
+
listMessage.value = [];
|
|
167
|
+
inputChatRef.value?.clearInput();
|
|
168
|
+
handleGetDetailReceiver(data);
|
|
169
|
+
await Promise.allSettled([handleGetMessage({ resetList: true })]);
|
|
170
|
+
// readMessages(infoUser.value?.conversation_id)
|
|
171
|
+
await nextTick();
|
|
172
|
+
chatMessageRef.value?.scrollBottom();
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
console.error(error);
|
|
176
|
+
}
|
|
177
|
+
finally {
|
|
178
|
+
isLoading.value = false;
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
const updateMessageItem = (id, data) => {
|
|
182
|
+
const index = listMessage.value.findIndex((e) => e.local_id == id);
|
|
183
|
+
if (index > -1) {
|
|
184
|
+
let item = listMessage.value[index];
|
|
185
|
+
item = { ...item, ...data };
|
|
186
|
+
listMessage.value[index] = item;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const handleSendMessage = async (data) => {
|
|
190
|
+
try {
|
|
191
|
+
// listMessage.value.push({ ...data, state: MessageState.Sending })
|
|
192
|
+
listMessage.value.unshift({ ...data, state: MessageState.Sending, local_id: data?.id });
|
|
193
|
+
await nextTick();
|
|
194
|
+
// publishMessage(topic, {
|
|
195
|
+
// ...data,
|
|
196
|
+
// state: MessageState.Sending
|
|
197
|
+
// })
|
|
198
|
+
let file_upload = [];
|
|
199
|
+
if (data?.attachments?.length) {
|
|
200
|
+
updateMessageItem(data.id, { state: MessageState.Uploading });
|
|
201
|
+
file_upload = await handleUploadImage(data?.attachments[0].file_local);
|
|
202
|
+
}
|
|
203
|
+
updateMessageItem(data.id, { state: MessageState.Sending });
|
|
204
|
+
chatMessageRef.value?.scrollBottom();
|
|
205
|
+
const formData = new FormData();
|
|
206
|
+
formData.append('message', data.message ?? '');
|
|
207
|
+
formData.append('receiver_id', infoUser.value?.id.toString() ?? '');
|
|
208
|
+
if (file_upload?.length) {
|
|
209
|
+
formData.append('url', file_upload[0]?.url ?? '');
|
|
210
|
+
}
|
|
211
|
+
const res = await sendMessage(formData);
|
|
212
|
+
publishMessage(topic_plivo_chat, {
|
|
213
|
+
...data,
|
|
214
|
+
state: MessageState.Sent,
|
|
215
|
+
attachments: file_upload
|
|
216
|
+
? [
|
|
217
|
+
{
|
|
218
|
+
file_name: data.attachments[0]?.file_name ?? '',
|
|
219
|
+
file_path: file_upload[0]?.url ?? ''
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
: [],
|
|
223
|
+
id: res?.message?.id,
|
|
224
|
+
is_sms: res?.message?.is_sms,
|
|
225
|
+
local_id: data?.id
|
|
226
|
+
});
|
|
227
|
+
updateMessageItem(data.id, {
|
|
228
|
+
state: MessageState.Sent,
|
|
229
|
+
id: res?.message?.id,
|
|
230
|
+
is_sms: res?.message?.is_sms
|
|
231
|
+
});
|
|
232
|
+
chatMessageRef.value?.scrollBottom();
|
|
233
|
+
publicTopicConversationUpdate({
|
|
234
|
+
message: data?.message ?? '',
|
|
235
|
+
isSendImg: !!file_upload?.length,
|
|
236
|
+
infoUser: infoUser.value,
|
|
237
|
+
is_known: props.conversation?.is_known ?? 0,
|
|
238
|
+
conversation_id: props.conversation?.id ?? 0
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
console.log(error);
|
|
243
|
+
updateMessageItem(data.id, {
|
|
244
|
+
state: MessageState.Failed,
|
|
245
|
+
error: typeof error?.messages == 'string' ? error.messages : error
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
const handleUploadImage = async (file) => {
|
|
250
|
+
if (file == null || file == undefined)
|
|
251
|
+
return [];
|
|
252
|
+
if (file.size > 1 * 1024 * 1024) {
|
|
253
|
+
throw new Error('File size exceeds limit');
|
|
254
|
+
}
|
|
255
|
+
const formData = new FormData();
|
|
256
|
+
formData.append('file', file);
|
|
257
|
+
const res = await upLoadImage(formData);
|
|
258
|
+
if (res?.[0]?.error) {
|
|
259
|
+
throw new Error(res?.[0]?.errors ?? 'Error!');
|
|
260
|
+
}
|
|
261
|
+
return res;
|
|
262
|
+
};
|
|
263
|
+
const call = () => {
|
|
264
|
+
if (infoUser.value) {
|
|
265
|
+
emit('call', infoUser.value);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
const reconcileAndSortMessages = (serverMessages) => {
|
|
269
|
+
let currentMessages = [...listMessage.value];
|
|
270
|
+
serverMessages.forEach((serverMsg) => {
|
|
271
|
+
const index = currentMessages.findIndex((msg) => msg.id === serverMsg.id);
|
|
272
|
+
if (index !== -1) {
|
|
273
|
+
currentMessages[index] = {
|
|
274
|
+
...currentMessages[index],
|
|
275
|
+
...serverMsg
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
currentMessages.push(serverMsg);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
listMessage.value = currentMessages.sort((a, b) => dayjs(b.created_at).valueOf() - dayjs(a.created_at).valueOf());
|
|
283
|
+
};
|
|
284
|
+
const handleGetListMqtt = useDebounce(() => handleGetMessage({ is_mqtt: true }), 5000);
|
|
285
|
+
const __VLS_exposed = { getData, handleGetMessage, infoUser, handleGetDetailReceiverQuickly };
|
|
286
|
+
defineExpose(__VLS_exposed);
|
|
287
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
288
|
+
const __VLS_defaults = {};
|
|
289
|
+
const __VLS_ctx = {
|
|
290
|
+
...{},
|
|
291
|
+
...{},
|
|
292
|
+
...{},
|
|
293
|
+
...{},
|
|
294
|
+
...{},
|
|
295
|
+
};
|
|
296
|
+
let __VLS_elements;
|
|
297
|
+
let __VLS_components;
|
|
298
|
+
let __VLS_directives;
|
|
299
|
+
if (__VLS_ctx.infoUser) {
|
|
300
|
+
// @ts-ignore
|
|
301
|
+
[infoUser,];
|
|
302
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
303
|
+
...{ class: "flex flex-col overflow-hidden relative" },
|
|
304
|
+
});
|
|
305
|
+
/** @type {[typeof HomeHeader, ]} */ ;
|
|
306
|
+
// @ts-ignore
|
|
307
|
+
const __VLS_0 = __VLS_asFunctionalComponent(HomeHeader, new HomeHeader({
|
|
308
|
+
...{ 'onCall': {} },
|
|
309
|
+
...{ 'onViewAppointment': {} },
|
|
310
|
+
...{ 'onBack': {} },
|
|
311
|
+
...{ class: "shrink-0" },
|
|
312
|
+
data: (__VLS_ctx.infoUser),
|
|
313
|
+
responsive: (__VLS_ctx.responsive),
|
|
314
|
+
parentPageName: (__VLS_ctx.parentPageName),
|
|
315
|
+
customerLoading: (__VLS_ctx.customerLoading),
|
|
316
|
+
}));
|
|
317
|
+
const __VLS_1 = __VLS_0({
|
|
318
|
+
...{ 'onCall': {} },
|
|
319
|
+
...{ 'onViewAppointment': {} },
|
|
320
|
+
...{ 'onBack': {} },
|
|
321
|
+
...{ class: "shrink-0" },
|
|
322
|
+
data: (__VLS_ctx.infoUser),
|
|
323
|
+
responsive: (__VLS_ctx.responsive),
|
|
324
|
+
parentPageName: (__VLS_ctx.parentPageName),
|
|
325
|
+
customerLoading: (__VLS_ctx.customerLoading),
|
|
326
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
327
|
+
let __VLS_3;
|
|
328
|
+
let __VLS_4;
|
|
329
|
+
const __VLS_5 = ({ call: {} },
|
|
330
|
+
{ onCall: (__VLS_ctx.call) });
|
|
331
|
+
const __VLS_6 = ({ viewAppointment: {} },
|
|
332
|
+
{ onViewAppointment: (...[$event]) => {
|
|
333
|
+
if (!(__VLS_ctx.infoUser))
|
|
334
|
+
return;
|
|
335
|
+
__VLS_ctx.emit('viewAppointment', $event);
|
|
336
|
+
// @ts-ignore
|
|
337
|
+
[infoUser, responsive, parentPageName, customerLoading, call, emit,];
|
|
338
|
+
} });
|
|
339
|
+
const __VLS_7 = ({ back: {} },
|
|
340
|
+
{ onBack: (...[$event]) => {
|
|
341
|
+
if (!(__VLS_ctx.infoUser))
|
|
342
|
+
return;
|
|
343
|
+
__VLS_ctx.emit('back');
|
|
344
|
+
// @ts-ignore
|
|
345
|
+
[emit,];
|
|
346
|
+
} });
|
|
347
|
+
var __VLS_2;
|
|
348
|
+
if (__VLS_ctx.listMessage?.length) {
|
|
349
|
+
// @ts-ignore
|
|
350
|
+
[listMessage,];
|
|
351
|
+
/** @type {[typeof ChatMessage, ]} */ ;
|
|
352
|
+
// @ts-ignore
|
|
353
|
+
const __VLS_9 = __VLS_asFunctionalComponent(ChatMessage, new ChatMessage({
|
|
354
|
+
...{ 'onScrollTop': {} },
|
|
355
|
+
...{ 'onCallBack': {} },
|
|
356
|
+
ref: "chatMessageRef",
|
|
357
|
+
data: (__VLS_ctx.infoUser),
|
|
358
|
+
message: (__VLS_ctx.reversedList),
|
|
359
|
+
...{ class: "grow" },
|
|
360
|
+
responsive: (__VLS_ctx.responsive),
|
|
361
|
+
showNewCustomer: (__VLS_ctx.page >= __VLS_ctx.pageCount),
|
|
362
|
+
isLoading: (__VLS_ctx.isLoading),
|
|
363
|
+
}));
|
|
364
|
+
const __VLS_10 = __VLS_9({
|
|
365
|
+
...{ 'onScrollTop': {} },
|
|
366
|
+
...{ 'onCallBack': {} },
|
|
367
|
+
ref: "chatMessageRef",
|
|
368
|
+
data: (__VLS_ctx.infoUser),
|
|
369
|
+
message: (__VLS_ctx.reversedList),
|
|
370
|
+
...{ class: "grow" },
|
|
371
|
+
responsive: (__VLS_ctx.responsive),
|
|
372
|
+
showNewCustomer: (__VLS_ctx.page >= __VLS_ctx.pageCount),
|
|
373
|
+
isLoading: (__VLS_ctx.isLoading),
|
|
374
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_9));
|
|
375
|
+
let __VLS_12;
|
|
376
|
+
let __VLS_13;
|
|
377
|
+
const __VLS_14 = ({ scrollTop: {} },
|
|
378
|
+
{ onScrollTop: (__VLS_ctx.handleScrollTop) });
|
|
379
|
+
const __VLS_15 = ({ callBack: {} },
|
|
380
|
+
{ onCallBack: (__VLS_ctx.call) });
|
|
381
|
+
/** @type {typeof __VLS_ctx.chatMessageRef} */ ;
|
|
382
|
+
var __VLS_16 = {};
|
|
383
|
+
// @ts-ignore
|
|
384
|
+
[infoUser, responsive, call, reversedList, page, pageCount, isLoading, handleScrollTop, chatMessageRef,];
|
|
385
|
+
var __VLS_11;
|
|
386
|
+
}
|
|
387
|
+
else if (!__VLS_ctx.isLoading) {
|
|
388
|
+
// @ts-ignore
|
|
389
|
+
[isLoading,];
|
|
390
|
+
/** @type {[typeof NewCustomer, ]} */ ;
|
|
391
|
+
// @ts-ignore
|
|
392
|
+
const __VLS_19 = __VLS_asFunctionalComponent(NewCustomer, new NewCustomer({
|
|
393
|
+
data: (__VLS_ctx.infoUser),
|
|
394
|
+
...{ class: "grow" },
|
|
395
|
+
isNew: (!__VLS_ctx.listMessage.length),
|
|
396
|
+
}));
|
|
397
|
+
const __VLS_20 = __VLS_19({
|
|
398
|
+
data: (__VLS_ctx.infoUser),
|
|
399
|
+
...{ class: "grow" },
|
|
400
|
+
isNew: (!__VLS_ctx.listMessage.length),
|
|
401
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_19));
|
|
402
|
+
// @ts-ignore
|
|
403
|
+
[infoUser, listMessage,];
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
407
|
+
...{ class: "grow" },
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
if (__VLS_ctx.receiverId != __VLS_ctx.digibotId) {
|
|
411
|
+
// @ts-ignore
|
|
412
|
+
[receiverId, digibotId,];
|
|
413
|
+
/** @type {[typeof InputChat, ]} */ ;
|
|
414
|
+
// @ts-ignore
|
|
415
|
+
const __VLS_23 = __VLS_asFunctionalComponent(InputChat, new InputChat({
|
|
416
|
+
...{ 'onSendMessage': {} },
|
|
417
|
+
...{ 'onFocus': {} },
|
|
418
|
+
data: (__VLS_ctx.infoUser),
|
|
419
|
+
responsive: (__VLS_ctx.responsive),
|
|
420
|
+
conversation: (__VLS_ctx.conversation),
|
|
421
|
+
ref: "inputChatRef",
|
|
422
|
+
...{ class: "p-2 sm:p-6" },
|
|
423
|
+
}));
|
|
424
|
+
const __VLS_24 = __VLS_23({
|
|
425
|
+
...{ 'onSendMessage': {} },
|
|
426
|
+
...{ 'onFocus': {} },
|
|
427
|
+
data: (__VLS_ctx.infoUser),
|
|
428
|
+
responsive: (__VLS_ctx.responsive),
|
|
429
|
+
conversation: (__VLS_ctx.conversation),
|
|
430
|
+
ref: "inputChatRef",
|
|
431
|
+
...{ class: "p-2 sm:p-6" },
|
|
432
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_23));
|
|
433
|
+
let __VLS_26;
|
|
434
|
+
let __VLS_27;
|
|
435
|
+
const __VLS_28 = ({ sendMessage: {} },
|
|
436
|
+
{ onSendMessage: (__VLS_ctx.handleSendMessage) });
|
|
437
|
+
const __VLS_29 = ({ focus: {} },
|
|
438
|
+
{ onFocus: (...[$event]) => {
|
|
439
|
+
if (!(__VLS_ctx.infoUser))
|
|
440
|
+
return;
|
|
441
|
+
if (!(__VLS_ctx.receiverId != __VLS_ctx.digibotId))
|
|
442
|
+
return;
|
|
443
|
+
__VLS_ctx.emit('inputFocus');
|
|
444
|
+
// @ts-ignore
|
|
445
|
+
[infoUser, responsive, emit, conversation, handleSendMessage,];
|
|
446
|
+
} });
|
|
447
|
+
/** @type {typeof __VLS_ctx.inputChatRef} */ ;
|
|
448
|
+
var __VLS_30 = {};
|
|
449
|
+
// @ts-ignore
|
|
450
|
+
[inputChatRef,];
|
|
451
|
+
var __VLS_25;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
455
|
+
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
456
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
457
|
+
/** @type {__VLS_StyleScopedClasses['relative']} */ ;
|
|
458
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
459
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
460
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
461
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
462
|
+
/** @type {__VLS_StyleScopedClasses['p-2']} */ ;
|
|
463
|
+
/** @type {__VLS_StyleScopedClasses['sm:p-6']} */ ;
|
|
464
|
+
// @ts-ignore
|
|
465
|
+
var __VLS_17 = __VLS_16, __VLS_31 = __VLS_30;
|
|
466
|
+
const __VLS_export = (await import('vue')).defineComponent({
|
|
467
|
+
setup: () => (__VLS_exposed),
|
|
468
|
+
__typeEmits: {},
|
|
469
|
+
__typeProps: {},
|
|
470
|
+
props: {},
|
|
471
|
+
});
|
|
472
|
+
export default {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IResUser } from '../../../types/message';
|
|
2
|
+
import type { PAGE_RESPONSIVE, PARENT_PAGE_NAME } from '../../../types/chat/global';
|
|
3
|
+
type Props = {
|
|
4
|
+
data: IResUser | null;
|
|
5
|
+
responsive: PAGE_RESPONSIVE | null;
|
|
6
|
+
parentPageName: PARENT_PAGE_NAME;
|
|
7
|
+
customerLoading: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
call: () => any;
|
|
11
|
+
back: () => any;
|
|
12
|
+
viewAppointment: (id: any) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
14
|
+
onCall?: (() => any) | undefined;
|
|
15
|
+
onBack?: (() => any) | undefined;
|
|
16
|
+
onViewAppointment?: ((id: any) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|