@phonghq/go-chat 1.0.70 → 1.0.72

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 (388) hide show
  1. package/dist/go-chat.es.js +11166 -11151
  2. package/dist/go-chat.umd.js +21 -21
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/dist/assets/icons/call/IconClock.vue.d.ts +0 -2
  6. package/dist/assets/icons/call/IconClock.vue.js +0 -22
  7. package/dist/assets/icons/call/IconClose.vue.d.ts +0 -2
  8. package/dist/assets/icons/call/IconClose.vue.js +0 -26
  9. package/dist/assets/icons/call/IconMic.vue.d.ts +0 -14
  10. package/dist/assets/icons/call/IconMic.vue.js +0 -123
  11. package/dist/assets/icons/call/IconPhone.vue.d.ts +0 -2
  12. package/dist/assets/icons/call/IconPhone.vue.js +0 -22
  13. package/dist/assets/icons/call/IconPhoneBase.vue.d.ts +0 -2
  14. package/dist/assets/icons/call/IconPhoneBase.vue.js +0 -20
  15. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +0 -14
  16. package/dist/assets/icons/call/IconPhoneCancel.vue.js +0 -46
  17. package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +0 -2
  18. package/dist/assets/icons/call/IconSoundDownload.vue.js +0 -50
  19. package/dist/assets/icons/call/IconSpeaker.vue.d.ts +0 -14
  20. package/dist/assets/icons/call/IconSpeaker.vue.js +0 -62
  21. package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +0 -2
  22. package/dist/assets/icons/customer-appointment/IconFilter.vue.js +0 -53
  23. package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +0 -2
  24. package/dist/assets/icons/customer-detail/IconArrow.vue.js +0 -22
  25. package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +0 -2
  26. package/dist/assets/icons/customer-detail/IconCheck.vue.js +0 -27
  27. package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +0 -2
  28. package/dist/assets/icons/customer-detail/IconDate.vue.js +0 -43
  29. package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +0 -2
  30. package/dist/assets/icons/customer-detail/IconGroup.vue.js +0 -48
  31. package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +0 -2
  32. package/dist/assets/icons/customer-detail/IconMessage.vue.js +0 -28
  33. package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +0 -2
  34. package/dist/assets/icons/customer-detail/IconNote.vue.js +0 -29
  35. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +0 -14
  36. package/dist/assets/icons/customer-detail/IconPhone.vue.js +0 -41
  37. package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +0 -2
  38. package/dist/assets/icons/customer-detail/IconPin.vue.js +0 -29
  39. package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +0 -2
  40. package/dist/assets/icons/customer-detail/IconSearch.vue.js +0 -29
  41. package/dist/assets/icons/global/IconAiCheck.vue.d.ts +0 -2
  42. package/dist/assets/icons/global/IconAiCheck.vue.js +0 -28
  43. package/dist/assets/icons/global/IconArrowLeft.vue.d.ts +0 -2
  44. package/dist/assets/icons/global/IconArrowLeft.vue.js +0 -29
  45. package/dist/assets/icons/global/IconBackspace.vue.d.ts +0 -2
  46. package/dist/assets/icons/global/IconBackspace.vue.js +0 -28
  47. package/dist/assets/icons/global/IconCloseCircle.vue.d.ts +0 -2
  48. package/dist/assets/icons/global/IconCloseCircle.vue.js +0 -36
  49. package/dist/assets/icons/global/IconPhone.vue.d.ts +0 -2
  50. package/dist/assets/icons/global/IconPhone.vue.js +0 -19
  51. package/dist/assets/icons/global/IconPlan.vue.d.ts +0 -14
  52. package/dist/assets/icons/global/IconPlan.vue.js +0 -39
  53. package/dist/assets/icons/global/IconPlus.vue.d.ts +0 -2
  54. package/dist/assets/icons/global/IconPlus.vue.js +0 -22
  55. package/dist/assets/icons/global/IconSearch.vue.d.ts +0 -32
  56. package/dist/assets/icons/global/IconSearch.vue.js +0 -68
  57. package/dist/assets/icons/global/IconSms.vue.d.ts +0 -2
  58. package/dist/assets/icons/global/IconSms.vue.js +0 -22
  59. package/dist/assets/icons/global/IconUser.vue.d.ts +0 -2
  60. package/dist/assets/icons/global/IconUser.vue.js +0 -25
  61. package/dist/chat/App.vue.d.ts +0 -22
  62. package/dist/chat/App.vue.js +0 -1022
  63. package/dist/chat/main.d.ts +0 -7
  64. package/dist/chat/main.js +0 -7
  65. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +0 -2
  66. package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +0 -207
  67. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +0 -12
  68. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.js +0 -80
  69. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +0 -2
  70. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.js +0 -138
  71. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +0 -7
  72. package/dist/chat/page/customer-detail/CustomerDetail.vue.js +0 -233
  73. package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +0 -16
  74. package/dist/chat/page/customer-detail/SubInformation.vue.js +0 -102
  75. package/dist/chat/page/error/Error.vue.d.ts +0 -2
  76. package/dist/chat/page/error/Error.vue.js +0 -64
  77. package/dist/chat/page/home/ChatList.vue.d.ts +0 -98
  78. package/dist/chat/page/home/ChatList.vue.js +0 -621
  79. package/dist/chat/page/home/ChatMessage.vue.d.ts +0 -21
  80. package/dist/chat/page/home/ChatMessage.vue.js +0 -200
  81. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +0 -19
  82. package/dist/chat/page/home/ChatMessageItem.vue.js +0 -358
  83. package/dist/chat/page/home/ChatMessageItem2.vue.d.ts +0 -19
  84. package/dist/chat/page/home/ChatMessageItem2.vue.js +0 -351
  85. package/dist/chat/page/home/DropZone.vue.d.ts +0 -13
  86. package/dist/chat/page/home/DropZone.vue.js +0 -130
  87. package/dist/chat/page/home/Home.vue.d.ts +0 -25
  88. package/dist/chat/page/home/Home.vue.js +0 -430
  89. package/dist/chat/page/home/HomeHeader.vue.d.ts +0 -14
  90. package/dist/chat/page/home/HomeHeader.vue.js +0 -248
  91. package/dist/chat/page/home/InputChat.vue.d.ts +0 -27
  92. package/dist/chat/page/home/InputChat.vue.js +0 -412
  93. package/dist/chat/page/home/NewCustomer.vue.d.ts +0 -7
  94. package/dist/chat/page/home/NewCustomer.vue.js +0 -81
  95. package/dist/chat/page/home/PhoneNumpad.vue.d.ts +0 -18
  96. package/dist/chat/page/home/PhoneNumpad.vue.js +0 -143
  97. package/dist/chat/page/setting/Setting.vue.d.ts +0 -2
  98. package/dist/chat/page/setting/Setting.vue.js +0 -277
  99. package/dist/chat/page/setting/SettingSuccess.vue.d.ts +0 -2
  100. package/dist/chat/page/setting/SettingSuccess.vue.js +0 -33
  101. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +0 -24
  102. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +0 -207
  103. package/dist/components/chat/call/Calling.vue.d.ts +0 -17
  104. package/dist/components/chat/call/Calling.vue.js +0 -600
  105. package/dist/components/chat/call/TimeLeft.vue.d.ts +0 -5
  106. package/dist/components/chat/call/TimeLeft.vue.js +0 -59
  107. package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +0 -13
  108. package/dist/components/chat/card/CardCustomerDetail.vue.js +0 -28
  109. package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +0 -20
  110. package/dist/components/chat/common/collapse/CollapseBase.vue.js +0 -59
  111. package/dist/components/chat/common/input/InputSearch.vue.d.ts +0 -16
  112. package/dist/components/chat/common/input/InputSearch.vue.js +0 -71
  113. package/dist/components/chat/common/modal/Modal.vue.d.ts +0 -94
  114. package/dist/components/chat/common/modal/Modal.vue.js +0 -260
  115. package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +0 -35
  116. package/dist/components/chat/common/popover/PopoverBase.vue.js +0 -148
  117. package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +0 -10
  118. package/dist/components/chat/common/spin/BaseSpin.vue.js +0 -43
  119. package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +0 -17
  120. package/dist/components/chat/common/switch/SwitchBase.vue.js +0 -76
  121. package/dist/components/chat/common/tab/TabBase.vue.d.ts +0 -30
  122. package/dist/components/chat/common/tab/TabBase.vue.js +0 -86
  123. package/dist/components/chat/common/tabs/TabBase.vue.d.ts +0 -18
  124. package/dist/components/chat/common/tabs/TabBase.vue.js +0 -93
  125. package/dist/components/chat/customer/Avatar.vue.d.ts +0 -12
  126. package/dist/components/chat/customer/Avatar.vue.js +0 -127
  127. package/dist/components/chat/layout/mobile/Footer.vue.d.ts +0 -2
  128. package/dist/components/chat/layout/mobile/Footer.vue.js +0 -114
  129. package/dist/components/chat/select/SelectBase.vue.d.ts +0 -24
  130. package/dist/components/chat/select/SelectBase.vue.js +0 -105
  131. package/dist/components/common/CustomLoading.vue.d.ts +0 -2
  132. package/dist/components/common/CustomLoading.vue.js +0 -19
  133. package/dist/components/common/Notification/NotificationDescription.vue.d.ts +0 -7
  134. package/dist/components/common/Notification/NotificationDescription.vue.js +0 -38
  135. package/dist/components/common/button/ButtonBase.vue.d.ts +0 -22
  136. package/dist/components/common/button/ButtonBase.vue.js +0 -78
  137. package/dist/components/common/button/ButtonToggle.vue.d.ts +0 -20
  138. package/dist/components/common/button/ButtonToggle.vue.js +0 -70
  139. package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +0 -16
  140. package/dist/components/common/checkbox/CCheckboxNumber.vue.js +0 -48
  141. package/dist/components/common/collapse/BaseCollapse.vue.d.ts +0 -12
  142. package/dist/components/common/collapse/BaseCollapse.vue.js +0 -36
  143. package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +0 -4
  144. package/dist/components/common/collapse/BaseCollapseItem.vue.js +0 -22
  145. package/dist/components/common/drawer/DrawerBase.vue.d.ts +0 -39
  146. package/dist/components/common/drawer/DrawerBase.vue.js +0 -126
  147. package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +0 -33
  148. package/dist/components/common/drawer/DrawerBaseCustom.vue.js +0 -135
  149. package/dist/components/common/dropdown/DropdownBase.vue.d.ts +0 -21
  150. package/dist/components/common/dropdown/DropdownBase.vue.js +0 -91
  151. package/dist/components/common/input/CInputSearch.vue.d.ts +0 -14
  152. package/dist/components/common/input/CInputSearch.vue.js +0 -62
  153. package/dist/components/common/modal/ModalBase.vue.d.ts +0 -35
  154. package/dist/components/common/modal/ModalBase.vue.js +0 -187
  155. package/dist/components/common/popover/PopoverBase.vue.d.ts +0 -3
  156. package/dist/components/common/popover/PopoverBase.vue.js +0 -36
  157. package/dist/components/common/select/SelectBase.vue.d.ts +0 -28
  158. package/dist/components/common/select/SelectBase.vue.js +0 -102
  159. package/dist/components/common/slider/BaseSlider.vue.d.ts +0 -11
  160. package/dist/components/common/slider/BaseSlider.vue.js +0 -70
  161. package/dist/components/common/spin/CSpin.vue.d.ts +0 -9
  162. package/dist/components/common/spin/CSpin.vue.js +0 -41
  163. package/dist/components/common/tooltip/TooltipBase.vue.d.ts +0 -2
  164. package/dist/components/common/tooltip/TooltipBase.vue.js +0 -8
  165. package/dist/components/layout/PageError.vue.d.ts +0 -2
  166. package/dist/components/layout/PageError.vue.js +0 -91
  167. package/dist/components/ui/button/CButton.vue.d.ts +0 -19
  168. package/dist/components/ui/button/CButton.vue.js +0 -49
  169. package/dist/components/ui/button/c-button.d.ts +0 -7
  170. package/dist/components/ui/button/c-button.js +0 -26
  171. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -18
  172. package/dist/components/ui/checkbox/Checkbox.vue.js +0 -79
  173. package/dist/components/ui/checkbox/index.d.ts +0 -1
  174. package/dist/components/ui/checkbox/index.js +0 -1
  175. package/dist/components/ui/collapsible/Collapsible.vue.d.ts +0 -16
  176. package/dist/components/ui/collapsible/Collapsible.vue.js +0 -47
  177. package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -10
  178. package/dist/components/ui/collapsible/CollapsibleContent.vue.js +0 -41
  179. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -10
  180. package/dist/components/ui/collapsible/CollapsibleTrigger.vue.js +0 -35
  181. package/dist/components/ui/collapsible/index.d.ts +0 -3
  182. package/dist/components/ui/collapsible/index.js +0 -3
  183. package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -14
  184. package/dist/components/ui/dialog/Dialog.vue.js +0 -42
  185. package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -10
  186. package/dist/components/ui/dialog/DialogClose.vue.js +0 -35
  187. package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -29
  188. package/dist/components/ui/dialog/DialogContent.vue.js +0 -84
  189. package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -14
  190. package/dist/components/ui/dialog/DialogDescription.vue.js +0 -43
  191. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -13
  192. package/dist/components/ui/dialog/DialogFooter.vue.js +0 -26
  193. package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -13
  194. package/dist/components/ui/dialog/DialogHeader.vue.js +0 -26
  195. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -30
  196. package/dist/components/ui/dialog/DialogScrollContent.vue.js +0 -99
  197. package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -14
  198. package/dist/components/ui/dialog/DialogTitle.vue.js +0 -43
  199. package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -10
  200. package/dist/components/ui/dialog/DialogTrigger.vue.js +0 -35
  201. package/dist/components/ui/dialog/index.d.ts +0 -9
  202. package/dist/components/ui/dialog/index.js +0 -9
  203. package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -26
  204. package/dist/components/ui/drawer/Drawer.vue.js +0 -48
  205. package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -33
  206. package/dist/components/ui/drawer/DrawerContent.vue.js +0 -81
  207. package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -14
  208. package/dist/components/ui/drawer/DrawerDescription.vue.js +0 -42
  209. package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -13
  210. package/dist/components/ui/drawer/DrawerFooter.vue.js +0 -26
  211. package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -13
  212. package/dist/components/ui/drawer/DrawerHeader.vue.js +0 -26
  213. package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -7
  214. package/dist/components/ui/drawer/DrawerOverlay.vue.js +0 -37
  215. package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -14
  216. package/dist/components/ui/drawer/DrawerTitle.vue.js +0 -42
  217. package/dist/components/ui/drawer/index.d.ts +0 -8
  218. package/dist/components/ui/drawer/index.js +0 -8
  219. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -14
  220. package/dist/components/ui/dropdown-menu/DropdownMenu.vue.js +0 -41
  221. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -20
  222. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -79
  223. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -28
  224. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -61
  225. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -10
  226. package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -35
  227. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -15
  228. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -43
  229. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -15
  230. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -43
  231. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -14
  232. package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -41
  233. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -18
  234. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -80
  235. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
  236. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -37
  237. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
  238. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -26
  239. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -14
  240. package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -41
  241. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -30
  242. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -46
  243. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -14
  244. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -58
  245. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -10
  246. package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -41
  247. package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
  248. package/dist/components/ui/dropdown-menu/index.js +0 -15
  249. package/dist/components/ui/popover/Popover.vue.d.ts +0 -14
  250. package/dist/components/ui/popover/Popover.vue.js +0 -41
  251. package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -28
  252. package/dist/components/ui/popover/PopoverContent.vue.js +0 -60
  253. package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -10
  254. package/dist/components/ui/popover/PopoverTrigger.vue.js +0 -35
  255. package/dist/components/ui/popover/index.d.ts +0 -3
  256. package/dist/components/ui/popover/index.js +0 -3
  257. package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +0 -18
  258. package/dist/components/ui/radio-group/RadioGroup.vue.js +0 -46
  259. package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +0 -7
  260. package/dist/components/ui/radio-group/RadioGroupItem.vue.js +0 -71
  261. package/dist/components/ui/radio-group/index.d.ts +0 -2
  262. package/dist/components/ui/radio-group/index.js +0 -2
  263. package/dist/components/ui/select/Select.vue.d.ts +0 -20
  264. package/dist/components/ui/select/Select.vue.js +0 -49
  265. package/dist/components/ui/select/SelectContent.vue.d.ts +0 -24
  266. package/dist/components/ui/select/SelectContent.vue.js +0 -98
  267. package/dist/components/ui/select/SelectGroup.vue.d.ts +0 -10
  268. package/dist/components/ui/select/SelectGroup.vue.js +0 -37
  269. package/dist/components/ui/select/SelectItem.vue.d.ts +0 -18
  270. package/dist/components/ui/select/SelectItem.vue.js +0 -73
  271. package/dist/components/ui/select/SelectItemText.vue.d.ts +0 -10
  272. package/dist/components/ui/select/SelectItemText.vue.js +0 -37
  273. package/dist/components/ui/select/SelectLabel.vue.d.ts +0 -14
  274. package/dist/components/ui/select/SelectLabel.vue.js +0 -40
  275. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +0 -14
  276. package/dist/components/ui/select/SelectScrollDownButton.vue.js +0 -58
  277. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +0 -14
  278. package/dist/components/ui/select/SelectScrollUpButton.vue.js +0 -58
  279. package/dist/components/ui/select/SelectSeparator.vue.d.ts +0 -7
  280. package/dist/components/ui/select/SelectSeparator.vue.js +0 -39
  281. package/dist/components/ui/select/SelectTrigger.vue.d.ts +0 -17
  282. package/dist/components/ui/select/SelectTrigger.vue.js +0 -49
  283. package/dist/components/ui/select/SelectValue.vue.d.ts +0 -10
  284. package/dist/components/ui/select/SelectValue.vue.js +0 -37
  285. package/dist/components/ui/select/index.d.ts +0 -11
  286. package/dist/components/ui/select/index.js +0 -11
  287. package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
  288. package/dist/components/ui/slider/Slider.vue.js +0 -155
  289. package/dist/components/ui/slider/index.d.ts +0 -1
  290. package/dist/components/ui/slider/index.js +0 -1
  291. package/dist/components/ui/switch/Switch.vue.d.ts +0 -18
  292. package/dist/components/ui/switch/Switch.vue.js +0 -61
  293. package/dist/components/ui/switch/index.d.ts +0 -1
  294. package/dist/components/ui/switch/index.js +0 -1
  295. package/dist/components/ui/tabs/Tabs.vue.d.ts +0 -20
  296. package/dist/components/ui/tabs/Tabs.vue.js +0 -54
  297. package/dist/components/ui/tabs/TabsContent.vue.d.ts +0 -14
  298. package/dist/components/ui/tabs/TabsContent.vue.js +0 -44
  299. package/dist/components/ui/tabs/TabsList.vue.d.ts +0 -14
  300. package/dist/components/ui/tabs/TabsList.vue.js +0 -44
  301. package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +0 -14
  302. package/dist/components/ui/tabs/TabsTrigger.vue.js +0 -45
  303. package/dist/components/ui/tabs/index.d.ts +0 -4
  304. package/dist/components/ui/tabs/index.js +0 -4
  305. package/dist/composable/useDigibot.d.ts +0 -7
  306. package/dist/composable/useDigibot.js +0 -23
  307. package/dist/composable/useInitData.d.ts +0 -12
  308. package/dist/composable/useInitData.js +0 -99
  309. package/dist/composable/useListConversations.d.ts +0 -55
  310. package/dist/composable/useListConversations.js +0 -209
  311. package/dist/composable/useListentEvent.d.ts +0 -5
  312. package/dist/composable/useListentEvent.js +0 -51
  313. package/dist/composable/usePlivo.d.ts +0 -17
  314. package/dist/composable/usePlivo.js +0 -207
  315. package/dist/constant/color.d.ts +0 -22
  316. package/dist/constant/color.js +0 -47
  317. package/dist/constant/datetime.d.ts +0 -6
  318. package/dist/constant/datetime.js +0 -6
  319. package/dist/constant/general.d.ts +0 -11
  320. package/dist/constant/general.js +0 -12
  321. package/dist/constant/message.d.ts +0 -8
  322. package/dist/constant/message.js +0 -8
  323. package/dist/constant/mqtt.d.ts +0 -7
  324. package/dist/constant/mqtt.js +0 -18
  325. package/dist/constant/user.d.ts +0 -8
  326. package/dist/constant/user.js +0 -9
  327. package/dist/lib/utils.d.ts +0 -2
  328. package/dist/lib/utils.js +0 -5
  329. package/dist/plugins/axios-gci.d.ts +0 -3
  330. package/dist/plugins/axios-gci.js +0 -25
  331. package/dist/plugins/axios.d.ts +0 -3
  332. package/dist/plugins/axios.js +0 -84
  333. package/dist/plugins/mqtt.d.ts +0 -8
  334. package/dist/plugins/mqtt.js +0 -189
  335. package/dist/plugins/pocketbase.d.ts +0 -5
  336. package/dist/plugins/pocketbase.js +0 -15
  337. package/dist/plugins/sdk.d.ts +0 -18
  338. package/dist/plugins/sdk.js +0 -73
  339. package/dist/plugins/websocket.d.ts +0 -15
  340. package/dist/plugins/websocket.js +0 -151
  341. package/dist/types/chat/auth.d.ts +0 -41
  342. package/dist/types/chat/auth.js +0 -1
  343. package/dist/types/chat/call.d.ts +0 -19
  344. package/dist/types/chat/call.js +0 -23
  345. package/dist/types/chat/global.d.ts +0 -32
  346. package/dist/types/chat/global.js +0 -1
  347. package/dist/types/chat/promise.d.ts +0 -17
  348. package/dist/types/chat/promise.js +0 -1
  349. package/dist/types/chat/user.d.ts +0 -88
  350. package/dist/types/chat/user.js +0 -1
  351. package/dist/types/conversation.d.ts +0 -23
  352. package/dist/types/conversation.js +0 -1
  353. package/dist/types/global.d.ts +0 -11
  354. package/dist/types/global.js +0 -15
  355. package/dist/types/message.d.ts +0 -52
  356. package/dist/types/message.js +0 -1
  357. package/dist/utils/chat/cache.d.ts +0 -7
  358. package/dist/utils/chat/cache.js +0 -63
  359. package/dist/utils/chat/chat-router.d.ts +0 -3
  360. package/dist/utils/chat/chat-router.js +0 -8
  361. package/dist/utils/chat/page-error.d.ts +0 -4
  362. package/dist/utils/chat/page-error.js +0 -25
  363. package/dist/utils/chat/phone-string.d.ts +0 -1
  364. package/dist/utils/chat/phone-string.js +0 -4
  365. package/dist/utils/chat/store/auth.d.ts +0 -62
  366. package/dist/utils/chat/store/auth.js +0 -93
  367. package/dist/utils/chat/store/call.d.ts +0 -15
  368. package/dist/utils/chat/store/call.js +0 -160
  369. package/dist/utils/chat/store/conversation.d.ts +0 -13
  370. package/dist/utils/chat/store/conversation.js +0 -69
  371. package/dist/utils/chat/store/message.d.ts +0 -31
  372. package/dist/utils/chat/store/message.js +0 -74
  373. package/dist/utils/chat/store/user.d.ts +0 -200
  374. package/dist/utils/chat/store/user.js +0 -43
  375. package/dist/utils/debounce.d.ts +0 -1
  376. package/dist/utils/debounce.js +0 -9
  377. package/dist/utils/json.d.ts +0 -2
  378. package/dist/utils/json.js +0 -18
  379. package/dist/utils/logger.d.ts +0 -3
  380. package/dist/utils/logger.js +0 -5
  381. package/dist/utils/string-helper.d.ts +0 -2
  382. package/dist/utils/string-helper.js +0 -40
  383. package/dist/views/NotTenantPhone.vue.d.ts +0 -9
  384. package/dist/views/NotTenantPhone.vue.js +0 -99
  385. package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +0 -18
  386. package/dist/views/home/phone-numpad/ConvercationList.vue.js +0 -174
  387. package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +0 -28
  388. package/dist/views/home/phone-numpad/PhoneNumpad.vue.js +0 -377
@@ -1,51 +0,0 @@
1
- import { onMounted, onUnmounted, ref } from 'vue';
2
- import { currentPage } from '../utils/chat/chat-router';
3
- import { PAGE } from '../constant/general';
4
- import { useDebounce } from '../utils/debounce';
5
- // import router from '../router'
6
- //PINIA
7
- export const responsiveObserver = ref('tablet');
8
- export function useListenEvent(callBackResizeChange) {
9
- onMounted(() => {
10
- window.addEventListener('resize', getResponsiveObserverDebounce);
11
- });
12
- onUnmounted(() => {
13
- window.removeEventListener('resize', getResponsiveObserverDebounce);
14
- });
15
- const getResponsiveObserver = (is_init) => {
16
- const appChatRef = document.getElementById('appChatMain');
17
- if (!appChatRef)
18
- return;
19
- const width = appChatRef?.offsetWidth ?? 0;
20
- if (width >= 1281) {
21
- if (responsiveObserver.value != 'window') {
22
- if (!is_init)
23
- callBackResizeChange?.();
24
- responsiveObserver.value = 'window';
25
- }
26
- }
27
- else if (width >= 640) {
28
- if (responsiveObserver.value != 'tablet') {
29
- if (!is_init)
30
- callBackResizeChange?.();
31
- responsiveObserver.value = 'tablet';
32
- }
33
- }
34
- else {
35
- if (responsiveObserver.value != 'mobile') {
36
- if (!is_init)
37
- callBackResizeChange?.();
38
- if (currentPage.value == PAGE.HOME) {
39
- currentPage.value = PAGE.CHAT_LIST;
40
- }
41
- responsiveObserver.value = 'mobile';
42
- }
43
- }
44
- };
45
- const getResponsiveObserverDebounce = useDebounce(() => {
46
- getResponsiveObserver();
47
- }, 50);
48
- return {
49
- getResponsiveObserver
50
- };
51
- }
@@ -1,17 +0,0 @@
1
- import { type PlivoCallStatusType } from '../types/chat/call';
2
- export declare function usePlivo(callback: (status: PlivoCallStatusType, data?: any) => void): {
3
- plivoLogin: (data: {
4
- token: string;
5
- isRefresh?: boolean;
6
- }) => Promise<void>;
7
- plivoCallAnswer: () => Promise<void>;
8
- plivoCallReject: () => void;
9
- plivoCall: (phone: string) => Promise<void>;
10
- plivoEndCall: (status: PlivoCallStatusType) => void;
11
- plivoCallSwishMute: (isMute: boolean) => void;
12
- plivoCallSwishSpeaker: (id: any) => void;
13
- plivoRemoveCallBack: () => void;
14
- checkTimeLimit: () => Promise<number>;
15
- isPlivoOn: import("vue").Ref<boolean, boolean>;
16
- isPlivoOn2: boolean;
17
- };
@@ -1,207 +0,0 @@
1
- import { PLIVO_CALL_STATUS } from '../types/chat/call';
2
- import { createSipAccount } from '../utils/chat/store/call';
3
- import { dataProfile } from '../utils/chat/store/auth';
4
- import { getPhoneTimeLimit } from '../utils/chat/store/message';
5
- import { ref } from 'vue';
6
- export function usePlivo(callback) {
7
- var options = {
8
- debug: 'ALL',
9
- deviceParams: {
10
- micEnabled: true,
11
- audioConstraints: { audio: true, video: false }
12
- }
13
- };
14
- var plivoBrowserSdk = null;
15
- var plivoBrowserSdk2 = null;
16
- let CallUuid = '';
17
- let custom_resolve = null;
18
- let custom_reject = null;
19
- const isPlivoOn = ref(false);
20
- let isPlivoOn2 = false;
21
- const plivoLogin = async (data) => {
22
- try {
23
- if (!plivoBrowserSdk) {
24
- plivoBrowserSdk = new window.Plivo(options);
25
- plivoBrowserSdk?.client?.on?.('onCallAnswered', handleCallAnswered);
26
- plivoBrowserSdk?.client?.on?.('onCallTerminated', handleCallTerminated);
27
- plivoBrowserSdk.client?.on?.('onCallFailed', handleCallFailed);
28
- plivoBrowserSdk.client?.on?.('onIncomingCallCanceled', handleIncomingCallCanceled);
29
- // plivoBrowserSdk.client.on('onCalling', (data: any) => console.log('onCallFailed', data))
30
- plivoBrowserSdk?.client?.on?.('onIncomingCall', handleIncomingCall);
31
- plivoBrowserSdk.client?.on?.('onCallRemoteRinging', handleCallRemoteRinging);
32
- plivoBrowserSdk.client?.on?.('onMediaPermission', handleMediaPermission);
33
- plivoBrowserSdk?.client?.on?.('onLoginFailed', handleLoginFailed);
34
- }
35
- if (!data.isRefresh) {
36
- const payload = JSON.parse(atob(data.token.split('.')[1]));
37
- await createSipAccount({
38
- sip_username: `${payload.sub}_${payload.iss}`,
39
- did_number: dataProfile.value?.phone ?? ''
40
- });
41
- }
42
- // await plivoBrowserSdk?.client?.tokenLogin(payload.sub ?? '', token)
43
- // await plivoBrowserSdk?.client?.login('webcall003079673454891827', '123456abcA!')
44
- // await plivoBrowserSdk?.client?.login(payload.sub , null, token)
45
- await plivoBrowserSdk?.client?.loginWithAccessToken(data.token);
46
- plivoBrowserSdk?.client?.setRingTone(false);
47
- isPlivoOn.value = true;
48
- isPlivoOn2 = true;
49
- // await plivoBrowserSdk?.client?.on?.(payload)
50
- // console.log('Registered with token')
51
- console.log(plivoBrowserSdk);
52
- }
53
- catch (err) {
54
- console.log('Login error: ' + err);
55
- }
56
- };
57
- const handleLoginFailed = (e) => {
58
- console.log('Login failed', e);
59
- };
60
- const handleIncomingCall = async (callerID, extraHeaders, call) => {
61
- try {
62
- const data = {
63
- phone: _getPhone(call.src)
64
- };
65
- callback(PLIVO_CALL_STATUS.CHECK_USER_OFFER, data);
66
- const limit_time = await checkTimeLimit();
67
- plivoBrowserSdk?.client?.setRingTone(true);
68
- callback(PLIVO_CALL_STATUS.RINGING, { ...data, limit_time });
69
- CallUuid = call?.callUUID;
70
- }
71
- catch (error) {
72
- callback(PLIVO_CALL_STATUS.CALL_END);
73
- }
74
- };
75
- const handleCallRemoteRinging = (callInfo) => {
76
- CallUuid = callInfo.callUUID;
77
- callback(PLIVO_CALL_STATUS.CALLING);
78
- custom_resolve?.();
79
- };
80
- const handleCallAnswered = (call) => {
81
- if (call.callUUID == CallUuid) {
82
- custom_resolve?.();
83
- callback(PLIVO_CALL_STATUS.CALL_START);
84
- }
85
- };
86
- const handleCallTerminated = (data, callInfo) => {
87
- if (CallUuid === callInfo.callUUID) {
88
- callback(PLIVO_CALL_STATUS.CALL_END, { message: data?.reason });
89
- CallUuid = '';
90
- }
91
- };
92
- const _getPhone = (text, dial = '1') => {
93
- let result = text.replace(/[^0-9]/g, '');
94
- return result?.startsWith(dial) ? result.slice(dial.toString().length) : result;
95
- };
96
- const _waitEventOrTimeout = (timeoutMs = 3000) => {
97
- return new Promise((resolve, reject) => {
98
- custom_resolve = null;
99
- const timer = setTimeout(() => {
100
- reject('Time out error!');
101
- custom_resolve = null;
102
- custom_reject = null;
103
- }, timeoutMs);
104
- custom_resolve = () => {
105
- resolve(true);
106
- custom_resolve = null;
107
- clearTimeout(timer);
108
- };
109
- custom_reject = (data) => {
110
- reject(data);
111
- custom_reject = null;
112
- clearTimeout(timer);
113
- };
114
- });
115
- };
116
- const plivoCallAnswer = async () => {
117
- plivoBrowserSdk?.client?.answer?.(CallUuid);
118
- await _waitEventOrTimeout(3000);
119
- };
120
- const plivoCallReject = () => {
121
- plivoBrowserSdk?.client?.reject?.(CallUuid);
122
- };
123
- const plivoCallIgnore = () => {
124
- if (CallUuid)
125
- plivoBrowserSdk?.client?.ignore?.(CallUuid);
126
- };
127
- const plivoCallSwishMute = (isMute) => {
128
- plivoBrowserSdk?.client?.mute();
129
- if (isMute)
130
- plivoBrowserSdk?.client?.mute?.();
131
- else
132
- plivoBrowserSdk?.client?.unmute?.();
133
- };
134
- const plivoCall = async (phone) => {
135
- plivoBrowserSdk?.client?.call('+' + phone, { number_phone: phone });
136
- await _waitEventOrTimeout(5000);
137
- };
138
- const plivoEndCall = (status) => {
139
- if (status == PLIVO_CALL_STATUS.RINGING) {
140
- plivoBrowserSdk?.client?.reject?.(CallUuid);
141
- }
142
- else if (status == PLIVO_CALL_STATUS.CALL_START || status == PLIVO_CALL_STATUS.CALLING) {
143
- plivoBrowserSdk?.client?.hangup?.();
144
- }
145
- plivoBrowserSdk?.client?.setRingTone(false);
146
- };
147
- const handleCallFailed = (data, callInfo) => {
148
- console.log('handleCallFailed', data);
149
- if (custom_reject)
150
- custom_reject?.(data);
151
- callback(PLIVO_CALL_STATUS.CALL_END, { message: data });
152
- if (data == 'User Denied Media Access') {
153
- alert('Microphone access is blocked. Please enable the microphone permission to make a call.');
154
- }
155
- };
156
- const handleIncomingCallCanceled = (callInfo) => {
157
- callback(PLIVO_CALL_STATUS.CALL_END, { reason: callInfo.reason ?? '' });
158
- };
159
- const handleMediaPermission = (e) => {
160
- console.log('MediaPermission', e);
161
- if (e?.status == 'failure') {
162
- callback(PLIVO_CALL_STATUS.MEDIA_PERMISSION_FAIL);
163
- }
164
- };
165
- const plivoCallSwishSpeaker = (id) => {
166
- alert(id);
167
- plivoBrowserSdk?.client?.audio?.set?.(id);
168
- };
169
- const checkTimeLimit = async () => {
170
- // await sleep()
171
- const res = await getPhoneTimeLimit({
172
- tenant_id: dataProfile.value?.tenant_id ?? '',
173
- phone: dataProfile.value?.phone ?? ''
174
- });
175
- return res;
176
- };
177
- const plivoRemoveCallBack = () => {
178
- plivoBrowserSdk?.client?.off?.('onCallAnswered', handleCallAnswered);
179
- plivoBrowserSdk?.client?.off?.('onCallTerminated', handleCallTerminated);
180
- plivoBrowserSdk?.client?.off?.('onCallFailed', handleCallFailed);
181
- plivoBrowserSdk?.client?.off?.('onIncomingCallCanceled', handleIncomingCallCanceled);
182
- // plivoBrowserSdk.client.on('onCalling', (data: any) => console.log('onCallFailed', data))
183
- plivoBrowserSdk?.client?.off?.('onIncomingCall', handleIncomingCall);
184
- plivoBrowserSdk?.client?.off?.('onCallRemoteRinging', handleCallRemoteRinging);
185
- plivoBrowserSdk?.client?.off?.('onMediaPermission', handleMediaPermission);
186
- plivoBrowserSdk?.client?.off?.('onLoginFailed', handleLoginFailed);
187
- plivoBrowserSdk = null;
188
- isPlivoOn.value = false;
189
- isPlivoOn2 = false;
190
- };
191
- const sleep = () => {
192
- return new Promise((resolve) => setTimeout(resolve, 2000));
193
- };
194
- return {
195
- plivoLogin,
196
- plivoCallAnswer,
197
- plivoCallReject,
198
- plivoCall,
199
- plivoEndCall,
200
- plivoCallSwishMute,
201
- plivoCallSwishSpeaker,
202
- plivoRemoveCallBack,
203
- checkTimeLimit,
204
- isPlivoOn,
205
- isPlivoOn2
206
- };
207
- }
@@ -1,22 +0,0 @@
1
- export declare const enum Status_Color {
2
- Orange = "#F2994A",
3
- Blue_Teal = "#F2994A"
4
- }
5
- declare const enum Color {
6
- Primary = "#0051E6",
7
- Primary_Hover = "#699FF5",
8
- Primary_RGB = "41, 121, 255",
9
- Error = "#ef4444",
10
- Error_Hover = "#FF8A75",
11
- Success = "#4ade80",
12
- Success_Hover = "#5FD9A0",
13
- Success_Bg = "#E9FFE4",
14
- Warning = "#f3a22c",
15
- Text = "#333333",
16
- Link = "#1890ff",
17
- Default_Appointment = "#rgb(244, 185, 124)",
18
- Done_Appointment = "#00d652",
19
- Cancel_Appointment = "#ff0000"
20
- }
21
- export default Color;
22
- export declare function defineRootColor(): void;
@@ -1,47 +0,0 @@
1
- export var Status_Color;
2
- (function (Status_Color) {
3
- Status_Color["Orange"] = "#F2994A";
4
- Status_Color["Blue_Teal"] = "#F2994A";
5
- })(Status_Color || (Status_Color = {}));
6
- var Color;
7
- (function (Color) {
8
- Color["Primary"] = "#0051E6";
9
- Color["Primary_Hover"] = "#699FF5";
10
- Color["Primary_RGB"] = "41, 121, 255";
11
- // Error = '#ff3b3b',
12
- // Error = '#EF4444',
13
- Color["Error"] = "#ef4444";
14
- Color["Error_Hover"] = "#FF8A75";
15
- // Success = '#1DA91D',
16
- // Success = '#22C55E',
17
- Color["Success"] = "#4ade80";
18
- Color["Success_Hover"] = "#5FD9A0";
19
- Color["Success_Bg"] = "#E9FFE4";
20
- Color["Warning"] = "#f3a22c";
21
- Color["Text"] = "#333333";
22
- Color["Link"] = "#1890ff";
23
- Color["Default_Appointment"] = "#rgb(244, 185, 124)";
24
- Color["Done_Appointment"] = "#00d652";
25
- Color["Cancel_Appointment"] = "#ff0000";
26
- })(Color || (Color = {}));
27
- export default Color;
28
- export function defineRootColor() {
29
- const root = document.querySelector(':root');
30
- if (root) {
31
- root.style?.setProperty('--chat-color-primary', Color.Primary);
32
- // root.style?.setProperty('--chat-color-primary_hover', Color.Primary_Hover)
33
- // root.style?.setProperty('--chat-color-primary_rgb', Color.Primary_RGB)
34
- root.style?.setProperty('--chat-color-error', Color.Error);
35
- // root.style?.setProperty('--chat-color-error_hover', Color.Error_Hover)
36
- root.style?.setProperty('--chat-color-success', Color.Success);
37
- // root.style?.setProperty('--chat-color-success-bg', Color.Success_Bg)
38
- // root.style?.setProperty('--chat-color-success_hover', Color.Success_Hover)
39
- // root.style?.setProperty('--chat-color-second-success', Color.Success)
40
- // root.style?.setProperty('--chat-color-warning', Color.Warning)
41
- // root.style?.setProperty('--chat-color-text', Color.Text)
42
- // root.style?.setProperty('--chat-color-link', Color.Link)
43
- // root.style?.setProperty('--chat-color-default_appointment', Color.Default_Appointment)
44
- // root.style?.setProperty('--chat-color-done_appointment', Color.Done_Appointment)
45
- // root.style?.setProperty('--chat-color-cancel_appointment', Color.Cancel_Appointment)
46
- }
47
- }
@@ -1,6 +0,0 @@
1
- export declare const DATE_FORMATS: {
2
- readonly DATE_FORMAT: "YYYY-MM-DD";
3
- readonly DATE_FORMAT_FULL: "YYYY-MM-DD HH:mm:ss";
4
- readonly TIME_12_FORMAT: "hh:mm A";
5
- };
6
- export declare const TIME_ZONE_UTC = "Africa/Freetown";
@@ -1,6 +0,0 @@
1
- export const DATE_FORMATS = {
2
- DATE_FORMAT: 'YYYY-MM-DD',
3
- DATE_FORMAT_FULL: 'YYYY-MM-DD HH:mm:ss',
4
- TIME_12_FORMAT: 'hh:mm A'
5
- };
6
- export const TIME_ZONE_UTC = 'Africa/Freetown';
@@ -1,11 +0,0 @@
1
- export declare enum PAGE {
2
- HOME = "home",
3
- CUSTOMER_DETAIL = "customer_detail",
4
- CUSTOMER_CHECK_IN = "customer_check_in",
5
- CUSTOMER_APPOINTMENT = "customer_appointment",
6
- TENANT_ERROR = "tenant_error",
7
- CHAT_LIST = "chat_list",
8
- REGISTER_TENANT = "register_tenant",
9
- REGISTER_SUCCESS = "register_success",
10
- NOT_TENANT_PHONE = "not_tenant_phone"
11
- }
@@ -1,12 +0,0 @@
1
- export var PAGE;
2
- (function (PAGE) {
3
- PAGE["HOME"] = "home";
4
- PAGE["CUSTOMER_DETAIL"] = "customer_detail";
5
- PAGE["CUSTOMER_CHECK_IN"] = "customer_check_in";
6
- PAGE["CUSTOMER_APPOINTMENT"] = "customer_appointment";
7
- PAGE["TENANT_ERROR"] = "tenant_error";
8
- PAGE["CHAT_LIST"] = "chat_list";
9
- PAGE["REGISTER_TENANT"] = "register_tenant";
10
- PAGE["REGISTER_SUCCESS"] = "register_success";
11
- PAGE["NOT_TENANT_PHONE"] = "not_tenant_phone";
12
- })(PAGE || (PAGE = {}));
@@ -1,8 +0,0 @@
1
- export declare const MessageState: {
2
- readonly Sending: "sending";
3
- readonly Sent: "sent";
4
- readonly Read: "read";
5
- readonly Failed: "failed";
6
- readonly Uploading: "uploading";
7
- readonly Uploaded: "uploaded";
8
- };
@@ -1,8 +0,0 @@
1
- export const MessageState = {
2
- Sending: "sending",
3
- Sent: "sent",
4
- Read: "read",
5
- Failed: "failed",
6
- Uploading: "uploading",
7
- Uploaded: "uploaded"
8
- };
@@ -1,7 +0,0 @@
1
- export declare const TOPIC_DETAIL_CHAT = "chat/message/";
2
- export declare const TOPIC_DETAIL_CALL = "call/message/";
3
- export declare const TOPIC_PLIVO_CALL = "message-call/";
4
- export declare const TOPIC_PLIVO_SMS = "sms-inbound/";
5
- export declare const TOPIC_STATUS_USER: string;
6
- export declare const TOPIC_CUSTOMER_RELOAD: string;
7
- export declare const TOPIC_HOME: string[];
@@ -1,18 +0,0 @@
1
- export const TOPIC_DETAIL_CHAT = 'chat/message/';
2
- export const TOPIC_DETAIL_CALL = 'call/message/';
3
- export const TOPIC_PLIVO_CALL = 'message-call/';
4
- export const TOPIC_PLIVO_SMS = 'sms-inbound/';
5
- export const TOPIC_STATUS_USER = 'user/status/';
6
- export const TOPIC_CUSTOMER_RELOAD = 'chat/customer/reload/+';
7
- export const TOPIC_HOME = [
8
- // 'chat/conversation/update/',
9
- // 'chat/conversation/read_message/',
10
- // 'chat/conversation/update_list/',
11
- 'chat/conversation/update/message-call/',
12
- 'chat/conversation/update/sms-inbound/',
13
- 'chat/conversation/read_message/',
14
- 'chat/conversation/reload/sms-inbound/',
15
- ];
16
- // export CALL_STATE = {
17
- // Offer: 'offer',
18
- // }
@@ -1,8 +0,0 @@
1
- export declare const enum CalendarStatus {
2
- Confirmed = "confirmed",
3
- Scheduled = "scheduled",
4
- Canceled = "canceled",
5
- Done = "done",
6
- Reminder = "reminder",
7
- Waiting = "wait_list"
8
- }
@@ -1,9 +0,0 @@
1
- export var CalendarStatus;
2
- (function (CalendarStatus) {
3
- CalendarStatus["Confirmed"] = "confirmed";
4
- CalendarStatus["Scheduled"] = "scheduled";
5
- CalendarStatus["Canceled"] = "canceled";
6
- CalendarStatus["Done"] = "done";
7
- CalendarStatus["Reminder"] = "reminder";
8
- CalendarStatus["Waiting"] = "wait_list";
9
- })(CalendarStatus || (CalendarStatus = {}));
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
package/dist/lib/utils.js DELETED
@@ -1,5 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
- export function cn(...inputs) {
4
- return twMerge(clsx(inputs));
5
- }
@@ -1,3 +0,0 @@
1
- declare const instance: import("axios").AxiosInstance;
2
- export declare const setAxiosGciInstance: (token: string, domain: string, id: string) => void;
3
- export default instance;
@@ -1,25 +0,0 @@
1
- import axios from 'axios';
2
- const instance = axios.create({
3
- timeout: 20000,
4
- headers: {
5
- 'Content-Type': 'application/json'
6
- }
7
- });
8
- export const setAxiosGciInstance = (token, domain, id) => {
9
- instance.defaults.headers.common['Authorization'] = `Bearer ${token}`;
10
- instance.defaults.baseURL = domain;
11
- instance.defaults.headers.common['G-ClientID'] = id || '';
12
- };
13
- instance.interceptors.response.use((response) => {
14
- console.log(response);
15
- const data = response?.data;
16
- if (data?.status == 'OK' && (data?.result?.status == 'OK' || data?.result?.status == 200) && data?.result?.data) {
17
- return Promise.resolve(data?.result?.data);
18
- }
19
- else {
20
- return Promise.reject(data?.message ?? 'Error');
21
- }
22
- }, async (error) => {
23
- return Promise.reject(error.response?.data || error);
24
- });
25
- export default instance;
@@ -1,3 +0,0 @@
1
- declare const instance: import("axios").AxiosInstance;
2
- export declare const setAxiosInstance: (token: string, domain?: string) => void;
3
- export default instance;
@@ -1,84 +0,0 @@
1
- import axios from 'axios';
2
- // const baseURL = 'https://go-chat.dev01.dtsmart.dev/'
3
- const baseURL = 'https://go-chat-backend.gci-app2.dtsmart.dev';
4
- const instance = axios.create({
5
- baseURL,
6
- timeout: 20000,
7
- headers: {
8
- 'Content-Type': 'application/json'
9
- }
10
- });
11
- export const setAxiosInstance = (token, domain) => {
12
- instance.defaults.headers.common['Authorization'] = `Bearer ${token}`;
13
- instance.defaults.baseURL = domain || baseURL;
14
- };
15
- instance.interceptors.request.use((config) => {
16
- const token = config?.token || localStorage.getItem('chat_token');
17
- if (token) {
18
- config.headers.Authorization = `Bearer ${token}`;
19
- }
20
- return config;
21
- }, (error) => Promise.reject(error));
22
- let isRefreshing = false;
23
- let failedQueue = [];
24
- const processQueue = (error, token = null) => {
25
- failedQueue.forEach((prom) => {
26
- if (token) {
27
- prom.resolve(token);
28
- }
29
- else {
30
- prom.reject(error);
31
- }
32
- });
33
- failedQueue = [];
34
- };
35
- instance.interceptors.response.use((response) => {
36
- const data = response?.data;
37
- if (data.files) {
38
- return Promise.resolve(data.files);
39
- }
40
- if (data?.status && data?.data) {
41
- return Promise.resolve(data.data);
42
- }
43
- else {
44
- return Promise.reject(data?.messages ?? 'Error');
45
- }
46
- }, async (error) => {
47
- const originalRequest = error.config;
48
- if (error.response?.status === 403 && !originalRequest._retry) {
49
- originalRequest._retry = true;
50
- if (isRefreshing) {
51
- return new Promise((resolve, reject) => {
52
- failedQueue.push({
53
- resolve: (token) => {
54
- originalRequest.headers['Authorization'] = 'Bearer ' + token;
55
- resolve(instance(originalRequest));
56
- },
57
- reject: (err) => reject(err)
58
- });
59
- });
60
- }
61
- isRefreshing = true;
62
- const authStore = null;
63
- try {
64
- const body = {
65
- refresh_token: localStorage.getItem('refresh_token') || ''
66
- };
67
- const res = await authStore.refreshToken(body);
68
- const newToken = res.data.token;
69
- localStorage.setItem('chat_token', newToken);
70
- instance.defaults.headers.common['Authorization'] = 'Bearer ' + newToken;
71
- processQueue(null, newToken);
72
- return instance(originalRequest);
73
- }
74
- catch (err) {
75
- processQueue(err, null);
76
- return Promise.reject(err);
77
- }
78
- finally {
79
- isRefreshing = false;
80
- }
81
- }
82
- return Promise.reject(error.response?.data || error);
83
- });
84
- export default instance;
@@ -1,8 +0,0 @@
1
- import mqtt from 'mqtt';
2
- export declare const connectMqtt: () => Promise<void>;
3
- export declare const subscribeToTopic: (topic: string) => void;
4
- export declare const unsubscribeFromTopic: (topic: string) => Promise<void>;
5
- export declare const publishMessage: (topic: string, payload: any) => Promise<void>;
6
- export declare const addHandleMqttMessage: (key: string, topic: string, callBack: any) => void;
7
- export declare const removeHandleMqttMessage: (key: string) => void;
8
- export declare const getMqttInstance: () => mqtt.MqttClient | null;