@phonghq/go-chat 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/go-chat.es.js +6578 -6530
- package/dist/go-chat.umd.js +14 -14
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/IconArrowLeft.vue.d.ts +0 -2
- package/dist/assets/icons/IconPhone.vue.d.ts +0 -2
- package/dist/assets/icons/IconPlan.vue.d.ts +0 -2
- package/dist/assets/icons/IconPlus.vue.d.ts +0 -2
- package/dist/assets/icons/IconSearch.vue.d.ts +0 -32
- package/dist/assets/icons/call/IconMic.vue.d.ts +0 -14
- package/dist/assets/icons/call/IconPhone.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconSpeaker.vue.d.ts +0 -14
- package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +0 -2
- package/dist/chat/App.vue.d.ts +0 -5
- package/dist/chat/main.d.ts +0 -6
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +0 -2
- package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +0 -12
- package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +0 -2
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +0 -7
- package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +0 -16
- package/dist/chat/page/error/Error.vue.d.ts +0 -2
- package/dist/chat/page/home/ChatList.vue.d.ts +0 -20
- package/dist/chat/page/home/ChatMessage.vue.d.ts +0 -16
- package/dist/chat/page/home/Home.vue.d.ts +0 -14
- package/dist/chat/page/home/HomeHeader.vue.d.ts +0 -10
- package/dist/chat/page/home/InputChat.vue.d.ts +0 -19
- package/dist/chat/page/home/NewCustomer.vue.d.ts +0 -6
- package/dist/components/ListenEvent.vue.d.ts +0 -2
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +0 -22
- package/dist/components/chat/call/Calling.vue.d.ts +0 -7
- package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +0 -13
- package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +0 -20
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +0 -16
- package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +0 -35
- package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +0 -2
- package/dist/components/chat/customer/Avatar.vue.d.ts +0 -11
- package/dist/components/chat/layout/mobile/Footer.vue.d.ts +0 -2
- package/dist/components/common/CustomLoading.vue.d.ts +0 -2
- package/dist/components/common/Notification/NotificationDescription.vue.d.ts +0 -7
- package/dist/components/common/button/ButtonBase.vue.d.ts +0 -22
- package/dist/components/common/button/ButtonToggle.vue.d.ts +0 -20
- package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +0 -16
- package/dist/components/common/collapse/BaseCollapse.vue.d.ts +0 -12
- package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +0 -4
- package/dist/components/common/drawer/DrawerBase.vue.d.ts +0 -39
- package/dist/components/common/dropdown/DropdownBase.vue.d.ts +0 -21
- package/dist/components/common/input/CInputSearch.vue.d.ts +0 -14
- package/dist/components/common/modal/ModalBase.vue.d.ts +0 -35
- package/dist/components/common/popover/PopoverBase.vue.d.ts +0 -3
- package/dist/components/common/slider/BaseSlider.vue.d.ts +0 -11
- package/dist/components/common/spin/CSpin.vue.d.ts +0 -9
- package/dist/components/common/tooltip/TooltipBase.vue.d.ts +0 -2
- package/dist/components/layout/Blank.vue.d.ts +0 -9
- package/dist/components/layout/Default.vue.d.ts +0 -9
- package/dist/components/modal/Confirm.vue.d.ts +0 -2
- package/dist/components/ui/button/CButton.vue.d.ts +0 -19
- package/dist/components/ui/button/c-button.d.ts +0 -7
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -18
- package/dist/components/ui/checkbox/index.d.ts +0 -1
- package/dist/components/ui/collapsible/Collapsible.vue.d.ts +0 -16
- package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -10
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -10
- package/dist/components/ui/collapsible/index.d.ts +0 -3
- package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -14
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -10
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -29
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -14
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -13
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -13
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -30
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -14
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -10
- package/dist/components/ui/dialog/index.d.ts +0 -9
- package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -26
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -33
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -14
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -13
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -13
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -7
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -14
- package/dist/components/ui/drawer/index.d.ts +0 -8
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -20
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -28
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -10
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -15
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -15
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -18
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -30
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -10
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
- package/dist/components/ui/popover/Popover.vue.d.ts +0 -14
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -28
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -10
- package/dist/components/ui/popover/index.d.ts +0 -3
- package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +0 -18
- package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +0 -7
- package/dist/components/ui/radio-group/index.d.ts +0 -2
- package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
- package/dist/components/ui/slider/index.d.ts +0 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +0 -18
- package/dist/components/ui/switch/index.d.ts +0 -1
- package/dist/composable/useCallHelper.d.ts +0 -23
- package/dist/composable/useInitData.d.ts +0 -11
- package/dist/composable/useModalConfirm.d.ts +0 -5
- package/dist/constant/color.d.ts +0 -22
- package/dist/constant/datetime.d.ts +0 -5
- package/dist/constant/general.d.ts +0 -8
- package/dist/constant/message.d.ts +0 -8
- package/dist/constant/mqtt.d.ts +0 -4
- package/dist/constant/user.d.ts +0 -8
- package/dist/lib/utils.d.ts +0 -2
- package/dist/plugins/axios-gci.d.ts +0 -3
- package/dist/plugins/axios.d.ts +0 -3
- package/dist/plugins/mqtt.d.ts +0 -10
- package/dist/plugins/sdk.d.ts +0 -19
- package/dist/plugins/websocket.d.ts +0 -4
- package/dist/test/assets/icons/IconArrowLeft.vue.js +0 -29
- package/dist/test/assets/icons/IconPhone.vue.js +0 -19
- package/dist/test/assets/icons/IconPlan.vue.js +0 -19
- package/dist/test/assets/icons/IconPlus.vue.js +0 -22
- package/dist/test/assets/icons/IconSearch.vue.js +0 -68
- package/dist/test/assets/icons/call/IconMic.vue.js +0 -123
- package/dist/test/assets/icons/call/IconPhone.vue.js +0 -35
- package/dist/test/assets/icons/call/IconPhoneCancel.vue.js +0 -35
- package/dist/test/assets/icons/call/IconSpeaker.vue.js +0 -62
- package/dist/test/assets/icons/customer-appointment/IconFilter.vue.js +0 -53
- package/dist/test/assets/icons/customer-detail/IconArrow.vue.js +0 -22
- package/dist/test/assets/icons/customer-detail/IconCheck.vue.js +0 -27
- package/dist/test/assets/icons/customer-detail/IconDate.vue.js +0 -43
- package/dist/test/assets/icons/customer-detail/IconGroup.vue.js +0 -48
- package/dist/test/assets/icons/customer-detail/IconMessage.vue.js +0 -28
- package/dist/test/assets/icons/customer-detail/IconNote.vue.js +0 -29
- package/dist/test/assets/icons/customer-detail/IconPhone.vue.js +0 -21
- package/dist/test/assets/icons/customer-detail/IconPin.vue.js +0 -29
- package/dist/test/assets/icons/customer-detail/IconSearch.vue.js +0 -29
- package/dist/test/chat/App.vue.js +0 -502
- package/dist/test/chat/main.js +0 -6
- package/dist/test/chat/page/customer-appointment/CustomerAppointment.vue.js +0 -207
- package/dist/test/chat/page/customer-check-in/CollapseCheckIn.vue.js +0 -80
- package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +0 -136
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -235
- package/dist/test/chat/page/customer-detail/SubInformation.vue.js +0 -102
- package/dist/test/chat/page/error/Error.vue.js +0 -64
- package/dist/test/chat/page/home/ChatList.vue.js +0 -380
- package/dist/test/chat/page/home/ChatMessage.vue.js +0 -271
- package/dist/test/chat/page/home/Home.vue.js +0 -327
- package/dist/test/chat/page/home/HomeHeader.vue.js +0 -122
- package/dist/test/chat/page/home/InputChat.vue.js +0 -226
- package/dist/test/chat/page/home/NewCustomer.vue.js +0 -82
- package/dist/test/components/ListenEvent.vue.js +0 -45
- package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +0 -197
- package/dist/test/components/chat/call/Calling.vue.js +0 -291
- package/dist/test/components/chat/card/CardCustomerDetail.vue.js +0 -28
- package/dist/test/components/chat/common/collapse/CollapseBase.vue.js +0 -59
- package/dist/test/components/chat/common/input/InputSearch.vue.js +0 -71
- package/dist/test/components/chat/common/popover/PopoverBase.vue.js +0 -148
- package/dist/test/components/chat/common/spin/BaseSpin.vue.js +0 -12
- package/dist/test/components/chat/customer/Avatar.vue.js +0 -79
- package/dist/test/components/chat/layout/mobile/Footer.vue.js +0 -109
- package/dist/test/components/common/CustomLoading.vue.js +0 -19
- package/dist/test/components/common/Notification/NotificationDescription.vue.js +0 -38
- package/dist/test/components/common/button/ButtonBase.vue.js +0 -78
- package/dist/test/components/common/button/ButtonToggle.vue.js +0 -70
- package/dist/test/components/common/checkbox/CCheckboxNumber.vue.js +0 -48
- package/dist/test/components/common/collapse/BaseCollapse.vue.js +0 -36
- package/dist/test/components/common/collapse/BaseCollapseItem.vue.js +0 -22
- package/dist/test/components/common/drawer/DrawerBase.vue.js +0 -126
- package/dist/test/components/common/dropdown/DropdownBase.vue.js +0 -91
- package/dist/test/components/common/input/CInputSearch.vue.js +0 -62
- package/dist/test/components/common/modal/ModalBase.vue.js +0 -164
- package/dist/test/components/common/popover/PopoverBase.vue.js +0 -36
- package/dist/test/components/common/slider/BaseSlider.vue.js +0 -70
- package/dist/test/components/common/spin/CSpin.vue.js +0 -41
- package/dist/test/components/common/tooltip/TooltipBase.vue.js +0 -8
- package/dist/test/components/layout/Blank.vue.js +0 -19
- package/dist/test/components/layout/Default.vue.js +0 -21
- package/dist/test/components/modal/Confirm.vue.js +0 -164
- package/dist/test/components/ui/button/CButton.vue.js +0 -49
- package/dist/test/components/ui/button/c-button.js +0 -26
- package/dist/test/components/ui/checkbox/Checkbox.vue.js +0 -79
- package/dist/test/components/ui/checkbox/index.js +0 -1
- package/dist/test/components/ui/collapsible/Collapsible.vue.js +0 -47
- package/dist/test/components/ui/collapsible/CollapsibleContent.vue.js +0 -41
- package/dist/test/components/ui/collapsible/CollapsibleTrigger.vue.js +0 -35
- package/dist/test/components/ui/collapsible/index.js +0 -3
- package/dist/test/components/ui/dialog/Dialog.vue.js +0 -42
- package/dist/test/components/ui/dialog/DialogClose.vue.js +0 -35
- package/dist/test/components/ui/dialog/DialogContent.vue.js +0 -84
- package/dist/test/components/ui/dialog/DialogDescription.vue.js +0 -43
- package/dist/test/components/ui/dialog/DialogFooter.vue.js +0 -26
- package/dist/test/components/ui/dialog/DialogHeader.vue.js +0 -26
- package/dist/test/components/ui/dialog/DialogScrollContent.vue.js +0 -99
- package/dist/test/components/ui/dialog/DialogTitle.vue.js +0 -43
- package/dist/test/components/ui/dialog/DialogTrigger.vue.js +0 -35
- package/dist/test/components/ui/dialog/index.js +0 -9
- package/dist/test/components/ui/drawer/Drawer.vue.js +0 -48
- package/dist/test/components/ui/drawer/DrawerContent.vue.js +0 -81
- package/dist/test/components/ui/drawer/DrawerDescription.vue.js +0 -42
- package/dist/test/components/ui/drawer/DrawerFooter.vue.js +0 -26
- package/dist/test/components/ui/drawer/DrawerHeader.vue.js +0 -26
- package/dist/test/components/ui/drawer/DrawerOverlay.vue.js +0 -37
- package/dist/test/components/ui/drawer/DrawerTitle.vue.js +0 -42
- package/dist/test/components/ui/drawer/index.js +0 -8
- package/dist/test/components/ui/dropdown-menu/DropdownMenu.vue.js +0 -41
- package/dist/test/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -79
- package/dist/test/components/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -61
- package/dist/test/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -35
- package/dist/test/components/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -43
- package/dist/test/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -43
- package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -41
- package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -80
- package/dist/test/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -37
- package/dist/test/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -26
- package/dist/test/components/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -41
- package/dist/test/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -46
- package/dist/test/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -58
- package/dist/test/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -41
- package/dist/test/components/ui/dropdown-menu/index.js +0 -15
- package/dist/test/components/ui/popover/Popover.vue.js +0 -41
- package/dist/test/components/ui/popover/PopoverContent.vue.js +0 -60
- package/dist/test/components/ui/popover/PopoverTrigger.vue.js +0 -35
- package/dist/test/components/ui/popover/index.js +0 -3
- package/dist/test/components/ui/radio-group/RadioGroup.vue.js +0 -46
- package/dist/test/components/ui/radio-group/RadioGroupItem.vue.js +0 -71
- package/dist/test/components/ui/radio-group/index.js +0 -2
- package/dist/test/components/ui/slider/Slider.vue.js +0 -155
- package/dist/test/components/ui/slider/index.js +0 -1
- package/dist/test/components/ui/switch/Switch.vue.js +0 -61
- package/dist/test/components/ui/switch/index.js +0 -1
- package/dist/test/composable/useCallHelper.js +0 -170
- package/dist/test/composable/useInitData.js +0 -84
- package/dist/test/composable/useModalConfirm.js +0 -39
- package/dist/test/constant/color.js +0 -43
- package/dist/test/constant/datetime.js +0 -5
- package/dist/test/constant/general.js +0 -9
- package/dist/test/constant/message.js +0 -8
- package/dist/test/constant/mqtt.js +0 -11
- package/dist/test/constant/user.js +0 -9
- package/dist/test/lib/utils.js +0 -5
- package/dist/test/plugins/axios-gci.js +0 -25
- package/dist/test/plugins/axios.js +0 -85
- package/dist/test/plugins/mqtt.js +0 -128
- package/dist/test/plugins/sdk.js +0 -83
- package/dist/test/plugins/websocket.js +0 -65
- package/dist/test/types/call.js +0 -1
- package/dist/test/types/chat/auth.js +0 -1
- package/dist/test/types/chat/global.js +0 -1
- package/dist/test/types/chat/promise.js +0 -1
- package/dist/test/types/chat/user.js +0 -1
- package/dist/test/types/conversation.js +0 -1
- package/dist/test/types/global.js +0 -15
- package/dist/test/types/message.js +0 -1
- package/dist/test/utils/chat/auth.js +0 -51
- package/dist/test/utils/chat/call.js +0 -61
- package/dist/test/utils/chat/chat-router.js +0 -9
- package/dist/test/utils/chat/conversation.js +0 -7
- package/dist/test/utils/chat/message.js +0 -42
- package/dist/test/utils/chat/user.js +0 -33
- package/dist/test/utils/debounce.js +0 -9
- package/dist/test/utils/json.js +0 -18
- package/dist/test/utils/logger.js +0 -5
- package/dist/test/utils/string-helper.js +0 -27
- package/dist/types/call.d.ts +0 -4
- package/dist/types/chat/auth.d.ts +0 -37
- package/dist/types/chat/global.d.ts +0 -7
- package/dist/types/chat/promise.d.ts +0 -17
- package/dist/types/chat/user.d.ts +0 -88
- package/dist/types/conversation.d.ts +0 -18
- package/dist/types/global.d.ts +0 -11
- package/dist/types/message.d.ts +0 -43
- package/dist/utils/chat/auth.d.ts +0 -45
- package/dist/utils/chat/call.d.ts +0 -5
- package/dist/utils/chat/chat-router.d.ts +0 -3
- package/dist/utils/chat/conversation.d.ts +0 -3
- package/dist/utils/chat/message.d.ts +0 -17
- package/dist/utils/chat/user.d.ts +0 -193
- package/dist/utils/debounce.d.ts +0 -1
- package/dist/utils/json.d.ts +0 -2
- package/dist/utils/logger.d.ts +0 -3
- package/dist/utils/string-helper.d.ts +0 -1
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
-
import IconArrow from '../../../assets/icons/customer-detail/IconArrow.vue';
|
|
3
|
-
const props = withDefaults(defineProps(), {
|
|
4
|
-
information: [],
|
|
5
|
-
title: ''
|
|
6
|
-
});
|
|
7
|
-
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
8
|
-
const __VLS_defaults = {
|
|
9
|
-
information: [],
|
|
10
|
-
title: ''
|
|
11
|
-
};
|
|
12
|
-
const __VLS_ctx = {
|
|
13
|
-
...{},
|
|
14
|
-
...{},
|
|
15
|
-
...{},
|
|
16
|
-
...{},
|
|
17
|
-
};
|
|
18
|
-
let __VLS_elements;
|
|
19
|
-
let __VLS_components;
|
|
20
|
-
let __VLS_directives;
|
|
21
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
22
|
-
...{ class: "w-full" },
|
|
23
|
-
});
|
|
24
|
-
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
|
|
25
|
-
...{ class: "text-chat-haze-500 font-semibold" },
|
|
26
|
-
});
|
|
27
|
-
(__VLS_ctx.title);
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
[title,];
|
|
30
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
31
|
-
...{ class: "bg-white rounded-xl border border-chat-haze-100 mt-1 p-4 space-y-4" },
|
|
32
|
-
});
|
|
33
|
-
for (const [item, x] of __VLS_getVForSourceType((__VLS_ctx.information))) {
|
|
34
|
-
(x);
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
[information,];
|
|
37
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
38
|
-
...{ onClick: (...[$event]) => {
|
|
39
|
-
item.click?.();
|
|
40
|
-
} },
|
|
41
|
-
...{ class: "flex items-center gap-1 " },
|
|
42
|
-
...{ class: ({ 'cursor-pointer': item.click }) },
|
|
43
|
-
});
|
|
44
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
45
|
-
...{ class: "flex items-center gap-1 grow text-chat-haze-900" },
|
|
46
|
-
});
|
|
47
|
-
const __VLS_0 = ((item.icon));
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({}));
|
|
50
|
-
const __VLS_2 = __VLS_1({}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
51
|
-
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
52
|
-
(item.label);
|
|
53
|
-
if (item.value) {
|
|
54
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
55
|
-
...{ class: "flex items-center text-chat-haze-300" },
|
|
56
|
-
});
|
|
57
|
-
(item.value);
|
|
58
|
-
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
59
|
-
...{ class: "ml-1" },
|
|
60
|
-
});
|
|
61
|
-
/** @type {[typeof IconArrow, ]} */ ;
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
const __VLS_5 = __VLS_asFunctionalComponent(IconArrow, new IconArrow({}));
|
|
64
|
-
const __VLS_6 = __VLS_5({}, ...__VLS_functionalComponentArgsRest(__VLS_5));
|
|
65
|
-
}
|
|
66
|
-
__VLS_asFunctionalElement(__VLS_elements.hr)({
|
|
67
|
-
...{ class: "border-chat-haze-100 mx-6" },
|
|
68
|
-
});
|
|
69
|
-
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (x < __VLS_ctx.information.length - 1) }, null, null);
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
[information,];
|
|
72
|
-
}
|
|
73
|
-
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
74
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
|
|
75
|
-
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
76
|
-
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
77
|
-
/** @type {__VLS_StyleScopedClasses['rounded-xl']} */ ;
|
|
78
|
-
/** @type {__VLS_StyleScopedClasses['border']} */ ;
|
|
79
|
-
/** @type {__VLS_StyleScopedClasses['border-chat-haze-100']} */ ;
|
|
80
|
-
/** @type {__VLS_StyleScopedClasses['mt-1']} */ ;
|
|
81
|
-
/** @type {__VLS_StyleScopedClasses['p-4']} */ ;
|
|
82
|
-
/** @type {__VLS_StyleScopedClasses['space-y-4']} */ ;
|
|
83
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
84
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
85
|
-
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
86
|
-
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
87
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
88
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
89
|
-
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
90
|
-
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
91
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-haze-900']} */ ;
|
|
92
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
93
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
94
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-haze-300']} */ ;
|
|
95
|
-
/** @type {__VLS_StyleScopedClasses['ml-1']} */ ;
|
|
96
|
-
/** @type {__VLS_StyleScopedClasses['border-chat-haze-100']} */ ;
|
|
97
|
-
/** @type {__VLS_StyleScopedClasses['mx-6']} */ ;
|
|
98
|
-
const __VLS_export = (await import('vue')).defineComponent({
|
|
99
|
-
__typeProps: {},
|
|
100
|
-
props: {},
|
|
101
|
-
});
|
|
102
|
-
export default {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
-
import { logout } from '../../../utils/chat/auth.js';
|
|
3
|
-
const reload = () => window.location.reload();
|
|
4
|
-
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
5
|
-
const __VLS_ctx = {
|
|
6
|
-
...{},
|
|
7
|
-
...{},
|
|
8
|
-
};
|
|
9
|
-
let __VLS_elements;
|
|
10
|
-
let __VLS_components;
|
|
11
|
-
let __VLS_directives;
|
|
12
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
13
|
-
...{ class: "m-auto w-max" },
|
|
14
|
-
});
|
|
15
|
-
__VLS_asFunctionalElement(__VLS_elements.h1, __VLS_elements.h1)({
|
|
16
|
-
...{ class: "font-bold text-chat-haze-900 text-center mb-2" },
|
|
17
|
-
...{ style: {} },
|
|
18
|
-
});
|
|
19
|
-
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
20
|
-
...{ class: "text-chat-haze-500 text-center mb-8" },
|
|
21
|
-
...{ style: {} },
|
|
22
|
-
});
|
|
23
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
24
|
-
...{ class: "flex gap-4" },
|
|
25
|
-
});
|
|
26
|
-
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
27
|
-
...{ onClick: (...[$event]) => {
|
|
28
|
-
__VLS_ctx.reload();
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
[reload,];
|
|
31
|
-
} },
|
|
32
|
-
...{ class: "px-6 py-2 bg-[#004AB3] text-white rounded-lg" },
|
|
33
|
-
});
|
|
34
|
-
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
35
|
-
...{ onClick: (...[$event]) => {
|
|
36
|
-
__VLS_ctx.logout();
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
[logout,];
|
|
39
|
-
} },
|
|
40
|
-
...{ class: "px-6 py-2 bg-[#004AB3] text-white rounded-lg" },
|
|
41
|
-
});
|
|
42
|
-
/** @type {__VLS_StyleScopedClasses['m-auto']} */ ;
|
|
43
|
-
/** @type {__VLS_StyleScopedClasses['w-max']} */ ;
|
|
44
|
-
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
|
|
45
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-haze-900']} */ ;
|
|
46
|
-
/** @type {__VLS_StyleScopedClasses['text-center']} */ ;
|
|
47
|
-
/** @type {__VLS_StyleScopedClasses['mb-2']} */ ;
|
|
48
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
|
|
49
|
-
/** @type {__VLS_StyleScopedClasses['text-center']} */ ;
|
|
50
|
-
/** @type {__VLS_StyleScopedClasses['mb-8']} */ ;
|
|
51
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
52
|
-
/** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
|
|
53
|
-
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
54
|
-
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
55
|
-
/** @type {__VLS_StyleScopedClasses['bg-[#004AB3]']} */ ;
|
|
56
|
-
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
57
|
-
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
58
|
-
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
59
|
-
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
60
|
-
/** @type {__VLS_StyleScopedClasses['bg-[#004AB3]']} */ ;
|
|
61
|
-
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
62
|
-
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
63
|
-
const __VLS_export = (await import('vue')).defineComponent({});
|
|
64
|
-
export default {};
|
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import InputSearch from '../../../components/chat/common/input/InputSearch.vue';
|
|
2
|
-
import IconPlus from '../../../assets/icons/IconPlus.vue';
|
|
3
|
-
import { nextTick, onMounted, onUnmounted, ref } from 'vue';
|
|
4
|
-
import Avatar from '../../../components/chat/customer/Avatar.vue';
|
|
5
|
-
import { getConversation } from '../../../utils/chat/conversation';
|
|
6
|
-
import BaseSpin from '../../../components/chat/common/spin/BaseSpin.vue';
|
|
7
|
-
import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
|
|
8
|
-
import { useDebounce } from '../../../utils/debounce';
|
|
9
|
-
import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt';
|
|
10
|
-
import { TOPIC_HOME, TOPIC_STATUS_USER } from '../../../constant/mqtt';
|
|
11
|
-
import { dataProfile } from '../../../utils/chat/auth';
|
|
12
|
-
import { readMessages } from '../../../utils/chat/message';
|
|
13
|
-
import dayjs from 'dayjs';
|
|
14
|
-
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
15
|
-
dayjs.extend(relativeTime);
|
|
16
|
-
const props = withDefaults(defineProps(), {});
|
|
17
|
-
const emit = defineEmits();
|
|
18
|
-
const receiver_id = defineModel('receiverId');
|
|
19
|
-
const isOpen = ref(false);
|
|
20
|
-
const keyword = ref('');
|
|
21
|
-
const scrollEventRef = ref(null);
|
|
22
|
-
const listConversations = ref([]);
|
|
23
|
-
const params = ref({
|
|
24
|
-
page: 1,
|
|
25
|
-
search: ''
|
|
26
|
-
});
|
|
27
|
-
let pageCount = 0;
|
|
28
|
-
const isLoadingSearch = ref(false);
|
|
29
|
-
onMounted(() => {
|
|
30
|
-
handleConnectMqtt();
|
|
31
|
-
});
|
|
32
|
-
onUnmounted(() => {
|
|
33
|
-
handleDisconnectMqtt;
|
|
34
|
-
});
|
|
35
|
-
const handleDisconnectMqtt = () => {
|
|
36
|
-
TOPIC_HOME.forEach((item) => {
|
|
37
|
-
unsubscribeFromTopic(item + dataProfile.value?.id);
|
|
38
|
-
removeHandleMqttMessage('chat-list-' + item);
|
|
39
|
-
});
|
|
40
|
-
if (dataProfile.value?.user_type == 'tenant') {
|
|
41
|
-
subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id);
|
|
42
|
-
removeHandleMqttMessage('chat-list-' + TOPIC_STATUS_USER);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const handleConnectMqtt = async () => {
|
|
46
|
-
try {
|
|
47
|
-
if (dataProfile.value) {
|
|
48
|
-
await connectMqtt();
|
|
49
|
-
TOPIC_HOME.forEach((item) => {
|
|
50
|
-
subscribeToTopic(item + dataProfile.value?.id);
|
|
51
|
-
addHandleMqttMessage('chat-list-' + item, item + dataProfile.value?.id, mqttMessageHandler);
|
|
52
|
-
});
|
|
53
|
-
subscribeToTopic(TOPIC_STATUS_USER + dataProfile.value?.id);
|
|
54
|
-
addHandleMqttMessage('chat-list-' + TOPIC_STATUS_USER, TOPIC_STATUS_USER + dataProfile.value?.id, mqttMessageHandler);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (error) {
|
|
58
|
-
console.error(error);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const mqttMessageHandler = (topic, data) => {
|
|
62
|
-
getDataMqtt();
|
|
63
|
-
if (topic === TOPIC_HOME[0] + dataProfile.value?.id) {
|
|
64
|
-
const index = listConversations.value.findIndex((item) => item.id === data.id);
|
|
65
|
-
if (index != -1) {
|
|
66
|
-
listConversations.value.splice(index, 1);
|
|
67
|
-
}
|
|
68
|
-
listConversations.value.unshift(data);
|
|
69
|
-
}
|
|
70
|
-
if (topic === TOPIC_HOME[1] + dataProfile.value?.id) {
|
|
71
|
-
const index = listConversations.value.findIndex((item) => item.id === data.id);
|
|
72
|
-
if (index != -1) {
|
|
73
|
-
listConversations.value[index].unread_count = 0;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (topic === TOPIC_HOME[2] + dataProfile.value?.id) {
|
|
77
|
-
listConversations.value.unshift(data?.conversations);
|
|
78
|
-
}
|
|
79
|
-
if (topic === TOPIC_STATUS_USER + dataProfile.value?.id) {
|
|
80
|
-
const index = listConversations.value.findIndex((e) => e.receiver_id == Number(data?.customer_id));
|
|
81
|
-
if (index != -1) {
|
|
82
|
-
listConversations.value[index].status = data.is_online ? 1 : 0;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
const getDataMqtt = useDebounce(() => {
|
|
87
|
-
getData(undefined, { hideLoading: true, reset: true });
|
|
88
|
-
}, 5000);
|
|
89
|
-
const getData = async (data, option) => {
|
|
90
|
-
try {
|
|
91
|
-
if (!option?.hideLoading)
|
|
92
|
-
isLoadingSearch.value = true;
|
|
93
|
-
params.value = { ...params.value, ...(data ?? {}) };
|
|
94
|
-
const res = await getConversation(params.value);
|
|
95
|
-
if (option?.reset) {
|
|
96
|
-
listConversations.value = [];
|
|
97
|
-
await nextTick();
|
|
98
|
-
}
|
|
99
|
-
listConversations.value.push(...(res?.items ?? []));
|
|
100
|
-
checkHasReceiveId();
|
|
101
|
-
params.value.page = res?._meta?.currentPage || 1;
|
|
102
|
-
pageCount = res?._meta?.pageCount || 1;
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
console.error(error);
|
|
106
|
-
}
|
|
107
|
-
finally {
|
|
108
|
-
isLoadingSearch.value = false;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
const checkHasReceiveId = () => {
|
|
112
|
-
const hasReceiveId = listConversations.value?.some((e) => e.receiver_id === receiver_id.value);
|
|
113
|
-
if (props.response == 'tablet') {
|
|
114
|
-
if (!hasReceiveId && listConversations.value?.length)
|
|
115
|
-
emit('selectReceiver', listConversations.value[0]);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
const handleSearch = (value) => {
|
|
119
|
-
// listConversations.value = []
|
|
120
|
-
getData({ search: value }, { reset: true });
|
|
121
|
-
};
|
|
122
|
-
const handleScroll = useDebounce(async () => {
|
|
123
|
-
if (params.value.page >= pageCount) {
|
|
124
|
-
scrollEventRef.value?.hideLoading();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
let page = params.value.page + 1;
|
|
128
|
-
await getData({ page });
|
|
129
|
-
scrollEventRef.value?.hideLoading();
|
|
130
|
-
}, 200);
|
|
131
|
-
const selectUser = (user) => {
|
|
132
|
-
emit('selectReceiver', user);
|
|
133
|
-
};
|
|
134
|
-
const handleReadMessage = () => {
|
|
135
|
-
const index = listConversations.value.findIndex((e) => e.receiver_id == receiver_id.value);
|
|
136
|
-
if (index > -1) {
|
|
137
|
-
if (listConversations.value[index].unread_count) {
|
|
138
|
-
readMessages(listConversations.value[index].id);
|
|
139
|
-
listConversations.value[index].unread_count = 0;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
getData();
|
|
144
|
-
const __VLS_exposed = { handleReadMessage };
|
|
145
|
-
defineExpose(__VLS_exposed);
|
|
146
|
-
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
147
|
-
const __VLS_modelEmit = defineEmits();
|
|
148
|
-
const __VLS_defaults = {};
|
|
149
|
-
const __VLS_ctx = {
|
|
150
|
-
...{},
|
|
151
|
-
...{},
|
|
152
|
-
...{},
|
|
153
|
-
...{},
|
|
154
|
-
...{},
|
|
155
|
-
};
|
|
156
|
-
let __VLS_elements;
|
|
157
|
-
let __VLS_components;
|
|
158
|
-
let __VLS_directives;
|
|
159
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
160
|
-
...{ class: "h-full flex flex-col chat-box-white pt-6" },
|
|
161
|
-
});
|
|
162
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
163
|
-
...{ class: "shrink-0 w-full px-6 flex gap-2 mb-6" },
|
|
164
|
-
});
|
|
165
|
-
/** @type {[typeof InputSearch, ]} */ ;
|
|
166
|
-
// @ts-ignore
|
|
167
|
-
const __VLS_0 = __VLS_asFunctionalComponent(InputSearch, new InputSearch({
|
|
168
|
-
...{ 'onSearch': {} },
|
|
169
|
-
...{ class: "h-[45px] grow" },
|
|
170
|
-
response: (__VLS_ctx.response),
|
|
171
|
-
modelValue: (__VLS_ctx.keyword),
|
|
172
|
-
}));
|
|
173
|
-
const __VLS_1 = __VLS_0({
|
|
174
|
-
...{ 'onSearch': {} },
|
|
175
|
-
...{ class: "h-[45px] grow" },
|
|
176
|
-
response: (__VLS_ctx.response),
|
|
177
|
-
modelValue: (__VLS_ctx.keyword),
|
|
178
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
179
|
-
let __VLS_3;
|
|
180
|
-
let __VLS_4;
|
|
181
|
-
const __VLS_5 = ({ search: {} },
|
|
182
|
-
{ onSearch: (__VLS_ctx.handleSearch) });
|
|
183
|
-
// @ts-ignore
|
|
184
|
-
[response, keyword, handleSearch,];
|
|
185
|
-
var __VLS_2;
|
|
186
|
-
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
187
|
-
...{ class: "h-[45px] w-[45px] rounded-full flex-center bg-[#C7DEFF]" },
|
|
188
|
-
});
|
|
189
|
-
/** @type {[typeof IconPlus, ]} */ ;
|
|
190
|
-
// @ts-ignore
|
|
191
|
-
const __VLS_7 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
|
|
192
|
-
...{ class: "text-[#004AB3]" },
|
|
193
|
-
}));
|
|
194
|
-
const __VLS_8 = __VLS_7({
|
|
195
|
-
...{ class: "text-[#004AB3]" },
|
|
196
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
197
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
198
|
-
...{ class: "grow relative overflow-hidden" },
|
|
199
|
-
});
|
|
200
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
201
|
-
...{ class: "absolute sc-full flex-center bg-black/10" },
|
|
202
|
-
});
|
|
203
|
-
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.isLoadingSearch) }, null, null);
|
|
204
|
-
// @ts-ignore
|
|
205
|
-
[isLoadingSearch,];
|
|
206
|
-
/** @type {[typeof BaseSpin, ]} */ ;
|
|
207
|
-
// @ts-ignore
|
|
208
|
-
const __VLS_11 = __VLS_asFunctionalComponent(BaseSpin, new BaseSpin({}));
|
|
209
|
-
const __VLS_12 = __VLS_11({}, ...__VLS_functionalComponentArgsRest(__VLS_11));
|
|
210
|
-
/** @type {[typeof ScrollEvent, typeof ScrollEvent, ]} */ ;
|
|
211
|
-
// @ts-ignore
|
|
212
|
-
const __VLS_15 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
|
|
213
|
-
...{ 'onGetDataBottom': {} },
|
|
214
|
-
ref: "scrollEventRef",
|
|
215
|
-
...{ class: "h-full overflow-auto" },
|
|
216
|
-
bottom: true,
|
|
217
|
-
}));
|
|
218
|
-
const __VLS_16 = __VLS_15({
|
|
219
|
-
...{ 'onGetDataBottom': {} },
|
|
220
|
-
ref: "scrollEventRef",
|
|
221
|
-
...{ class: "h-full overflow-auto" },
|
|
222
|
-
bottom: true,
|
|
223
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_15));
|
|
224
|
-
let __VLS_18;
|
|
225
|
-
let __VLS_19;
|
|
226
|
-
const __VLS_20 = ({ getDataBottom: {} },
|
|
227
|
-
{ onGetDataBottom: (__VLS_ctx.handleScroll) });
|
|
228
|
-
/** @type {typeof __VLS_ctx.scrollEventRef} */ ;
|
|
229
|
-
var __VLS_21 = {};
|
|
230
|
-
const { default: __VLS_23 } = __VLS_17.slots;
|
|
231
|
-
// @ts-ignore
|
|
232
|
-
[handleScroll, scrollEventRef,];
|
|
233
|
-
for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
|
|
234
|
-
// @ts-ignore
|
|
235
|
-
[listConversations,];
|
|
236
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
237
|
-
...{ onClick: (...[$event]) => {
|
|
238
|
-
__VLS_ctx.selectUser(user);
|
|
239
|
-
// @ts-ignore
|
|
240
|
-
[selectUser,];
|
|
241
|
-
} },
|
|
242
|
-
...{ class: "" },
|
|
243
|
-
key: (user.id),
|
|
244
|
-
});
|
|
245
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
246
|
-
...{ class: "w-full overflow-hidden flex items-center hover:bg-[#EDF5FF] cursor-pointer px-6 py-2" },
|
|
247
|
-
...{ class: ({ 'bg-[#EDF5FF]': __VLS_ctx.receiver_id == user.receiver_id && __VLS_ctx.response == 'tablet' }) },
|
|
248
|
-
});
|
|
249
|
-
// @ts-ignore
|
|
250
|
-
[response, receiver_id,];
|
|
251
|
-
/** @type {[typeof Avatar, ]} */ ;
|
|
252
|
-
// @ts-ignore
|
|
253
|
-
const __VLS_24 = __VLS_asFunctionalComponent(Avatar, new Avatar({
|
|
254
|
-
...{ class: "shrink-0" },
|
|
255
|
-
src: (user.avatar ?? ''),
|
|
256
|
-
color: (user.color),
|
|
257
|
-
name: (user.username ?? ''),
|
|
258
|
-
}));
|
|
259
|
-
const __VLS_25 = __VLS_24({
|
|
260
|
-
...{ class: "shrink-0" },
|
|
261
|
-
src: (user.avatar ?? ''),
|
|
262
|
-
color: (user.color),
|
|
263
|
-
name: (user.username ?? ''),
|
|
264
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_24));
|
|
265
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
266
|
-
...{ class: "grow ml-3 overflow-hidden" },
|
|
267
|
-
});
|
|
268
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
269
|
-
...{ class: "flex justify-between items-center gap-4" },
|
|
270
|
-
});
|
|
271
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
272
|
-
...{ class: "truncate" },
|
|
273
|
-
});
|
|
274
|
-
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
275
|
-
...{ class: "flex items-center" },
|
|
276
|
-
});
|
|
277
|
-
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
278
|
-
...{ class: "font-semibold" },
|
|
279
|
-
});
|
|
280
|
-
(user.username);
|
|
281
|
-
if (user.unread_count) {
|
|
282
|
-
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
283
|
-
...{ class: "ml-2 bg-[#E60000] text-white text-xs font-bold px-2 py-[1px] flex-center rounded-full" },
|
|
284
|
-
});
|
|
285
|
-
(user.unread_count);
|
|
286
|
-
}
|
|
287
|
-
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
288
|
-
...{ class: "text-sm truncate" },
|
|
289
|
-
...{ class: ({
|
|
290
|
-
'font-semibold': user.unread_count,
|
|
291
|
-
'text-chat-gray-3': !user.unread_count
|
|
292
|
-
}) },
|
|
293
|
-
});
|
|
294
|
-
(user.last_message ?? 'No messages');
|
|
295
|
-
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
296
|
-
...{ class: "text-sm text-right text-chat-gray-4 w-[130px]" },
|
|
297
|
-
});
|
|
298
|
-
(__VLS_ctx.dayjs(user.last_message_time).isValid()
|
|
299
|
-
? __VLS_ctx.dayjs(user.last_message_time).fromNow()
|
|
300
|
-
: (user.last_message_time ?? ''));
|
|
301
|
-
// @ts-ignore
|
|
302
|
-
[dayjs, dayjs,];
|
|
303
|
-
}
|
|
304
|
-
var __VLS_17;
|
|
305
|
-
/** @type {__VLS_StyleScopedClasses['']} */ ;
|
|
306
|
-
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
307
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
308
|
-
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
309
|
-
/** @type {__VLS_StyleScopedClasses['chat-box-white']} */ ;
|
|
310
|
-
/** @type {__VLS_StyleScopedClasses['pt-6']} */ ;
|
|
311
|
-
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
312
|
-
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
313
|
-
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
314
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
315
|
-
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
|
|
316
|
-
/** @type {__VLS_StyleScopedClasses['mb-6']} */ ;
|
|
317
|
-
/** @type {__VLS_StyleScopedClasses['h-[45px]']} */ ;
|
|
318
|
-
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
319
|
-
/** @type {__VLS_StyleScopedClasses['h-[45px]']} */ ;
|
|
320
|
-
/** @type {__VLS_StyleScopedClasses['w-[45px]']} */ ;
|
|
321
|
-
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
|
|
322
|
-
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
323
|
-
/** @type {__VLS_StyleScopedClasses['bg-[#C7DEFF]']} */ ;
|
|
324
|
-
/** @type {__VLS_StyleScopedClasses['text-[#004AB3]']} */ ;
|
|
325
|
-
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
326
|
-
/** @type {__VLS_StyleScopedClasses['relative']} */ ;
|
|
327
|
-
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
328
|
-
/** @type {__VLS_StyleScopedClasses['absolute']} */ ;
|
|
329
|
-
/** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
|
|
330
|
-
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
331
|
-
/** @type {__VLS_StyleScopedClasses['bg-black/10']} */ ;
|
|
332
|
-
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
333
|
-
/** @type {__VLS_StyleScopedClasses['overflow-auto']} */ ;
|
|
334
|
-
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
335
|
-
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
336
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
337
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
338
|
-
/** @type {__VLS_StyleScopedClasses['hover:bg-[#EDF5FF]']} */ ;
|
|
339
|
-
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
340
|
-
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
341
|
-
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
342
|
-
/** @type {__VLS_StyleScopedClasses['bg-[#EDF5FF]']} */ ;
|
|
343
|
-
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
344
|
-
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
345
|
-
/** @type {__VLS_StyleScopedClasses['ml-3']} */ ;
|
|
346
|
-
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
347
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
348
|
-
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
349
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
350
|
-
/** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
|
|
351
|
-
/** @type {__VLS_StyleScopedClasses['truncate']} */ ;
|
|
352
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
353
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
354
|
-
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
355
|
-
/** @type {__VLS_StyleScopedClasses['ml-2']} */ ;
|
|
356
|
-
/** @type {__VLS_StyleScopedClasses['bg-[#E60000]']} */ ;
|
|
357
|
-
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
358
|
-
/** @type {__VLS_StyleScopedClasses['text-xs']} */ ;
|
|
359
|
-
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
|
|
360
|
-
/** @type {__VLS_StyleScopedClasses['px-2']} */ ;
|
|
361
|
-
/** @type {__VLS_StyleScopedClasses['py-[1px]']} */ ;
|
|
362
|
-
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
363
|
-
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
|
|
364
|
-
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
365
|
-
/** @type {__VLS_StyleScopedClasses['truncate']} */ ;
|
|
366
|
-
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
367
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-gray-3']} */ ;
|
|
368
|
-
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
369
|
-
/** @type {__VLS_StyleScopedClasses['text-right']} */ ;
|
|
370
|
-
/** @type {__VLS_StyleScopedClasses['text-chat-gray-4']} */ ;
|
|
371
|
-
/** @type {__VLS_StyleScopedClasses['w-[130px]']} */ ;
|
|
372
|
-
// @ts-ignore
|
|
373
|
-
var __VLS_22 = __VLS_21;
|
|
374
|
-
const __VLS_export = (await import('vue')).defineComponent({
|
|
375
|
-
setup: () => (__VLS_exposed),
|
|
376
|
-
__typeEmits: {},
|
|
377
|
-
__typeProps: {},
|
|
378
|
-
props: {},
|
|
379
|
-
});
|
|
380
|
-
export default {};
|