@phonghq/go-chat 1.0.0 → 1.0.2
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/README.md +4 -0
- package/dist/assets/icons/IconArrowLeft.vue.d.ts +2 -0
- package/dist/assets/icons/IconArrowLeft.vue.js +29 -0
- package/dist/assets/icons/IconPhone.vue.d.ts +2 -0
- package/dist/assets/icons/IconPhone.vue.js +19 -0
- package/dist/assets/icons/IconPlan.vue.d.ts +2 -0
- package/dist/assets/icons/IconPlan.vue.js +19 -0
- package/dist/assets/icons/IconPlus.vue.d.ts +2 -0
- package/dist/assets/icons/IconPlus.vue.js +22 -0
- package/dist/assets/icons/IconSearch.vue.d.ts +32 -0
- package/dist/assets/icons/IconSearch.vue.js +68 -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 +35 -0
- package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconPhoneCancel.vue.js +35 -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/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 +2 -0
- package/dist/assets/icons/customer-detail/IconPhone.vue.js +21 -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/chat/App.vue.d.ts +5 -0
- package/dist/chat/App.vue.js +502 -0
- package/dist/chat/main.d.ts +3 -0
- package/dist/chat/main.js +2 -0
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +2 -0
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +207 -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 +136 -0
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +7 -0
- package/dist/chat/page/customer-detail/CustomerDetail.vue.js +235 -0
- package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +16 -0
- package/dist/chat/page/customer-detail/SubInformation.vue.js +102 -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 +20 -0
- package/dist/chat/page/home/ChatList.vue.js +380 -0
- package/dist/chat/page/home/ChatMessage.vue.d.ts +16 -0
- package/dist/chat/page/home/ChatMessage.vue.js +271 -0
- package/dist/chat/page/home/Home.vue.d.ts +14 -0
- package/dist/chat/page/home/Home.vue.js +327 -0
- package/dist/chat/page/home/HomeHeader.vue.d.ts +10 -0
- package/dist/chat/page/home/HomeHeader.vue.js +122 -0
- package/dist/chat/page/home/InputChat.vue.d.ts +19 -0
- package/dist/chat/page/home/InputChat.vue.js +226 -0
- package/dist/chat/page/home/NewCustomer.vue.d.ts +6 -0
- package/dist/chat/page/home/NewCustomer.vue.js +82 -0
- package/dist/components/ListenEvent.vue.d.ts +2 -0
- package/dist/components/ListenEvent.vue.js +45 -0
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +22 -0
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +197 -0
- package/dist/components/chat/call/Calling.vue.d.ts +7 -0
- package/dist/components/chat/call/Calling.vue.js +291 -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/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 +2 -0
- package/dist/components/chat/common/spin/BaseSpin.vue.js +12 -0
- package/dist/components/chat/customer/Avatar.vue.d.ts +11 -0
- package/dist/components/chat/customer/Avatar.vue.js +79 -0
- package/dist/components/chat/layout/mobile/Footer.vue.d.ts +2 -0
- package/dist/components/chat/layout/mobile/Footer.vue.js +109 -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/dropdown/DropdownBase.vue.d.ts +21 -0
- package/dist/components/common/dropdown/DropdownBase.vue.js +91 -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 +164 -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/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/Blank.vue.d.ts +9 -0
- package/dist/components/layout/Blank.vue.js +19 -0
- package/dist/components/layout/Default.vue.d.ts +9 -0
- package/dist/components/layout/Default.vue.js +21 -0
- package/dist/components/modal/Confirm.vue.d.ts +2 -0
- package/dist/components/modal/Confirm.vue.js +164 -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 +61 -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/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/composable/useCallHelper.d.ts +23 -0
- package/dist/composable/useCallHelper.js +170 -0
- package/dist/composable/useInitData.d.ts +11 -0
- package/dist/composable/useInitData.js +84 -0
- package/dist/composable/useModalConfirm.d.ts +5 -0
- package/dist/composable/useModalConfirm.js +39 -0
- package/dist/constant/color.d.ts +22 -0
- package/dist/constant/color.js +43 -0
- package/dist/constant/datetime.d.ts +5 -0
- package/dist/constant/datetime.js +5 -0
- package/dist/constant/general.d.ts +8 -0
- package/dist/constant/general.js +9 -0
- package/dist/constant/message.d.ts +8 -0
- package/dist/constant/message.js +8 -0
- package/dist/constant/mqtt.d.ts +4 -0
- package/dist/constant/mqtt.js +11 -0
- package/dist/constant/user.d.ts +8 -0
- package/dist/constant/user.js +9 -0
- package/dist/go-chat.es.js +64024 -2699
- package/dist/go-chat.umd.js +15 -3
- 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 +85 -0
- package/dist/plugins/mqtt.d.ts +10 -0
- package/dist/plugins/mqtt.js +128 -0
- package/dist/plugins/sdk.d.ts +19 -0
- package/dist/plugins/sdk.js +83 -0
- package/dist/plugins/websocket.d.ts +4 -0
- package/dist/plugins/websocket.js +65 -0
- package/dist/style.css +1 -1
- package/dist/types/chat/user.d.ts +88 -0
- package/dist/types/chat/user.js +1 -0
- package/dist/types/conversation.d.ts +18 -0
- package/dist/types/conversation.js +1 -0
- package/dist/utils/chat/auth.d.ts +45 -0
- package/dist/utils/chat/auth.js +51 -0
- package/dist/utils/chat/call.d.ts +5 -0
- package/dist/utils/chat/call.js +61 -0
- package/dist/utils/chat/chat-router.d.ts +3 -0
- package/dist/utils/chat/chat-router.js +9 -0
- package/dist/utils/chat/conversation.d.ts +3 -0
- package/dist/utils/chat/conversation.js +7 -0
- package/dist/utils/chat/message.d.ts +17 -0
- package/dist/utils/chat/message.js +42 -0
- package/dist/utils/chat/user.d.ts +193 -0
- package/dist/utils/chat/user.js +33 -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 +1 -0
- package/dist/utils/string-helper.js +27 -0
- package/package.json +8 -7
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat/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 { getCountUnread, getDetailReceiver, getMessage, sendMessage, upLoadImage } from '../../../utils/chat/message';
|
|
6
|
+
import { 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_DETAIL_CHAT, TOPIC_HOME } from '../../../constant/mqtt';
|
|
10
|
+
import { dataProfile } from '../../../utils/chat/auth';
|
|
11
|
+
import dayjs from 'dayjs';
|
|
12
|
+
import { DATE_FORMATS } from '../../../constant/datetime';
|
|
13
|
+
import { MessageState } from '../../../constant/message';
|
|
14
|
+
const props = withDefaults(defineProps(), {});
|
|
15
|
+
const emit = defineEmits();
|
|
16
|
+
let page = 1;
|
|
17
|
+
let pageCount = 1;
|
|
18
|
+
let topic = '';
|
|
19
|
+
const isLoading = ref(false);
|
|
20
|
+
const infoUser = shallowRef(null);
|
|
21
|
+
const listMessage = ref([]);
|
|
22
|
+
const chatMessageRef = ref(null);
|
|
23
|
+
onMounted(() => {
|
|
24
|
+
});
|
|
25
|
+
onUnmounted(() => {
|
|
26
|
+
handleDisconnectMqtt();
|
|
27
|
+
});
|
|
28
|
+
const handleConnectMqtt = async () => {
|
|
29
|
+
try {
|
|
30
|
+
await connectMqtt();
|
|
31
|
+
topic = TOPIC_DETAIL_CHAT + infoUser.value?.conversation_id;
|
|
32
|
+
subscribeToTopic(topic);
|
|
33
|
+
addHandleMqttMessage('chat-home', topic, mqttMessageHandler);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error(error);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const handleDisconnectMqtt = async () => {
|
|
40
|
+
const topic = TOPIC_DETAIL_CHAT + infoUser.value?.conversation_id;
|
|
41
|
+
unsubscribeFromTopic(topic);
|
|
42
|
+
removeHandleMqttMessage('chat-home');
|
|
43
|
+
};
|
|
44
|
+
const mqttMessageHandler = (topic, message) => {
|
|
45
|
+
if (infoUser.value?.id && message?.sender_id?.toString() == infoUser.value?.id?.toString() || true) {
|
|
46
|
+
const index = listMessage.value.findIndex((item) => item.id === message?.id);
|
|
47
|
+
if (index < 0) {
|
|
48
|
+
listMessage.value.push(message);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
listMessage.value[index] = message;
|
|
52
|
+
}
|
|
53
|
+
chatMessageRef.value?.scrollBottom();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const handleGetMessage = async () => {
|
|
57
|
+
try {
|
|
58
|
+
const id = props.receiverId;
|
|
59
|
+
const params = { page: page, receiver_id: props.receiverId };
|
|
60
|
+
let res = await getMessage(params);
|
|
61
|
+
res.items = res.items.reverse();
|
|
62
|
+
page = res._meta?.currentPage || 1;
|
|
63
|
+
pageCount = res._meta?.pageCount || 1;
|
|
64
|
+
if (id == props.receiverId)
|
|
65
|
+
listMessage.value.unshift(...res.items);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error(error);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleScrollTop = async () => {
|
|
72
|
+
if (page >= pageCount) {
|
|
73
|
+
chatMessageRef.value?.hideScrollEvent();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
page = page + 1;
|
|
77
|
+
await handleGetMessage();
|
|
78
|
+
chatMessageRef.value?.hideScrollEvent();
|
|
79
|
+
};
|
|
80
|
+
const handleGetDetailReceiver = async (data) => {
|
|
81
|
+
const id = props.receiverId;
|
|
82
|
+
if (data)
|
|
83
|
+
infoUser.value = data;
|
|
84
|
+
const res = (await getDetailReceiver(props.receiverId)) ?? null;
|
|
85
|
+
if (id == props.receiverId) {
|
|
86
|
+
infoUser.value = res;
|
|
87
|
+
await handleConnectMqtt();
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const getData = async (data) => {
|
|
91
|
+
try {
|
|
92
|
+
isLoading.value = true;
|
|
93
|
+
listMessage.value = [];
|
|
94
|
+
await Promise.allSettled([handleGetMessage(), handleGetDetailReceiver(data)]);
|
|
95
|
+
// readMessages(infoUser.value?.conversation_id)
|
|
96
|
+
await nextTick();
|
|
97
|
+
chatMessageRef.value?.scrollBottom();
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error(error);
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
isLoading.value = false;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const updateMessageItem = (id, data) => {
|
|
107
|
+
const index = listMessage.value.findIndex((e) => e.id == id);
|
|
108
|
+
if (index > -1) {
|
|
109
|
+
const item = listMessage.value[index];
|
|
110
|
+
listMessage.value[index] = { ...item, ...data };
|
|
111
|
+
console.log({ ...item, ...data });
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const handleSendMessage = async (data) => {
|
|
115
|
+
try {
|
|
116
|
+
listMessage.value.push({ ...data, state: MessageState.Sending });
|
|
117
|
+
publishMessage(topic, {
|
|
118
|
+
...data,
|
|
119
|
+
state: MessageState.Sending
|
|
120
|
+
});
|
|
121
|
+
let file_upload = [];
|
|
122
|
+
if (data?.attachments?.length) {
|
|
123
|
+
updateMessageItem(data.id, { state: MessageState.Uploading });
|
|
124
|
+
file_upload = await handleUploadImage(data?.attachments[0].file_local);
|
|
125
|
+
}
|
|
126
|
+
updateMessageItem(data.id, { state: MessageState.Sending });
|
|
127
|
+
chatMessageRef.value?.scrollBottom();
|
|
128
|
+
const formData = new FormData();
|
|
129
|
+
formData.append('message', data.message ?? '');
|
|
130
|
+
formData.append('receiver_id', infoUser.value?.id ?? '');
|
|
131
|
+
if (file_upload.length) {
|
|
132
|
+
formData.append('url', file_upload[0]?.url ?? '');
|
|
133
|
+
}
|
|
134
|
+
await sendMessage(formData);
|
|
135
|
+
publishMessage(topic, {
|
|
136
|
+
...data,
|
|
137
|
+
state: MessageState.Sent,
|
|
138
|
+
attachments: file_upload
|
|
139
|
+
? [
|
|
140
|
+
{
|
|
141
|
+
file_name: data.attachments[0]?.file_name ?? '',
|
|
142
|
+
file_path: file_upload[0]?.url ?? ''
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
: []
|
|
146
|
+
});
|
|
147
|
+
updateMessageItem(data.id, { state: MessageState.Sent });
|
|
148
|
+
publicTopicConversationUpdate(false, data?.message ?? '');
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
updateMessageItem(data.id, {
|
|
152
|
+
state: MessageState.Failed,
|
|
153
|
+
error: typeof error?.message == 'string' ? error.message : ''
|
|
154
|
+
});
|
|
155
|
+
console.log(error.message);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const handleUploadImage = async (file) => {
|
|
159
|
+
if (file == null || file == undefined)
|
|
160
|
+
return [];
|
|
161
|
+
if (file.size > 1 * 1024 * 1024) {
|
|
162
|
+
throw new Error('File size exceeds limit');
|
|
163
|
+
}
|
|
164
|
+
const formData = new FormData();
|
|
165
|
+
formData.append('file', file);
|
|
166
|
+
const res = await upLoadImage(formData);
|
|
167
|
+
return res;
|
|
168
|
+
};
|
|
169
|
+
const publicTopicConversationUpdate = async (isSendImg, message) => {
|
|
170
|
+
const res = await getCountUnread({
|
|
171
|
+
conversation_id: infoUser.value?.conversation_id ?? 0,
|
|
172
|
+
receiver_id: Number(infoUser.value?.id)
|
|
173
|
+
});
|
|
174
|
+
const current = dayjs().format(DATE_FORMATS['DATE_FORMAT_FULL']);
|
|
175
|
+
const dataMessageForReceiver = {
|
|
176
|
+
id: infoUser.value?.conversation_id ?? 0,
|
|
177
|
+
receiver_id: Number(dataProfile.value?.id ?? 0),
|
|
178
|
+
username: dataProfile.value?.username ?? '',
|
|
179
|
+
customer_phone: dataProfile.value?.phone ?? '',
|
|
180
|
+
avatar: dataProfile.value?.avatar ?? '',
|
|
181
|
+
last_message: isSendImg ? `${infoUser.value?.username} sent images` : message,
|
|
182
|
+
last_message_time: current,
|
|
183
|
+
created_at: current,
|
|
184
|
+
updated_at: current,
|
|
185
|
+
unread_count: (res?.unread_count ?? 0) + 1,
|
|
186
|
+
status: 1,
|
|
187
|
+
color: dataProfile.value?.color ?? ''
|
|
188
|
+
};
|
|
189
|
+
publishMessage(`${TOPIC_HOME[0] + Number(infoUser.value?.id)}`, JSON.stringify(dataMessageForReceiver));
|
|
190
|
+
const dataMessageMyself = {
|
|
191
|
+
id: infoUser.value?.conversation_id ?? 0,
|
|
192
|
+
receiver_id: Number(dataProfile.value?.id ?? 0),
|
|
193
|
+
username: infoUser.value?.username ?? '',
|
|
194
|
+
customer_phone: infoUser.value?.phone ?? '',
|
|
195
|
+
avatar: infoUser.value?.avatar ?? '',
|
|
196
|
+
last_message: isSendImg ? `${infoUser.value?.username} sent images` : message,
|
|
197
|
+
last_message_time: current,
|
|
198
|
+
created_at: current,
|
|
199
|
+
updated_at: current,
|
|
200
|
+
unread_count: 0,
|
|
201
|
+
status: 1,
|
|
202
|
+
color: infoUser.value?.color
|
|
203
|
+
};
|
|
204
|
+
publishMessage(`${TOPIC_HOME[0] + Number(dataProfile.value?.id)}`, JSON.stringify(dataMessageMyself));
|
|
205
|
+
};
|
|
206
|
+
const call = () => {
|
|
207
|
+
if (infoUser.value) {
|
|
208
|
+
emit('call', infoUser.value);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const __VLS_exposed = { getData };
|
|
212
|
+
defineExpose(__VLS_exposed);
|
|
213
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
214
|
+
const __VLS_defaults = {};
|
|
215
|
+
const __VLS_ctx = {
|
|
216
|
+
...{},
|
|
217
|
+
...{},
|
|
218
|
+
...{},
|
|
219
|
+
...{},
|
|
220
|
+
...{},
|
|
221
|
+
};
|
|
222
|
+
let __VLS_elements;
|
|
223
|
+
let __VLS_components;
|
|
224
|
+
let __VLS_directives;
|
|
225
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
226
|
+
...{ class: "h-full flex flex-col overflow-hidden" },
|
|
227
|
+
});
|
|
228
|
+
/** @type {[typeof HomeHeader, ]} */ ;
|
|
229
|
+
// @ts-ignore
|
|
230
|
+
const __VLS_0 = __VLS_asFunctionalComponent(HomeHeader, new HomeHeader({
|
|
231
|
+
...{ 'onCall': {} },
|
|
232
|
+
...{ class: "shrink-0" },
|
|
233
|
+
data: (__VLS_ctx.infoUser),
|
|
234
|
+
}));
|
|
235
|
+
const __VLS_1 = __VLS_0({
|
|
236
|
+
...{ 'onCall': {} },
|
|
237
|
+
...{ class: "shrink-0" },
|
|
238
|
+
data: (__VLS_ctx.infoUser),
|
|
239
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
240
|
+
let __VLS_3;
|
|
241
|
+
let __VLS_4;
|
|
242
|
+
const __VLS_5 = ({ call: {} },
|
|
243
|
+
{ onCall: (__VLS_ctx.call) });
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
[infoUser, call,];
|
|
246
|
+
var __VLS_2;
|
|
247
|
+
if (__VLS_ctx.listMessage?.length) {
|
|
248
|
+
// @ts-ignore
|
|
249
|
+
[listMessage,];
|
|
250
|
+
/** @type {[typeof ChatMessage, ]} */ ;
|
|
251
|
+
// @ts-ignore
|
|
252
|
+
const __VLS_7 = __VLS_asFunctionalComponent(ChatMessage, new ChatMessage({
|
|
253
|
+
...{ 'onScrollTop': {} },
|
|
254
|
+
ref: "chatMessageRef",
|
|
255
|
+
data: (__VLS_ctx.infoUser),
|
|
256
|
+
message: (__VLS_ctx.listMessage),
|
|
257
|
+
...{ class: "grow" },
|
|
258
|
+
response: (__VLS_ctx.response),
|
|
259
|
+
}));
|
|
260
|
+
const __VLS_8 = __VLS_7({
|
|
261
|
+
...{ 'onScrollTop': {} },
|
|
262
|
+
ref: "chatMessageRef",
|
|
263
|
+
data: (__VLS_ctx.infoUser),
|
|
264
|
+
message: (__VLS_ctx.listMessage),
|
|
265
|
+
...{ class: "grow" },
|
|
266
|
+
response: (__VLS_ctx.response),
|
|
267
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
268
|
+
let __VLS_10;
|
|
269
|
+
let __VLS_11;
|
|
270
|
+
const __VLS_12 = ({ scrollTop: {} },
|
|
271
|
+
{ onScrollTop: (__VLS_ctx.handleScrollTop) });
|
|
272
|
+
/** @type {typeof __VLS_ctx.chatMessageRef} */ ;
|
|
273
|
+
var __VLS_13 = {};
|
|
274
|
+
// @ts-ignore
|
|
275
|
+
[infoUser, listMessage, response, handleScrollTop, chatMessageRef,];
|
|
276
|
+
var __VLS_9;
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
/** @type {[typeof NewCustomer, ]} */ ;
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
const __VLS_16 = __VLS_asFunctionalComponent(NewCustomer, new NewCustomer({
|
|
282
|
+
data: (__VLS_ctx.infoUser),
|
|
283
|
+
...{ class: "grow" },
|
|
284
|
+
}));
|
|
285
|
+
const __VLS_17 = __VLS_16({
|
|
286
|
+
data: (__VLS_ctx.infoUser),
|
|
287
|
+
...{ class: "grow" },
|
|
288
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_16));
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
[infoUser,];
|
|
291
|
+
}
|
|
292
|
+
/** @type {[typeof InputChat, ]} */ ;
|
|
293
|
+
// @ts-ignore
|
|
294
|
+
const __VLS_20 = __VLS_asFunctionalComponent(InputChat, new InputChat({
|
|
295
|
+
...{ 'onSendMessage': {} },
|
|
296
|
+
data: (__VLS_ctx.infoUser),
|
|
297
|
+
...{ class: "p-6" },
|
|
298
|
+
}));
|
|
299
|
+
const __VLS_21 = __VLS_20({
|
|
300
|
+
...{ 'onSendMessage': {} },
|
|
301
|
+
data: (__VLS_ctx.infoUser),
|
|
302
|
+
...{ class: "p-6" },
|
|
303
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_20));
|
|
304
|
+
let __VLS_23;
|
|
305
|
+
let __VLS_24;
|
|
306
|
+
const __VLS_25 = ({ sendMessage: {} },
|
|
307
|
+
{ onSendMessage: (__VLS_ctx.handleSendMessage) });
|
|
308
|
+
// @ts-ignore
|
|
309
|
+
[infoUser, handleSendMessage,];
|
|
310
|
+
var __VLS_22;
|
|
311
|
+
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
312
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
313
|
+
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
314
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
315
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
316
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
317
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
318
|
+
/** @type {__VLS_StyleScopedClasses['p-6']} */ ;
|
|
319
|
+
// @ts-ignore
|
|
320
|
+
var __VLS_14 = __VLS_13;
|
|
321
|
+
const __VLS_export = (await import('vue')).defineComponent({
|
|
322
|
+
setup: () => (__VLS_exposed),
|
|
323
|
+
__typeEmits: {},
|
|
324
|
+
__typeProps: {},
|
|
325
|
+
props: {},
|
|
326
|
+
});
|
|
327
|
+
export default {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IResUser } from '../../../types/message';
|
|
2
|
+
type Props = {
|
|
3
|
+
data: IResUser | null;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
call: () => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
8
|
+
onCall?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import IconPhone from '../../../assets/icons/IconPhone.vue';
|
|
2
|
+
import { PAGE } from '../../../constant/general';
|
|
3
|
+
import Avatar from '../../../components/chat/customer/Avatar.vue';
|
|
4
|
+
import { routerPush } from '../../../utils/chat/chat-router';
|
|
5
|
+
import { user } from '../../../utils/chat/user';
|
|
6
|
+
import { dataProfile } from '../../../utils/chat/auth';
|
|
7
|
+
const props = withDefaults(defineProps(), {});
|
|
8
|
+
const emit = defineEmits();
|
|
9
|
+
const goToViewUser = () => {
|
|
10
|
+
if (dataProfile.value?.user_type == 'tenant') {
|
|
11
|
+
user.value = props.data;
|
|
12
|
+
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
16
|
+
const __VLS_defaults = {};
|
|
17
|
+
const __VLS_ctx = {
|
|
18
|
+
...{},
|
|
19
|
+
...{},
|
|
20
|
+
...{},
|
|
21
|
+
...{},
|
|
22
|
+
...{},
|
|
23
|
+
};
|
|
24
|
+
let __VLS_elements;
|
|
25
|
+
let __VLS_components;
|
|
26
|
+
let __VLS_directives;
|
|
27
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
28
|
+
...{ class: "px-8 pb-4 border-b border-chat-gray-5" },
|
|
29
|
+
});
|
|
30
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
31
|
+
...{ class: "flex items-center" },
|
|
32
|
+
});
|
|
33
|
+
/** @type {[typeof Avatar, ]} */ ;
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
const __VLS_0 = __VLS_asFunctionalComponent(Avatar, new Avatar({
|
|
36
|
+
...{ 'onClick': {} },
|
|
37
|
+
...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
|
|
38
|
+
src: (__VLS_ctx.data?.avatar ?? ''),
|
|
39
|
+
color: (__VLS_ctx.data?.color),
|
|
40
|
+
name: (__VLS_ctx.data?.username),
|
|
41
|
+
}));
|
|
42
|
+
const __VLS_1 = __VLS_0({
|
|
43
|
+
...{ 'onClick': {} },
|
|
44
|
+
...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
|
|
45
|
+
src: (__VLS_ctx.data?.avatar ?? ''),
|
|
46
|
+
color: (__VLS_ctx.data?.color),
|
|
47
|
+
name: (__VLS_ctx.data?.username),
|
|
48
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
49
|
+
let __VLS_3;
|
|
50
|
+
let __VLS_4;
|
|
51
|
+
const __VLS_5 = ({ click: {} },
|
|
52
|
+
{ onClick: (__VLS_ctx.goToViewUser) });
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
[dataProfile, data, data, data, goToViewUser,];
|
|
55
|
+
var __VLS_2;
|
|
56
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
57
|
+
...{ class: "flex-1 ml-3" },
|
|
58
|
+
});
|
|
59
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
60
|
+
...{ class: "flex justify-between items-center" },
|
|
61
|
+
});
|
|
62
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
63
|
+
...{ onClick: (__VLS_ctx.goToViewUser) },
|
|
64
|
+
...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
|
|
65
|
+
});
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
[dataProfile, goToViewUser,];
|
|
68
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
69
|
+
...{ class: "flex items-center" },
|
|
70
|
+
});
|
|
71
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
72
|
+
...{ class: "font-semibold" },
|
|
73
|
+
});
|
|
74
|
+
(__VLS_ctx.data?.username ?? 'n/a');
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
[data,];
|
|
77
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
78
|
+
...{ class: "text-sm text-chat-gray-3 truncate" },
|
|
79
|
+
});
|
|
80
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
81
|
+
...{ onClick: (...[$event]) => {
|
|
82
|
+
__VLS_ctx.emit('call');
|
|
83
|
+
// @ts-ignore
|
|
84
|
+
[emit,];
|
|
85
|
+
} },
|
|
86
|
+
...{ class: "flex-center text-[#0051E6] bg-chat-haze-200 w-9 h-9 rounded-lg" },
|
|
87
|
+
});
|
|
88
|
+
/** @type {[typeof IconPhone, ]} */ ;
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
const __VLS_7 = __VLS_asFunctionalComponent(IconPhone, new IconPhone({}));
|
|
91
|
+
const __VLS_8 = __VLS_7({}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
92
|
+
/** @type {__VLS_StyleScopedClasses['px-8']} */ ;
|
|
93
|
+
/** @type {__VLS_StyleScopedClasses['pb-4']} */ ;
|
|
94
|
+
/** @type {__VLS_StyleScopedClasses['border-b']} */ ;
|
|
95
|
+
/** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
|
|
96
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
97
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
98
|
+
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
99
|
+
/** @type {__VLS_StyleScopedClasses['flex-1']} */ ;
|
|
100
|
+
/** @type {__VLS_StyleScopedClasses['ml-3']} */ ;
|
|
101
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
102
|
+
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
103
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
104
|
+
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
105
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
106
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
107
|
+
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
108
|
+
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
109
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-gray-3']} */ ;
|
|
110
|
+
/** @type {__VLS_StyleScopedClasses['truncate']} */ ;
|
|
111
|
+
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
112
|
+
/** @type {__VLS_StyleScopedClasses['text-[#0051E6]']} */ ;
|
|
113
|
+
/** @type {__VLS_StyleScopedClasses['bg-chat-haze-200']} */ ;
|
|
114
|
+
/** @type {__VLS_StyleScopedClasses['w-9']} */ ;
|
|
115
|
+
/** @type {__VLS_StyleScopedClasses['h-9']} */ ;
|
|
116
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
117
|
+
const __VLS_export = (await import('vue')).defineComponent({
|
|
118
|
+
__typeEmits: {},
|
|
119
|
+
__typeProps: {},
|
|
120
|
+
props: {},
|
|
121
|
+
});
|
|
122
|
+
export default {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IResMessage, IResUser } from '../../../types/message';
|
|
2
|
+
import 'vue3-emoji-picker/css';
|
|
3
|
+
type Props = {
|
|
4
|
+
data: IResUser | null;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Props = Props;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
13
|
+
} & {
|
|
14
|
+
sendMessage: (val: IResMessage) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
17
|
+
onSendMessage?: ((val: IResMessage) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|