@phonghq/go-chat 1.0.23 → 1.0.24

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/icons/IconSetting.vue.d.ts +2 -0
  3. package/dist/chat/App.vue.d.ts +2 -0
  4. package/dist/chat/page/home/ChatList.vue.d.ts +1 -1
  5. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +11 -0
  6. package/dist/chat/page/home/Home.vue.d.ts +3 -0
  7. package/dist/components/chat/call/Calling.vue.d.ts +2 -0
  8. package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +14 -0
  9. package/dist/components/chat/common/tab/TabBase.vue.d.ts +30 -0
  10. package/dist/composable/useListConversations.d.ts +46 -0
  11. package/dist/constant/color.d.ts +2 -2
  12. package/dist/go-chat.es.js +28481 -28313
  13. package/dist/go-chat.umd.js +13 -13
  14. package/dist/style.css +1 -1
  15. package/dist/test/assets/icons/IconSetting.vue.js +33 -0
  16. package/dist/test/chat/App.vue.js +102 -77
  17. package/dist/test/chat/page/home/ChatList.vue.js +226 -124
  18. package/dist/test/chat/page/home/ChatMessage.vue.js +19 -164
  19. package/dist/test/chat/page/home/ChatMessageItem.vue.js +321 -0
  20. package/dist/test/chat/page/home/Home.vue.js +14 -8
  21. package/dist/test/chat/page/home/HomeHeader.vue.js +18 -12
  22. package/dist/test/chat/page/home/InputChat.vue.js +62 -33
  23. package/dist/test/components/chat/call/Calling.vue.js +19 -22
  24. package/dist/test/components/chat/common/switch/SwitchBase.vue.js +70 -0
  25. package/dist/test/components/chat/common/tab/TabBase.vue.js +85 -0
  26. package/dist/test/components/chat/select/SelectBase.vue.js +15 -17
  27. package/dist/test/composable/useInitData.js +7 -4
  28. package/dist/test/composable/useListConversations.js +122 -0
  29. package/dist/test/composable/usePlivo.js +9 -3
  30. package/dist/test/constant/color.js +4 -2
  31. package/dist/test/types/chat/call.js +2 -1
  32. package/dist/test/utils/chat/auth.js +14 -0
  33. package/dist/test/utils/chat/phone-string.js +1 -1
  34. package/dist/types/chat/auth.d.ts +2 -0
  35. package/dist/types/chat/call.d.ts +1 -0
  36. package/dist/types/conversation.d.ts +1 -0
  37. package/dist/types/message.d.ts +5 -0
  38. package/dist/utils/chat/auth.d.ts +5 -0
  39. package/dist/utils/chat/phone-string.d.ts +1 -1
  40. package/package.json +1 -1
package/README.md CHANGED
@@ -40,4 +40,4 @@ npm run lint
40
40
 
41
41
  ...build
42
42
  yarn vue-tsc -p tsconfig.build.json
43
- api/v1/message/tenant/gci-link?tenant_id=test1&phone=16013818811&message=Test message nè&customer_name=Loi v&business_name=Nail Spa New v
43
+ /tenant?tenant_id=test1&phone=16013818811&message=Test%20message%20n%C3%A8&customer_name=Loi%20v&business_name=Nail%20Spa%20New%20v
@@ -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;
@@ -3,8 +3,10 @@ import type { IResUser } from '../types/message';
3
3
  import '../style/index.scss';
4
4
  declare const _default: import("vue").DefineComponent<GoChatProps, GoChatInstance, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
5
  userCalling: (id: IResUser) => any;
6
+ "error:noPhoneTenant": () => any;
6
7
  }, string, import("vue").PublicProps, Readonly<GoChatProps> & Readonly<{
7
8
  onUserCalling?: ((id: IResUser) => any) | undefined;
9
+ "onError:noPhoneTenant"?: (() => any) | undefined;
8
10
  }>, {
9
11
  response: PAGE_RESPONSE;
10
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -10,7 +10,7 @@ type __VLS_ModelProps = {
10
10
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
11
  declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
12
12
  handleReadMessage: () => void;
13
- listConversations: import("vue").Ref<{
13
+ listConversationsAll: import("vue").Ref<{
14
14
  id: number;
15
15
  receiver_id: number;
16
16
  username: string | null;
@@ -0,0 +1,11 @@
1
+ import type { IResMessage, IResUser } from '../../../types/message';
2
+ import type { PAGE_RESPONSE } from '../../../types/chat/global';
3
+ type Props = {
4
+ message: IResMessage;
5
+ index: number;
6
+ listMessage: IResMessage[];
7
+ responsive: PAGE_RESPONSE;
8
+ data: IResUser | null;
9
+ };
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>;
11
+ export default _default;
@@ -6,6 +6,9 @@ type Props = {
6
6
  };
7
7
  declare const _default: import("vue").DefineComponent<Props, {
8
8
  getData: (data?: any) => Promise<void>;
9
+ handleGetMessage: (option?: {
10
+ resetList?: boolean | undefined;
11
+ } | undefined) => Promise<void>;
9
12
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
13
  call: (value: IResUser) => any;
11
14
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
@@ -5,7 +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
9
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
10
  onUserCalling?: ((id: IResUser) => any) | undefined;
11
+ onEndCall?: ((id: IResUser | null) => any) | undefined;
10
12
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
13
  export default _default;
@@ -0,0 +1,14 @@
1
+ type Props = {
2
+ label?: string;
3
+ };
4
+ type __VLS_Props = Props;
5
+ type __VLS_ModelProps = {
6
+ modelValue?: boolean;
7
+ };
8
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
9
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: boolean | undefined) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,30 @@
1
+ type Props = {
2
+ tabs: {
3
+ label: string;
4
+ value: any;
5
+ badge?: string;
6
+ }[];
7
+ };
8
+ type __VLS_Props = Props;
9
+ type __VLS_ModelProps = {
10
+ 'active'?: any;
11
+ };
12
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:active": (value: any) => any;
15
+ } & {
16
+ change: (val: any) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ onChange?: ((val: any) => any) | undefined;
19
+ "onUpdate:active"?: ((value: any) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
21
+ [x: string]: ((props: {}) => any) | undefined;
22
+ [x: number]: ((props: {}) => any) | undefined;
23
+ [x: symbol]: ((props: {}) => any) | undefined;
24
+ }>;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,46 @@
1
+ import type { IConversation, IParamGetConversation } from '../types/conversation';
2
+ export declare const useListConversations: (is_unknown: number) => {
3
+ listConversations: import("vue").Ref<{
4
+ id: number;
5
+ receiver_id: number;
6
+ username: string | null;
7
+ customer_phone: string;
8
+ avatar: string | null;
9
+ last_message: string;
10
+ last_message_time: string;
11
+ created_at: string;
12
+ updated_at: string;
13
+ unread_count: number;
14
+ status: number;
15
+ color: string;
16
+ }[], IConversation[] | {
17
+ id: number;
18
+ receiver_id: number;
19
+ username: string | null;
20
+ customer_phone: string;
21
+ avatar: string | null;
22
+ last_message: string;
23
+ last_message_time: string;
24
+ created_at: string;
25
+ updated_at: string;
26
+ unread_count: number;
27
+ status: number;
28
+ color: string;
29
+ }[]>;
30
+ params: import("vue").Ref<{
31
+ page: number;
32
+ search: string;
33
+ }, {
34
+ page: number;
35
+ search: string;
36
+ } | {
37
+ page: number;
38
+ search: string;
39
+ }>;
40
+ pageCount: number;
41
+ getData: (data?: IParamGetConversation, option?: {
42
+ reset?: boolean;
43
+ hideLoading?: boolean;
44
+ }) => Promise<void>;
45
+ handleReadMessage: (receiver_id: any) => void;
46
+ };
@@ -6,9 +6,9 @@ declare const enum Color {
6
6
  Primary = "#0051E6",
7
7
  Primary_Hover = "#699FF5",
8
8
  Primary_RGB = "41, 121, 255",
9
- Error = "#ff3b3b",
9
+ Error = "#EF4444",
10
10
  Error_Hover = "#FF8A75",
11
- Success = "#1DA91D",
11
+ Success = "#22C55E",
12
12
  Success_Hover = "#5FD9A0",
13
13
  Success_Bg = "#E9FFE4",
14
14
  Warning = "#f3a22c",