@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.
Files changed (296) hide show
  1. package/dist/go-chat.es.js +6578 -6530
  2. package/dist/go-chat.umd.js +14 -14
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/dist/assets/icons/IconArrowLeft.vue.d.ts +0 -2
  6. package/dist/assets/icons/IconPhone.vue.d.ts +0 -2
  7. package/dist/assets/icons/IconPlan.vue.d.ts +0 -2
  8. package/dist/assets/icons/IconPlus.vue.d.ts +0 -2
  9. package/dist/assets/icons/IconSearch.vue.d.ts +0 -32
  10. package/dist/assets/icons/call/IconMic.vue.d.ts +0 -14
  11. package/dist/assets/icons/call/IconPhone.vue.d.ts +0 -2
  12. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +0 -2
  13. package/dist/assets/icons/call/IconSpeaker.vue.d.ts +0 -14
  14. package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +0 -2
  15. package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +0 -2
  16. package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +0 -2
  17. package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +0 -2
  18. package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +0 -2
  19. package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +0 -2
  20. package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +0 -2
  21. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +0 -2
  22. package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +0 -2
  23. package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +0 -2
  24. package/dist/chat/App.vue.d.ts +0 -5
  25. package/dist/chat/main.d.ts +0 -6
  26. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +0 -2
  27. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +0 -12
  28. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +0 -2
  29. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +0 -7
  30. package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +0 -16
  31. package/dist/chat/page/error/Error.vue.d.ts +0 -2
  32. package/dist/chat/page/home/ChatList.vue.d.ts +0 -20
  33. package/dist/chat/page/home/ChatMessage.vue.d.ts +0 -16
  34. package/dist/chat/page/home/Home.vue.d.ts +0 -14
  35. package/dist/chat/page/home/HomeHeader.vue.d.ts +0 -10
  36. package/dist/chat/page/home/InputChat.vue.d.ts +0 -19
  37. package/dist/chat/page/home/NewCustomer.vue.d.ts +0 -6
  38. package/dist/components/ListenEvent.vue.d.ts +0 -2
  39. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +0 -22
  40. package/dist/components/chat/call/Calling.vue.d.ts +0 -7
  41. package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +0 -13
  42. package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +0 -20
  43. package/dist/components/chat/common/input/InputSearch.vue.d.ts +0 -16
  44. package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +0 -35
  45. package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +0 -2
  46. package/dist/components/chat/customer/Avatar.vue.d.ts +0 -11
  47. package/dist/components/chat/layout/mobile/Footer.vue.d.ts +0 -2
  48. package/dist/components/common/CustomLoading.vue.d.ts +0 -2
  49. package/dist/components/common/Notification/NotificationDescription.vue.d.ts +0 -7
  50. package/dist/components/common/button/ButtonBase.vue.d.ts +0 -22
  51. package/dist/components/common/button/ButtonToggle.vue.d.ts +0 -20
  52. package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +0 -16
  53. package/dist/components/common/collapse/BaseCollapse.vue.d.ts +0 -12
  54. package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +0 -4
  55. package/dist/components/common/drawer/DrawerBase.vue.d.ts +0 -39
  56. package/dist/components/common/dropdown/DropdownBase.vue.d.ts +0 -21
  57. package/dist/components/common/input/CInputSearch.vue.d.ts +0 -14
  58. package/dist/components/common/modal/ModalBase.vue.d.ts +0 -35
  59. package/dist/components/common/popover/PopoverBase.vue.d.ts +0 -3
  60. package/dist/components/common/slider/BaseSlider.vue.d.ts +0 -11
  61. package/dist/components/common/spin/CSpin.vue.d.ts +0 -9
  62. package/dist/components/common/tooltip/TooltipBase.vue.d.ts +0 -2
  63. package/dist/components/layout/Blank.vue.d.ts +0 -9
  64. package/dist/components/layout/Default.vue.d.ts +0 -9
  65. package/dist/components/modal/Confirm.vue.d.ts +0 -2
  66. package/dist/components/ui/button/CButton.vue.d.ts +0 -19
  67. package/dist/components/ui/button/c-button.d.ts +0 -7
  68. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -18
  69. package/dist/components/ui/checkbox/index.d.ts +0 -1
  70. package/dist/components/ui/collapsible/Collapsible.vue.d.ts +0 -16
  71. package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -10
  72. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -10
  73. package/dist/components/ui/collapsible/index.d.ts +0 -3
  74. package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -14
  75. package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -10
  76. package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -29
  77. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -14
  78. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -13
  79. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -13
  80. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -30
  81. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -14
  82. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -10
  83. package/dist/components/ui/dialog/index.d.ts +0 -9
  84. package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -26
  85. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -33
  86. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -14
  87. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -13
  88. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -13
  89. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -7
  90. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -14
  91. package/dist/components/ui/drawer/index.d.ts +0 -8
  92. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -14
  93. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -20
  94. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -28
  95. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -10
  96. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -15
  97. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -15
  98. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -14
  99. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -18
  100. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
  101. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
  102. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -14
  103. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -30
  104. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -14
  105. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -10
  106. package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
  107. package/dist/components/ui/popover/Popover.vue.d.ts +0 -14
  108. package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -28
  109. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -10
  110. package/dist/components/ui/popover/index.d.ts +0 -3
  111. package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +0 -18
  112. package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +0 -7
  113. package/dist/components/ui/radio-group/index.d.ts +0 -2
  114. package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
  115. package/dist/components/ui/slider/index.d.ts +0 -1
  116. package/dist/components/ui/switch/Switch.vue.d.ts +0 -18
  117. package/dist/components/ui/switch/index.d.ts +0 -1
  118. package/dist/composable/useCallHelper.d.ts +0 -23
  119. package/dist/composable/useInitData.d.ts +0 -11
  120. package/dist/composable/useModalConfirm.d.ts +0 -5
  121. package/dist/constant/color.d.ts +0 -22
  122. package/dist/constant/datetime.d.ts +0 -5
  123. package/dist/constant/general.d.ts +0 -8
  124. package/dist/constant/message.d.ts +0 -8
  125. package/dist/constant/mqtt.d.ts +0 -4
  126. package/dist/constant/user.d.ts +0 -8
  127. package/dist/lib/utils.d.ts +0 -2
  128. package/dist/plugins/axios-gci.d.ts +0 -3
  129. package/dist/plugins/axios.d.ts +0 -3
  130. package/dist/plugins/mqtt.d.ts +0 -10
  131. package/dist/plugins/sdk.d.ts +0 -19
  132. package/dist/plugins/websocket.d.ts +0 -4
  133. package/dist/test/assets/icons/IconArrowLeft.vue.js +0 -29
  134. package/dist/test/assets/icons/IconPhone.vue.js +0 -19
  135. package/dist/test/assets/icons/IconPlan.vue.js +0 -19
  136. package/dist/test/assets/icons/IconPlus.vue.js +0 -22
  137. package/dist/test/assets/icons/IconSearch.vue.js +0 -68
  138. package/dist/test/assets/icons/call/IconMic.vue.js +0 -123
  139. package/dist/test/assets/icons/call/IconPhone.vue.js +0 -35
  140. package/dist/test/assets/icons/call/IconPhoneCancel.vue.js +0 -35
  141. package/dist/test/assets/icons/call/IconSpeaker.vue.js +0 -62
  142. package/dist/test/assets/icons/customer-appointment/IconFilter.vue.js +0 -53
  143. package/dist/test/assets/icons/customer-detail/IconArrow.vue.js +0 -22
  144. package/dist/test/assets/icons/customer-detail/IconCheck.vue.js +0 -27
  145. package/dist/test/assets/icons/customer-detail/IconDate.vue.js +0 -43
  146. package/dist/test/assets/icons/customer-detail/IconGroup.vue.js +0 -48
  147. package/dist/test/assets/icons/customer-detail/IconMessage.vue.js +0 -28
  148. package/dist/test/assets/icons/customer-detail/IconNote.vue.js +0 -29
  149. package/dist/test/assets/icons/customer-detail/IconPhone.vue.js +0 -21
  150. package/dist/test/assets/icons/customer-detail/IconPin.vue.js +0 -29
  151. package/dist/test/assets/icons/customer-detail/IconSearch.vue.js +0 -29
  152. package/dist/test/chat/App.vue.js +0 -502
  153. package/dist/test/chat/main.js +0 -6
  154. package/dist/test/chat/page/customer-appointment/CustomerAppointment.vue.js +0 -207
  155. package/dist/test/chat/page/customer-check-in/CollapseCheckIn.vue.js +0 -80
  156. package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +0 -136
  157. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -235
  158. package/dist/test/chat/page/customer-detail/SubInformation.vue.js +0 -102
  159. package/dist/test/chat/page/error/Error.vue.js +0 -64
  160. package/dist/test/chat/page/home/ChatList.vue.js +0 -380
  161. package/dist/test/chat/page/home/ChatMessage.vue.js +0 -271
  162. package/dist/test/chat/page/home/Home.vue.js +0 -327
  163. package/dist/test/chat/page/home/HomeHeader.vue.js +0 -122
  164. package/dist/test/chat/page/home/InputChat.vue.js +0 -226
  165. package/dist/test/chat/page/home/NewCustomer.vue.js +0 -82
  166. package/dist/test/components/ListenEvent.vue.js +0 -45
  167. package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +0 -197
  168. package/dist/test/components/chat/call/Calling.vue.js +0 -291
  169. package/dist/test/components/chat/card/CardCustomerDetail.vue.js +0 -28
  170. package/dist/test/components/chat/common/collapse/CollapseBase.vue.js +0 -59
  171. package/dist/test/components/chat/common/input/InputSearch.vue.js +0 -71
  172. package/dist/test/components/chat/common/popover/PopoverBase.vue.js +0 -148
  173. package/dist/test/components/chat/common/spin/BaseSpin.vue.js +0 -12
  174. package/dist/test/components/chat/customer/Avatar.vue.js +0 -79
  175. package/dist/test/components/chat/layout/mobile/Footer.vue.js +0 -109
  176. package/dist/test/components/common/CustomLoading.vue.js +0 -19
  177. package/dist/test/components/common/Notification/NotificationDescription.vue.js +0 -38
  178. package/dist/test/components/common/button/ButtonBase.vue.js +0 -78
  179. package/dist/test/components/common/button/ButtonToggle.vue.js +0 -70
  180. package/dist/test/components/common/checkbox/CCheckboxNumber.vue.js +0 -48
  181. package/dist/test/components/common/collapse/BaseCollapse.vue.js +0 -36
  182. package/dist/test/components/common/collapse/BaseCollapseItem.vue.js +0 -22
  183. package/dist/test/components/common/drawer/DrawerBase.vue.js +0 -126
  184. package/dist/test/components/common/dropdown/DropdownBase.vue.js +0 -91
  185. package/dist/test/components/common/input/CInputSearch.vue.js +0 -62
  186. package/dist/test/components/common/modal/ModalBase.vue.js +0 -164
  187. package/dist/test/components/common/popover/PopoverBase.vue.js +0 -36
  188. package/dist/test/components/common/slider/BaseSlider.vue.js +0 -70
  189. package/dist/test/components/common/spin/CSpin.vue.js +0 -41
  190. package/dist/test/components/common/tooltip/TooltipBase.vue.js +0 -8
  191. package/dist/test/components/layout/Blank.vue.js +0 -19
  192. package/dist/test/components/layout/Default.vue.js +0 -21
  193. package/dist/test/components/modal/Confirm.vue.js +0 -164
  194. package/dist/test/components/ui/button/CButton.vue.js +0 -49
  195. package/dist/test/components/ui/button/c-button.js +0 -26
  196. package/dist/test/components/ui/checkbox/Checkbox.vue.js +0 -79
  197. package/dist/test/components/ui/checkbox/index.js +0 -1
  198. package/dist/test/components/ui/collapsible/Collapsible.vue.js +0 -47
  199. package/dist/test/components/ui/collapsible/CollapsibleContent.vue.js +0 -41
  200. package/dist/test/components/ui/collapsible/CollapsibleTrigger.vue.js +0 -35
  201. package/dist/test/components/ui/collapsible/index.js +0 -3
  202. package/dist/test/components/ui/dialog/Dialog.vue.js +0 -42
  203. package/dist/test/components/ui/dialog/DialogClose.vue.js +0 -35
  204. package/dist/test/components/ui/dialog/DialogContent.vue.js +0 -84
  205. package/dist/test/components/ui/dialog/DialogDescription.vue.js +0 -43
  206. package/dist/test/components/ui/dialog/DialogFooter.vue.js +0 -26
  207. package/dist/test/components/ui/dialog/DialogHeader.vue.js +0 -26
  208. package/dist/test/components/ui/dialog/DialogScrollContent.vue.js +0 -99
  209. package/dist/test/components/ui/dialog/DialogTitle.vue.js +0 -43
  210. package/dist/test/components/ui/dialog/DialogTrigger.vue.js +0 -35
  211. package/dist/test/components/ui/dialog/index.js +0 -9
  212. package/dist/test/components/ui/drawer/Drawer.vue.js +0 -48
  213. package/dist/test/components/ui/drawer/DrawerContent.vue.js +0 -81
  214. package/dist/test/components/ui/drawer/DrawerDescription.vue.js +0 -42
  215. package/dist/test/components/ui/drawer/DrawerFooter.vue.js +0 -26
  216. package/dist/test/components/ui/drawer/DrawerHeader.vue.js +0 -26
  217. package/dist/test/components/ui/drawer/DrawerOverlay.vue.js +0 -37
  218. package/dist/test/components/ui/drawer/DrawerTitle.vue.js +0 -42
  219. package/dist/test/components/ui/drawer/index.js +0 -8
  220. package/dist/test/components/ui/dropdown-menu/DropdownMenu.vue.js +0 -41
  221. package/dist/test/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -79
  222. package/dist/test/components/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -61
  223. package/dist/test/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -35
  224. package/dist/test/components/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -43
  225. package/dist/test/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -43
  226. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -41
  227. package/dist/test/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -80
  228. package/dist/test/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -37
  229. package/dist/test/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -26
  230. package/dist/test/components/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -41
  231. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -46
  232. package/dist/test/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -58
  233. package/dist/test/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -41
  234. package/dist/test/components/ui/dropdown-menu/index.js +0 -15
  235. package/dist/test/components/ui/popover/Popover.vue.js +0 -41
  236. package/dist/test/components/ui/popover/PopoverContent.vue.js +0 -60
  237. package/dist/test/components/ui/popover/PopoverTrigger.vue.js +0 -35
  238. package/dist/test/components/ui/popover/index.js +0 -3
  239. package/dist/test/components/ui/radio-group/RadioGroup.vue.js +0 -46
  240. package/dist/test/components/ui/radio-group/RadioGroupItem.vue.js +0 -71
  241. package/dist/test/components/ui/radio-group/index.js +0 -2
  242. package/dist/test/components/ui/slider/Slider.vue.js +0 -155
  243. package/dist/test/components/ui/slider/index.js +0 -1
  244. package/dist/test/components/ui/switch/Switch.vue.js +0 -61
  245. package/dist/test/components/ui/switch/index.js +0 -1
  246. package/dist/test/composable/useCallHelper.js +0 -170
  247. package/dist/test/composable/useInitData.js +0 -84
  248. package/dist/test/composable/useModalConfirm.js +0 -39
  249. package/dist/test/constant/color.js +0 -43
  250. package/dist/test/constant/datetime.js +0 -5
  251. package/dist/test/constant/general.js +0 -9
  252. package/dist/test/constant/message.js +0 -8
  253. package/dist/test/constant/mqtt.js +0 -11
  254. package/dist/test/constant/user.js +0 -9
  255. package/dist/test/lib/utils.js +0 -5
  256. package/dist/test/plugins/axios-gci.js +0 -25
  257. package/dist/test/plugins/axios.js +0 -85
  258. package/dist/test/plugins/mqtt.js +0 -128
  259. package/dist/test/plugins/sdk.js +0 -83
  260. package/dist/test/plugins/websocket.js +0 -65
  261. package/dist/test/types/call.js +0 -1
  262. package/dist/test/types/chat/auth.js +0 -1
  263. package/dist/test/types/chat/global.js +0 -1
  264. package/dist/test/types/chat/promise.js +0 -1
  265. package/dist/test/types/chat/user.js +0 -1
  266. package/dist/test/types/conversation.js +0 -1
  267. package/dist/test/types/global.js +0 -15
  268. package/dist/test/types/message.js +0 -1
  269. package/dist/test/utils/chat/auth.js +0 -51
  270. package/dist/test/utils/chat/call.js +0 -61
  271. package/dist/test/utils/chat/chat-router.js +0 -9
  272. package/dist/test/utils/chat/conversation.js +0 -7
  273. package/dist/test/utils/chat/message.js +0 -42
  274. package/dist/test/utils/chat/user.js +0 -33
  275. package/dist/test/utils/debounce.js +0 -9
  276. package/dist/test/utils/json.js +0 -18
  277. package/dist/test/utils/logger.js +0 -5
  278. package/dist/test/utils/string-helper.js +0 -27
  279. package/dist/types/call.d.ts +0 -4
  280. package/dist/types/chat/auth.d.ts +0 -37
  281. package/dist/types/chat/global.d.ts +0 -7
  282. package/dist/types/chat/promise.d.ts +0 -17
  283. package/dist/types/chat/user.d.ts +0 -88
  284. package/dist/types/conversation.d.ts +0 -18
  285. package/dist/types/global.d.ts +0 -11
  286. package/dist/types/message.d.ts +0 -43
  287. package/dist/utils/chat/auth.d.ts +0 -45
  288. package/dist/utils/chat/call.d.ts +0 -5
  289. package/dist/utils/chat/chat-router.d.ts +0 -3
  290. package/dist/utils/chat/conversation.d.ts +0 -3
  291. package/dist/utils/chat/message.d.ts +0 -17
  292. package/dist/utils/chat/user.d.ts +0 -193
  293. package/dist/utils/debounce.d.ts +0 -1
  294. package/dist/utils/json.d.ts +0 -2
  295. package/dist/utils/logger.d.ts +0 -3
  296. package/dist/utils/string-helper.d.ts +0 -1
@@ -1,291 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { ref, onMounted, onUnmounted, watch } from 'vue';
3
- import DrawerBase from '../../../components/common/drawer/DrawerBase.vue';
4
- import IconPhone from '../../../assets/icons/call/IconPhone.vue';
5
- import { dataProfile } from '../../../utils/chat/auth.js';
6
- import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt.js';
7
- import { TOPIC_DETAIL_CALL } from '../../../constant/mqtt.js';
8
- import { useCallHelper } from '../../../composable/useCallHelper';
9
- import IconPhoneCancel from '../../../assets/icons/call/IconPhoneCancel.vue';
10
- import { addHandleWebSK, removeHandleWebSK } from '../../../plugins/websocket';
11
- import { callClient, callOutBound } from '../../../utils/chat/call';
12
- const { handleOffer, handleOfferResponse, call, end, endPc, addIceCandidate, sendOfferOk } = useCallHelper();
13
- const STATUS = {
14
- CONNECTING: 'Connecting...',
15
- CALLING: 'calling',
16
- RINGING: 'ringing',
17
- CONNECT_FAILED: 'Connect Error',
18
- CALL_START: 'in-progress',
19
- CALL_END: 'completed'
20
- };
21
- const STATUS_LABEL = {
22
- [STATUS.CONNECTING]: 'Connecting...',
23
- [STATUS.CALLING]: 'Calling...',
24
- [STATUS.RINGING]: 'Ringing...',
25
- [STATUS.CONNECT_FAILED]: 'Connect Error',
26
- [STATUS.CALL_START]: '',
27
- [STATUS.CALL_END]: 'Call Ended'
28
- };
29
- const callStatus = ref(STATUS.CONNECTING);
30
- const duration = ref('00:00');
31
- const drawerVisible = ref(false);
32
- const disable = ref(false);
33
- let timer = null;
34
- let timeOut = null;
35
- onMounted(() => {
36
- // timeOut = setTimeout(() => {
37
- // callStatus.value = 'Connected'
38
- // startTimer()
39
- // }, 2000)
40
- });
41
- onUnmounted(() => {
42
- if (timer)
43
- clearInterval(timer);
44
- if (timeOut)
45
- clearTimeout(timeOut);
46
- });
47
- let dataWebSK = null;
48
- function startTimer() {
49
- let sec = 0;
50
- timer = setInterval(() => {
51
- sec++;
52
- const m = String(Math.floor(sec / 60)).padStart(2, '0');
53
- const s = String(sec % 60).padStart(2, '0');
54
- duration.value = `${m}:${s}`;
55
- }, 1000);
56
- }
57
- function toggleMute() {
58
- alert('Mic toggled');
59
- }
60
- function toggleSpeaker() {
61
- alert('Speaker toggled');
62
- }
63
- function endCall() {
64
- callStatus.value = STATUS.CALL_END;
65
- end('');
66
- clearInterval(timer);
67
- disable.value = false;
68
- drawerVisible.value = false;
69
- }
70
- const open = () => {
71
- drawerVisible.value = true;
72
- disable.value = true;
73
- };
74
- const startCall = async (data) => {
75
- try {
76
- callStatus.value = STATUS.CONNECTING;
77
- open();
78
- await callOutBound(data);
79
- // await call(data)
80
- callStatus.value = STATUS.CALLING;
81
- }
82
- catch (e) {
83
- console.log(e);
84
- callStatus.value = STATUS.CONNECT_FAILED;
85
- }
86
- };
87
- const answer = async () => {
88
- await callClient(dataWebSK);
89
- callStatus.value = STATUS.CALL_START;
90
- // sendOfferOk()
91
- };
92
- const handleMqttMessage = async (message) => {
93
- if (message?.data?.status == STATUS.RINGING) {
94
- if (message?.data?.to_number == dataProfile.value?.phone) {
95
- callStatus.value = STATUS.RINGING;
96
- dataWebSK = {
97
- from: message.data.from_number,
98
- to: message.data.to_number
99
- };
100
- open();
101
- }
102
- }
103
- else if (message?.data?.status == STATUS.CALL_START) {
104
- callStatus.value = STATUS.CALL_START;
105
- }
106
- else if (message?.data?.status == STATUS.CALL_END) {
107
- endCall();
108
- }
109
- };
110
- // const handleMqttMessage = async (topic: string, message: any) => {
111
- // if (topic == TOPIC_DETAIL_CALL + dataProfile.value?.id) {
112
- // console.log(message)
113
- // if (message?.type === 'offer') {
114
- // const status = await handleOffer(message)
115
- // if (status) {
116
- // callStatus.value = STATUS.CALLING
117
- // open()
118
- // }
119
- // } else if (message?.type === 'offer-response') {
120
- // await handleOfferResponse(message)
121
- // callStatus.value = STATUS.CALL_START
122
- // } else if (message?.type === 'candidate') {
123
- // addIceCandidate(message)
124
- // } else if (message?.type === 'end-call') {
125
- // endPc(message?.link)
126
- // callStatus.value = STATUS.CALL_END
127
- // }
128
- // }
129
- // }
130
- const __VLS_exposed = { startCall, endCall };
131
- defineExpose(__VLS_exposed);
132
- watch(dataProfile, async (newValue, oldValue) => {
133
- if (oldValue?.id && oldValue?.id != newValue?.id) {
134
- unsubscribeFromTopic(TOPIC_DETAIL_CALL + oldValue?.id);
135
- removeHandleMqttMessage('call-message');
136
- removeHandleWebSK('call-message');
137
- }
138
- if (newValue?.id && oldValue?.id != newValue?.id) {
139
- await connectMqtt();
140
- subscribeToTopic(TOPIC_DETAIL_CALL + newValue?.id);
141
- addHandleMqttMessage('call-message', TOPIC_DETAIL_CALL + newValue?.id, handleMqttMessage);
142
- addHandleWebSK('call-message', handleMqttMessage);
143
- }
144
- }, { immediate: true });
145
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
146
- const __VLS_ctx = {
147
- ...{},
148
- ...{},
149
- };
150
- let __VLS_elements;
151
- let __VLS_components;
152
- let __VLS_directives;
153
- /** @type {[typeof DrawerBase, typeof DrawerBase, ]} */ ;
154
- // @ts-ignore
155
- const __VLS_0 = __VLS_asFunctionalComponent(DrawerBase, new DrawerBase({
156
- open: (__VLS_ctx.drawerVisible),
157
- width: (500),
158
- disableClose: (__VLS_ctx.disable),
159
- }));
160
- const __VLS_1 = __VLS_0({
161
- open: (__VLS_ctx.drawerVisible),
162
- width: (500),
163
- disableClose: (__VLS_ctx.disable),
164
- }, ...__VLS_functionalComponentArgsRest(__VLS_0));
165
- const { default: __VLS_3 } = __VLS_2.slots;
166
- // @ts-ignore
167
- [drawerVisible, disable,];
168
- {
169
- const { content: __VLS_4 } = __VLS_2.slots;
170
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
171
- ...{ class: "flex flex-col items-center justify-center h-screen bg-chat-haze-300 text-white relative" },
172
- });
173
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
174
- ...{ class: "w-32 h-32 rounded-full overflow-hidden mb-4 border-4 border-gray-700" },
175
- });
176
- __VLS_asFunctionalElement(__VLS_elements.img)({
177
- src: "https://i.pravatar.cc/300",
178
- alt: "avatar",
179
- ...{ class: "w-full h-full object-cover" },
180
- });
181
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
182
- ...{ class: "text-center" },
183
- });
184
- __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
185
- ...{ class: "text-2xl font-semibold" },
186
- });
187
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
188
- ...{ class: "text-gray-400 mt-1" },
189
- });
190
- (__VLS_ctx.STATUS_LABEL[__VLS_ctx.callStatus]);
191
- // @ts-ignore
192
- [STATUS_LABEL, callStatus,];
193
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
194
- ...{ class: "flex items-center justify-center gap-8 mt-10" },
195
- });
196
- if (__VLS_ctx.callStatus == __VLS_ctx.STATUS.RINGING) {
197
- // @ts-ignore
198
- [callStatus, STATUS,];
199
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
200
- ...{ onClick: (__VLS_ctx.answer) },
201
- ...{ class: "w-16 h-16 bg-[#22C55E] hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition" },
202
- });
203
- // @ts-ignore
204
- [answer,];
205
- /** @type {[typeof IconPhone, ]} */ ;
206
- // @ts-ignore
207
- const __VLS_5 = __VLS_asFunctionalComponent(IconPhone, new IconPhone({}));
208
- const __VLS_6 = __VLS_5({}, ...__VLS_functionalComponentArgsRest(__VLS_5));
209
- }
210
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
211
- ...{ onClick: (__VLS_ctx.endCall) },
212
- ...{ class: "w-16 h-16 rounded-full bg-[#EF4444] hover:bg-red-700 flex items-center justify-center" },
213
- });
214
- // @ts-ignore
215
- [endCall,];
216
- /** @type {[typeof IconPhoneCancel, ]} */ ;
217
- // @ts-ignore
218
- const __VLS_9 = __VLS_asFunctionalComponent(IconPhoneCancel, new IconPhoneCancel({}));
219
- const __VLS_10 = __VLS_9({}, ...__VLS_functionalComponentArgsRest(__VLS_9));
220
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
221
- ...{ class: "absolute bottom-6 text-gray-500 text-sm" },
222
- });
223
- (__VLS_ctx.duration);
224
- // @ts-ignore
225
- [duration,];
226
- }
227
- var __VLS_2;
228
- __VLS_asFunctionalElement(__VLS_elements.audio, __VLS_elements.audio)({
229
- id: "go-chat-local-audio",
230
- autoplay: true,
231
- muted: true,
232
- });
233
- __VLS_asFunctionalElement(__VLS_elements.audio, __VLS_elements.audio)({
234
- id: "go-chat-remote-audio",
235
- autoplay: true,
236
- });
237
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
238
- /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
239
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
240
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
241
- /** @type {__VLS_StyleScopedClasses['h-screen']} */ ;
242
- /** @type {__VLS_StyleScopedClasses['bg-chat-haze-300']} */ ;
243
- /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
244
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
245
- /** @type {__VLS_StyleScopedClasses['w-32']} */ ;
246
- /** @type {__VLS_StyleScopedClasses['h-32']} */ ;
247
- /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
248
- /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
249
- /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
250
- /** @type {__VLS_StyleScopedClasses['border-4']} */ ;
251
- /** @type {__VLS_StyleScopedClasses['border-gray-700']} */ ;
252
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
253
- /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
254
- /** @type {__VLS_StyleScopedClasses['object-cover']} */ ;
255
- /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
256
- /** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
257
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
258
- /** @type {__VLS_StyleScopedClasses['text-gray-400']} */ ;
259
- /** @type {__VLS_StyleScopedClasses['mt-1']} */ ;
260
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
261
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
262
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
263
- /** @type {__VLS_StyleScopedClasses['gap-8']} */ ;
264
- /** @type {__VLS_StyleScopedClasses['mt-10']} */ ;
265
- /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
266
- /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
267
- /** @type {__VLS_StyleScopedClasses['bg-[#22C55E]']} */ ;
268
- /** @type {__VLS_StyleScopedClasses['hover:bg-green-600']} */ ;
269
- /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
270
- /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
271
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
272
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
273
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
274
- /** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
275
- /** @type {__VLS_StyleScopedClasses['transition']} */ ;
276
- /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
277
- /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
278
- /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
279
- /** @type {__VLS_StyleScopedClasses['bg-[#EF4444]']} */ ;
280
- /** @type {__VLS_StyleScopedClasses['hover:bg-red-700']} */ ;
281
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
282
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
283
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
284
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
285
- /** @type {__VLS_StyleScopedClasses['bottom-6']} */ ;
286
- /** @type {__VLS_StyleScopedClasses['text-gray-500']} */ ;
287
- /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
288
- const __VLS_export = (await import('vue')).defineComponent({
289
- setup: () => (__VLS_exposed),
290
- });
291
- export default {};
@@ -1,28 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
3
- const __VLS_ctx = {};
4
- let __VLS_elements;
5
- let __VLS_components;
6
- let __VLS_directives;
7
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
8
- ...{ class: "bg-white border border-chat-haze-200 rounded-lg p-4" },
9
- });
10
- var __VLS_0 = {};
11
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
12
- ...{ class: "border-t border-dashed border-chat-haze-200 my-2" },
13
- });
14
- var __VLS_2 = {};
15
- /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
16
- /** @type {__VLS_StyleScopedClasses['border']} */ ;
17
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
18
- /** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
19
- /** @type {__VLS_StyleScopedClasses['p-4']} */ ;
20
- /** @type {__VLS_StyleScopedClasses['border-t']} */ ;
21
- /** @type {__VLS_StyleScopedClasses['border-dashed']} */ ;
22
- /** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
23
- /** @type {__VLS_StyleScopedClasses['my-2']} */ ;
24
- // @ts-ignore
25
- var __VLS_1 = __VLS_0, __VLS_3 = __VLS_2;
26
- const __VLS_base = (await import('vue')).defineComponent({});
27
- const __VLS_export = {};
28
- export default {};
@@ -1,59 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from '../../../../components/ui/collapsible';
3
- const isOpen = defineModel('open');
4
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
5
- const __VLS_modelEmit = defineEmits();
6
- const __VLS_ctx = {
7
- ...{},
8
- ...{},
9
- ...{},
10
- ...{},
11
- ...{},
12
- };
13
- let __VLS_elements;
14
- let __VLS_components;
15
- let __VLS_directives;
16
- const __VLS_0 = {}.Collapsible;
17
- /** @type {[typeof __VLS_components.Collapsible, typeof __VLS_components.Collapsible, ]} */ ;
18
- // @ts-ignore
19
- Collapsible;
20
- // @ts-ignore
21
- const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
22
- open: (__VLS_ctx.isOpen),
23
- }));
24
- const __VLS_2 = __VLS_1({
25
- open: (__VLS_ctx.isOpen),
26
- }, ...__VLS_functionalComponentArgsRest(__VLS_1));
27
- var __VLS_4 = {};
28
- const { default: __VLS_5 } = __VLS_3.slots;
29
- // @ts-ignore
30
- [isOpen,];
31
- const __VLS_6 = {}.CollapsibleTrigger;
32
- /** @type {[typeof __VLS_components.CollapsibleTrigger, typeof __VLS_components.CollapsibleTrigger, ]} */ ;
33
- // @ts-ignore
34
- CollapsibleTrigger;
35
- // @ts-ignore
36
- const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({}));
37
- const __VLS_8 = __VLS_7({}, ...__VLS_functionalComponentArgsRest(__VLS_7));
38
- const { default: __VLS_10 } = __VLS_9.slots;
39
- var __VLS_11 = {};
40
- var __VLS_9;
41
- const __VLS_13 = {}.CollapsibleContent;
42
- /** @type {[typeof __VLS_components.CollapsibleContent, typeof __VLS_components.CollapsibleContent, ]} */ ;
43
- // @ts-ignore
44
- CollapsibleContent;
45
- // @ts-ignore
46
- const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({}));
47
- const __VLS_15 = __VLS_14({}, ...__VLS_functionalComponentArgsRest(__VLS_14));
48
- const { default: __VLS_17 } = __VLS_16.slots;
49
- var __VLS_18 = {};
50
- var __VLS_16;
51
- var __VLS_3;
52
- // @ts-ignore
53
- var __VLS_12 = __VLS_11, __VLS_19 = __VLS_18;
54
- const __VLS_base = (await import('vue')).defineComponent({
55
- __typeEmits: {},
56
- __typeProps: {},
57
- });
58
- const __VLS_export = {};
59
- export default {};
@@ -1,71 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { computed } from 'vue';
3
- import IconSearch from '../../../../assets/icons/IconSearch.vue';
4
- import { useDebounce } from '../../../../utils/debounce';
5
- const props = withDefaults(defineProps(), {
6
- placeholder: 'Search...'
7
- });
8
- const emit = defineEmits();
9
- const keyword = computed({
10
- get: () => props.modelValue,
11
- set: (val) => emit('update:modelValue', val)
12
- });
13
- const search = useDebounce(() => {
14
- emit('search', keyword.value);
15
- });
16
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
17
- const __VLS_defaults = {
18
- placeholder: 'Search...'
19
- };
20
- const __VLS_ctx = {
21
- ...{},
22
- ...{},
23
- ...{},
24
- ...{},
25
- ...{},
26
- };
27
- let __VLS_elements;
28
- let __VLS_components;
29
- let __VLS_directives;
30
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
31
- ...{ class: "relative" },
32
- });
33
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
34
- ...{ class: "absolute inset-y-0 left-4 translate-y-1/2 bottom-1/2 flex items-center pointer-events-none text-gray-500" },
35
- });
36
- /** @type {[typeof IconSearch, ]} */ ;
37
- // @ts-ignore
38
- const __VLS_0 = __VLS_asFunctionalComponent(IconSearch, new IconSearch({}));
39
- const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
40
- __VLS_asFunctionalElement(__VLS_elements.input)({
41
- ...{ onInput: (__VLS_ctx.search) },
42
- ...{ class: "sc-full chat-input bg-[#F7F8F9] pr-4 py-3 pl-10" },
43
- ...{ class: ({ '!bg-white': __VLS_ctx.response == 'mobile' }) },
44
- placeholder: (props.placeholder),
45
- });
46
- (__VLS_ctx.keyword);
47
- // @ts-ignore
48
- [search, response, keyword,];
49
- /** @type {__VLS_StyleScopedClasses['relative']} */ ;
50
- /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
51
- /** @type {__VLS_StyleScopedClasses['inset-y-0']} */ ;
52
- /** @type {__VLS_StyleScopedClasses['left-4']} */ ;
53
- /** @type {__VLS_StyleScopedClasses['translate-y-1/2']} */ ;
54
- /** @type {__VLS_StyleScopedClasses['bottom-1/2']} */ ;
55
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
56
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
57
- /** @type {__VLS_StyleScopedClasses['pointer-events-none']} */ ;
58
- /** @type {__VLS_StyleScopedClasses['text-gray-500']} */ ;
59
- /** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
60
- /** @type {__VLS_StyleScopedClasses['chat-input']} */ ;
61
- /** @type {__VLS_StyleScopedClasses['bg-[#F7F8F9]']} */ ;
62
- /** @type {__VLS_StyleScopedClasses['pr-4']} */ ;
63
- /** @type {__VLS_StyleScopedClasses['py-3']} */ ;
64
- /** @type {__VLS_StyleScopedClasses['pl-10']} */ ;
65
- /** @type {__VLS_StyleScopedClasses['!bg-white']} */ ;
66
- const __VLS_export = (await import('vue')).defineComponent({
67
- __typeEmits: {},
68
- __typeProps: {},
69
- props: {},
70
- });
71
- export default {};
@@ -1,148 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { Popover, PopoverContent, PopoverTrigger, } from '../../../../components/ui/popover';
3
- const props = withDefaults(defineProps(), {
4
- align: "center",
5
- sideOffset: 4,
6
- delay: 100,
7
- trigger: 'click',
8
- triggerClass: '',
9
- });
10
- let closeTimer = null;
11
- const isOpen = defineModel('open');
12
- function delaySetOpen(open, delay) {
13
- if (props.disabled)
14
- return;
15
- if (closeTimer) {
16
- clearTimeout(closeTimer);
17
- closeTimer = null;
18
- }
19
- if (delay === 0) {
20
- setOpen(open);
21
- return;
22
- }
23
- closeTimer = setTimeout(() => {
24
- setOpen(open);
25
- closeTimer = null;
26
- }, delay);
27
- }
28
- const setOpen = (value) => {
29
- isOpen.value = value;
30
- };
31
- function onMouseEnter() {
32
- if (props.trigger != 'hover')
33
- return;
34
- delaySetOpen(true, props.delay);
35
- }
36
- const onMouseLeave = () => {
37
- if (props.trigger != 'hover')
38
- return;
39
- delaySetOpen(false, props.delay);
40
- };
41
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
42
- const __VLS_modelEmit = defineEmits();
43
- const __VLS_defaults = {
44
- align: "center",
45
- sideOffset: 4,
46
- delay: 100,
47
- trigger: 'click',
48
- triggerClass: '',
49
- };
50
- const __VLS_ctx = {
51
- ...{},
52
- ...{},
53
- ...{},
54
- ...{},
55
- ...{},
56
- };
57
- let __VLS_elements;
58
- let __VLS_components;
59
- let __VLS_directives;
60
- const __VLS_0 = {}.Popover;
61
- /** @type {[typeof __VLS_components.Popover, typeof __VLS_components.Popover, ]} */ ;
62
- // @ts-ignore
63
- Popover;
64
- // @ts-ignore
65
- const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
66
- ...{ 'onUpdate:open': {} },
67
- open: (__VLS_ctx.isOpen),
68
- }));
69
- const __VLS_2 = __VLS_1({
70
- ...{ 'onUpdate:open': {} },
71
- open: (__VLS_ctx.isOpen),
72
- }, ...__VLS_functionalComponentArgsRest(__VLS_1));
73
- let __VLS_4;
74
- let __VLS_5;
75
- const __VLS_6 = ({ 'update:open': {} },
76
- { 'onUpdate:open': ((val) => __VLS_ctx.isOpen = val) });
77
- var __VLS_7 = {};
78
- const { default: __VLS_8 } = __VLS_3.slots;
79
- // @ts-ignore
80
- [isOpen, isOpen,];
81
- const __VLS_9 = {}.PopoverTrigger;
82
- /** @type {[typeof __VLS_components.PopoverTrigger, typeof __VLS_components.PopoverTrigger, ]} */ ;
83
- // @ts-ignore
84
- PopoverTrigger;
85
- // @ts-ignore
86
- const __VLS_10 = __VLS_asFunctionalComponent(__VLS_9, new __VLS_9({
87
- ...{ 'onMouseenter': {} },
88
- ...{ 'onMouseleave': {} },
89
- ...{ class: (props.triggerClass) },
90
- }));
91
- const __VLS_11 = __VLS_10({
92
- ...{ 'onMouseenter': {} },
93
- ...{ 'onMouseleave': {} },
94
- ...{ class: (props.triggerClass) },
95
- }, ...__VLS_functionalComponentArgsRest(__VLS_10));
96
- let __VLS_13;
97
- let __VLS_14;
98
- const __VLS_15 = ({ mouseenter: {} },
99
- { onMouseenter: (__VLS_ctx.onMouseEnter) });
100
- const __VLS_16 = ({ mouseleave: {} },
101
- { onMouseleave: (__VLS_ctx.onMouseLeave) });
102
- const { default: __VLS_17 } = __VLS_12.slots;
103
- // @ts-ignore
104
- [onMouseEnter, onMouseLeave,];
105
- var __VLS_18 = {};
106
- var __VLS_12;
107
- if (!__VLS_ctx.disabled) {
108
- // @ts-ignore
109
- [disabled,];
110
- const __VLS_20 = {}.PopoverContent;
111
- /** @type {[typeof __VLS_components.PopoverContent, typeof __VLS_components.PopoverContent, ]} */ ;
112
- // @ts-ignore
113
- PopoverContent;
114
- // @ts-ignore
115
- const __VLS_21 = __VLS_asFunctionalComponent(__VLS_20, new __VLS_20({
116
- ...{ 'onMouseenter': {} },
117
- ...{ 'onMouseleave': {} },
118
- side: (__VLS_ctx.side),
119
- align: (__VLS_ctx.align),
120
- }));
121
- const __VLS_22 = __VLS_21({
122
- ...{ 'onMouseenter': {} },
123
- ...{ 'onMouseleave': {} },
124
- side: (__VLS_ctx.side),
125
- align: (__VLS_ctx.align),
126
- }, ...__VLS_functionalComponentArgsRest(__VLS_21));
127
- let __VLS_24;
128
- let __VLS_25;
129
- const __VLS_26 = ({ mouseenter: {} },
130
- { onMouseenter: (__VLS_ctx.onMouseEnter) });
131
- const __VLS_27 = ({ mouseleave: {} },
132
- { onMouseleave: (__VLS_ctx.onMouseLeave) });
133
- const { default: __VLS_28 } = __VLS_23.slots;
134
- // @ts-ignore
135
- [onMouseEnter, onMouseLeave, side, align,];
136
- var __VLS_29 = {};
137
- var __VLS_23;
138
- }
139
- var __VLS_3;
140
- // @ts-ignore
141
- var __VLS_19 = __VLS_18, __VLS_30 = __VLS_29;
142
- const __VLS_base = (await import('vue')).defineComponent({
143
- __typeEmits: {},
144
- __typeProps: {},
145
- props: {},
146
- });
147
- const __VLS_export = {};
148
- export default {};
@@ -1,12 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
3
- const __VLS_ctx = {};
4
- let __VLS_elements;
5
- let __VLS_components;
6
- let __VLS_directives;
7
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
8
- ...{ class: "loader" },
9
- });
10
- /** @type {__VLS_StyleScopedClasses['loader']} */ ;
11
- const __VLS_export = (await import('vue')).defineComponent({});
12
- export default {};
@@ -1,79 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { computed } from 'vue';
3
- const props = withDefaults(defineProps(), {
4
- size: 'md',
5
- src: ''
6
- });
7
- const initials = computed(() => props.name?.[0]?.toUpperCase() ?? 'n/a');
8
- const sizeClass = computed(() => {
9
- const s = props.size;
10
- if (typeof s === 'number')
11
- return `w-[${s}px] h-[${s}px] text-[${s / 2.5}px]`;
12
- switch (s) {
13
- case 'sm':
14
- return 'w-8 h-8 text-sm';
15
- case 'lg':
16
- return 'w-20 h-20 text-2xl';
17
- case 'xl':
18
- return 'w-24 h-24 text-3xl';
19
- case 'xxl':
20
- return 'w-40 h-40 text-3xl';
21
- default:
22
- return 'w-12 h-12 text-base';
23
- }
24
- });
25
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
26
- const __VLS_defaults = {
27
- size: 'md',
28
- src: ''
29
- };
30
- const __VLS_ctx = {
31
- ...{},
32
- ...{},
33
- ...{},
34
- ...{},
35
- };
36
- let __VLS_elements;
37
- let __VLS_components;
38
- let __VLS_directives;
39
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
40
- ...{ class: ([
41
- 'flex items-center justify-center rounded-full font-medium overflow-hidden select-none',
42
- __VLS_ctx.sizeClass
43
- ]) },
44
- ...{ style: ({ backgroundColor: __VLS_ctx.color || '#266699' }) },
45
- });
46
- // @ts-ignore
47
- [sizeClass, color,];
48
- if (__VLS_ctx.src) {
49
- // @ts-ignore
50
- [src,];
51
- __VLS_asFunctionalElement(__VLS_elements.img)({
52
- src: (__VLS_ctx.src),
53
- alt: "avatar",
54
- ...{ class: "w-full h-full object-cover" },
55
- });
56
- // @ts-ignore
57
- [src,];
58
- }
59
- else {
60
- __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
61
- (__VLS_ctx.initials);
62
- // @ts-ignore
63
- [initials,];
64
- }
65
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
66
- /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
67
- /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
68
- /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
69
- /** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
70
- /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
71
- /** @type {__VLS_StyleScopedClasses['select-none']} */ ;
72
- /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
73
- /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
74
- /** @type {__VLS_StyleScopedClasses['object-cover']} */ ;
75
- const __VLS_export = (await import('vue')).defineComponent({
76
- __typeProps: {},
77
- props: {},
78
- });
79
- export default {};