@phonghq/go-chat 1.0.24 → 1.0.26

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 (44) hide show
  1. package/dist/assets/icons/IconCloseCircle.vue.d.ts +2 -0
  2. package/dist/chat/page/home/ChatList.vue.d.ts +5 -2
  3. package/dist/chat/page/home/ChatMessage.vue.d.ts +2 -0
  4. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +10 -3
  5. package/dist/chat/page/home/Home.vue.d.ts +1 -0
  6. package/dist/chat/page/setting/Setting.vue.d.ts +2 -0
  7. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +1 -0
  8. package/dist/components/chat/call/Calling.vue.d.ts +2 -2
  9. package/dist/components/chat/select/SelectBase.vue.d.ts +2 -0
  10. package/dist/components/common/button/ButtonBase.vue.d.ts +1 -1
  11. package/dist/components/common/drawer/DrawerBase.vue.d.ts +1 -1
  12. package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +1 -0
  13. package/dist/composable/useCallHelper.d.ts +2 -0
  14. package/dist/composable/useListConversations.d.ts +4 -2
  15. package/dist/go-chat.es.js +10491 -10554
  16. package/dist/go-chat.umd.js +13 -13
  17. package/dist/style.css +1 -1
  18. package/dist/test/assets/icons/IconCloseCircle.vue.js +36 -0
  19. package/dist/test/chat/App.vue.js +98 -21
  20. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -3
  21. package/dist/test/chat/page/home/ChatList.vue.js +20 -34
  22. package/dist/test/chat/page/home/ChatMessage.vue.js +32 -22
  23. package/dist/test/chat/page/home/ChatMessageItem.vue.js +51 -37
  24. package/dist/test/chat/page/home/Home.vue.js +26 -61
  25. package/dist/test/chat/page/home/HomeHeader.vue.js +0 -6
  26. package/dist/test/chat/page/home/InputChat.vue.js +0 -1
  27. package/dist/test/chat/page/setting/Setting.vue.js +125 -0
  28. package/dist/test/components/chat/call/Calling.vue.js +22 -6
  29. package/dist/test/components/chat/select/SelectBase.vue.js +13 -3
  30. package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +9 -4
  31. package/dist/test/composable/useDigibot.js +2 -1
  32. package/dist/test/composable/useInitData.js +0 -6
  33. package/dist/test/composable/useListConversations.js +6 -4
  34. package/dist/test/composable/usePlivo.js +9 -3
  35. package/dist/test/types/chat/call.js +3 -1
  36. package/dist/test/utils/chat/auth.js +4 -3
  37. package/dist/test/utils/chat/conversation.js +57 -0
  38. package/dist/types/chat/call.d.ts +2 -0
  39. package/dist/types/chat/global.d.ts +1 -0
  40. package/dist/types/conversation.d.ts +2 -1
  41. package/dist/types/message.d.ts +1 -0
  42. package/dist/utils/chat/conversation.d.ts +7 -0
  43. package/dist/utils/chat/user.d.ts +2 -0
  44. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
14
14
  id: number;
15
15
  receiver_id: number;
16
16
  username: string | null;
17
- customer_phone: string;
17
+ phone: string;
18
18
  avatar: string | null;
19
19
  last_message: string;
20
20
  last_message_time: string;
@@ -23,11 +23,12 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
23
23
  unread_count: number;
24
24
  status: number;
25
25
  color: string;
26
+ is_unknown: number;
26
27
  }[], IConversation[] | {
27
28
  id: number;
28
29
  receiver_id: number;
29
30
  username: string | null;
30
- customer_phone: string;
31
+ phone: string;
31
32
  avatar: string | null;
32
33
  last_message: string;
33
34
  last_message_time: string;
@@ -36,7 +37,9 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
36
37
  unread_count: number;
37
38
  status: number;
38
39
  color: string;
40
+ is_unknown: number;
39
41
  }[]>;
42
+ getCurrentConversation: () => IConversation | undefined;
40
43
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
41
44
  "update:receiverId": (value: any) => any;
42
45
  } & {
@@ -12,7 +12,9 @@ declare const _default: import("vue").DefineComponent<Props, {
12
12
  fixedScroll: () => void;
13
13
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
14
  scrollTop: () => any;
15
+ callBack: () => any;
15
16
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
17
  onScrollTop?: (() => any) | undefined;
18
+ onCallBack?: (() => any) | undefined;
17
19
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
20
  export default _default;
@@ -2,10 +2,17 @@ import type { IResMessage, IResUser } from '../../../types/message';
2
2
  import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type Props = {
4
4
  message: IResMessage;
5
- index: number;
6
- listMessage: IResMessage[];
7
5
  responsive: PAGE_RESPONSE;
6
+ isEndMessage: boolean;
7
+ isMyMessage: boolean;
8
+ isLastMessage: boolean;
9
+ shouldShowAvatar: boolean;
10
+ isChatFinished: boolean;
8
11
  data: IResUser | null;
9
12
  };
10
- declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
14
+ callAgain: () => any;
15
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
+ onCallAgain?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
18
  export default _default;
@@ -9,6 +9,7 @@ declare const _default: import("vue").DefineComponent<Props, {
9
9
  handleGetMessage: (option?: {
10
10
  resetList?: boolean | undefined;
11
11
  } | undefined) => Promise<void>;
12
+ infoUser: import("vue").ShallowRef<IResUser | null>;
12
13
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
14
  call: (value: IResUser) => any;
14
15
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,6 +1,7 @@
1
1
  type Props = {
2
2
  top?: boolean;
3
3
  bottom?: boolean;
4
+ disabled?: boolean;
4
5
  };
5
6
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
6
7
  hideLoading: () => void;
@@ -5,9 +5,9 @@ type __VLS_Props = {
5
5
  };
6
6
  declare const _default: import("vue").DefineComponent<__VLS_Props, CallInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
7
  userCalling: (id: IResUser) => any;
8
- endCall: (id: IResUser | null) => any;
8
+ endCall: (id: IResUser | null, type: string) => any;
9
9
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
10
  onUserCalling?: ((id: IResUser) => any) | undefined;
11
- onEndCall?: ((id: IResUser | null) => any) | undefined;
11
+ onEndCall?: ((id: IResUser | null, type: string) => any) | undefined;
12
12
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  export default _default;
@@ -4,6 +4,8 @@ type __VLS_Props = {
4
4
  label: string;
5
5
  value: string | number;
6
6
  }[];
7
+ placement?: 'top' | 'bottom';
8
+ disabled?: boolean;
7
9
  };
8
10
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
11
  select: (id: any) => any;
@@ -11,8 +11,8 @@ type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_12) => any;
12
12
  };
13
13
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
- loading: boolean;
15
14
  disabled: boolean;
15
+ loading: boolean;
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
17
17
  export default _default;
18
18
  type __VLS_WithSlots<T, S> = T & {
@@ -24,8 +24,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Publ
24
24
  }>, {
25
25
  title: string;
26
26
  width: string | number;
27
- showTitle: boolean;
28
27
  placement: import("vaul-vue").DrawerDirection;
28
+ showTitle: boolean;
29
29
  showButtonClose: boolean;
30
30
  disableClose: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -5,6 +5,7 @@ type __VLS_Props = {
5
5
  width?: number;
6
6
  responsive: PAGE_RESPONSE;
7
7
  disabledClose?: boolean;
8
+ absolute?: boolean;
8
9
  };
9
10
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Props, {
10
11
  close: () => Promise<void>;
@@ -25,6 +25,7 @@ export declare function useCallHelper(): {
25
25
  color: string;
26
26
  status: number;
27
27
  last_offline_at: string;
28
+ is_unknown: number;
28
29
  } | null, IResUser | {
29
30
  id: string;
30
31
  username: string;
@@ -35,6 +36,7 @@ export declare function useCallHelper(): {
35
36
  color: string;
36
37
  status: number;
37
38
  last_offline_at: string;
39
+ is_unknown: number;
38
40
  } | null>;
39
41
  testPlay: () => void;
40
42
  handleCallAnswer: (data: any) => void;
@@ -4,7 +4,7 @@ export declare const useListConversations: (is_unknown: number) => {
4
4
  id: number;
5
5
  receiver_id: number;
6
6
  username: string | null;
7
- customer_phone: string;
7
+ phone: string;
8
8
  avatar: string | null;
9
9
  last_message: string;
10
10
  last_message_time: string;
@@ -13,11 +13,12 @@ export declare const useListConversations: (is_unknown: number) => {
13
13
  unread_count: number;
14
14
  status: number;
15
15
  color: string;
16
+ is_unknown: number;
16
17
  }[], IConversation[] | {
17
18
  id: number;
18
19
  receiver_id: number;
19
20
  username: string | null;
20
- customer_phone: string;
21
+ phone: string;
21
22
  avatar: string | null;
22
23
  last_message: string;
23
24
  last_message_time: string;
@@ -26,6 +27,7 @@ export declare const useListConversations: (is_unknown: number) => {
26
27
  unread_count: number;
27
28
  status: number;
28
29
  color: string;
30
+ is_unknown: number;
29
31
  }[]>;
30
32
  params: import("vue").Ref<{
31
33
  page: number;