@phonghq/go-chat 1.0.72 → 1.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/dist/assets/icons/call/IconClock.vue.d.ts +2 -0
  2. package/dist/assets/icons/call/IconClock.vue.js +22 -0
  3. package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
  4. package/dist/assets/icons/call/IconClose.vue.js +26 -0
  5. package/dist/assets/icons/call/IconMic.vue.d.ts +14 -0
  6. package/dist/assets/icons/call/IconMic.vue.js +123 -0
  7. package/dist/assets/icons/call/IconPhone.vue.d.ts +2 -0
  8. package/dist/assets/icons/call/IconPhone.vue.js +22 -0
  9. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +14 -0
  10. package/dist/assets/icons/call/IconPhoneCancel.vue.js +46 -0
  11. package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
  12. package/dist/assets/icons/call/IconSoundDownload.vue.js +50 -0
  13. package/dist/assets/icons/call/IconSpeaker.vue.d.ts +14 -0
  14. package/dist/assets/icons/call/IconSpeaker.vue.js +62 -0
  15. package/dist/assets/icons/chat/IconCalendar.vue.d.ts +14 -0
  16. package/dist/assets/icons/chat/IconCalendar.vue.js +42 -0
  17. package/dist/assets/icons/chat/IconCheck.vue.d.ts +2 -0
  18. package/dist/assets/icons/chat/IconCheck.vue.js +22 -0
  19. package/dist/assets/icons/chat/IconInfo.vue.d.ts +2 -0
  20. package/dist/assets/icons/chat/IconInfo.vue.js +20 -0
  21. package/dist/assets/icons/chat/IconLink.vue.d.ts +14 -0
  22. package/dist/assets/icons/chat/IconLink.vue.js +42 -0
  23. package/dist/assets/icons/chat/IconMenuDot.vue.d.ts +2 -0
  24. package/dist/assets/icons/chat/IconMenuDot.vue.js +31 -0
  25. package/dist/assets/icons/customer-appointment/IconChevronRight.vue.d.ts +2 -0
  26. package/dist/assets/icons/customer-appointment/IconChevronRight.vue.js +22 -0
  27. package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +2 -0
  28. package/dist/assets/icons/customer-appointment/IconFilter.vue.js +53 -0
  29. package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +2 -0
  30. package/dist/assets/icons/customer-detail/IconArrow.vue.js +22 -0
  31. package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +2 -0
  32. package/dist/assets/icons/customer-detail/IconCheck.vue.js +27 -0
  33. package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +2 -0
  34. package/dist/assets/icons/customer-detail/IconDate.vue.js +43 -0
  35. package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +2 -0
  36. package/dist/assets/icons/customer-detail/IconGroup.vue.js +48 -0
  37. package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +2 -0
  38. package/dist/assets/icons/customer-detail/IconMessage.vue.js +28 -0
  39. package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +2 -0
  40. package/dist/assets/icons/customer-detail/IconNote.vue.js +29 -0
  41. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +14 -0
  42. package/dist/assets/icons/customer-detail/IconPhone.vue.js +41 -0
  43. package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +2 -0
  44. package/dist/assets/icons/customer-detail/IconPin.vue.js +29 -0
  45. package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +2 -0
  46. package/dist/assets/icons/customer-detail/IconSearch.vue.js +29 -0
  47. package/dist/assets/icons/global/IconAiCheck.vue.d.ts +2 -0
  48. package/dist/assets/icons/global/IconAiCheck.vue.js +28 -0
  49. package/dist/assets/icons/global/IconArrowLeft.vue.d.ts +2 -0
  50. package/dist/assets/icons/global/IconArrowLeft.vue.js +29 -0
  51. package/dist/assets/icons/global/IconBackspace.vue.d.ts +2 -0
  52. package/dist/assets/icons/global/IconBackspace.vue.js +28 -0
  53. package/dist/assets/icons/global/IconCloseCircle.vue.d.ts +2 -0
  54. package/dist/assets/icons/global/IconCloseCircle.vue.js +36 -0
  55. package/dist/assets/icons/global/IconMessageOutline.vue.d.ts +2 -0
  56. package/dist/assets/icons/global/IconMessageOutline.vue.js +22 -0
  57. package/dist/assets/icons/global/IconPhone.vue.d.ts +2 -0
  58. package/dist/assets/icons/global/IconPhone.vue.js +19 -0
  59. package/dist/assets/icons/global/IconPlan.vue.d.ts +14 -0
  60. package/dist/assets/icons/global/IconPlan.vue.js +39 -0
  61. package/dist/assets/icons/global/IconPlus.vue.d.ts +2 -0
  62. package/dist/assets/icons/global/IconPlus.vue.js +22 -0
  63. package/dist/assets/icons/global/IconSearch.vue.d.ts +32 -0
  64. package/dist/assets/icons/global/IconSearch.vue.js +68 -0
  65. package/dist/assets/icons/global/IconSms.vue.d.ts +2 -0
  66. package/dist/assets/icons/global/IconSms.vue.js +22 -0
  67. package/dist/assets/icons/global/IconUser.vue.d.ts +2 -0
  68. package/dist/assets/icons/global/IconUser.vue.js +25 -0
  69. package/dist/assets/icons/lib/IconZoomOut.vue.d.ts +5 -0
  70. package/dist/assets/icons/lib/IconZoomOut.vue.js +52 -0
  71. package/dist/chat/App.vue.d.ts +26 -0
  72. package/dist/chat/App.vue.js +928 -0
  73. package/dist/chat/ChatHeader.vue.d.ts +15 -0
  74. package/dist/chat/ChatHeader.vue.js +218 -0
  75. package/dist/chat/main.d.ts +7 -0
  76. package/dist/chat/main.js +7 -0
  77. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +9 -0
  78. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +262 -0
  79. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +12 -0
  80. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.js +80 -0
  81. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +2 -0
  82. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.js +138 -0
  83. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +7 -0
  84. package/dist/chat/page/customer-detail/CustomerDetail.vue.js +234 -0
  85. package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +16 -0
  86. package/dist/chat/page/customer-detail/SubInformation.vue.js +134 -0
  87. package/dist/chat/page/error/Error.vue.d.ts +2 -0
  88. package/dist/chat/page/error/Error.vue.js +64 -0
  89. package/dist/chat/page/home/ChatList.vue.d.ts +104 -0
  90. package/dist/chat/page/home/ChatList.vue.js +654 -0
  91. package/dist/chat/page/home/ChatMessage.vue.d.ts +21 -0
  92. package/dist/chat/page/home/ChatMessage.vue.js +210 -0
  93. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +20 -0
  94. package/dist/chat/page/home/ChatMessageItem.vue.js +397 -0
  95. package/dist/chat/page/home/ChatMessageItem2.vue.d.ts +19 -0
  96. package/dist/chat/page/home/ChatMessageItem2.vue.js +351 -0
  97. package/dist/chat/page/home/DropZone.vue.d.ts +13 -0
  98. package/dist/chat/page/home/DropZone.vue.js +130 -0
  99. package/dist/chat/page/home/Home.vue.d.ts +29 -0
  100. package/dist/chat/page/home/Home.vue.js +472 -0
  101. package/dist/chat/page/home/HomeHeader.vue.d.ts +18 -0
  102. package/dist/chat/page/home/HomeHeader.vue.js +514 -0
  103. package/dist/chat/page/home/InputChat.vue.d.ts +27 -0
  104. package/dist/chat/page/home/InputChat.vue.js +412 -0
  105. package/dist/chat/page/home/NewCustomer.vue.d.ts +7 -0
  106. package/dist/chat/page/home/NewCustomer.vue.js +83 -0
  107. package/dist/chat/page/home/PhoneNumpad.vue.d.ts +22 -0
  108. package/dist/chat/page/home/PhoneNumpad.vue.js +161 -0
  109. package/dist/chat/page/setting/Setting.vue.d.ts +2 -0
  110. package/dist/chat/page/setting/Setting.vue.js +277 -0
  111. package/dist/chat/page/setting/SettingSuccess.vue.d.ts +2 -0
  112. package/dist/chat/page/setting/SettingSuccess.vue.js +33 -0
  113. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +24 -0
  114. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +207 -0
  115. package/dist/components/chat/call/Calling.vue.d.ts +17 -0
  116. package/dist/components/chat/call/Calling.vue.js +594 -0
  117. package/dist/components/chat/call/TimeLeft.vue.d.ts +5 -0
  118. package/dist/components/chat/call/TimeLeft.vue.js +59 -0
  119. package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +13 -0
  120. package/dist/components/chat/card/CardCustomerDetail.vue.js +28 -0
  121. package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +20 -0
  122. package/dist/components/chat/common/collapse/CollapseBase.vue.js +59 -0
  123. package/dist/components/chat/common/input/InputSearch.vue.d.ts +16 -0
  124. package/dist/components/chat/common/input/InputSearch.vue.js +71 -0
  125. package/dist/components/chat/common/modal/Modal.vue.d.ts +94 -0
  126. package/dist/components/chat/common/modal/Modal.vue.js +260 -0
  127. package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +35 -0
  128. package/dist/components/chat/common/popover/PopoverBase.vue.js +148 -0
  129. package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +10 -0
  130. package/dist/components/chat/common/spin/BaseSpin.vue.js +43 -0
  131. package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +17 -0
  132. package/dist/components/chat/common/switch/SwitchBase.vue.js +76 -0
  133. package/dist/components/chat/common/tab/TabBase.vue.d.ts +30 -0
  134. package/dist/components/chat/common/tab/TabBase.vue.js +86 -0
  135. package/dist/components/chat/common/tabs/TabBase.vue.d.ts +18 -0
  136. package/dist/components/chat/common/tabs/TabBase.vue.js +93 -0
  137. package/dist/components/chat/customer/Avatar.vue.d.ts +12 -0
  138. package/dist/components/chat/customer/Avatar.vue.js +127 -0
  139. package/dist/components/chat/layout/mobile/Footer.vue.d.ts +2 -0
  140. package/dist/components/chat/layout/mobile/Footer.vue.js +114 -0
  141. package/dist/components/chat/select/SelectBase.vue.d.ts +24 -0
  142. package/dist/components/chat/select/SelectBase.vue.js +105 -0
  143. package/dist/components/common/CustomLoading.vue.d.ts +2 -0
  144. package/dist/components/common/CustomLoading.vue.js +19 -0
  145. package/dist/components/common/Notification/NotificationDescription.vue.d.ts +7 -0
  146. package/dist/components/common/Notification/NotificationDescription.vue.js +38 -0
  147. package/dist/components/common/button/ButtonBase.vue.d.ts +22 -0
  148. package/dist/components/common/button/ButtonBase.vue.js +78 -0
  149. package/dist/components/common/button/ButtonToggle.vue.d.ts +20 -0
  150. package/dist/components/common/button/ButtonToggle.vue.js +70 -0
  151. package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +16 -0
  152. package/dist/components/common/checkbox/CCheckboxNumber.vue.js +48 -0
  153. package/dist/components/common/collapse/BaseCollapse.vue.d.ts +12 -0
  154. package/dist/components/common/collapse/BaseCollapse.vue.js +36 -0
  155. package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +4 -0
  156. package/dist/components/common/collapse/BaseCollapseItem.vue.js +22 -0
  157. package/dist/components/common/drawer/DrawerBase.vue.d.ts +39 -0
  158. package/dist/components/common/drawer/DrawerBase.vue.js +126 -0
  159. package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +33 -0
  160. package/dist/components/common/drawer/DrawerBaseCustom.vue.js +135 -0
  161. package/dist/components/common/dropdown/DropdownBase.vue.d.ts +21 -0
  162. package/dist/components/common/dropdown/DropdownBase.vue.js +93 -0
  163. package/dist/components/common/input/CInputSearch.vue.d.ts +14 -0
  164. package/dist/components/common/input/CInputSearch.vue.js +62 -0
  165. package/dist/components/common/modal/ModalBase.vue.d.ts +35 -0
  166. package/dist/components/common/modal/ModalBase.vue.js +187 -0
  167. package/dist/components/common/popover/PopoverBase.vue.d.ts +3 -0
  168. package/dist/components/common/popover/PopoverBase.vue.js +36 -0
  169. package/dist/components/common/select/SelectBase.vue.d.ts +33 -0
  170. package/dist/components/common/select/SelectBase.vue.js +120 -0
  171. package/dist/components/common/slider/BaseSlider.vue.d.ts +11 -0
  172. package/dist/components/common/slider/BaseSlider.vue.js +70 -0
  173. package/dist/components/common/spin/CSpin.vue.d.ts +9 -0
  174. package/dist/components/common/spin/CSpin.vue.js +41 -0
  175. package/dist/components/common/tooltip/TooltipBase.vue.d.ts +2 -0
  176. package/dist/components/common/tooltip/TooltipBase.vue.js +8 -0
  177. package/dist/components/layout/PageError.vue.d.ts +2 -0
  178. package/dist/components/layout/PageError.vue.js +91 -0
  179. package/dist/components/ui/button/CButton.vue.d.ts +19 -0
  180. package/dist/components/ui/button/CButton.vue.js +49 -0
  181. package/dist/components/ui/button/c-button.d.ts +7 -0
  182. package/dist/components/ui/button/c-button.js +26 -0
  183. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +18 -0
  184. package/dist/components/ui/checkbox/Checkbox.vue.js +79 -0
  185. package/dist/components/ui/checkbox/index.d.ts +1 -0
  186. package/dist/components/ui/checkbox/index.js +1 -0
  187. package/dist/components/ui/collapsible/Collapsible.vue.d.ts +16 -0
  188. package/dist/components/ui/collapsible/Collapsible.vue.js +47 -0
  189. package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +10 -0
  190. package/dist/components/ui/collapsible/CollapsibleContent.vue.js +41 -0
  191. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +10 -0
  192. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.js +35 -0
  193. package/dist/components/ui/collapsible/index.d.ts +3 -0
  194. package/dist/components/ui/collapsible/index.js +3 -0
  195. package/dist/components/ui/dialog/Dialog.vue.d.ts +14 -0
  196. package/dist/components/ui/dialog/Dialog.vue.js +42 -0
  197. package/dist/components/ui/dialog/DialogClose.vue.d.ts +10 -0
  198. package/dist/components/ui/dialog/DialogClose.vue.js +35 -0
  199. package/dist/components/ui/dialog/DialogContent.vue.d.ts +29 -0
  200. package/dist/components/ui/dialog/DialogContent.vue.js +84 -0
  201. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +14 -0
  202. package/dist/components/ui/dialog/DialogDescription.vue.js +43 -0
  203. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +13 -0
  204. package/dist/components/ui/dialog/DialogFooter.vue.js +26 -0
  205. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +13 -0
  206. package/dist/components/ui/dialog/DialogHeader.vue.js +26 -0
  207. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +30 -0
  208. package/dist/components/ui/dialog/DialogScrollContent.vue.js +99 -0
  209. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +14 -0
  210. package/dist/components/ui/dialog/DialogTitle.vue.js +43 -0
  211. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +10 -0
  212. package/dist/components/ui/dialog/DialogTrigger.vue.js +35 -0
  213. package/dist/components/ui/dialog/index.d.ts +9 -0
  214. package/dist/components/ui/dialog/index.js +9 -0
  215. package/dist/components/ui/drawer/Drawer.vue.d.ts +26 -0
  216. package/dist/components/ui/drawer/Drawer.vue.js +48 -0
  217. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +33 -0
  218. package/dist/components/ui/drawer/DrawerContent.vue.js +81 -0
  219. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +14 -0
  220. package/dist/components/ui/drawer/DrawerDescription.vue.js +42 -0
  221. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +13 -0
  222. package/dist/components/ui/drawer/DrawerFooter.vue.js +26 -0
  223. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +13 -0
  224. package/dist/components/ui/drawer/DrawerHeader.vue.js +26 -0
  225. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +7 -0
  226. package/dist/components/ui/drawer/DrawerOverlay.vue.js +37 -0
  227. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +14 -0
  228. package/dist/components/ui/drawer/DrawerTitle.vue.js +42 -0
  229. package/dist/components/ui/drawer/index.d.ts +8 -0
  230. package/dist/components/ui/drawer/index.js +8 -0
  231. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +14 -0
  232. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.js +41 -0
  233. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +20 -0
  234. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +79 -0
  235. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +28 -0
  236. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +66 -0
  237. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +10 -0
  238. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +35 -0
  239. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +15 -0
  240. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.js +43 -0
  241. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +15 -0
  242. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +43 -0
  243. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +14 -0
  244. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +41 -0
  245. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +18 -0
  246. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +80 -0
  247. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
  248. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +37 -0
  249. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +13 -0
  250. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +26 -0
  251. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +14 -0
  252. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.js +41 -0
  253. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +30 -0
  254. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +46 -0
  255. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +14 -0
  256. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +58 -0
  257. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +10 -0
  258. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +41 -0
  259. package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
  260. package/dist/components/ui/dropdown-menu/index.js +15 -0
  261. package/dist/components/ui/popover/Popover.vue.d.ts +14 -0
  262. package/dist/components/ui/popover/Popover.vue.js +41 -0
  263. package/dist/components/ui/popover/PopoverContent.vue.d.ts +28 -0
  264. package/dist/components/ui/popover/PopoverContent.vue.js +60 -0
  265. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +10 -0
  266. package/dist/components/ui/popover/PopoverTrigger.vue.js +35 -0
  267. package/dist/components/ui/popover/index.d.ts +3 -0
  268. package/dist/components/ui/popover/index.js +3 -0
  269. package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +18 -0
  270. package/dist/components/ui/radio-group/RadioGroup.vue.js +46 -0
  271. package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +7 -0
  272. package/dist/components/ui/radio-group/RadioGroupItem.vue.js +71 -0
  273. package/dist/components/ui/radio-group/index.d.ts +2 -0
  274. package/dist/components/ui/radio-group/index.js +2 -0
  275. package/dist/components/ui/select/Select.vue.d.ts +20 -0
  276. package/dist/components/ui/select/Select.vue.js +49 -0
  277. package/dist/components/ui/select/SelectContent.vue.d.ts +24 -0
  278. package/dist/components/ui/select/SelectContent.vue.js +103 -0
  279. package/dist/components/ui/select/SelectGroup.vue.d.ts +10 -0
  280. package/dist/components/ui/select/SelectGroup.vue.js +37 -0
  281. package/dist/components/ui/select/SelectItem.vue.d.ts +18 -0
  282. package/dist/components/ui/select/SelectItem.vue.js +73 -0
  283. package/dist/components/ui/select/SelectItemText.vue.d.ts +10 -0
  284. package/dist/components/ui/select/SelectItemText.vue.js +37 -0
  285. package/dist/components/ui/select/SelectLabel.vue.d.ts +14 -0
  286. package/dist/components/ui/select/SelectLabel.vue.js +40 -0
  287. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +14 -0
  288. package/dist/components/ui/select/SelectScrollDownButton.vue.js +58 -0
  289. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +14 -0
  290. package/dist/components/ui/select/SelectScrollUpButton.vue.js +58 -0
  291. package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
  292. package/dist/components/ui/select/SelectSeparator.vue.js +39 -0
  293. package/dist/components/ui/select/SelectTrigger.vue.d.ts +17 -0
  294. package/dist/components/ui/select/SelectTrigger.vue.js +49 -0
  295. package/dist/components/ui/select/SelectValue.vue.d.ts +10 -0
  296. package/dist/components/ui/select/SelectValue.vue.js +37 -0
  297. package/dist/components/ui/select/index.d.ts +11 -0
  298. package/dist/components/ui/select/index.js +11 -0
  299. package/dist/components/ui/slider/Slider.vue.d.ts +13 -0
  300. package/dist/components/ui/slider/Slider.vue.js +155 -0
  301. package/dist/components/ui/slider/index.d.ts +1 -0
  302. package/dist/components/ui/slider/index.js +1 -0
  303. package/dist/components/ui/switch/Switch.vue.d.ts +18 -0
  304. package/dist/components/ui/switch/Switch.vue.js +61 -0
  305. package/dist/components/ui/switch/index.d.ts +1 -0
  306. package/dist/components/ui/switch/index.js +1 -0
  307. package/dist/components/ui/tabs/Tabs.vue.d.ts +20 -0
  308. package/dist/components/ui/tabs/Tabs.vue.js +54 -0
  309. package/dist/components/ui/tabs/TabsContent.vue.d.ts +14 -0
  310. package/dist/components/ui/tabs/TabsContent.vue.js +44 -0
  311. package/dist/components/ui/tabs/TabsList.vue.d.ts +14 -0
  312. package/dist/components/ui/tabs/TabsList.vue.js +44 -0
  313. package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +14 -0
  314. package/dist/components/ui/tabs/TabsTrigger.vue.js +45 -0
  315. package/dist/components/ui/tabs/index.d.ts +4 -0
  316. package/dist/components/ui/tabs/index.js +4 -0
  317. package/dist/composable/useDigibot.d.ts +7 -0
  318. package/dist/composable/useDigibot.js +23 -0
  319. package/dist/composable/useInitData.d.ts +12 -0
  320. package/dist/composable/useInitData.js +101 -0
  321. package/dist/composable/useListConversations.d.ts +59 -0
  322. package/dist/composable/useListConversations.js +220 -0
  323. package/dist/composable/useListentEvent.d.ts +5 -0
  324. package/dist/composable/useListentEvent.js +69 -0
  325. package/dist/composable/usePlivo.d.ts +15 -0
  326. package/dist/composable/usePlivo.js +201 -0
  327. package/dist/constant/color.d.ts +22 -0
  328. package/dist/constant/color.js +47 -0
  329. package/dist/constant/datetime.d.ts +7 -0
  330. package/dist/constant/datetime.js +7 -0
  331. package/dist/constant/general.d.ts +11 -0
  332. package/dist/constant/general.js +12 -0
  333. package/dist/constant/message.d.ts +8 -0
  334. package/dist/constant/message.js +8 -0
  335. package/dist/constant/mqtt.d.ts +7 -0
  336. package/dist/constant/mqtt.js +18 -0
  337. package/dist/constant/user.d.ts +8 -0
  338. package/dist/constant/user.js +9 -0
  339. package/dist/go-chat.es.js +18766 -17073
  340. package/dist/go-chat.umd.js +23 -23
  341. package/dist/lib/utils.d.ts +2 -0
  342. package/dist/lib/utils.js +5 -0
  343. package/dist/plugins/axios-gci.d.ts +3 -0
  344. package/dist/plugins/axios-gci.js +25 -0
  345. package/dist/plugins/axios.d.ts +3 -0
  346. package/dist/plugins/axios.js +84 -0
  347. package/dist/plugins/mqtt.d.ts +8 -0
  348. package/dist/plugins/mqtt.js +189 -0
  349. package/dist/plugins/pocketbase.d.ts +5 -0
  350. package/dist/plugins/pocketbase.js +15 -0
  351. package/dist/plugins/sdk.d.ts +18 -0
  352. package/dist/plugins/sdk.js +73 -0
  353. package/dist/plugins/websocket.d.ts +15 -0
  354. package/dist/plugins/websocket.js +151 -0
  355. package/dist/style.css +1 -1
  356. package/dist/types/chat/auth.d.ts +41 -0
  357. package/dist/types/chat/auth.js +1 -0
  358. package/dist/types/chat/call.d.ts +19 -0
  359. package/dist/types/chat/call.js +23 -0
  360. package/dist/types/chat/global.d.ts +58 -0
  361. package/dist/types/chat/global.js +1 -0
  362. package/dist/types/chat/promise.d.ts +17 -0
  363. package/dist/types/chat/promise.js +1 -0
  364. package/dist/types/chat/user.d.ts +88 -0
  365. package/dist/types/chat/user.js +1 -0
  366. package/dist/types/conversation.d.ts +23 -0
  367. package/dist/types/conversation.js +1 -0
  368. package/dist/types/global.d.ts +11 -0
  369. package/dist/types/global.js +15 -0
  370. package/dist/types/message.d.ts +52 -0
  371. package/dist/types/message.js +1 -0
  372. package/dist/utils/chat/cache.d.ts +7 -0
  373. package/dist/utils/chat/cache.js +63 -0
  374. package/dist/utils/chat/chat-router.d.ts +5 -0
  375. package/dist/utils/chat/chat-router.js +14 -0
  376. package/dist/utils/chat/page-error.d.ts +4 -0
  377. package/dist/utils/chat/page-error.js +25 -0
  378. package/dist/utils/chat/phone-string.d.ts +1 -0
  379. package/dist/utils/chat/phone-string.js +4 -0
  380. package/dist/utils/chat/queue.d.ts +7 -0
  381. package/dist/utils/chat/queue.js +30 -0
  382. package/dist/utils/chat/store/auth.d.ts +62 -0
  383. package/dist/utils/chat/store/auth.js +93 -0
  384. package/dist/utils/chat/store/call.d.ts +15 -0
  385. package/dist/utils/chat/store/call.js +160 -0
  386. package/dist/utils/chat/store/conversation.d.ts +14 -0
  387. package/dist/utils/chat/store/conversation.js +73 -0
  388. package/dist/utils/chat/store/message.d.ts +27 -0
  389. package/dist/utils/chat/store/message.js +70 -0
  390. package/dist/utils/chat/store/time-limit.d.ts +5 -0
  391. package/dist/utils/chat/store/time-limit.js +8 -0
  392. package/dist/utils/chat/store/user.d.ts +200 -0
  393. package/dist/utils/chat/store/user.js +44 -0
  394. package/dist/utils/dayjs-helper.d.ts +3 -0
  395. package/dist/utils/dayjs-helper.js +8 -0
  396. package/dist/utils/debounce.d.ts +1 -0
  397. package/dist/utils/debounce.js +9 -0
  398. package/dist/utils/json.d.ts +2 -0
  399. package/dist/utils/json.js +18 -0
  400. package/dist/utils/logger.d.ts +3 -0
  401. package/dist/utils/logger.js +5 -0
  402. package/dist/utils/string-helper.d.ts +3 -0
  403. package/dist/utils/string-helper.js +43 -0
  404. package/dist/views/NotTenantPhone.vue.d.ts +9 -0
  405. package/dist/views/NotTenantPhone.vue.js +99 -0
  406. package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +19 -0
  407. package/dist/views/home/phone-numpad/ConvercationList.vue.js +177 -0
  408. package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +32 -0
  409. package/dist/views/home/phone-numpad/PhoneNumpad.vue.js +403 -0
  410. package/package.json +1 -1
@@ -0,0 +1,594 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
3
+ import IconPhone from '../../../assets/icons/call/IconPhone.vue';
4
+ import { dataProfile } from '../../../utils/chat/store/auth';
5
+ import IconPhoneCancel from '../../../assets/icons/call/IconPhoneCancel.vue';
6
+ import { downloadRecord, getPlivoAccessToken } from '../../../utils/chat/store/call';
7
+ import DrawerBaseCustom from '../../../components/common/drawer/DrawerBaseCustom.vue';
8
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
9
+ import { getUserDetailChat } from '../../../utils/chat/store/user';
10
+ import { formatPhone10number } from '../../../utils/chat/phone-string';
11
+ import IconSoundDownload from '../../../assets/icons/call/IconSoundDownload.vue';
12
+ import IconClose from '../../../assets/icons/call/IconClose.vue';
13
+ import { usePlivo } from '../../../composable/usePlivo';
14
+ import { PLIVO_CALL_STATUS } from '../../../types/chat/call';
15
+ import IconMic from '../../../assets/icons/call/IconMic.vue';
16
+ import { useDebounce } from '../../../utils/debounce';
17
+ import { phoneNumberFormat } from '../../../utils/string-helper';
18
+ import { handleMedialPermissionError, showPageError } from '../../../utils/chat/page-error';
19
+ import RingAudio from '../../../assets/sound/telephone-2.mp3';
20
+ import TimeLeft from '../../../components/chat/call/TimeLeft.vue';
21
+ const props = withDefaults(defineProps(), {
22
+ responsive: 'window'
23
+ });
24
+ const emit = defineEmits();
25
+ const handlePlivoCallBack = (status, data) => {
26
+ if (!drawerVisibleRef.value)
27
+ return;
28
+ callStatus.value = status;
29
+ if (status == PLIVO_CALL_STATUS.RINGING) {
30
+ handleInComingCall(data);
31
+ }
32
+ else if (status == PLIVO_CALL_STATUS.CHECK_USER_OFFER) {
33
+ getUserOffer(data?.phone ?? '');
34
+ }
35
+ else if (status == PLIVO_CALL_STATUS.CONNECT_FAILED || status == PLIVO_CALL_STATUS.NO_ANSWER) {
36
+ endCall();
37
+ }
38
+ else if (status == PLIVO_CALL_STATUS.CALL_END) {
39
+ errorMessage.value = data?.message ?? '';
40
+ const closeModal = data?.reason == 'ORIGINATOR_CANCEL';
41
+ endCall({ closeModal });
42
+ }
43
+ else if (status == PLIVO_CALL_STATUS.CALL_START) {
44
+ audioRef.value?.pause();
45
+ startTimer();
46
+ }
47
+ else if (status == PLIVO_CALL_STATUS.MEDIA_PERMISSION_FAIL) {
48
+ handleMedialPermissionError();
49
+ }
50
+ };
51
+ const { plivoLogin, plivoCallAnswer, plivoCall, plivoEndCall, plivoCallSwishMute, plivoCallSwishSpeaker, plivoRemoveCallBack, checkTimeLimit, } = usePlivo(handlePlivoCallBack);
52
+ const STATUS_LABEL = computed(() => {
53
+ return {
54
+ [PLIVO_CALL_STATUS.CONNECTING]: 'Connecting...',
55
+ [PLIVO_CALL_STATUS.CALLING]: 'Calling...',
56
+ [PLIVO_CALL_STATUS.RINGING]: 'Ringing...',
57
+ [PLIVO_CALL_STATUS.CONNECT_FAILED]: errorMessage.value || 'Connect Error',
58
+ [PLIVO_CALL_STATUS.CALL_START]: '',
59
+ [PLIVO_CALL_STATUS.CALL_END]: errorMessage.value || 'Call Ended',
60
+ [PLIVO_CALL_STATUS.NO_ANSWER]: 'No Answer',
61
+ [PLIVO_CALL_STATUS.CANCEL]: '',
62
+ [PLIVO_CALL_STATUS.TIME_OUT]: '',
63
+ [PLIVO_CALL_STATUS.BUSY]: '',
64
+ [PLIVO_CALL_STATUS.MEDIA_PERMISSION_FAIL]: '',
65
+ [PLIVO_CALL_STATUS.CHECK_USER_OFFER]: ''
66
+ };
67
+ });
68
+ const REFRESH_TOKEN_TIME = 15 * 60 * 1000;
69
+ const label = computed(() => STATUS_LABEL.value[callStatus.value] ?? '');
70
+ const callStatus = ref(PLIVO_CALL_STATUS.CONNECTING);
71
+ const duration = ref('00:00');
72
+ const drawerVisible = ref(false);
73
+ const disable = ref(false);
74
+ const errorMessage = ref('');
75
+ const record_link = ref('');
76
+ const drawerVisibleRef = ref(null);
77
+ const audioRef = ref(null);
78
+ const userRemoter = ref(null);
79
+ const isMute = ref(false);
80
+ const limitTime = ref(0);
81
+ let timer = null;
82
+ let timeOut = null;
83
+ let refreshTokenTimeOut = null;
84
+ let refreshTokenCount = null;
85
+ let callType = 'call';
86
+ let uuidEnd = '';
87
+ onMounted(async () => {
88
+ try {
89
+ if (dataProfile.value?.phone) {
90
+ const token = await getPlivoAccessToken();
91
+ await plivoLogin({ token });
92
+ setTimeout(refreshToken, REFRESH_TOKEN_TIME);
93
+ }
94
+ }
95
+ catch {
96
+ showPageError('We’re having trouble connecting the call. Please try again in a moment');
97
+ }
98
+ });
99
+ onBeforeUnmount(() => {
100
+ if (timer)
101
+ clearInterval(timer);
102
+ if (timeOut)
103
+ clearTimeout(timeOut);
104
+ endCall();
105
+ plivoRemoveCallBack();
106
+ errorMessage.value = '';
107
+ });
108
+ function startTimer() {
109
+ let sec = 0;
110
+ timer = setInterval(() => {
111
+ sec++;
112
+ limitTime.value = limitTime.value - 1;
113
+ const m = String(Math.floor(sec / 60)).padStart(2, '0');
114
+ const s = String(sec % 60).padStart(2, '0');
115
+ duration.value = `${m}:${s}`;
116
+ if (!limitTime.value || limitTime.value <= 0) {
117
+ handleTimeLimitError();
118
+ }
119
+ }, 1000);
120
+ }
121
+ function endCall(option) {
122
+ if (option?.closeModal) {
123
+ closeModal();
124
+ }
125
+ audioRef.value?.pause();
126
+ handleEmitEndCall(userRemoter.value, callType);
127
+ plivoEndCall(callStatus.value);
128
+ callStatus.value = PLIVO_CALL_STATUS.CALL_END;
129
+ clearInterval(timer);
130
+ disable.value = false;
131
+ isMute.value = false;
132
+ duration.value = '00:00';
133
+ if (timer)
134
+ clearInterval(timer);
135
+ if (timeOut)
136
+ clearTimeout(timeOut);
137
+ callType = '';
138
+ }
139
+ const closeModal = () => {
140
+ drawerVisible.value = false;
141
+ drawerVisibleRef.value?.close();
142
+ };
143
+ const handleEmitEndCall = useDebounce((data, type) => {
144
+ emit('endCall', data, type);
145
+ }, 500);
146
+ const refreshToken = async () => {
147
+ try {
148
+ if (refreshTokenTimeOut) {
149
+ clearTimeout(refreshTokenTimeOut);
150
+ refreshTokenTimeOut = null;
151
+ }
152
+ const token = await getPlivoAccessToken();
153
+ await plivoLogin({ token, isRefresh: true });
154
+ setTimeout(() => refreshToken(), REFRESH_TOKEN_TIME);
155
+ refreshTokenCount = 0;
156
+ }
157
+ catch (e) {
158
+ console.log(e);
159
+ refreshTokenCount = refreshTokenCount + 1;
160
+ if (refreshTokenCount < 3) {
161
+ setTimeout(() => refreshToken(), 60 * 1000);
162
+ }
163
+ else {
164
+ showPageError('We’re having trouble connecting the call. Please try again in a moment');
165
+ }
166
+ console.log(e);
167
+ }
168
+ };
169
+ const handleInComingCall = (data) => {
170
+ limitTime.value = data?.limit_time ?? 0;
171
+ if (limitTime.value <= 0) {
172
+ handleTimeLimitError();
173
+ return;
174
+ }
175
+ emit('userCalling', userRemoter.value);
176
+ audioRef.value?.play();
177
+ open();
178
+ };
179
+ const open = () => {
180
+ drawerVisible.value = true;
181
+ disable.value = true;
182
+ drawerVisibleRef.value?.open();
183
+ };
184
+ const handleMute = async () => {
185
+ try {
186
+ plivoCallSwishMute(!isMute.value);
187
+ isMute.value = !isMute.value;
188
+ }
189
+ catch (e) {
190
+ alert(e);
191
+ }
192
+ };
193
+ const startCall = async (data) => {
194
+ try {
195
+ callStatus.value = PLIVO_CALL_STATUS.CONNECTING;
196
+ userRemoter.value = data;
197
+ open();
198
+ limitTime.value = await checkTimeLimit();
199
+ if (!limitTime.value || limitTime.value <= 0) {
200
+ handleTimeLimitError();
201
+ return;
202
+ }
203
+ callType = 'call';
204
+ await plivoCall(data.phone);
205
+ callStatus.value = PLIVO_CALL_STATUS.CALLING;
206
+ }
207
+ catch (e) {
208
+ endCall();
209
+ console.log(e);
210
+ errorMessage.value = e?.message || JSON.stringify(e);
211
+ callStatus.value = PLIVO_CALL_STATUS.CONNECT_FAILED;
212
+ }
213
+ };
214
+ const answer = async () => {
215
+ try {
216
+ await plivoCallAnswer();
217
+ }
218
+ catch (e) {
219
+ endCall();
220
+ callStatus.value = PLIVO_CALL_STATUS.CONNECT_FAILED;
221
+ errorMessage.value = e?.message || JSON.stringify(e);
222
+ }
223
+ };
224
+ const getUserOffer = async (phone) => {
225
+ let res = null;
226
+ try {
227
+ userRemoter.value = { phone, username: '' };
228
+ let data = {
229
+ phone: formatPhone10number(phone, '1'),
230
+ client_id: dataProfile.value?.tenant_id ?? ''
231
+ };
232
+ res = await getUserDetailChat(data);
233
+ }
234
+ catch (e) {
235
+ console.log(e);
236
+ }
237
+ const user = {
238
+ username: res?.full_name || '',
239
+ phone: res?.phone ? '1' + res?.phone : phone
240
+ };
241
+ userRemoter.value = user;
242
+ if (callStatus.value !== PLIVO_CALL_STATUS.CALL_END && callStatus.value !== PLIVO_CALL_STATUS.CHECK_USER_OFFER) {
243
+ emit('userCalling', userRemoter.value);
244
+ }
245
+ };
246
+ const handleTimeLimitError = () => {
247
+ errorMessage.value = 'Call time limit reached. This call has ended.';
248
+ endCall();
249
+ };
250
+ const exportRecordFile = async () => {
251
+ downloadRecord(record_link.value);
252
+ };
253
+ const handleAfterClose = () => {
254
+ checkTimeLimit();
255
+ record_link.value = '';
256
+ errorMessage.value = '';
257
+ uuidEnd = '';
258
+ };
259
+ let __VLS_exposed;
260
+ defineExpose({ startCall, endCall, userRemoter, callStatus, answer, label, closeModal });
261
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
262
+ const __VLS_defaults = {
263
+ responsive: 'window'
264
+ };
265
+ const __VLS_ctx = {
266
+ ...{},
267
+ ...{},
268
+ ...{},
269
+ ...{},
270
+ ...{},
271
+ };
272
+ let __VLS_elements;
273
+ let __VLS_components;
274
+ let __VLS_directives;
275
+ /** @type {__VLS_StyleScopedClasses['call-avatar']} */ ;
276
+ /** @type {__VLS_StyleScopedClasses['call-avatar']} */ ;
277
+ /** @type {__VLS_StyleScopedClasses['call-avatar']} */ ;
278
+ /** @type {__VLS_StyleScopedClasses['call-avatar']} */ ;
279
+ /** @type {[typeof DrawerBaseCustom, typeof DrawerBaseCustom, ]} */ ;
280
+ // @ts-ignore
281
+ const __VLS_0 = __VLS_asFunctionalComponent(DrawerBaseCustom, new DrawerBaseCustom({
282
+ ...{ 'onAfterClose': {} },
283
+ ref: "drawerVisibleRef",
284
+ width: (500),
285
+ disabledClose: (__VLS_ctx.disable),
286
+ responsive: (__VLS_ctx.responsive),
287
+ index: (1501),
288
+ absolute: true,
289
+ }));
290
+ const __VLS_1 = __VLS_0({
291
+ ...{ 'onAfterClose': {} },
292
+ ref: "drawerVisibleRef",
293
+ width: (500),
294
+ disabledClose: (__VLS_ctx.disable),
295
+ responsive: (__VLS_ctx.responsive),
296
+ index: (1501),
297
+ absolute: true,
298
+ }, ...__VLS_functionalComponentArgsRest(__VLS_0));
299
+ let __VLS_3;
300
+ let __VLS_4;
301
+ const __VLS_5 = ({ afterClose: {} },
302
+ { onAfterClose: (__VLS_ctx.handleAfterClose) });
303
+ /** @type {typeof __VLS_ctx.drawerVisibleRef} */ ;
304
+ var __VLS_6 = {};
305
+ const { default: __VLS_8 } = __VLS_2.slots;
306
+ // @ts-ignore
307
+ [disable, responsive, handleAfterClose, drawerVisibleRef,];
308
+ {
309
+ const { content: __VLS_9 } = __VLS_2.slots;
310
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
311
+ ...{ class: "flex flex-col items-center justify-center h-full relative bg-white" },
312
+ ...{ style: {} },
313
+ });
314
+ /** @type {[typeof TimeLeft, ]} */ ;
315
+ // @ts-ignore
316
+ const __VLS_10 = __VLS_asFunctionalComponent(TimeLeft, new TimeLeft({
317
+ time: (__VLS_ctx.limitTime),
318
+ }));
319
+ const __VLS_11 = __VLS_10({
320
+ time: (__VLS_ctx.limitTime),
321
+ }, ...__VLS_functionalComponentArgsRest(__VLS_10));
322
+ // @ts-ignore
323
+ [limitTime,];
324
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
325
+ ...{ class: "h-40 w-40 call-avatar mb-8" },
326
+ });
327
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
328
+ ...{ class: "h-40 w-40 rounded-full overflow-hidden mb-4 border-4 border-white flex-center" },
329
+ });
330
+ /** @type {[typeof Avatar, ]} */ ;
331
+ // @ts-ignore
332
+ const __VLS_14 = __VLS_asFunctionalComponent(Avatar, new Avatar({
333
+ ...{ class: "bg-white z-[2]" },
334
+ src: (__VLS_ctx.userRemoter?.avatar ?? ''),
335
+ id: (__VLS_ctx.userRemoter?.id ?? ''),
336
+ color: (__VLS_ctx.userRemoter?.color),
337
+ name: (__VLS_ctx.userRemoter?.username),
338
+ size: "xxl",
339
+ }));
340
+ const __VLS_15 = __VLS_14({
341
+ ...{ class: "bg-white z-[2]" },
342
+ src: (__VLS_ctx.userRemoter?.avatar ?? ''),
343
+ id: (__VLS_ctx.userRemoter?.id ?? ''),
344
+ color: (__VLS_ctx.userRemoter?.color),
345
+ name: (__VLS_ctx.userRemoter?.username),
346
+ size: "xxl",
347
+ }, ...__VLS_functionalComponentArgsRest(__VLS_14));
348
+ // @ts-ignore
349
+ [userRemoter, userRemoter, userRemoter, userRemoter,];
350
+ if (__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.RINGING || __VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALLING) {
351
+ // @ts-ignore
352
+ [callStatus, callStatus, PLIVO_CALL_STATUS, PLIVO_CALL_STATUS,];
353
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
354
+ ...{ class: "bubble bubble-1" },
355
+ });
356
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
357
+ ...{ class: "bubble bubble-2" },
358
+ });
359
+ __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
360
+ ...{ class: "bubble bubble-3" },
361
+ });
362
+ }
363
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
364
+ ...{ class: "text-center" },
365
+ });
366
+ __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
367
+ ...{ class: "text-2xl font-semibold" },
368
+ });
369
+ (__VLS_ctx.userRemoter?.username || __VLS_ctx.phoneNumberFormat(__VLS_ctx.userRemoter?.phone ?? ''));
370
+ // @ts-ignore
371
+ [userRemoter, userRemoter, phoneNumberFormat,];
372
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
373
+ ...{ class: "text-gray-400 mt-1" },
374
+ ...{ class: ({ 'text-2xl font-semibold': __VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_START }) },
375
+ });
376
+ // @ts-ignore
377
+ [callStatus, PLIVO_CALL_STATUS,];
378
+ (__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_START ? __VLS_ctx.duration : __VLS_ctx.STATUS_LABEL[__VLS_ctx.callStatus]);
379
+ // @ts-ignore
380
+ [callStatus, callStatus, PLIVO_CALL_STATUS, duration, STATUS_LABEL,];
381
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
382
+ ...{ class: "flex items-center justify-center gap-8 mt-10" },
383
+ });
384
+ if (__VLS_ctx.record_link && __VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_END) {
385
+ // @ts-ignore
386
+ [callStatus, PLIVO_CALL_STATUS, record_link,];
387
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
388
+ ...{ onClick: (__VLS_ctx.exportRecordFile) },
389
+ href: (__VLS_ctx.record_link),
390
+ download: "recording.mp3",
391
+ ...{ class: "w-16 h-16 bg-white hover:bg-green-600 text-white rounded-full flex items-center justify-center shadow-lg transition" },
392
+ });
393
+ // @ts-ignore
394
+ [record_link, exportRecordFile,];
395
+ /** @type {[typeof IconSoundDownload, ]} */ ;
396
+ // @ts-ignore
397
+ const __VLS_18 = __VLS_asFunctionalComponent(IconSoundDownload, new IconSoundDownload({}));
398
+ const __VLS_19 = __VLS_18({}, ...__VLS_functionalComponentArgsRest(__VLS_18));
399
+ }
400
+ if (__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_START) {
401
+ // @ts-ignore
402
+ [callStatus, PLIVO_CALL_STATUS,];
403
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
404
+ ...{ onClick: (...[$event]) => {
405
+ if (!(__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_START))
406
+ return;
407
+ __VLS_ctx.handleMute();
408
+ // @ts-ignore
409
+ [handleMute,];
410
+ } },
411
+ ...{ class: "w-16 h-16 shadow-lg bg-white text-black rounded-full flex items-center justify-center shadow-3xl transition" },
412
+ });
413
+ /** @type {[typeof IconMic, ]} */ ;
414
+ // @ts-ignore
415
+ const __VLS_22 = __VLS_asFunctionalComponent(IconMic, new IconMic({
416
+ mute: (__VLS_ctx.isMute),
417
+ }));
418
+ const __VLS_23 = __VLS_22({
419
+ mute: (__VLS_ctx.isMute),
420
+ }, ...__VLS_functionalComponentArgsRest(__VLS_22));
421
+ // @ts-ignore
422
+ [isMute,];
423
+ }
424
+ if (__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_END) {
425
+ // @ts-ignore
426
+ [callStatus, PLIVO_CALL_STATUS,];
427
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
428
+ ...{ onClick: (...[$event]) => {
429
+ if (!(__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.CALL_END))
430
+ return;
431
+ __VLS_ctx.endCall({ closeModal: true });
432
+ // @ts-ignore
433
+ [endCall,];
434
+ } },
435
+ ...{ class: "w-16 h-16 bg-white text-white rounded-full flex items-center justify-center shadow-3xl transition" },
436
+ });
437
+ /** @type {[typeof IconClose, ]} */ ;
438
+ // @ts-ignore
439
+ const __VLS_26 = __VLS_asFunctionalComponent(IconClose, new IconClose({}));
440
+ const __VLS_27 = __VLS_26({}, ...__VLS_functionalComponentArgsRest(__VLS_26));
441
+ }
442
+ if (__VLS_ctx.callStatus != __VLS_ctx.PLIVO_CALL_STATUS.CALL_END) {
443
+ // @ts-ignore
444
+ [callStatus, PLIVO_CALL_STATUS,];
445
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
446
+ ...{ onClick: (...[$event]) => {
447
+ if (!(__VLS_ctx.callStatus != __VLS_ctx.PLIVO_CALL_STATUS.CALL_END))
448
+ return;
449
+ __VLS_ctx.endCall();
450
+ // @ts-ignore
451
+ [endCall,];
452
+ } },
453
+ ...{ class: "shadow-3xl w-16 h-16 rounded-full bg-chat-error hover:bg-red-700 flex text-white items-center justify-center" },
454
+ });
455
+ /** @type {[typeof IconPhoneCancel, ]} */ ;
456
+ // @ts-ignore
457
+ const __VLS_30 = __VLS_asFunctionalComponent(IconPhoneCancel, new IconPhoneCancel({}));
458
+ const __VLS_31 = __VLS_30({}, ...__VLS_functionalComponentArgsRest(__VLS_30));
459
+ }
460
+ if (__VLS_ctx.callStatus == __VLS_ctx.PLIVO_CALL_STATUS.RINGING) {
461
+ // @ts-ignore
462
+ [callStatus, PLIVO_CALL_STATUS,];
463
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
464
+ ...{ onClick: (__VLS_ctx.answer) },
465
+ ...{ class: "shadow-3xl w-16 h-16 bg-chat-success hover:bg-green-600 rounded-full text-white flex items-center justify-center shadow-lg transition" },
466
+ });
467
+ // @ts-ignore
468
+ [answer,];
469
+ /** @type {[typeof IconPhone, ]} */ ;
470
+ // @ts-ignore
471
+ const __VLS_34 = __VLS_asFunctionalComponent(IconPhone, new IconPhone({}));
472
+ const __VLS_35 = __VLS_34({}, ...__VLS_functionalComponentArgsRest(__VLS_34));
473
+ }
474
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
475
+ ...{ class: "flex items-center justify-center gap-8 mt-10" },
476
+ });
477
+ }
478
+ var __VLS_2;
479
+ __VLS_asFunctionalElement(__VLS_elements.audio, __VLS_elements.audio)({
480
+ ref: "audioRef",
481
+ src: (__VLS_ctx.RingAudio),
482
+ loop: true,
483
+ preload: "auto",
484
+ });
485
+ /** @type {typeof __VLS_ctx.audioRef} */ ;
486
+ // @ts-ignore
487
+ [RingAudio, audioRef,];
488
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
489
+ /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
490
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
491
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
492
+ /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
493
+ /** @type {__VLS_StyleScopedClasses['relative']} */ ;
494
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
495
+ /** @type {__VLS_StyleScopedClasses['h-40']} */ ;
496
+ /** @type {__VLS_StyleScopedClasses['w-40']} */ ;
497
+ /** @type {__VLS_StyleScopedClasses['call-avatar']} */ ;
498
+ /** @type {__VLS_StyleScopedClasses['mb-8']} */ ;
499
+ /** @type {__VLS_StyleScopedClasses['h-40']} */ ;
500
+ /** @type {__VLS_StyleScopedClasses['w-40']} */ ;
501
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
502
+ /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
503
+ /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
504
+ /** @type {__VLS_StyleScopedClasses['border-4']} */ ;
505
+ /** @type {__VLS_StyleScopedClasses['border-white']} */ ;
506
+ /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
507
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
508
+ /** @type {__VLS_StyleScopedClasses['z-[2]']} */ ;
509
+ /** @type {__VLS_StyleScopedClasses['bubble']} */ ;
510
+ /** @type {__VLS_StyleScopedClasses['bubble-1']} */ ;
511
+ /** @type {__VLS_StyleScopedClasses['bubble']} */ ;
512
+ /** @type {__VLS_StyleScopedClasses['bubble-2']} */ ;
513
+ /** @type {__VLS_StyleScopedClasses['bubble']} */ ;
514
+ /** @type {__VLS_StyleScopedClasses['bubble-3']} */ ;
515
+ /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
516
+ /** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
517
+ /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
518
+ /** @type {__VLS_StyleScopedClasses['text-gray-400']} */ ;
519
+ /** @type {__VLS_StyleScopedClasses['mt-1']} */ ;
520
+ /** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
521
+ /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
522
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
523
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
524
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
525
+ /** @type {__VLS_StyleScopedClasses['gap-8']} */ ;
526
+ /** @type {__VLS_StyleScopedClasses['mt-10']} */ ;
527
+ /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
528
+ /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
529
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
530
+ /** @type {__VLS_StyleScopedClasses['hover:bg-green-600']} */ ;
531
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
532
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
533
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
534
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
535
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
536
+ /** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
537
+ /** @type {__VLS_StyleScopedClasses['transition']} */ ;
538
+ /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
539
+ /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
540
+ /** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
541
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
542
+ /** @type {__VLS_StyleScopedClasses['text-black']} */ ;
543
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
544
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
545
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
546
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
547
+ /** @type {__VLS_StyleScopedClasses['shadow-3xl']} */ ;
548
+ /** @type {__VLS_StyleScopedClasses['transition']} */ ;
549
+ /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
550
+ /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
551
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
552
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
553
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
554
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
555
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
556
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
557
+ /** @type {__VLS_StyleScopedClasses['shadow-3xl']} */ ;
558
+ /** @type {__VLS_StyleScopedClasses['transition']} */ ;
559
+ /** @type {__VLS_StyleScopedClasses['shadow-3xl']} */ ;
560
+ /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
561
+ /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
562
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
563
+ /** @type {__VLS_StyleScopedClasses['bg-chat-error']} */ ;
564
+ /** @type {__VLS_StyleScopedClasses['hover:bg-red-700']} */ ;
565
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
566
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
567
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
568
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
569
+ /** @type {__VLS_StyleScopedClasses['shadow-3xl']} */ ;
570
+ /** @type {__VLS_StyleScopedClasses['w-16']} */ ;
571
+ /** @type {__VLS_StyleScopedClasses['h-16']} */ ;
572
+ /** @type {__VLS_StyleScopedClasses['bg-chat-success']} */ ;
573
+ /** @type {__VLS_StyleScopedClasses['hover:bg-green-600']} */ ;
574
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
575
+ /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
576
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
577
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
578
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
579
+ /** @type {__VLS_StyleScopedClasses['shadow-lg']} */ ;
580
+ /** @type {__VLS_StyleScopedClasses['transition']} */ ;
581
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
582
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
583
+ /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
584
+ /** @type {__VLS_StyleScopedClasses['gap-8']} */ ;
585
+ /** @type {__VLS_StyleScopedClasses['mt-10']} */ ;
586
+ // @ts-ignore
587
+ var __VLS_7 = __VLS_6;
588
+ const __VLS_export = (await import('vue')).defineComponent({
589
+ setup: () => (__VLS_exposed),
590
+ __typeEmits: {},
591
+ __typeProps: {},
592
+ props: {},
593
+ });
594
+ export default {};
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ time: number;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,59 @@
1
+ /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
+ import { computed } from 'vue';
3
+ import IconClock from '../../../assets/icons/call/IconClock.vue';
4
+ const props = withDefaults(defineProps(), {});
5
+ const emit = defineEmits();
6
+ const limitTimeLabel = computed(() => {
7
+ const m2 = Math.floor(props.time / 60);
8
+ const s2 = props.time % 60;
9
+ return `${m2.toString().padStart(2, '0')}:${s2.toString().padStart(2, '0')}`;
10
+ });
11
+ debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
12
+ const __VLS_defaults = {};
13
+ const __VLS_ctx = {
14
+ ...{},
15
+ ...{},
16
+ ...{},
17
+ ...{},
18
+ ...{},
19
+ };
20
+ let __VLS_elements;
21
+ let __VLS_components;
22
+ let __VLS_directives;
23
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
24
+ ...{ class: "text-sm rounded-lg px-3 py-1.5 border border-chat-primary border-[2px] bg-[#eff6ff] absolute top-6 left-6 text-chat-primary flex items-center gap-1" },
25
+ });
26
+ /** @type {[typeof IconClock, ]} */ ;
27
+ // @ts-ignore
28
+ const __VLS_0 = __VLS_asFunctionalComponent(IconClock, new IconClock({
29
+ ...{ class: "w-4 h-4" },
30
+ }));
31
+ const __VLS_1 = __VLS_0({
32
+ ...{ class: "w-4 h-4" },
33
+ }, ...__VLS_functionalComponentArgsRest(__VLS_0));
34
+ (__VLS_ctx.limitTimeLabel);
35
+ // @ts-ignore
36
+ [limitTimeLabel,];
37
+ /** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
38
+ /** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
39
+ /** @type {__VLS_StyleScopedClasses['px-3']} */ ;
40
+ /** @type {__VLS_StyleScopedClasses['py-1.5']} */ ;
41
+ /** @type {__VLS_StyleScopedClasses['border']} */ ;
42
+ /** @type {__VLS_StyleScopedClasses['border-chat-primary']} */ ;
43
+ /** @type {__VLS_StyleScopedClasses['border-[2px]']} */ ;
44
+ /** @type {__VLS_StyleScopedClasses['bg-[#eff6ff]']} */ ;
45
+ /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
46
+ /** @type {__VLS_StyleScopedClasses['top-6']} */ ;
47
+ /** @type {__VLS_StyleScopedClasses['left-6']} */ ;
48
+ /** @type {__VLS_StyleScopedClasses['text-chat-primary']} */ ;
49
+ /** @type {__VLS_StyleScopedClasses['flex']} */ ;
50
+ /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
51
+ /** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
52
+ /** @type {__VLS_StyleScopedClasses['w-4']} */ ;
53
+ /** @type {__VLS_StyleScopedClasses['h-4']} */ ;
54
+ const __VLS_export = (await import('vue')).defineComponent({
55
+ __typeEmits: {},
56
+ __typeProps: {},
57
+ props: {},
58
+ });
59
+ export default {};
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {}, __VLS_3: {};
2
+ type __VLS_Slots = {} & {
3
+ header?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ content?: (props: typeof __VLS_3) => any;
6
+ };
7
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, __VLS_Slots>;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };