@phonghq/go-chat 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/chat/App.vue.d.ts +2 -2
  2. package/dist/chat/App.vue.js +60 -63
  3. package/dist/chat/page/customer-appointment/{CustomerApointment.vue.js → CustomerAppointment.vue.js} +5 -5
  4. package/dist/chat/page/customer-check-in/CollapseCheckIn.vue.js +2 -2
  5. package/dist/chat/page/customer-check-in/CustomerCheckIn.vue.js +4 -4
  6. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +1 -1
  7. package/dist/chat/page/customer-detail/CustomerDetail.vue.js +16 -15
  8. package/dist/chat/page/customer-detail/SubInformation.vue.js +1 -1
  9. package/dist/chat/page/error/Error.vue.js +1 -1
  10. package/dist/chat/page/home/ChatList.vue.d.ts +1 -1
  11. package/dist/chat/page/home/ChatList.vue.js +11 -13
  12. package/dist/chat/page/home/ChatMessage.vue.d.ts +2 -2
  13. package/dist/chat/page/home/ChatMessage.vue.js +4 -4
  14. package/dist/chat/page/home/Home.vue.d.ts +2 -2
  15. package/dist/chat/page/home/Home.vue.js +10 -10
  16. package/dist/chat/page/home/HomeHeader.vue.d.ts +1 -1
  17. package/dist/chat/page/home/HomeHeader.vue.js +6 -6
  18. package/dist/chat/page/home/InputChat.vue.d.ts +1 -1
  19. package/dist/chat/page/home/InputChat.vue.js +13 -11
  20. package/dist/chat/page/home/NewCustomer.vue.d.ts +1 -1
  21. package/dist/chat/page/home/NewCustomer.vue.js +2 -2
  22. package/dist/components/ListenEvent.vue.js +25 -27
  23. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.js +1 -1
  24. package/dist/components/chat/call/Calling.vue.d.ts +1 -1
  25. package/dist/components/chat/call/Calling.vue.js +68 -38
  26. package/dist/components/chat/common/collapse/CollapseBase.vue.js +1 -1
  27. package/dist/components/chat/common/input/InputSearch.vue.d.ts +1 -1
  28. package/dist/components/chat/common/input/InputSearch.vue.js +2 -2
  29. package/dist/components/chat/common/popover/PopoverBase.vue.js +1 -1
  30. package/dist/components/chat/layout/mobile/Footer.vue.js +10 -10
  31. package/dist/components/common/button/ButtonBase.vue.js +2 -2
  32. package/dist/components/common/button/ButtonToggle.vue.js +1 -1
  33. package/dist/components/common/checkbox/CCheckboxNumber.vue.js +1 -1
  34. package/dist/components/common/drawer/DrawerBase.vue.js +1 -1
  35. package/dist/components/common/dropdown/DropdownBase.vue.js +1 -1
  36. package/dist/components/common/input/CInputSearch.vue.js +1 -1
  37. package/dist/components/common/modal/ModalBase.vue.js +2 -2
  38. package/dist/components/common/slider/BaseSlider.vue.js +1 -1
  39. package/dist/components/modal/Confirm.vue.js +3 -3
  40. package/dist/components/ui/button/CButton.vue.js +1 -1
  41. package/dist/components/ui/checkbox/Checkbox.vue.js +1 -1
  42. package/dist/components/ui/dialog/DialogContent.vue.js +1 -1
  43. package/dist/components/ui/dialog/DialogDescription.vue.js +1 -1
  44. package/dist/components/ui/dialog/DialogFooter.vue.js +1 -1
  45. package/dist/components/ui/dialog/DialogHeader.vue.js +1 -1
  46. package/dist/components/ui/dialog/DialogScrollContent.vue.js +1 -1
  47. package/dist/components/ui/dialog/DialogTitle.vue.js +1 -1
  48. package/dist/components/ui/drawer/DrawerContent.vue.js +1 -1
  49. package/dist/components/ui/drawer/DrawerDescription.vue.js +1 -1
  50. package/dist/components/ui/drawer/DrawerFooter.vue.js +1 -1
  51. package/dist/components/ui/drawer/DrawerHeader.vue.js +1 -1
  52. package/dist/components/ui/drawer/DrawerOverlay.vue.js +1 -1
  53. package/dist/components/ui/drawer/DrawerTitle.vue.js +1 -1
  54. package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.js +1 -1
  55. package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +1 -1
  56. package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.js +1 -1
  57. package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.js +1 -1
  58. package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.js +1 -1
  59. package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.js +1 -1
  60. package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.js +1 -1
  61. package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.js +1 -1
  62. package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.js +1 -1
  63. package/dist/components/ui/popover/PopoverContent.vue.js +1 -1
  64. package/dist/components/ui/radio-group/RadioGroup.vue.js +1 -1
  65. package/dist/components/ui/radio-group/RadioGroupItem.vue.js +1 -1
  66. package/dist/components/ui/slider/Slider.vue.js +1 -1
  67. package/dist/components/ui/switch/Switch.vue.js +1 -1
  68. package/dist/composable/useCallHelper.d.ts +1 -1
  69. package/dist/composable/useCallHelper.js +4 -16
  70. package/dist/composable/useInitData.d.ts +1 -1
  71. package/dist/composable/useInitData.js +8 -6
  72. package/dist/composable/useModalConfirm.d.ts +1 -1
  73. package/dist/go-chat.es.js +26369 -28399
  74. package/dist/go-chat.umd.js +15 -23
  75. package/dist/plugins/mqtt.d.ts +2 -1
  76. package/dist/plugins/mqtt.js +1 -2
  77. package/dist/plugins/sdk.js +3 -3
  78. package/dist/plugins/websocket.d.ts +4 -1
  79. package/dist/plugins/websocket.js +61 -22
  80. package/dist/style.css +1 -1
  81. package/dist/utils/chat/auth.d.ts +1 -1
  82. package/dist/utils/chat/auth.js +2 -2
  83. package/dist/utils/chat/call.d.ts +4 -0
  84. package/dist/utils/chat/call.js +52 -1
  85. package/dist/utils/chat/chat-router.d.ts +1 -1
  86. package/dist/utils/chat/chat-router.js +1 -1
  87. package/dist/utils/chat/conversation.d.ts +2 -2
  88. package/dist/utils/chat/conversation.js +1 -1
  89. package/dist/utils/chat/message.d.ts +2 -2
  90. package/dist/utils/chat/message.js +1 -1
  91. package/dist/utils/chat/user.d.ts +2 -2
  92. package/dist/utils/chat/user.js +1 -1
  93. package/dist/utils/json.d.ts +2 -0
  94. package/dist/utils/json.js +18 -0
  95. package/package.json +1 -1
  96. package/dist/stores/general.d.ts +0 -48
  97. package/dist/stores/general.js +0 -39
  98. /package/dist/chat/page/customer-appointment/{CustomerApointment.vue.d.ts → CustomerAppointment.vue.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import type { GoChatProps } from '@/types/chat/global';
1
+ import type { GoChatProps } from '../types/chat/global';
2
2
  declare const _default: import("vue").DefineComponent<GoChatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GoChatProps> & Readonly<{}>, {
3
- response: import("@/types/chat/global").PAGE_RESPONSE;
3
+ response: import("../types/chat/global").PAGE_RESPONSE;
4
4
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
5
  export default _default;
@@ -1,20 +1,20 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import ChatList from '@/chat/page/home/ChatList.vue';
3
- import HomeComponent from '@/chat/page/home/Home.vue';
4
- import IconArrowLeft from '@/assets/icons/IconArrowLeft.vue';
2
+ import ChatList from '../chat/page/home/ChatList.vue';
3
+ import HomeComponent from '../chat/page/home/Home.vue';
4
+ import IconArrowLeft from '../assets/icons/IconArrowLeft.vue';
5
5
  import { computed, nextTick, ref } from 'vue';
6
- import { PAGE } from '@/constant/general';
7
- import CustomerDetail from '@/chat/page/customer-detail/CustomerDetail.vue';
8
- import CustomerCheckIn from '@/chat/page/customer-check-in/CustomerCheckIn.vue';
9
- import CustomerApointment from '@/chat/page/customer-appointment/CustomerApointment.vue';
10
- import { isRouterReady, useInitData } from '@/composable/useInitData';
11
- import Error from '@/chat/page/error/Error.vue';
12
- import { currentPage, routerPush } from '@/utils/chat/chat-router';
13
- import BaseSpin from '@/components/chat/common/spin/BaseSpin.vue';
14
- import Calling from '@/components/chat/call/Calling.vue';
15
- import { logout } from '@/utils/chat/auth';
16
- import MobileFooter from '@/components/chat/layout/mobile/Footer.vue';
17
- import { initWebSocket } from '@/plugins/websocket';
6
+ import { PAGE } from '../constant/general';
7
+ import CustomerDetail from '../chat/page/customer-detail/CustomerDetail.vue';
8
+ import CustomerCheckIn from '../chat/page/customer-check-in/CustomerCheckIn.vue';
9
+ import CustomerAppointment from '../chat/page/customer-appointment/CustomerAppointment.vue';
10
+ import { isRouterReady, useInitData } from '../composable/useInitData';
11
+ import Error from '../chat/page/error/Error.vue';
12
+ import { currentPage, routerPush } from '../utils/chat/chat-router';
13
+ import BaseSpin from '../components/chat/common/spin/BaseSpin.vue';
14
+ import Calling from '../components/chat/call/Calling.vue';
15
+ import { logout } from '../utils/chat/auth';
16
+ import MobileFooter from '../components/chat/layout/mobile/Footer.vue';
17
+ import { initWebSocket } from '../plugins/websocket';
18
18
  const routerConfig = [
19
19
  { id: PAGE.HOME, backFunc: null, backTitle: '' },
20
20
  {
@@ -57,7 +57,7 @@ const routerMobileConfig = [
57
57
  }
58
58
  ];
59
59
  const props = withDefaults(defineProps(), {
60
- response: 'mobile'
60
+ response: 'tablet'
61
61
  });
62
62
  const { initPage } = useInitData();
63
63
  const currentPageConfig = computed(() => {
@@ -89,7 +89,7 @@ initWebSocket('https://web-socket.dev01.dtsmart.dev');
89
89
  initPage({ id: props.id, domain: props.domain, token: props.token, response: props.response });
90
90
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
91
91
  const __VLS_defaults = {
92
- response: 'mobile'
92
+ response: 'tablet'
93
93
  };
94
94
  const __VLS_ctx = {
95
95
  ...{},
@@ -164,35 +164,32 @@ else if (__VLS_ctx.response == 'mobile') {
164
164
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
165
165
  ...{ class: "grow overflow-hidden" },
166
166
  });
167
- if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) {
168
- // @ts-ignore
169
- [currentPage, PAGE,];
170
- /** @type {[typeof ChatList, ]} */ ;
171
- // @ts-ignore
172
- const __VLS_12 = __VLS_asFunctionalComponent(ChatList, new ChatList({
173
- ...{ 'onSelectReceiver': {} },
174
- ref: "chatListRef",
175
- ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
176
- response: (__VLS_ctx.response),
177
- receiverId: (__VLS_ctx.receiverId),
178
- }));
179
- const __VLS_13 = __VLS_12({
180
- ...{ 'onSelectReceiver': {} },
181
- ref: "chatListRef",
182
- ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
183
- response: (__VLS_ctx.response),
184
- receiverId: (__VLS_ctx.receiverId),
185
- }, ...__VLS_functionalComponentArgsRest(__VLS_12));
186
- let __VLS_15;
187
- let __VLS_16;
188
- const __VLS_17 = ({ selectReceiver: {} },
189
- { onSelectReceiver: (__VLS_ctx.selectReceiver) });
190
- /** @type {typeof __VLS_ctx.chatListRef} */ ;
191
- var __VLS_18 = {};
192
- // @ts-ignore
193
- [response, receiverId, selectReceiver, chatListRef,];
194
- var __VLS_14;
195
- }
167
+ /** @type {[typeof ChatList, ]} */ ;
168
+ // @ts-ignore
169
+ const __VLS_12 = __VLS_asFunctionalComponent(ChatList, new ChatList({
170
+ ...{ 'onSelectReceiver': {} },
171
+ ref: "chatListRef",
172
+ ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
173
+ response: (__VLS_ctx.response),
174
+ receiverId: (__VLS_ctx.receiverId),
175
+ }));
176
+ const __VLS_13 = __VLS_12({
177
+ ...{ 'onSelectReceiver': {} },
178
+ ref: "chatListRef",
179
+ ...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
180
+ response: (__VLS_ctx.response),
181
+ receiverId: (__VLS_ctx.receiverId),
182
+ }, ...__VLS_functionalComponentArgsRest(__VLS_12));
183
+ let __VLS_15;
184
+ let __VLS_16;
185
+ const __VLS_17 = ({ selectReceiver: {} },
186
+ { onSelectReceiver: (__VLS_ctx.selectReceiver) });
187
+ __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
188
+ /** @type {typeof __VLS_ctx.chatListRef} */ ;
189
+ var __VLS_18 = {};
190
+ // @ts-ignore
191
+ [currentPage, PAGE, response, receiverId, selectReceiver, chatListRef,];
192
+ var __VLS_14;
196
193
  /** @type {[typeof HomeComponent, ]} */ ;
197
194
  // @ts-ignore
198
195
  const __VLS_21 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
@@ -257,9 +254,9 @@ else if (__VLS_ctx.response == 'mobile') {
257
254
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
258
255
  // @ts-ignore
259
256
  [currentPage, PAGE,];
260
- /** @type {[typeof CustomerApointment, ]} */ ;
257
+ /** @type {[typeof CustomerAppointment, ]} */ ;
261
258
  // @ts-ignore
262
- const __VLS_40 = __VLS_asFunctionalComponent(CustomerApointment, new CustomerApointment({
259
+ const __VLS_40 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
263
260
  ...{ class: "h-full" },
264
261
  }));
265
262
  const __VLS_41 = __VLS_40({
@@ -411,29 +408,29 @@ else {
411
408
  if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
412
409
  // @ts-ignore
413
410
  [currentPage, PAGE,];
414
- /** @type {[typeof CustomerApointment, ]} */ ;
411
+ /** @type {[typeof CustomerAppointment, ]} */ ;
415
412
  // @ts-ignore
416
- const __VLS_80 = __VLS_asFunctionalComponent(CustomerApointment, new CustomerApointment({
413
+ const __VLS_80 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
417
414
  ...{ class: "h-full" },
418
415
  }));
419
416
  const __VLS_81 = __VLS_80({
420
417
  ...{ class: "h-full" },
421
418
  }, ...__VLS_functionalComponentArgsRest(__VLS_80));
422
419
  }
423
- /** @type {[typeof Calling, ]} */ ;
424
- // @ts-ignore
425
- const __VLS_84 = __VLS_asFunctionalComponent(Calling, new Calling({
426
- ref: "callingRef",
427
- }));
428
- const __VLS_85 = __VLS_84({
429
- ref: "callingRef",
430
- }, ...__VLS_functionalComponentArgsRest(__VLS_84));
431
- /** @type {typeof __VLS_ctx.callingRef} */ ;
432
- var __VLS_87 = {};
433
- // @ts-ignore
434
- [callingRef,];
435
- var __VLS_86;
436
420
  }
421
+ /** @type {[typeof Calling, ]} */ ;
422
+ // @ts-ignore
423
+ const __VLS_84 = __VLS_asFunctionalComponent(Calling, new Calling({
424
+ ref: "callingRef",
425
+ }));
426
+ const __VLS_85 = __VLS_84({
427
+ ref: "callingRef",
428
+ }, ...__VLS_functionalComponentArgsRest(__VLS_84));
429
+ /** @type {typeof __VLS_ctx.callingRef} */ ;
430
+ var __VLS_87 = {};
431
+ // @ts-ignore
432
+ [callingRef,];
433
+ var __VLS_86;
437
434
  /** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
438
435
  /** @type {__VLS_StyleScopedClasses['p-8']} */ ;
439
436
  /** @type {__VLS_StyleScopedClasses['m-auto']} */ ;
@@ -1,12 +1,12 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import CardCustomerDetail from '@/components/chat/card/CardCustomerDetail.vue';
3
- import IconFilter from '@/assets/icons/customer-appointment/IconFilter.vue';
2
+ import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail.vue';
3
+ import IconFilter from '../../../assets/icons/customer-appointment/IconFilter.vue';
4
4
  import { computed } from 'vue';
5
- import { getItemsByYear, userHistory } from '@/utils/chat/user';
6
- import { CalendarStatus } from '@/constant/user';
5
+ import { getItemsByYear, userHistory } from '../../../utils/chat/user';
6
+ import { CalendarStatus } from '../../../constant/user';
7
7
  import dayjs from 'dayjs';
8
8
  import { DATE_FORMATS } from '../../../constant/datetime';
9
- import CollapseCheckIn from '@/chat/page/customer-check-in/CollapseCheckIn.vue';
9
+ import CollapseCheckIn from '../../../chat/page/customer-check-in/CollapseCheckIn.vue';
10
10
  const appointment = computed(() => {
11
11
  return getItemsByYear(userHistory.value?.appointment ?? [], 'start_time');
12
12
  });
@@ -1,6 +1,6 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import IconArrow from '@/assets/icons/customer-detail/IconArrow.vue';
3
- import CollapseBase from '@/components/chat/common/collapse/CollapseBase.vue';
2
+ import IconArrow from '../../../assets/icons/customer-detail/IconArrow.vue';
3
+ import CollapseBase from '../../../components/chat/common/collapse/CollapseBase.vue';
4
4
  import { ref } from 'vue';
5
5
  const props = withDefaults(defineProps(), {});
6
6
  const open = ref(true);
@@ -1,9 +1,9 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import CardCustomerDetail from '@/components/chat/card/CardCustomerDetail.vue';
3
- import { Status_Color } from '@/constant/color';
2
+ import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail.vue';
3
+ import { Status_Color } from '../../../constant/color';
4
4
  import { computed, ref } from 'vue';
5
- import CollapseCheckIn from '@/chat/page/customer-check-in/CollapseCheckIn.vue';
6
- import { getItemsByYear, userHistory } from '@/utils/chat/user';
5
+ import CollapseCheckIn from '../../../chat/page/customer-check-in/CollapseCheckIn.vue';
6
+ import { getItemsByYear, userHistory } from '../../../utils/chat/user';
7
7
  import dayjs from 'dayjs';
8
8
  import { DATE_FORMATS } from '../../../constant/datetime';
9
9
  const checkin = computed(() => {
@@ -1,4 +1,4 @@
1
- import type { PAGE_RESPONSE } from '@/types/chat/global';
1
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
2
2
  type Props = {
3
3
  receiverId: any;
4
4
  response: PAGE_RESPONSE;
@@ -1,19 +1,19 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import Avatar from '@/components/chat/customer/Avatar.vue';
3
- import { PAGE } from '@/constant/general';
4
- import SubInformation from '@/chat/page/customer-detail/SubInformation.vue';
5
- import IconMessage from '@/assets/icons/customer-detail/IconMessage.vue';
6
- import IconPhone from '@/assets/icons/customer-detail/IconPhone.vue';
7
- import IconCheck from '@/assets/icons/customer-detail/IconCheck.vue';
8
- import IconDate from '@/assets/icons/customer-detail/IconDate.vue';
9
- import IconGroup from '@/assets/icons/customer-detail/IconGroup.vue';
10
- import IconNote from '@/assets/icons/customer-detail/IconNote.vue';
11
- import IconSearch from '@/assets/icons/customer-detail/IconSearch.vue';
12
- import IconPin from '@/assets/icons/customer-detail/IconPin.vue';
2
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
3
+ import { PAGE } from '../../../constant/general';
4
+ import SubInformation from '../../../chat/page/customer-detail/SubInformation.vue';
5
+ import IconMessage from '../../../assets/icons/customer-detail/IconMessage.vue';
6
+ import IconPhone from '../../../assets/icons/customer-detail/IconPhone.vue';
7
+ import IconCheck from '../../../assets/icons/customer-detail/IconCheck.vue';
8
+ import IconDate from '../../../assets/icons/customer-detail/IconDate.vue';
9
+ import IconGroup from '../../../assets/icons/customer-detail/IconGroup.vue';
10
+ import IconNote from '../../../assets/icons/customer-detail/IconNote.vue';
11
+ import IconSearch from '../../../assets/icons/customer-detail/IconSearch.vue';
12
+ import IconPin from '../../../assets/icons/customer-detail/IconPin.vue';
13
13
  import { getUserHistory, user, userHistory } from '../../../utils/chat/user';
14
14
  import { computed } from 'vue';
15
- import { phoneNumberFormat } from '@/utils/string-helper';
16
- import { routerPush } from '@/utils/chat/chat-router';
15
+ import { phoneNumberFormat } from '../../../utils/string-helper';
16
+ import { routerPush } from '../../../utils/chat/chat-router';
17
17
  const props = withDefaults(defineProps(), {});
18
18
  const customerTotalDetail = computed(() => {
19
19
  return [
@@ -76,7 +76,7 @@ let __VLS_elements;
76
76
  let __VLS_components;
77
77
  let __VLS_directives;
78
78
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
79
- ...{ class: "chat-padding-page" },
79
+ ...{ class: "chat-padding-page overflow-auto" },
80
80
  });
81
81
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
82
82
  ...{ class: "flex flex-col items-center mx-auto" },
@@ -107,7 +107,7 @@ __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
107
107
  // @ts-ignore
108
108
  [user,];
109
109
  __VLS_asFunctionalElement(__VLS_elements.img)({
110
- src: "@/assets/images/icons/new-customer.png",
110
+ src: "../../../assets/images/icons/new-customer.png",
111
111
  });
112
112
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
113
113
  ...{ class: " mt-5 text-center mx-auto" },
@@ -189,6 +189,7 @@ const __VLS_13 = __VLS_12({
189
189
  [otherActions,];
190
190
  /** @type {__VLS_StyleScopedClasses['']} */ ;
191
191
  /** @type {__VLS_StyleScopedClasses['chat-padding-page']} */ ;
192
+ /** @type {__VLS_StyleScopedClasses['overflow-auto']} */ ;
192
193
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
193
194
  /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
194
195
  /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import IconArrow from '@/assets/icons/customer-detail/IconArrow.vue';
2
+ import IconArrow from '../../../assets/icons/customer-detail/IconArrow.vue';
3
3
  const props = withDefaults(defineProps(), {
4
4
  information: [],
5
5
  title: ''
@@ -1,5 +1,5 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { logout } from '@/utils/chat/auth.js';
2
+ import { logout } from '../../../utils/chat/auth.js';
3
3
  const reload = () => window.location.reload();
4
4
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
5
5
  const __VLS_ctx = {
@@ -1,4 +1,4 @@
1
- import { PAGE_RESPONSE } from '@/types/chat/global';
1
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
2
2
  type Props = {
3
3
  response: PAGE_RESPONSE;
4
4
  };
@@ -1,15 +1,15 @@
1
- import InputSearch from '@/components/chat/common/input/InputSearch.vue';
2
- import IconPlus from '@/assets/icons/IconPlus.vue';
1
+ import InputSearch from '../../../components/chat/common/input/InputSearch.vue';
2
+ import IconPlus from '../../../assets/icons/IconPlus.vue';
3
3
  import { nextTick, onMounted, onUnmounted, ref } from 'vue';
4
- import Avatar from '@/components/chat/customer/Avatar.vue';
5
- import { getConversation } from '@/utils/chat/conversation';
6
- import BaseSpin from '@/components/chat/common/spin/BaseSpin.vue';
7
- import ScrollEvent from '@/components/chat/ScrollEvent/ScrollEvent.vue';
8
- import { useDebounce } from '@/utils/debounce';
9
- import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '@/plugins/mqtt';
10
- import { TOPIC_HOME, TOPIC_STATUS_USER } from '@/constant/mqtt';
11
- import { dataProfile } from '@/utils/chat/auth';
12
- import { readMessages } from '@/utils/chat/message';
4
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
5
+ import { getConversation } from '../../../utils/chat/conversation';
6
+ import BaseSpin from '../../../components/chat/common/spin/BaseSpin.vue';
7
+ import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
8
+ import { useDebounce } from '../../../utils/debounce';
9
+ import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt';
10
+ import { TOPIC_HOME, TOPIC_STATUS_USER } from '../../../constant/mqtt';
11
+ import { dataProfile } from '../../../utils/chat/auth';
12
+ import { readMessages } from '../../../utils/chat/message';
13
13
  import dayjs from 'dayjs';
14
14
  import relativeTime from 'dayjs/plugin/relativeTime';
15
15
  dayjs.extend(relativeTime);
@@ -214,14 +214,12 @@ const __VLS_15 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
214
214
  ref: "scrollEventRef",
215
215
  ...{ class: "h-full overflow-auto" },
216
216
  bottom: true,
217
- top: true,
218
217
  }));
219
218
  const __VLS_16 = __VLS_15({
220
219
  ...{ 'onGetDataBottom': {} },
221
220
  ref: "scrollEventRef",
222
221
  ...{ class: "h-full overflow-auto" },
223
222
  bottom: true,
224
- top: true,
225
223
  }, ...__VLS_functionalComponentArgsRest(__VLS_15));
226
224
  let __VLS_18;
227
225
  let __VLS_19;
@@ -1,5 +1,5 @@
1
- import type { IResMessage, IResUser } from '@/types/message';
2
- import type { PAGE_RESPONSE } from '@/types/chat/global';
1
+ import type { IResMessage, IResUser } from '../../../types/message';
2
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type Props = {
4
4
  data: IResUser | null;
5
5
  message: IResMessage[];
@@ -1,9 +1,9 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import Avatar from '@/components/chat/customer/Avatar.vue';
3
- import { dataProfile } from '@/utils/chat/auth';
2
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
3
+ import { dataProfile } from '../../../utils/chat/auth';
4
4
  import { nextTick, ref } from 'vue';
5
- import ScrollEvent from '@/components/chat/ScrollEvent/ScrollEvent.vue';
6
- import { MessageState } from '@/constant/message';
5
+ import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
6
+ import { MessageState } from '../../../constant/message';
7
7
  const props = withDefaults(defineProps(), {});
8
8
  const emit = defineEmits();
9
9
  const scrollEventRef = ref(null);
@@ -1,5 +1,5 @@
1
- import type { IResUser } from '@/types/message';
2
- import type { PAGE_RESPONSE } from '@/types/chat/global';
1
+ import type { IResUser } from '../../../types/message';
2
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type Props = {
4
4
  receiverId: any;
5
5
  response: PAGE_RESPONSE;
@@ -1,16 +1,16 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import HomeHeader from '@/chat/page/home/HomeHeader.vue';
3
- import NewCustomer from '@/chat/page/home/NewCustomer.vue';
4
- import InputChat from '@/chat/page/home/InputChat.vue';
5
- import { getCountUnread, getDetailReceiver, getMessage, sendMessage, upLoadImage } from '@/utils/chat/message';
2
+ import HomeHeader from '../../../chat/page/home/HomeHeader.vue';
3
+ import NewCustomer from '../../../chat/page/home/NewCustomer.vue';
4
+ import InputChat from '../../../chat/page/home/InputChat.vue';
5
+ import { getCountUnread, getDetailReceiver, getMessage, sendMessage, upLoadImage } from '../../../utils/chat/message';
6
6
  import { nextTick, onMounted, onUnmounted, ref, shallowRef } from 'vue';
7
- import ChatMessage from '@/chat/page/home/ChatMessage.vue';
8
- import { addHandleMqttMessage, connectMqtt, publishMessage, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '@/plugins/mqtt';
9
- import { TOPIC_DETAIL_CHAT, TOPIC_HOME } from '@/constant/mqtt';
10
- import { dataProfile } from '@/utils/chat/auth';
7
+ import ChatMessage from '../../../chat/page/home/ChatMessage.vue';
8
+ import { addHandleMqttMessage, connectMqtt, publishMessage, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../../../plugins/mqtt';
9
+ import { TOPIC_DETAIL_CHAT, TOPIC_HOME } from '../../../constant/mqtt';
10
+ import { dataProfile } from '../../../utils/chat/auth';
11
11
  import dayjs from 'dayjs';
12
- import { DATE_FORMATS } from '@/constant/datetime';
13
- import { MessageState } from '@/constant/message';
12
+ import { DATE_FORMATS } from '../../../constant/datetime';
13
+ import { MessageState } from '../../../constant/message';
14
14
  const props = withDefaults(defineProps(), {});
15
15
  const emit = defineEmits();
16
16
  let page = 1;
@@ -1,4 +1,4 @@
1
- import type { IResUser } from '@/types/message';
1
+ import type { IResUser } from '../../../types/message';
2
2
  type Props = {
3
3
  data: IResUser | null;
4
4
  };
@@ -1,9 +1,9 @@
1
- import IconPhone from '@/assets/icons/IconPhone.vue';
2
- import { PAGE } from '@/constant/general';
3
- import Avatar from '@/components/chat/customer/Avatar.vue';
4
- import { routerPush } from '@/utils/chat/chat-router';
5
- import { user } from '@/utils/chat/user';
6
- import { dataProfile } from '@/utils/chat/auth';
1
+ import IconPhone from '../../../assets/icons/IconPhone.vue';
2
+ import { PAGE } from '../../../constant/general';
3
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
4
+ import { routerPush } from '../../../utils/chat/chat-router';
5
+ import { user } from '../../../utils/chat/user';
6
+ import { dataProfile } from '../../../utils/chat/auth';
7
7
  const props = withDefaults(defineProps(), {});
8
8
  const emit = defineEmits();
9
9
  const goToViewUser = () => {
@@ -1,4 +1,4 @@
1
- import type { IResMessage, IResUser } from '@/types/message';
1
+ import type { IResMessage, IResUser } from '../../../types/message';
2
2
  import 'vue3-emoji-picker/css';
3
3
  type Props = {
4
4
  data: IResUser | null;
@@ -1,12 +1,12 @@
1
- import IconPlus from '@/assets/icons/IconPlus.vue';
2
- import IconPlan from '@/assets/icons/IconPlan.vue';
1
+ import IconPlus from '../../../assets/icons/IconPlus.vue';
2
+ import IconPlan from '../../../assets/icons/IconPlan.vue';
3
3
  import EmojiPicker from 'vue3-emoji-picker';
4
4
  import 'vue3-emoji-picker/css';
5
5
  import dayjs from 'dayjs';
6
- import { DATE_FORMATS } from '@/constant/datetime';
7
- import { dataProfile } from '@/utils/chat/auth';
6
+ import { DATE_FORMATS } from '../../../constant/datetime';
7
+ import { dataProfile } from '../../../utils/chat/auth';
8
8
  import { ref } from 'vue';
9
- import PopoverBase from '@/components/chat/common/popover/PopoverBase.vue';
9
+ import PopoverBase from '../../../components/chat/common/popover/PopoverBase.vue';
10
10
  const props = withDefaults(defineProps(), {});
11
11
  const emit = defineEmits();
12
12
  const keyword = defineModel();
@@ -59,7 +59,7 @@ const handleFileUpload = () => {
59
59
  handleSendMessage('file');
60
60
  };
61
61
  const onSelectEmoji = (value) => {
62
- keyword.value = keyword.value + (value?.i ?? '');
62
+ keyword.value = (keyword.value ?? '') + (value?.i?.replace('undefined', '') ?? '');
63
63
  emojiOpen.value = false;
64
64
  chatInputRef.value?.focus?.();
65
65
  };
@@ -116,9 +116,9 @@ const { default: __VLS_3 } = __VLS_2.slots;
116
116
  [emojiOpen,];
117
117
  __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
118
118
  ...{ onClick: (...[$event]) => {
119
- __VLS_ctx.emojiOpen = true;
119
+ __VLS_ctx.emojiOpen = !__VLS_ctx.emojiOpen;
120
120
  // @ts-ignore
121
- [emojiOpen,];
121
+ [emojiOpen, emojiOpen,];
122
122
  } },
123
123
  ...{ class: "" },
124
124
  });
@@ -131,14 +131,16 @@ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
131
131
  // @ts-ignore
132
132
  const __VLS_6 = __VLS_asFunctionalComponent(__VLS_5, new __VLS_5({
133
133
  ...{ 'onSelect': {} },
134
- ...{ class: "!w-[450px]" },
134
+ ...{ class: "!w-[300px]" },
135
135
  native: (true),
136
+ offset: (2),
136
137
  hideSearch: true,
137
138
  }));
138
139
  const __VLS_7 = __VLS_6({
139
140
  ...{ 'onSelect': {} },
140
- ...{ class: "!w-[450px]" },
141
+ ...{ class: "!w-[300px]" },
141
142
  native: (true),
143
+ offset: (2),
142
144
  hideSearch: true,
143
145
  }, ...__VLS_functionalComponentArgsRest(__VLS_6));
144
146
  let __VLS_9;
@@ -203,7 +205,7 @@ const __VLS_18 = __VLS_17({
203
205
  /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
204
206
  /** @type {__VLS_StyleScopedClasses['right-0']} */ ;
205
207
  /** @type {__VLS_StyleScopedClasses['bottom-0']} */ ;
206
- /** @type {__VLS_StyleScopedClasses['!w-[450px]']} */ ;
208
+ /** @type {__VLS_StyleScopedClasses['!w-[300px]']} */ ;
207
209
  /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
208
210
  /** @type {__VLS_StyleScopedClasses['w-10']} */ ;
209
211
  /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
@@ -1,4 +1,4 @@
1
- import type { IResUser } from '@/types/message';
1
+ import type { IResUser } from '../../../types/message';
2
2
  type Props = {
3
3
  data: IResUser | null;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import Avatar from '@/components/chat/customer/Avatar.vue';
2
+ import Avatar from '../../../components/chat/customer/Avatar.vue';
3
3
  const props = withDefaults(defineProps(), {});
4
4
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
5
5
  const __VLS_defaults = {};
@@ -43,7 +43,7 @@ __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
43
43
  // @ts-ignore
44
44
  [data,];
45
45
  __VLS_asFunctionalElement(__VLS_elements.img)({
46
- src: "@/assets/images/icons/new-customer.png",
46
+ src: "../../../assets/images/icons/new-customer.png",
47
47
  });
48
48
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
49
49
  ...{ class: "text-chat-haze-400 text-sm mt-1 flex items-center gap-1" },
@@ -1,32 +1,30 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { onMounted, onBeforeUnmount, computed } from 'vue';
3
- import { useDebounce } from '@/utils/debounce';
4
- import { useGeneralStore } from '@/stores/general';
5
- const deviceType = computed({
6
- set(value) {
7
- return useGeneralStore().deviceResponsive = value;
8
- },
9
- get() {
10
- return useGeneralStore().deviceResponsive;
11
- }
12
- });
13
- const getDeviceType = () => {
14
- const width = window.innerWidth;
15
- if (width < 767) {
16
- return 'mobile';
17
- }
18
- else if (width < 1023) {
19
- return 'tablet';
20
- }
21
- else {
22
- return 'window';
23
- }
24
- };
2
+ import { onMounted, onBeforeUnmount } from 'vue';
3
+ import { useDebounce } from '../utils/debounce';
4
+ // import { useGeneralStore } from '@/stores/general'
5
+ // const deviceType = computed({
6
+ // set(value: any) {
7
+ // return useGeneralStore().deviceResponsive = value
8
+ // },
9
+ // get() {
10
+ // return useGeneralStore().deviceResponsive
11
+ // }
12
+ // })
13
+ // const getDeviceType = () => {
14
+ // const width = window.innerWidth
15
+ // if (width < 767) {
16
+ // return 'mobile'
17
+ // } else if (width < 1023) {
18
+ // return 'tablet'
19
+ // } else {
20
+ // return 'window'
21
+ // }
22
+ // }
25
23
  const updateDeviceType = useDebounce(() => {
26
- const newType = getDeviceType();
27
- if (deviceType.value !== newType) {
28
- deviceType.value = newType;
29
- }
24
+ // const newType = getDeviceType()
25
+ // if (deviceType.value !== newType) {
26
+ // deviceType.value = newType
27
+ // }
30
28
  }, 500);
31
29
  onMounted(() => {
32
30
  updateDeviceType();
@@ -1,6 +1,6 @@
1
1
  /// <reference types="C:/phonghq/go-chat/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
2
  import { ref } from 'vue';
3
- import { useDebounce } from '@/utils/debounce';
3
+ import { useDebounce } from '../../../utils/debounce';
4
4
  const props = withDefaults(defineProps(), {});
5
5
  const emit = defineEmits();
6
6
  const scrollEvent = ref(null);
@@ -1,4 +1,4 @@
1
- import type { IResUser } from '@/types/message';
1
+ import type { IResUser } from '../../../types/message';
2
2
  declare function endCall(): void;
3
3
  declare const _default: import("vue").DefineComponent<{}, {
4
4
  startCall: (data: IResUser) => Promise<void>;