@phonghq/go-chat 1.0.11 → 1.0.13

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 (56) hide show
  1. package/dist/assets/icons/IconAiCheck.vue.d.ts +2 -0
  2. package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
  3. package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
  4. package/dist/chat/App.vue.d.ts +7 -2
  5. package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +1 -1
  6. package/dist/chat/page/home/ChatList.vue.d.ts +29 -1
  7. package/dist/chat/page/home/ChatMessage.vue.d.ts +1 -1
  8. package/dist/chat/page/home/Home.vue.d.ts +1 -1
  9. package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +1 -0
  10. package/dist/components/chat/call/Calling.vue.d.ts +8 -2
  11. package/dist/components/chat/common/input/InputSearch.vue.d.ts +1 -1
  12. package/dist/components/chat/select/SelectBase.vue.d.ts +22 -0
  13. package/dist/composable/useCallHelper.d.ts +6 -2
  14. package/dist/composable/useInitData.d.ts +2 -4
  15. package/dist/go-chat.es.js +22339 -20111
  16. package/dist/go-chat.umd.js +44 -14
  17. package/dist/plugins/websocket.d.ts +12 -2
  18. package/dist/router/index.d.ts +2 -0
  19. package/dist/style.css +1 -1
  20. package/dist/test/assets/icons/IconAiCheck.vue.js +28 -0
  21. package/dist/test/assets/icons/call/IconClose.vue.js +26 -0
  22. package/dist/test/assets/icons/call/IconSoundDownload.vue.js +50 -0
  23. package/dist/test/chat/App.vue.js +145 -90
  24. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +6 -5
  25. package/dist/test/chat/page/home/ChatList.vue.js +30 -9
  26. package/dist/test/chat/page/home/ChatMessage.vue.js +17 -9
  27. package/dist/test/chat/page/home/Home.vue.js +3 -3
  28. package/dist/test/chat/page/home/NewCustomer.vue.js +0 -12
  29. package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +7 -1
  30. package/dist/test/components/chat/call/Calling.vue.js +198 -76
  31. package/dist/test/components/chat/common/input/InputSearch.vue.js +2 -2
  32. package/dist/test/components/chat/select/SelectBase.vue.js +98 -0
  33. package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +0 -1
  34. package/dist/test/composable/data.json +32 -0
  35. package/dist/test/composable/useCallHelper.js +143 -33
  36. package/dist/test/composable/useDigibot.js +1 -1
  37. package/dist/test/composable/useInitData.js +17 -12
  38. package/dist/test/constant/color.js +1 -1
  39. package/dist/test/plugins/axios.js +2 -1
  40. package/dist/test/plugins/mqtt.js +11 -5
  41. package/dist/test/plugins/websocket.js +84 -4
  42. package/dist/test/router/index.js +39 -0
  43. package/dist/test/utils/chat/auth.js +10 -2
  44. package/dist/test/utils/chat/call.js +32 -5
  45. package/dist/test/utils/chat/phone-string.js +4 -0
  46. package/dist/test/utils/chat/user.js +7 -2
  47. package/dist/test/views/NotFound.vue.js +47 -0
  48. package/dist/test/views/TenantPhone.vue.js +270 -0
  49. package/dist/types/chat/global.d.ts +4 -0
  50. package/dist/utils/chat/auth.d.ts +5 -1
  51. package/dist/utils/chat/call.d.ts +5 -2
  52. package/dist/utils/chat/phone-string.d.ts +1 -0
  53. package/dist/utils/chat/user.d.ts +4 -0
  54. package/dist/views/NotFound.vue.d.ts +2 -0
  55. package/dist/views/TenantPhone.vue.d.ts +2 -0
  56. 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;
@@ -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;
@@ -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,11 @@
1
- import type { GoChatProps, PAGE_RESPONSE } from '../types/chat/global';
1
+ import { GoChatInstance, GoChatProps, PAGE_RESPONSE } from '../types/chat/global';
2
+ import type { IResUser } from '../types/message';
2
3
  import '../style/index.scss';
3
- declare const _default: import("vue").DefineComponent<GoChatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GoChatProps> & Readonly<{}>, {
4
+ declare const _default: import("vue").DefineComponent<GoChatProps, GoChatInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
+ userCalling: (id: IResUser) => any;
6
+ }, string, import("vue").PublicProps, Readonly<GoChatProps> & Readonly<{
7
+ onUserCalling?: ((id: IResUser) => any) | undefined;
8
+ }>, {
4
9
  response: PAGE_RESPONSE;
5
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
11
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import type { PAGE_RESPONSE } from '../../../types/chat/global';
2
2
  type Props = {
3
3
  receiverId: any;
4
- response: PAGE_RESPONSE;
4
+ responsive: PAGE_RESPONSE;
5
5
  };
6
6
  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>;
7
7
  export default _default;
@@ -1,6 +1,7 @@
1
+ import type { IConversation } from '../../../types/conversation';
1
2
  import type { PAGE_RESPONSE } from '../../../types/chat/global';
2
3
  type Props = {
3
- response: PAGE_RESPONSE;
4
+ responsive: PAGE_RESPONSE;
4
5
  };
5
6
  type __VLS_Props = Props;
6
7
  type __VLS_ModelProps = {
@@ -9,6 +10,33 @@ type __VLS_ModelProps = {
9
10
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
11
  declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
11
12
  handleReadMessage: () => void;
13
+ listConversations: import("vue").Ref<{
14
+ id: number;
15
+ receiver_id: number;
16
+ username: string | null;
17
+ customer_phone: string;
18
+ avatar: string | null;
19
+ last_message: string;
20
+ last_message_time: string;
21
+ created_at: string;
22
+ updated_at: string;
23
+ unread_count: number;
24
+ status: number;
25
+ color: string;
26
+ }[], IConversation[] | {
27
+ id: number;
28
+ receiver_id: number;
29
+ username: string | null;
30
+ customer_phone: string;
31
+ avatar: string | null;
32
+ last_message: string;
33
+ last_message_time: string;
34
+ created_at: string;
35
+ updated_at: string;
36
+ unread_count: number;
37
+ status: number;
38
+ color: string;
39
+ }[]>;
12
40
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
41
  "update:receiverId": (value: any) => any;
14
42
  } & {
@@ -3,7 +3,7 @@ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type Props = {
4
4
  data: IResUser | null;
5
5
  message: IResMessage[];
6
- response: PAGE_RESPONSE;
6
+ responsive: PAGE_RESPONSE;
7
7
  showNewCustomer: boolean;
8
8
  };
9
9
  declare const _default: import("vue").DefineComponent<Props, {
@@ -2,7 +2,7 @@ import type { IResUser } from '../../../types/message';
2
2
  import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type Props = {
4
4
  receiverId: any;
5
- response: PAGE_RESPONSE;
5
+ responsive: PAGE_RESPONSE;
6
6
  };
7
7
  declare const _default: import("vue").DefineComponent<Props, {
8
8
  getData: (data?: any) => Promise<void>;
@@ -5,6 +5,7 @@ type Props = {
5
5
  declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
6
6
  hideLoading: () => void;
7
7
  fixedScroll: () => void;
8
+ canScroll: () => boolean;
8
9
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
10
  getDataBottom: () => any;
10
11
  getDataTop: () => any;
@@ -3,9 +3,15 @@ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
3
  type __VLS_Props = {
4
4
  responsive: PAGE_RESPONSE;
5
5
  };
6
- declare function endCall(): void;
6
+ declare function endCall(option?: {
7
+ closeModal?: boolean;
8
+ }): void;
7
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
8
10
  startCall: (data: IResUser) => Promise<void>;
9
11
  endCall: typeof endCall;
10
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
+ userCalling: (id: IResUser) => any;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onUserCalling?: ((id: IResUser) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
17
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import type { PAGE_RESPONSE } from '../../../../types/chat/global';
2
2
  type Props = {
3
3
  modelValue: string;
4
- response: PAGE_RESPONSE;
4
+ responsive: PAGE_RESPONSE;
5
5
  placeholder?: string;
6
6
  };
7
7
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ modelValue?: string | number | null;
3
+ options: {
4
+ label: string;
5
+ value: string | number;
6
+ }[];
7
+ };
8
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ select: (id: any) => any;
10
+ "update:modelValue": (id: string | number | null) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onSelect?: ((id: any) => any) | undefined;
13
+ "onUpdate:modelValue"?: ((id: string | number | null) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
15
+ default?: ((props: {}) => any) | undefined;
16
+ }>;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -7,7 +7,7 @@ type Offer = {
7
7
  };
8
8
  export declare function useCallHelper(): {
9
9
  call: (user: IResUser) => Promise<void>;
10
- end: (link: any) => Promise<void>;
10
+ end: () => Promise<void>;
11
11
  handleOfferResponse: (data: {
12
12
  link: string;
13
13
  answer: any;
@@ -36,6 +36,10 @@ export declare function useCallHelper(): {
36
36
  status: number;
37
37
  last_offline_at: string;
38
38
  } | null>;
39
- startIncomingCall: () => Promise<void>;
39
+ testPlay: () => void;
40
+ handleCallAnswer: (data: any) => void;
41
+ callAnswer: (uuid_request: string) => Promise<void>;
42
+ startIncomingCall: (uuid_request: string) => Promise<void>;
43
+ uuid: import("vue").Ref<string, string>;
40
44
  };
41
45
  export {};
@@ -1,11 +1,9 @@
1
- import type { PAGE_RESPONSE } from '../types/chat/global';
1
+ import type { PAGE_RESPONSE, GoChatProps } from '../types/chat/global';
2
2
  export declare const isRouterReady: import("vue").Ref<boolean, boolean>;
3
3
  export declare function useInitData(): {
4
4
  NOTIFY_ID_APPOINTMENT_NAME: string;
5
5
  initPage: (data: {
6
- id?: string;
7
- token?: string;
8
- domain?: string;
6
+ props: GoChatProps;
9
7
  response: PAGE_RESPONSE;
10
8
  }) => Promise<void>;
11
9
  };