@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.
- package/dist/go-chat.es.js +11166 -11151
- package/dist/go-chat.umd.js +21 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/call/IconClock.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconClock.vue.js +0 -22
- package/dist/assets/icons/call/IconClose.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconClose.vue.js +0 -26
- package/dist/assets/icons/call/IconMic.vue.d.ts +0 -14
- package/dist/assets/icons/call/IconMic.vue.js +0 -123
- package/dist/assets/icons/call/IconPhone.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconPhone.vue.js +0 -22
- package/dist/assets/icons/call/IconPhoneBase.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconPhoneBase.vue.js +0 -20
- package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +0 -14
- package/dist/assets/icons/call/IconPhoneCancel.vue.js +0 -46
- package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +0 -2
- package/dist/assets/icons/call/IconSoundDownload.vue.js +0 -50
- package/dist/assets/icons/call/IconSpeaker.vue.d.ts +0 -14
- package/dist/assets/icons/call/IconSpeaker.vue.js +0 -62
- package/dist/assets/icons/customer-appointment/IconFilter.vue.d.ts +0 -2
- package/dist/assets/icons/customer-appointment/IconFilter.vue.js +0 -53
- package/dist/assets/icons/customer-detail/IconArrow.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconArrow.vue.js +0 -22
- package/dist/assets/icons/customer-detail/IconCheck.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconCheck.vue.js +0 -27
- package/dist/assets/icons/customer-detail/IconDate.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconDate.vue.js +0 -43
- package/dist/assets/icons/customer-detail/IconGroup.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconGroup.vue.js +0 -48
- package/dist/assets/icons/customer-detail/IconMessage.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconMessage.vue.js +0 -28
- package/dist/assets/icons/customer-detail/IconNote.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconNote.vue.js +0 -29
- package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +0 -14
- package/dist/assets/icons/customer-detail/IconPhone.vue.js +0 -41
- package/dist/assets/icons/customer-detail/IconPin.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconPin.vue.js +0 -29
- package/dist/assets/icons/customer-detail/IconSearch.vue.d.ts +0 -2
- package/dist/assets/icons/customer-detail/IconSearch.vue.js +0 -29
- package/dist/assets/icons/global/IconAiCheck.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconAiCheck.vue.js +0 -28
- package/dist/assets/icons/global/IconArrowLeft.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconArrowLeft.vue.js +0 -29
- package/dist/assets/icons/global/IconBackspace.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconBackspace.vue.js +0 -28
- package/dist/assets/icons/global/IconCloseCircle.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconCloseCircle.vue.js +0 -36
- package/dist/assets/icons/global/IconPhone.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconPhone.vue.js +0 -19
- package/dist/assets/icons/global/IconPlan.vue.d.ts +0 -14
- package/dist/assets/icons/global/IconPlan.vue.js +0 -39
- package/dist/assets/icons/global/IconPlus.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconPlus.vue.js +0 -22
- package/dist/assets/icons/global/IconSearch.vue.d.ts +0 -32
- package/dist/assets/icons/global/IconSearch.vue.js +0 -68
- package/dist/assets/icons/global/IconSms.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconSms.vue.js +0 -22
- package/dist/assets/icons/global/IconUser.vue.d.ts +0 -2
- package/dist/assets/icons/global/IconUser.vue.js +0 -25
- package/dist/chat/App.vue.d.ts +0 -22
- package/dist/chat/App.vue.js +0 -1022
- package/dist/chat/main.d.ts +0 -7
- package/dist/chat/main.js +0 -7
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +0 -2
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +0 -207
- package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.d.ts +0 -12
- package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.js +0 -80
- package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.d.ts +0 -2
- package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.js +0 -138
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +0 -7
- package/dist/chat/page/customer-detail/CustomerDetail.vue.js +0 -233
- package/dist/chat/page/customer-detail/SubInformation.vue.d.ts +0 -16
- package/dist/chat/page/customer-detail/SubInformation.vue.js +0 -102
- package/dist/chat/page/error/Error.vue.d.ts +0 -2
- package/dist/chat/page/error/Error.vue.js +0 -64
- package/dist/chat/page/home/ChatList.vue.d.ts +0 -98
- package/dist/chat/page/home/ChatList.vue.js +0 -621
- package/dist/chat/page/home/ChatMessage.vue.d.ts +0 -21
- package/dist/chat/page/home/ChatMessage.vue.js +0 -200
- package/dist/chat/page/home/ChatMessageItem.vue.d.ts +0 -19
- package/dist/chat/page/home/ChatMessageItem.vue.js +0 -358
- package/dist/chat/page/home/ChatMessageItem2.vue.d.ts +0 -19
- package/dist/chat/page/home/ChatMessageItem2.vue.js +0 -351
- package/dist/chat/page/home/DropZone.vue.d.ts +0 -13
- package/dist/chat/page/home/DropZone.vue.js +0 -130
- package/dist/chat/page/home/Home.vue.d.ts +0 -25
- package/dist/chat/page/home/Home.vue.js +0 -430
- package/dist/chat/page/home/HomeHeader.vue.d.ts +0 -14
- package/dist/chat/page/home/HomeHeader.vue.js +0 -248
- package/dist/chat/page/home/InputChat.vue.d.ts +0 -27
- package/dist/chat/page/home/InputChat.vue.js +0 -412
- package/dist/chat/page/home/NewCustomer.vue.d.ts +0 -7
- package/dist/chat/page/home/NewCustomer.vue.js +0 -81
- package/dist/chat/page/home/PhoneNumpad.vue.d.ts +0 -18
- package/dist/chat/page/home/PhoneNumpad.vue.js +0 -143
- package/dist/chat/page/setting/Setting.vue.d.ts +0 -2
- package/dist/chat/page/setting/Setting.vue.js +0 -277
- package/dist/chat/page/setting/SettingSuccess.vue.d.ts +0 -2
- package/dist/chat/page/setting/SettingSuccess.vue.js +0 -33
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +0 -24
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +0 -207
- package/dist/components/chat/call/Calling.vue.d.ts +0 -17
- package/dist/components/chat/call/Calling.vue.js +0 -600
- package/dist/components/chat/call/TimeLeft.vue.d.ts +0 -5
- package/dist/components/chat/call/TimeLeft.vue.js +0 -59
- package/dist/components/chat/card/CardCustomerDetail.vue.d.ts +0 -13
- package/dist/components/chat/card/CardCustomerDetail.vue.js +0 -28
- package/dist/components/chat/common/collapse/CollapseBase.vue.d.ts +0 -20
- package/dist/components/chat/common/collapse/CollapseBase.vue.js +0 -59
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +0 -16
- package/dist/components/chat/common/input/InputSearch.vue.js +0 -71
- package/dist/components/chat/common/modal/Modal.vue.d.ts +0 -94
- package/dist/components/chat/common/modal/Modal.vue.js +0 -260
- package/dist/components/chat/common/popover/PopoverBase.vue.d.ts +0 -35
- package/dist/components/chat/common/popover/PopoverBase.vue.js +0 -148
- package/dist/components/chat/common/spin/BaseSpin.vue.d.ts +0 -10
- package/dist/components/chat/common/spin/BaseSpin.vue.js +0 -43
- package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +0 -17
- package/dist/components/chat/common/switch/SwitchBase.vue.js +0 -76
- package/dist/components/chat/common/tab/TabBase.vue.d.ts +0 -30
- package/dist/components/chat/common/tab/TabBase.vue.js +0 -86
- package/dist/components/chat/common/tabs/TabBase.vue.d.ts +0 -18
- package/dist/components/chat/common/tabs/TabBase.vue.js +0 -93
- package/dist/components/chat/customer/Avatar.vue.d.ts +0 -12
- package/dist/components/chat/customer/Avatar.vue.js +0 -127
- package/dist/components/chat/layout/mobile/Footer.vue.d.ts +0 -2
- package/dist/components/chat/layout/mobile/Footer.vue.js +0 -114
- package/dist/components/chat/select/SelectBase.vue.d.ts +0 -24
- package/dist/components/chat/select/SelectBase.vue.js +0 -105
- package/dist/components/common/CustomLoading.vue.d.ts +0 -2
- package/dist/components/common/CustomLoading.vue.js +0 -19
- package/dist/components/common/Notification/NotificationDescription.vue.d.ts +0 -7
- package/dist/components/common/Notification/NotificationDescription.vue.js +0 -38
- package/dist/components/common/button/ButtonBase.vue.d.ts +0 -22
- package/dist/components/common/button/ButtonBase.vue.js +0 -78
- package/dist/components/common/button/ButtonToggle.vue.d.ts +0 -20
- package/dist/components/common/button/ButtonToggle.vue.js +0 -70
- package/dist/components/common/checkbox/CCheckboxNumber.vue.d.ts +0 -16
- package/dist/components/common/checkbox/CCheckboxNumber.vue.js +0 -48
- package/dist/components/common/collapse/BaseCollapse.vue.d.ts +0 -12
- package/dist/components/common/collapse/BaseCollapse.vue.js +0 -36
- package/dist/components/common/collapse/BaseCollapseItem.vue.d.ts +0 -4
- package/dist/components/common/collapse/BaseCollapseItem.vue.js +0 -22
- package/dist/components/common/drawer/DrawerBase.vue.d.ts +0 -39
- package/dist/components/common/drawer/DrawerBase.vue.js +0 -126
- package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +0 -33
- package/dist/components/common/drawer/DrawerBaseCustom.vue.js +0 -135
- package/dist/components/common/dropdown/DropdownBase.vue.d.ts +0 -21
- package/dist/components/common/dropdown/DropdownBase.vue.js +0 -91
- package/dist/components/common/input/CInputSearch.vue.d.ts +0 -14
- package/dist/components/common/input/CInputSearch.vue.js +0 -62
- package/dist/components/common/modal/ModalBase.vue.d.ts +0 -35
- package/dist/components/common/modal/ModalBase.vue.js +0 -187
- package/dist/components/common/popover/PopoverBase.vue.d.ts +0 -3
- package/dist/components/common/popover/PopoverBase.vue.js +0 -36
- package/dist/components/common/select/SelectBase.vue.d.ts +0 -28
- package/dist/components/common/select/SelectBase.vue.js +0 -102
- package/dist/components/common/slider/BaseSlider.vue.d.ts +0 -11
- package/dist/components/common/slider/BaseSlider.vue.js +0 -70
- package/dist/components/common/spin/CSpin.vue.d.ts +0 -9
- package/dist/components/common/spin/CSpin.vue.js +0 -41
- package/dist/components/common/tooltip/TooltipBase.vue.d.ts +0 -2
- package/dist/components/common/tooltip/TooltipBase.vue.js +0 -8
- package/dist/components/layout/PageError.vue.d.ts +0 -2
- package/dist/components/layout/PageError.vue.js +0 -91
- package/dist/components/ui/button/CButton.vue.d.ts +0 -19
- package/dist/components/ui/button/CButton.vue.js +0 -49
- package/dist/components/ui/button/c-button.d.ts +0 -7
- package/dist/components/ui/button/c-button.js +0 -26
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -18
- package/dist/components/ui/checkbox/Checkbox.vue.js +0 -79
- package/dist/components/ui/checkbox/index.d.ts +0 -1
- package/dist/components/ui/checkbox/index.js +0 -1
- package/dist/components/ui/collapsible/Collapsible.vue.d.ts +0 -16
- package/dist/components/ui/collapsible/Collapsible.vue.js +0 -47
- package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +0 -10
- package/dist/components/ui/collapsible/CollapsibleContent.vue.js +0 -41
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -10
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.js +0 -35
- package/dist/components/ui/collapsible/index.d.ts +0 -3
- package/dist/components/ui/collapsible/index.js +0 -3
- package/dist/components/ui/dialog/Dialog.vue.d.ts +0 -14
- package/dist/components/ui/dialog/Dialog.vue.js +0 -42
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +0 -10
- package/dist/components/ui/dialog/DialogClose.vue.js +0 -35
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +0 -29
- package/dist/components/ui/dialog/DialogContent.vue.js +0 -84
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +0 -14
- package/dist/components/ui/dialog/DialogDescription.vue.js +0 -43
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +0 -13
- package/dist/components/ui/dialog/DialogFooter.vue.js +0 -26
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +0 -13
- package/dist/components/ui/dialog/DialogHeader.vue.js +0 -26
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +0 -30
- package/dist/components/ui/dialog/DialogScrollContent.vue.js +0 -99
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +0 -14
- package/dist/components/ui/dialog/DialogTitle.vue.js +0 -43
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +0 -10
- package/dist/components/ui/dialog/DialogTrigger.vue.js +0 -35
- package/dist/components/ui/dialog/index.d.ts +0 -9
- package/dist/components/ui/dialog/index.js +0 -9
- package/dist/components/ui/drawer/Drawer.vue.d.ts +0 -26
- package/dist/components/ui/drawer/Drawer.vue.js +0 -48
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +0 -33
- package/dist/components/ui/drawer/DrawerContent.vue.js +0 -81
- package/dist/components/ui/drawer/DrawerDescription.vue.d.ts +0 -14
- package/dist/components/ui/drawer/DrawerDescription.vue.js +0 -42
- package/dist/components/ui/drawer/DrawerFooter.vue.d.ts +0 -13
- package/dist/components/ui/drawer/DrawerFooter.vue.js +0 -26
- package/dist/components/ui/drawer/DrawerHeader.vue.d.ts +0 -13
- package/dist/components/ui/drawer/DrawerHeader.vue.js +0 -26
- package/dist/components/ui/drawer/DrawerOverlay.vue.d.ts +0 -7
- package/dist/components/ui/drawer/DrawerOverlay.vue.js +0 -37
- package/dist/components/ui/drawer/DrawerTitle.vue.d.ts +0 -14
- package/dist/components/ui/drawer/DrawerTitle.vue.js +0 -42
- package/dist/components/ui/drawer/index.d.ts +0 -8
- package/dist/components/ui/drawer/index.js +0 -8
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.js +0 -41
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -20
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +0 -79
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -28
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +0 -61
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -10
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.js +0 -35
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -15
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.js +0 -43
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -15
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +0 -43
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.js +0 -41
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -18
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +0 -80
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -7
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +0 -37
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -13
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +0 -26
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.js +0 -41
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -30
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +0 -46
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -14
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +0 -58
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -10
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.js +0 -41
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -15
- package/dist/components/ui/dropdown-menu/index.js +0 -15
- package/dist/components/ui/popover/Popover.vue.d.ts +0 -14
- package/dist/components/ui/popover/Popover.vue.js +0 -41
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +0 -28
- package/dist/components/ui/popover/PopoverContent.vue.js +0 -60
- package/dist/components/ui/popover/PopoverTrigger.vue.d.ts +0 -10
- package/dist/components/ui/popover/PopoverTrigger.vue.js +0 -35
- package/dist/components/ui/popover/index.d.ts +0 -3
- package/dist/components/ui/popover/index.js +0 -3
- package/dist/components/ui/radio-group/RadioGroup.vue.d.ts +0 -18
- package/dist/components/ui/radio-group/RadioGroup.vue.js +0 -46
- package/dist/components/ui/radio-group/RadioGroupItem.vue.d.ts +0 -7
- package/dist/components/ui/radio-group/RadioGroupItem.vue.js +0 -71
- package/dist/components/ui/radio-group/index.d.ts +0 -2
- package/dist/components/ui/radio-group/index.js +0 -2
- package/dist/components/ui/select/Select.vue.d.ts +0 -20
- package/dist/components/ui/select/Select.vue.js +0 -49
- package/dist/components/ui/select/SelectContent.vue.d.ts +0 -24
- package/dist/components/ui/select/SelectContent.vue.js +0 -98
- package/dist/components/ui/select/SelectGroup.vue.d.ts +0 -10
- package/dist/components/ui/select/SelectGroup.vue.js +0 -37
- package/dist/components/ui/select/SelectItem.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectItem.vue.js +0 -73
- package/dist/components/ui/select/SelectItemText.vue.d.ts +0 -10
- package/dist/components/ui/select/SelectItemText.vue.js +0 -37
- package/dist/components/ui/select/SelectLabel.vue.d.ts +0 -14
- package/dist/components/ui/select/SelectLabel.vue.js +0 -40
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +0 -14
- package/dist/components/ui/select/SelectScrollDownButton.vue.js +0 -58
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +0 -14
- package/dist/components/ui/select/SelectScrollUpButton.vue.js +0 -58
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +0 -7
- package/dist/components/ui/select/SelectSeparator.vue.js +0 -39
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +0 -17
- package/dist/components/ui/select/SelectTrigger.vue.js +0 -49
- package/dist/components/ui/select/SelectValue.vue.d.ts +0 -10
- package/dist/components/ui/select/SelectValue.vue.js +0 -37
- package/dist/components/ui/select/index.d.ts +0 -11
- package/dist/components/ui/select/index.js +0 -11
- package/dist/components/ui/slider/Slider.vue.d.ts +0 -13
- package/dist/components/ui/slider/Slider.vue.js +0 -155
- package/dist/components/ui/slider/index.d.ts +0 -1
- package/dist/components/ui/slider/index.js +0 -1
- package/dist/components/ui/switch/Switch.vue.d.ts +0 -18
- package/dist/components/ui/switch/Switch.vue.js +0 -61
- package/dist/components/ui/switch/index.d.ts +0 -1
- package/dist/components/ui/switch/index.js +0 -1
- package/dist/components/ui/tabs/Tabs.vue.d.ts +0 -20
- package/dist/components/ui/tabs/Tabs.vue.js +0 -54
- package/dist/components/ui/tabs/TabsContent.vue.d.ts +0 -14
- package/dist/components/ui/tabs/TabsContent.vue.js +0 -44
- package/dist/components/ui/tabs/TabsList.vue.d.ts +0 -14
- package/dist/components/ui/tabs/TabsList.vue.js +0 -44
- package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +0 -14
- package/dist/components/ui/tabs/TabsTrigger.vue.js +0 -45
- package/dist/components/ui/tabs/index.d.ts +0 -4
- package/dist/components/ui/tabs/index.js +0 -4
- package/dist/composable/useDigibot.d.ts +0 -7
- package/dist/composable/useDigibot.js +0 -23
- package/dist/composable/useInitData.d.ts +0 -12
- package/dist/composable/useInitData.js +0 -99
- package/dist/composable/useListConversations.d.ts +0 -55
- package/dist/composable/useListConversations.js +0 -209
- package/dist/composable/useListentEvent.d.ts +0 -5
- package/dist/composable/useListentEvent.js +0 -51
- package/dist/composable/usePlivo.d.ts +0 -17
- package/dist/composable/usePlivo.js +0 -207
- package/dist/constant/color.d.ts +0 -22
- package/dist/constant/color.js +0 -47
- package/dist/constant/datetime.d.ts +0 -6
- package/dist/constant/datetime.js +0 -6
- package/dist/constant/general.d.ts +0 -11
- package/dist/constant/general.js +0 -12
- package/dist/constant/message.d.ts +0 -8
- package/dist/constant/message.js +0 -8
- package/dist/constant/mqtt.d.ts +0 -7
- package/dist/constant/mqtt.js +0 -18
- package/dist/constant/user.d.ts +0 -8
- package/dist/constant/user.js +0 -9
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +0 -5
- package/dist/plugins/axios-gci.d.ts +0 -3
- package/dist/plugins/axios-gci.js +0 -25
- package/dist/plugins/axios.d.ts +0 -3
- package/dist/plugins/axios.js +0 -84
- package/dist/plugins/mqtt.d.ts +0 -8
- package/dist/plugins/mqtt.js +0 -189
- package/dist/plugins/pocketbase.d.ts +0 -5
- package/dist/plugins/pocketbase.js +0 -15
- package/dist/plugins/sdk.d.ts +0 -18
- package/dist/plugins/sdk.js +0 -73
- package/dist/plugins/websocket.d.ts +0 -15
- package/dist/plugins/websocket.js +0 -151
- package/dist/types/chat/auth.d.ts +0 -41
- package/dist/types/chat/auth.js +0 -1
- package/dist/types/chat/call.d.ts +0 -19
- package/dist/types/chat/call.js +0 -23
- package/dist/types/chat/global.d.ts +0 -32
- package/dist/types/chat/global.js +0 -1
- package/dist/types/chat/promise.d.ts +0 -17
- package/dist/types/chat/promise.js +0 -1
- package/dist/types/chat/user.d.ts +0 -88
- package/dist/types/chat/user.js +0 -1
- package/dist/types/conversation.d.ts +0 -23
- package/dist/types/conversation.js +0 -1
- package/dist/types/global.d.ts +0 -11
- package/dist/types/global.js +0 -15
- package/dist/types/message.d.ts +0 -52
- package/dist/types/message.js +0 -1
- package/dist/utils/chat/cache.d.ts +0 -7
- package/dist/utils/chat/cache.js +0 -63
- package/dist/utils/chat/chat-router.d.ts +0 -3
- package/dist/utils/chat/chat-router.js +0 -8
- package/dist/utils/chat/page-error.d.ts +0 -4
- package/dist/utils/chat/page-error.js +0 -25
- package/dist/utils/chat/phone-string.d.ts +0 -1
- package/dist/utils/chat/phone-string.js +0 -4
- package/dist/utils/chat/store/auth.d.ts +0 -62
- package/dist/utils/chat/store/auth.js +0 -93
- package/dist/utils/chat/store/call.d.ts +0 -15
- package/dist/utils/chat/store/call.js +0 -160
- package/dist/utils/chat/store/conversation.d.ts +0 -13
- package/dist/utils/chat/store/conversation.js +0 -69
- package/dist/utils/chat/store/message.d.ts +0 -31
- package/dist/utils/chat/store/message.js +0 -74
- package/dist/utils/chat/store/user.d.ts +0 -200
- package/dist/utils/chat/store/user.js +0 -43
- package/dist/utils/debounce.d.ts +0 -1
- package/dist/utils/debounce.js +0 -9
- package/dist/utils/json.d.ts +0 -2
- package/dist/utils/json.js +0 -18
- package/dist/utils/logger.d.ts +0 -3
- package/dist/utils/logger.js +0 -5
- package/dist/utils/string-helper.d.ts +0 -2
- package/dist/utils/string-helper.js +0 -40
- package/dist/views/NotTenantPhone.vue.d.ts +0 -9
- package/dist/views/NotTenantPhone.vue.js +0 -99
- package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +0 -18
- package/dist/views/home/phone-numpad/ConvercationList.vue.js +0 -174
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +0 -28
- 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
|
-
}
|
package/dist/constant/color.d.ts
DELETED
|
@@ -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;
|
package/dist/constant/color.js
DELETED
|
@@ -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,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
|
-
}
|
package/dist/constant/general.js
DELETED
|
@@ -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 = {}));
|
package/dist/constant/message.js
DELETED
package/dist/constant/mqtt.d.ts
DELETED
|
@@ -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[];
|
package/dist/constant/mqtt.js
DELETED
|
@@ -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
|
-
// }
|
package/dist/constant/user.d.ts
DELETED
package/dist/constant/user.js
DELETED
|
@@ -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 = {}));
|
package/dist/lib/utils.d.ts
DELETED
package/dist/lib/utils.js
DELETED
|
@@ -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;
|
package/dist/plugins/axios.d.ts
DELETED
package/dist/plugins/axios.js
DELETED
|
@@ -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;
|
package/dist/plugins/mqtt.d.ts
DELETED
|
@@ -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;
|