@phonghq/go-chat 1.0.11 → 1.0.14
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/assets/icons/IconAiCheck.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconClose.vue.d.ts +2 -0
- package/dist/assets/icons/call/IconSoundDownload.vue.d.ts +2 -0
- package/dist/chat/App.vue.d.ts +7 -2
- package/dist/chat/page/customer-detail/CustomerDetail.vue.d.ts +1 -1
- package/dist/chat/page/home/ChatList.vue.d.ts +29 -1
- package/dist/chat/page/home/ChatMessage.vue.d.ts +2 -1
- package/dist/chat/page/home/Home.vue.d.ts +1 -1
- package/dist/components/chat/ScrollEvent/ScrollEvent.vue.d.ts +1 -0
- package/dist/components/chat/call/Calling.vue.d.ts +8 -2
- package/dist/components/chat/common/input/InputSearch.vue.d.ts +1 -1
- package/dist/components/chat/select/SelectBase.vue.d.ts +22 -0
- package/dist/components/common/drawer/DrawerBase.vue.d.ts +1 -1
- package/dist/components/common/modal/ModalBase.vue.d.ts +1 -1
- package/dist/composable/useCallHelper.d.ts +7 -2
- package/dist/composable/useInitData.d.ts +2 -4
- package/dist/composable/usePlivo.d.ts +9 -0
- package/dist/go-chat.es.js +14676 -12322
- package/dist/go-chat.umd.js +44 -14
- package/dist/plugins/websocket.d.ts +12 -2
- package/dist/router/index.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/test/assets/icons/IconAiCheck.vue.js +28 -0
- package/dist/test/assets/icons/call/IconClose.vue.js +26 -0
- package/dist/test/assets/icons/call/IconMic.vue.js +9 -9
- package/dist/test/assets/icons/call/IconSoundDownload.vue.js +50 -0
- package/dist/test/chat/App.vue.js +144 -90
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +6 -5
- package/dist/test/chat/page/home/ChatList.vue.js +30 -9
- package/dist/test/chat/page/home/ChatMessage.vue.js +23 -12
- package/dist/test/chat/page/home/Home.vue.js +4 -3
- package/dist/test/chat/page/home/NewCustomer.vue.js +0 -12
- package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +7 -1
- package/dist/test/components/chat/call/Calling.vue.js +277 -111
- package/dist/test/components/chat/common/input/InputSearch.vue.js +2 -2
- package/dist/test/components/chat/select/SelectBase.vue.js +98 -0
- package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +0 -1
- package/dist/test/composable/data.json +32 -0
- package/dist/test/composable/useCallHelper.js +146 -33
- package/dist/test/composable/useDigibot.js +1 -1
- package/dist/test/composable/useInitData.js +17 -12
- package/dist/test/composable/usePlivo.js +138 -0
- package/dist/test/constant/color.js +1 -1
- package/dist/test/plugins/axios.js +2 -1
- package/dist/test/plugins/mqtt.js +11 -8
- package/dist/test/plugins/websocket.js +108 -19
- package/dist/test/router/index.js +39 -0
- package/dist/test/types/call.js +10 -1
- package/dist/test/utils/chat/auth.js +10 -2
- package/dist/test/utils/chat/call.js +48 -8
- package/dist/test/utils/chat/phone-string.js +4 -0
- package/dist/test/utils/chat/user.js +7 -2
- package/dist/test/views/NotFound.vue.js +47 -0
- package/dist/test/views/TenantPhone.vue.js +270 -0
- package/dist/types/call.d.ts +9 -0
- package/dist/types/chat/global.d.ts +4 -0
- package/dist/utils/chat/auth.d.ts +5 -1
- package/dist/utils/chat/call.d.ts +6 -2
- package/dist/utils/chat/phone-string.d.ts +1 -0
- package/dist/utils/chat/user.d.ts +4 -0
- package/dist/views/NotFound.vue.d.ts +2 -0
- package/dist/views/TenantPhone.vue.d.ts +2 -0
- package/package.json +2 -1
- package/dist/composable/TestSound.d.ts +0 -64
- package/dist/test/composable/TestSound.js +0 -196
|
@@ -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;
|
package/dist/chat/App.vue.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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,12 +3,13 @@ import type { PAGE_RESPONSE } from '../../../types/chat/global';
|
|
|
3
3
|
type Props = {
|
|
4
4
|
data: IResUser | null;
|
|
5
5
|
message: IResMessage[];
|
|
6
|
-
|
|
6
|
+
responsive: PAGE_RESPONSE;
|
|
7
7
|
showNewCustomer: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const _default: import("vue").DefineComponent<Props, {
|
|
10
10
|
scrollBottom: () => void;
|
|
11
11
|
hideScrollEvent: () => void;
|
|
12
|
+
fixedScroll: () => void;
|
|
12
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
14
|
scrollTop: () => any;
|
|
14
15
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
@@ -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
|
-
|
|
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(
|
|
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, {}
|
|
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
|
-
|
|
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
|
+
};
|
|
@@ -24,9 +24,9 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Publ
|
|
|
24
24
|
}>, {
|
|
25
25
|
title: string;
|
|
26
26
|
width: string | number;
|
|
27
|
+
showTitle: boolean;
|
|
27
28
|
placement: import("vaul-vue").DrawerDirection;
|
|
28
29
|
showButtonClose: boolean;
|
|
29
|
-
showTitle: boolean;
|
|
30
30
|
disableClose: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
32
32
|
content?: ((props: {}) => any) | undefined;
|
|
@@ -21,8 +21,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, {
|
|
|
21
21
|
width: string | number;
|
|
22
22
|
open: boolean;
|
|
23
23
|
zIndex: number;
|
|
24
|
-
showButtonClose: boolean;
|
|
25
24
|
showTitle: boolean;
|
|
25
|
+
showButtonClose: boolean;
|
|
26
26
|
nonClosable: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
28
28
|
default?: ((props: {}) => any) | undefined;
|
|
@@ -7,7 +7,7 @@ type Offer = {
|
|
|
7
7
|
};
|
|
8
8
|
export declare function useCallHelper(): {
|
|
9
9
|
call: (user: IResUser) => Promise<void>;
|
|
10
|
-
end: (
|
|
10
|
+
end: () => Promise<void>;
|
|
11
11
|
handleOfferResponse: (data: {
|
|
12
12
|
link: string;
|
|
13
13
|
answer: any;
|
|
@@ -36,6 +36,11 @@ export declare function useCallHelper(): {
|
|
|
36
36
|
status: number;
|
|
37
37
|
last_offline_at: string;
|
|
38
38
|
} | null>;
|
|
39
|
-
|
|
39
|
+
testPlay: () => void;
|
|
40
|
+
handleCallAnswer: (data: any) => void;
|
|
41
|
+
callAnswer: (uuid_request: string) => Promise<void>;
|
|
42
|
+
startPeerConnection: () => Promise<void>;
|
|
43
|
+
startIncomingCall: (uuid_request: string) => Promise<void>;
|
|
44
|
+
uuid: import("vue").Ref<string, string>;
|
|
40
45
|
};
|
|
41
46
|
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
|
-
|
|
7
|
-
token?: string;
|
|
8
|
-
domain?: string;
|
|
6
|
+
props: GoChatProps;
|
|
9
7
|
response: PAGE_RESPONSE;
|
|
10
8
|
}) => Promise<void>;
|
|
11
9
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PLIVO_CALL_STATUS } from '../types/call';
|
|
2
|
+
export declare function usePlivo(callback: (status: PLIVO_CALL_STATUS, data?: any) => void): {
|
|
3
|
+
plivoLogin: (token: string) => Promise<void>;
|
|
4
|
+
plivoCallAnswer: () => Promise<void>;
|
|
5
|
+
plivoCallReject: () => void;
|
|
6
|
+
plivoCall: (phone: string) => Promise<void>;
|
|
7
|
+
plivoEndCall: (status: PLIVO_CALL_STATUS) => void;
|
|
8
|
+
plivoCallSwishMute: (isMute: boolean) => void;
|
|
9
|
+
};
|