@phonghq/go-chat 1.0.45 → 1.0.47
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/global/IconSms.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconUser.vue.d.ts +2 -0
- package/dist/chat/App.vue.d.ts +2 -9
- package/dist/chat/page/home/PhoneNumpad.vue.d.ts +11 -0
- package/dist/components/common/select/SelectBase.vue.d.ts +27 -1
- package/dist/components/layout/PageError.vue.d.ts +2 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +2 -2
- package/dist/composable/useListConversations.d.ts +1 -1
- package/dist/composable/useListentEvent.d.ts +1 -1
- package/dist/go-chat.es.js +11199 -10856
- package/dist/go-chat.umd.js +15 -15
- package/dist/plugins/sdk.d.ts +1 -2
- package/dist/style.css +1 -1
- package/dist/test/assets/icons/call/IconPhoneBase.vue.js +20 -0
- package/dist/test/assets/icons/global/IconBackspace.vue.js +28 -0
- package/dist/test/chat/App.vue.js +165 -127
- package/dist/test/chat/page/customer-appointment/CustomerAppointment.vue.js +1 -1
- package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +1 -1
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +1 -1
- package/dist/test/chat/page/error/Error.vue.js +1 -1
- package/dist/test/chat/page/home/ChatList.vue.js +54 -39
- package/dist/test/chat/page/home/ChatMessage.vue.js +1 -1
- package/dist/test/chat/page/home/ChatMessageItem.vue.js +7 -5
- package/dist/test/chat/page/home/ChatMessageItem2.vue.js +1 -1
- package/dist/test/chat/page/home/Home.vue.js +42 -35
- package/dist/test/chat/page/home/HomeHeader.vue.js +6 -6
- package/dist/test/chat/page/home/InputChat.vue.js +3 -6
- package/dist/test/chat/page/home/PhoneNumpad.vue.js +127 -0
- package/dist/test/chat/page/setting/Setting.vue.js +1 -1
- package/dist/test/components/chat/ScrollEvent/ScrollEvent.vue.js +2 -0
- package/dist/test/components/chat/call/Calling.vue.js +5 -17
- package/dist/test/components/chat/common/input/InputSearch.vue.js +1 -1
- package/dist/test/components/chat/common/modal/Modal.vue.js +1 -1
- package/dist/test/components/chat/customer/Avatar.vue.js +1 -1
- package/dist/test/components/common/modal/ModalBase.vue.js +1 -1
- package/dist/test/components/common/select/SelectBase.vue.js +69 -106
- package/dist/test/components/layout/PageError.vue.js +91 -0
- package/dist/test/components/ui/select/SelectContent.vue.js +2 -2
- package/dist/test/components/ui/select/SelectItem.vue.js +9 -22
- package/dist/test/components/ui/select/SelectTrigger.vue.js +3 -30
- package/dist/test/composable/useInitData.js +2 -2
- package/dist/test/composable/useListConversations.js +5 -5
- package/dist/test/composable/useListentEvent.js +7 -4
- package/dist/test/composable/usePlivo.js +2 -5
- package/dist/test/plugins/axios.js +0 -2
- package/dist/test/plugins/mqtt.js +12 -4
- package/dist/test/plugins/pocketbase.js +1 -2
- package/dist/test/plugins/sdk.js +2 -12
- package/dist/test/plugins/websocket.js +1 -1
- package/dist/test/utils/chat/cache.js +1 -1
- package/dist/test/utils/chat/{auth.js → store/auth.js} +14 -5
- package/dist/test/utils/chat/{call.js → store/call.js} +3 -3
- package/dist/test/utils/chat/{conversation.js → store/conversation.js} +6 -6
- package/dist/test/utils/chat/{message.js → store/message.js} +25 -1
- package/dist/test/utils/chat/{user.js → store/user.js} +2 -2
- package/dist/test/views/home/phone-numpad/ConvercationList.vue.js +174 -0
- package/dist/test/views/home/phone-numpad/PhoneNumpad.vue.js +270 -0
- package/dist/types/chat/auth.d.ts +1 -0
- package/dist/utils/chat/{auth.d.ts → store/auth.d.ts} +4 -1
- package/dist/utils/chat/{call.d.ts → store/call.d.ts} +1 -1
- package/dist/utils/chat/{conversation.d.ts → store/conversation.d.ts} +3 -3
- package/dist/utils/chat/{message.d.ts → store/message.d.ts} +8 -2
- package/dist/utils/chat/{user.d.ts → store/user.d.ts} +2 -2
- package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +18 -0
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +26 -0
- package/package.json +1 -1
- package/dist/composable/useCallHelper.d.ts +0 -48
- package/dist/test/composable/data.json +0 -32
- package/dist/test/composable/useCallHelper.js +0 -339
- /package/dist/assets/icons/{IconAiCheck.vue.d.ts → call/IconPhoneBase.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconArrowLeft.vue.d.ts → global/IconAiCheck.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconCloseCircle.vue.d.ts → global/IconArrowLeft.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconPhone.vue.d.ts → global/IconBackspace.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconPlus.vue.d.ts → global/IconCloseCircle.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconSms.vue.d.ts → global/IconPhone.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconPlan.vue.d.ts → global/IconPlan.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconUser.vue.d.ts → global/IconPlus.vue.d.ts} +0 -0
- /package/dist/assets/icons/{IconSearch.vue.d.ts → global/IconSearch.vue.d.ts} +0 -0
- /package/dist/test/assets/icons/{IconAiCheck.vue.js → global/IconAiCheck.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconArrowLeft.vue.js → global/IconArrowLeft.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconCloseCircle.vue.js → global/IconCloseCircle.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconPhone.vue.js → global/IconPhone.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconPlan.vue.js → global/IconPlan.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconPlus.vue.js → global/IconPlus.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconSearch.vue.js → global/IconSearch.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconSms.vue.js → global/IconSms.vue.js} +0 -0
- /package/dist/test/assets/icons/{IconUser.vue.js → global/IconUser.vue.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
2
|
import { ref, onMounted, onUnmounted } from 'vue';
|
|
3
|
-
import IconCloseCircle from '../../../../assets/icons/IconCloseCircle.vue';
|
|
3
|
+
import IconCloseCircle from '../../../../assets/icons/global/IconCloseCircle.vue';
|
|
4
4
|
onMounted(() => {
|
|
5
5
|
addEvent();
|
|
6
6
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
import { digibotId } from '../../../composable/useDigibot';
|
|
4
|
-
import IconUser from '../../../assets/icons/IconUser.vue';
|
|
4
|
+
import IconUser from '../../../assets/icons/global/IconUser.vue';
|
|
5
5
|
const props = withDefaults(defineProps(), {
|
|
6
6
|
size: 'md',
|
|
7
7
|
src: ''
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
-
import IconCloseCircle from '@/assets/icons/IconCloseCircle.vue';
|
|
2
|
+
import IconCloseCircle from '@/assets/icons/global/IconCloseCircle.vue';
|
|
3
3
|
defineOptions({
|
|
4
4
|
inheritAttrs: false
|
|
5
5
|
});
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
-
import { Select, SelectContent, SelectGroup, SelectItem,
|
|
2
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, } from '../../ui/select';
|
|
3
|
+
import { useSlots } from 'vue';
|
|
4
|
+
const props = defineProps();
|
|
5
|
+
const open = defineModel('open');
|
|
6
|
+
const slots = useSlots();
|
|
3
7
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
8
|
+
const __VLS_modelEmit = defineEmits();
|
|
4
9
|
const __VLS_ctx = {
|
|
5
10
|
...{},
|
|
6
11
|
...{},
|
|
12
|
+
...{},
|
|
13
|
+
...{},
|
|
14
|
+
...{},
|
|
7
15
|
};
|
|
8
16
|
let __VLS_elements;
|
|
9
17
|
let __VLS_components;
|
|
@@ -13,127 +21,82 @@ const __VLS_0 = {}.Select;
|
|
|
13
21
|
// @ts-ignore
|
|
14
22
|
Select;
|
|
15
23
|
// @ts-ignore
|
|
16
|
-
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
|
17
|
-
|
|
24
|
+
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
|
25
|
+
open: (__VLS_ctx.open),
|
|
26
|
+
}));
|
|
27
|
+
const __VLS_2 = __VLS_1({
|
|
28
|
+
open: (__VLS_ctx.open),
|
|
29
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
18
30
|
var __VLS_4 = {};
|
|
19
31
|
const { default: __VLS_5 } = __VLS_3.slots;
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
[open,];
|
|
20
34
|
const __VLS_6 = {}.SelectTrigger;
|
|
21
35
|
/** @type {[typeof __VLS_components.SelectTrigger, typeof __VLS_components.SelectTrigger, ]} */ ;
|
|
22
36
|
// @ts-ignore
|
|
23
37
|
SelectTrigger;
|
|
24
38
|
// @ts-ignore
|
|
25
39
|
const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({
|
|
26
|
-
...{ class: "
|
|
40
|
+
...{ class: "" },
|
|
27
41
|
}));
|
|
28
42
|
const __VLS_8 = __VLS_7({
|
|
29
|
-
...{ class: "
|
|
43
|
+
...{ class: "" },
|
|
30
44
|
}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
31
45
|
const { default: __VLS_10 } = __VLS_9.slots;
|
|
32
|
-
|
|
33
|
-
/** @type {[typeof __VLS_components.SelectValue, ]} */ ;
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
SelectValue;
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
const __VLS_12 = __VLS_asFunctionalComponent(__VLS_11, new __VLS_11({
|
|
38
|
-
placeholder: "Select a fruit",
|
|
39
|
-
}));
|
|
40
|
-
const __VLS_13 = __VLS_12({
|
|
41
|
-
placeholder: "Select a fruit",
|
|
42
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_12));
|
|
46
|
+
var __VLS_11 = {};
|
|
43
47
|
var __VLS_9;
|
|
44
|
-
const
|
|
48
|
+
const __VLS_13 = {}.SelectContent;
|
|
45
49
|
/** @type {[typeof __VLS_components.SelectContent, typeof __VLS_components.SelectContent, ]} */ ;
|
|
46
50
|
// @ts-ignore
|
|
47
51
|
SelectContent;
|
|
48
52
|
// @ts-ignore
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const { default:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
/** @type {[typeof __VLS_components.SelectItem, typeof __VLS_components.SelectItem, ]} */ ;
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
SelectItem;
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}));
|
|
90
|
-
const __VLS_38 = __VLS_37({
|
|
91
|
-
value: "banana",
|
|
92
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_37));
|
|
93
|
-
const { default: __VLS_40 } = __VLS_39.slots;
|
|
94
|
-
var __VLS_39;
|
|
95
|
-
const __VLS_41 = {}.SelectItem;
|
|
96
|
-
/** @type {[typeof __VLS_components.SelectItem, typeof __VLS_components.SelectItem, ]} */ ;
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
SelectItem;
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
const __VLS_42 = __VLS_asFunctionalComponent(__VLS_41, new __VLS_41({
|
|
101
|
-
value: "blueberry",
|
|
102
|
-
}));
|
|
103
|
-
const __VLS_43 = __VLS_42({
|
|
104
|
-
value: "blueberry",
|
|
105
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_42));
|
|
106
|
-
const { default: __VLS_45 } = __VLS_44.slots;
|
|
107
|
-
var __VLS_44;
|
|
108
|
-
const __VLS_46 = {}.SelectItem;
|
|
109
|
-
/** @type {[typeof __VLS_components.SelectItem, typeof __VLS_components.SelectItem, ]} */ ;
|
|
110
|
-
// @ts-ignore
|
|
111
|
-
SelectItem;
|
|
112
|
-
// @ts-ignore
|
|
113
|
-
const __VLS_47 = __VLS_asFunctionalComponent(__VLS_46, new __VLS_46({
|
|
114
|
-
value: "grapes",
|
|
115
|
-
}));
|
|
116
|
-
const __VLS_48 = __VLS_47({
|
|
117
|
-
value: "grapes",
|
|
118
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_47));
|
|
119
|
-
const { default: __VLS_50 } = __VLS_49.slots;
|
|
120
|
-
var __VLS_49;
|
|
121
|
-
const __VLS_51 = {}.SelectItem;
|
|
122
|
-
/** @type {[typeof __VLS_components.SelectItem, typeof __VLS_components.SelectItem, ]} */ ;
|
|
123
|
-
// @ts-ignore
|
|
124
|
-
SelectItem;
|
|
125
|
-
// @ts-ignore
|
|
126
|
-
const __VLS_52 = __VLS_asFunctionalComponent(__VLS_51, new __VLS_51({
|
|
127
|
-
value: "pineapple",
|
|
128
|
-
}));
|
|
129
|
-
const __VLS_53 = __VLS_52({
|
|
130
|
-
value: "pineapple",
|
|
131
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_52));
|
|
132
|
-
const { default: __VLS_55 } = __VLS_54.slots;
|
|
133
|
-
var __VLS_54;
|
|
134
|
-
var __VLS_24;
|
|
135
|
-
var __VLS_19;
|
|
53
|
+
const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({}));
|
|
54
|
+
const __VLS_15 = __VLS_14({}, ...__VLS_functionalComponentArgsRest(__VLS_14));
|
|
55
|
+
const { default: __VLS_17 } = __VLS_16.slots;
|
|
56
|
+
if (__VLS_ctx.slots.content) {
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
[slots,];
|
|
59
|
+
var __VLS_18 = {};
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const __VLS_20 = {}.SelectGroup;
|
|
63
|
+
/** @type {[typeof __VLS_components.SelectGroup, typeof __VLS_components.SelectGroup, ]} */ ;
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
SelectGroup;
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
const __VLS_21 = __VLS_asFunctionalComponent(__VLS_20, new __VLS_20({}));
|
|
68
|
+
const __VLS_22 = __VLS_21({}, ...__VLS_functionalComponentArgsRest(__VLS_21));
|
|
69
|
+
const { default: __VLS_24 } = __VLS_23.slots;
|
|
70
|
+
for (const [item] of __VLS_getVForSourceType((__VLS_ctx.options))) {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
[options,];
|
|
73
|
+
const __VLS_25 = {}.SelectItem;
|
|
74
|
+
/** @type {[typeof __VLS_components.SelectItem, typeof __VLS_components.SelectItem, ]} */ ;
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
SelectItem;
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
const __VLS_26 = __VLS_asFunctionalComponent(__VLS_25, new __VLS_25({
|
|
79
|
+
key: (item.value),
|
|
80
|
+
value: (item.value),
|
|
81
|
+
}));
|
|
82
|
+
const __VLS_27 = __VLS_26({
|
|
83
|
+
key: (item.value),
|
|
84
|
+
value: (item.value),
|
|
85
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_26));
|
|
86
|
+
const { default: __VLS_29 } = __VLS_28.slots;
|
|
87
|
+
(item.label);
|
|
88
|
+
var __VLS_28;
|
|
89
|
+
}
|
|
90
|
+
var __VLS_23;
|
|
91
|
+
}
|
|
92
|
+
var __VLS_16;
|
|
136
93
|
var __VLS_3;
|
|
137
|
-
/** @type {__VLS_StyleScopedClasses['
|
|
138
|
-
|
|
94
|
+
/** @type {__VLS_StyleScopedClasses['']} */ ;
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
var __VLS_12 = __VLS_11, __VLS_19 = __VLS_18;
|
|
97
|
+
const __VLS_base = (await import('vue')).defineComponent({
|
|
98
|
+
__typeEmits: {},
|
|
99
|
+
__typeProps: {},
|
|
100
|
+
});
|
|
101
|
+
const __VLS_export = {};
|
|
139
102
|
export default {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
+
import { goChatError, handleMedialPermissionError, mediaPermissionState } from '../../utils/chat/page-error';
|
|
3
|
+
const reload = () => {
|
|
4
|
+
;
|
|
5
|
+
window.location.reload();
|
|
6
|
+
};
|
|
7
|
+
const askMedialPermission = async () => {
|
|
8
|
+
try {
|
|
9
|
+
await navigator.mediaDevices.getUserMedia({ audio: true });
|
|
10
|
+
window.location.reload();
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
console.log(e);
|
|
14
|
+
}
|
|
15
|
+
handleMedialPermissionError();
|
|
16
|
+
};
|
|
17
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
18
|
+
const __VLS_ctx = {
|
|
19
|
+
...{},
|
|
20
|
+
...{},
|
|
21
|
+
};
|
|
22
|
+
let __VLS_elements;
|
|
23
|
+
let __VLS_components;
|
|
24
|
+
let __VLS_directives;
|
|
25
|
+
if (__VLS_ctx.goChatError) {
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
[goChatError,];
|
|
28
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
29
|
+
...{ class: "w-full bg-chat-error text-white text-sm px-4 py-2 flex items-center justify-between gap-2" },
|
|
30
|
+
});
|
|
31
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({});
|
|
32
|
+
(__VLS_ctx.goChatError);
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
[goChatError,];
|
|
35
|
+
if (__VLS_ctx.mediaPermissionState == 'prompt') {
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
[mediaPermissionState,];
|
|
38
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
39
|
+
...{ onClick: (__VLS_ctx.askMedialPermission) },
|
|
40
|
+
...{ class: "bg-white min-h-10 text-chat-haze-600 font-bold w-[250px] rounded-lg" },
|
|
41
|
+
});
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
[askMedialPermission,];
|
|
44
|
+
}
|
|
45
|
+
else if (__VLS_ctx.mediaPermissionState == 'denied') {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
[mediaPermissionState,];
|
|
48
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
52
|
+
...{ onClick: (...[$event]) => {
|
|
53
|
+
if (!(__VLS_ctx.goChatError))
|
|
54
|
+
return;
|
|
55
|
+
if (!!(__VLS_ctx.mediaPermissionState == 'prompt'))
|
|
56
|
+
return;
|
|
57
|
+
if (!!(__VLS_ctx.mediaPermissionState == 'denied'))
|
|
58
|
+
return;
|
|
59
|
+
__VLS_ctx.reload();
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
[reload,];
|
|
62
|
+
} },
|
|
63
|
+
...{ class: "bg-white min-h-10 text-chat-haze-600 font-bold text-base w-[200px] rounded-lg" },
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
68
|
+
/** @type {__VLS_StyleScopedClasses['bg-chat-error']} */ ;
|
|
69
|
+
/** @type {__VLS_StyleScopedClasses['text-white']} */ ;
|
|
70
|
+
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
71
|
+
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
|
|
72
|
+
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
73
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
74
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
75
|
+
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
76
|
+
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
|
|
77
|
+
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
78
|
+
/** @type {__VLS_StyleScopedClasses['min-h-10']} */ ;
|
|
79
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
|
|
80
|
+
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
|
|
81
|
+
/** @type {__VLS_StyleScopedClasses['w-[250px]']} */ ;
|
|
82
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
83
|
+
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
84
|
+
/** @type {__VLS_StyleScopedClasses['min-h-10']} */ ;
|
|
85
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
|
|
86
|
+
/** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
|
|
87
|
+
/** @type {__VLS_StyleScopedClasses['text-base']} */ ;
|
|
88
|
+
/** @type {__VLS_StyleScopedClasses['w-[200px]']} */ ;
|
|
89
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
90
|
+
const __VLS_export = (await import('vue')).defineComponent({});
|
|
91
|
+
export default {};
|
|
@@ -43,13 +43,13 @@ SelectContent;
|
|
|
43
43
|
const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({
|
|
44
44
|
dataSlot: "select-content",
|
|
45
45
|
...({ ...__VLS_ctx.$attrs, ...__VLS_ctx.forwarded }),
|
|
46
|
-
...{ class: (__VLS_ctx.cn('bg-
|
|
46
|
+
...{ class: (__VLS_ctx.cn('bg-white text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-chat-haze-400 shadow-md', __VLS_ctx.position === 'popper'
|
|
47
47
|
&& 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', props.class)) },
|
|
48
48
|
}));
|
|
49
49
|
const __VLS_8 = __VLS_7({
|
|
50
50
|
dataSlot: "select-content",
|
|
51
51
|
...({ ...__VLS_ctx.$attrs, ...__VLS_ctx.forwarded }),
|
|
52
|
-
...{ class: (__VLS_ctx.cn('bg-
|
|
52
|
+
...{ class: (__VLS_ctx.cn('bg-white text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-chat-haze-400 shadow-md', __VLS_ctx.position === 'popper'
|
|
53
53
|
&& 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', props.class)) },
|
|
54
54
|
}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
55
55
|
const { default: __VLS_10 } = __VLS_9.slots;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import { Check } from "lucide-vue-next";
|
|
4
3
|
import { SelectItem, SelectItemIndicator, SelectItemText, useForwardProps, } from "reka-ui";
|
|
5
4
|
import { cn } from "../../../lib/utils";
|
|
6
5
|
const props = defineProps();
|
|
@@ -24,12 +23,12 @@ SelectItem;
|
|
|
24
23
|
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
|
25
24
|
dataSlot: "select-item",
|
|
26
25
|
...(__VLS_ctx.forwardedProps),
|
|
27
|
-
...{ class: (__VLS_ctx.cn('focus:bg-
|
|
26
|
+
...{ class: (__VLS_ctx.cn('focus:bg-chat-haze-200 focus:text-accent-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm !outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2', props.class)) },
|
|
28
27
|
}));
|
|
29
28
|
const __VLS_2 = __VLS_1({
|
|
30
29
|
dataSlot: "select-item",
|
|
31
30
|
...(__VLS_ctx.forwardedProps),
|
|
32
|
-
...{ class: (__VLS_ctx.cn('focus:bg-
|
|
31
|
+
...{ class: (__VLS_ctx.cn('focus:bg-chat-haze-200 focus:text-accent-foreground [&_svg:not([class*=\'text-\'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm !outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2', props.class)) },
|
|
33
32
|
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
34
33
|
var __VLS_4 = {};
|
|
35
34
|
const { default: __VLS_5 } = __VLS_3.slots;
|
|
@@ -47,28 +46,17 @@ const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({}));
|
|
|
47
46
|
const __VLS_8 = __VLS_7({}, ...__VLS_functionalComponentArgsRest(__VLS_7));
|
|
48
47
|
const { default: __VLS_10 } = __VLS_9.slots;
|
|
49
48
|
var __VLS_11 = {};
|
|
50
|
-
const __VLS_13 = {}.Check;
|
|
51
|
-
/** @type {[typeof __VLS_components.Check, ]} */ ;
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
Check;
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({
|
|
56
|
-
...{ class: "size-4" },
|
|
57
|
-
}));
|
|
58
|
-
const __VLS_15 = __VLS_14({
|
|
59
|
-
...{ class: "size-4" },
|
|
60
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_14));
|
|
61
49
|
var __VLS_9;
|
|
62
|
-
const
|
|
50
|
+
const __VLS_13 = {}.SelectItemText;
|
|
63
51
|
/** @type {[typeof __VLS_components.SelectItemText, typeof __VLS_components.SelectItemText, ]} */ ;
|
|
64
52
|
// @ts-ignore
|
|
65
53
|
SelectItemText;
|
|
66
54
|
// @ts-ignore
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const { default:
|
|
70
|
-
var
|
|
71
|
-
var
|
|
55
|
+
const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({}));
|
|
56
|
+
const __VLS_15 = __VLS_14({}, ...__VLS_functionalComponentArgsRest(__VLS_14));
|
|
57
|
+
const { default: __VLS_17 } = __VLS_16.slots;
|
|
58
|
+
var __VLS_18 = {};
|
|
59
|
+
var __VLS_16;
|
|
72
60
|
var __VLS_3;
|
|
73
61
|
/** @type {__VLS_StyleScopedClasses['absolute']} */ ;
|
|
74
62
|
/** @type {__VLS_StyleScopedClasses['right-2']} */ ;
|
|
@@ -76,9 +64,8 @@ var __VLS_3;
|
|
|
76
64
|
/** @type {__VLS_StyleScopedClasses['size-3.5']} */ ;
|
|
77
65
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
78
66
|
/** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
|
|
79
|
-
/** @type {__VLS_StyleScopedClasses['size-4']} */ ;
|
|
80
67
|
// @ts-ignore
|
|
81
|
-
var __VLS_12 = __VLS_11,
|
|
68
|
+
var __VLS_12 = __VLS_11, __VLS_19 = __VLS_18;
|
|
82
69
|
const __VLS_base = (await import('vue')).defineComponent({
|
|
83
70
|
__typeProps: {},
|
|
84
71
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
4
|
-
import { SelectIcon, SelectTrigger, useForwardProps } from "reka-ui";
|
|
3
|
+
import { SelectTrigger, useForwardProps } from "reka-ui";
|
|
5
4
|
import { cn } from "../../../lib/utils";
|
|
6
5
|
const props = withDefaults(defineProps(), { size: "default" });
|
|
7
6
|
const delegatedProps = reactiveOmit(props, "class", "size");
|
|
@@ -26,46 +25,20 @@ const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
|
|
26
25
|
dataSlot: "select-trigger",
|
|
27
26
|
dataSize: (__VLS_ctx.size),
|
|
28
27
|
...(__VLS_ctx.forwardedProps),
|
|
29
|
-
...{ class: (__VLS_ctx.cn('
|
|
28
|
+
...{ class: (__VLS_ctx.cn('outline-none', props.class)) },
|
|
30
29
|
}));
|
|
31
30
|
const __VLS_2 = __VLS_1({
|
|
32
31
|
dataSlot: "select-trigger",
|
|
33
32
|
dataSize: (__VLS_ctx.size),
|
|
34
33
|
...(__VLS_ctx.forwardedProps),
|
|
35
|
-
...{ class: (__VLS_ctx.cn('
|
|
34
|
+
...{ class: (__VLS_ctx.cn('outline-none', props.class)) },
|
|
36
35
|
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
|
37
36
|
var __VLS_4 = {};
|
|
38
37
|
const { default: __VLS_5 } = __VLS_3.slots;
|
|
39
38
|
// @ts-ignore
|
|
40
39
|
[size, forwardedProps, cn,];
|
|
41
40
|
var __VLS_6 = {};
|
|
42
|
-
const __VLS_8 = {}.SelectIcon;
|
|
43
|
-
/** @type {[typeof __VLS_components.SelectIcon, typeof __VLS_components.SelectIcon, ]} */ ;
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
SelectIcon;
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
const __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({
|
|
48
|
-
asChild: true,
|
|
49
|
-
}));
|
|
50
|
-
const __VLS_10 = __VLS_9({
|
|
51
|
-
asChild: true,
|
|
52
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_9));
|
|
53
|
-
const { default: __VLS_12 } = __VLS_11.slots;
|
|
54
|
-
const __VLS_13 = {}.ChevronDown;
|
|
55
|
-
/** @type {[typeof __VLS_components.ChevronDown, ]} */ ;
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
ChevronDown;
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
const __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13({
|
|
60
|
-
...{ class: "size-4 opacity-50" },
|
|
61
|
-
}));
|
|
62
|
-
const __VLS_15 = __VLS_14({
|
|
63
|
-
...{ class: "size-4 opacity-50" },
|
|
64
|
-
}, ...__VLS_functionalComponentArgsRest(__VLS_14));
|
|
65
|
-
var __VLS_11;
|
|
66
41
|
var __VLS_3;
|
|
67
|
-
/** @type {__VLS_StyleScopedClasses['size-4']} */ ;
|
|
68
|
-
/** @type {__VLS_StyleScopedClasses['opacity-50']} */ ;
|
|
69
42
|
// @ts-ignore
|
|
70
43
|
var __VLS_7 = __VLS_6;
|
|
71
44
|
const __VLS_base = (await import('vue')).defineComponent({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { sdkInit } from '../plugins/sdk';
|
|
3
|
-
import { checkTenantPhoneOnGapInsight, dataProfile, getProfile, loginLink } from '../utils/chat/auth';
|
|
3
|
+
import { checkTenantPhoneOnGapInsight, dataProfile, getProfile, loginLink } from '../utils/chat/store/auth';
|
|
4
4
|
import { routerPush } from '../utils/chat/chat-router';
|
|
5
5
|
import { PAGE } from '../constant/general';
|
|
6
6
|
import { connectMqtt, subscribeToTopic, unsubscribeFromTopic } from '../plugins/mqtt';
|
|
@@ -48,7 +48,7 @@ export function useInitData() {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
const checkNotificationParams = () => {
|
|
51
|
-
// return {conversation_id: '
|
|
51
|
+
// return {conversation_id: '339', is_unknown: '1'}
|
|
52
52
|
const queryString = window.location.search;
|
|
53
53
|
const urlParams = new URLSearchParams(queryString);
|
|
54
54
|
const conversation_id = urlParams.get('conversation_id') || '';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { nextTick, onMounted, onUnmounted, ref } from 'vue';
|
|
2
2
|
import { TOPIC_HOME, TOPIC_STATUS_USER } from '../constant/mqtt';
|
|
3
3
|
import { addHandleMqttMessage, connectMqtt, removeHandleMqttMessage, subscribeToTopic, unsubscribeFromTopic } from '../plugins/mqtt';
|
|
4
|
-
import { dataProfile } from '../utils/chat/auth';
|
|
4
|
+
import { dataProfile } from '../utils/chat/store/auth';
|
|
5
5
|
import { useDebounce } from '../utils/debounce';
|
|
6
|
-
import { getConversation } from '../utils/chat/conversation';
|
|
7
|
-
import { readMessages } from '../utils/chat/message';
|
|
6
|
+
import { getConversation } from '../utils/chat/store/conversation';
|
|
7
|
+
import { readMessages } from '../utils/chat/store/message';
|
|
8
8
|
import { useDigibot } from '../composable/useDigibot';
|
|
9
9
|
import { getCache, setCache } from '../utils/chat/cache';
|
|
10
10
|
const { digibotData, digibotId } = useDigibot();
|
|
11
11
|
export const useListConversations = (is_unknown, is_tenant) => {
|
|
12
12
|
const STORAGE_KEY = 'chat-conversation-';
|
|
13
|
-
|
|
13
|
+
const pageCount = ref(0);
|
|
14
14
|
const listConversations = ref([]);
|
|
15
15
|
const params = ref({
|
|
16
16
|
page: 1,
|
|
@@ -105,7 +105,7 @@ export const useListConversations = (is_unknown, is_tenant) => {
|
|
|
105
105
|
}
|
|
106
106
|
listConversations.value.push(...(res?.items ?? []));
|
|
107
107
|
params.value.page = res?._meta?.currentPage || 1;
|
|
108
|
-
pageCount = res?._meta?.pageCount || 1;
|
|
108
|
+
pageCount.value = res?._meta?.pageCount || 1;
|
|
109
109
|
if (params.value.page <= 1) {
|
|
110
110
|
setCache(STORAGE_KEY + is_unknown, listConversations.value);
|
|
111
111
|
}
|
|
@@ -12,26 +12,29 @@ export function useListenEvent(callBackResizeChange) {
|
|
|
12
12
|
onUnmounted(() => {
|
|
13
13
|
window.removeEventListener('resize', getResponsiveObserverDebounce);
|
|
14
14
|
});
|
|
15
|
-
const getResponsiveObserver = () => {
|
|
15
|
+
const getResponsiveObserver = (is_init) => {
|
|
16
16
|
const appChatRef = document.getElementById('appChatMain');
|
|
17
17
|
if (!appChatRef)
|
|
18
18
|
return;
|
|
19
19
|
const width = appChatRef?.offsetWidth ?? 0;
|
|
20
20
|
if (width >= 1180) {
|
|
21
21
|
if (responsiveObserver.value != 'window') {
|
|
22
|
-
|
|
22
|
+
if (!is_init)
|
|
23
|
+
callBackResizeChange?.();
|
|
23
24
|
responsiveObserver.value = 'window';
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
else if (width >= 640) {
|
|
27
28
|
if (responsiveObserver.value != 'tablet') {
|
|
28
|
-
|
|
29
|
+
if (!is_init)
|
|
30
|
+
callBackResizeChange?.();
|
|
29
31
|
responsiveObserver.value = 'tablet';
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
33
35
|
if (responsiveObserver.value != 'mobile') {
|
|
34
|
-
|
|
36
|
+
if (!is_init)
|
|
37
|
+
callBackResizeChange?.();
|
|
35
38
|
if (currentPage.value == PAGE.HOME) {
|
|
36
39
|
currentPage.value = PAGE.CHAT_LIST;
|
|
37
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PLIVO_CALL_STATUS } from '../types/chat/call';
|
|
2
|
-
import { createSipAccount } from '../utils/chat/call';
|
|
3
|
-
import { dataProfile } from '../utils/chat/auth';
|
|
2
|
+
import { createSipAccount } from '../utils/chat/store/call';
|
|
3
|
+
import { dataProfile } from '../utils/chat/store/auth';
|
|
4
4
|
export function usePlivo(callback) {
|
|
5
5
|
var options = {
|
|
6
6
|
debug: 'ALL',
|
|
@@ -15,8 +15,6 @@ export function usePlivo(callback) {
|
|
|
15
15
|
let custom_resolve = null;
|
|
16
16
|
let custom_reject = null;
|
|
17
17
|
const plivoLogin = async (data) => {
|
|
18
|
-
// token =
|
|
19
|
-
// 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InBsaXZvO3Y9MSJ9.eyJqdGkiOiJ0ZXN0MSIsImlzcyI6IlNBTjJZMFpERTRNSkFUTVpZNU5DIiwic3ViIjoid2ViY2FsbDAwMzA3OTY3MzQ1NDg5MTgyNyIsIm5iZiI6MTc2MzY5MzUyNSwiZXhwIjoxNzYzNzc5OTI1LCJncmFudHMiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOnRydWUsIm91dGdvaW5nX2FsbG93Ijp0cnVlfX19.9p4O_xTb4kNhKyDVfK3EemSKBQiHtbKNUZ5iwnSdX1I'
|
|
20
18
|
try {
|
|
21
19
|
if (!plivoBrowserSdk) {
|
|
22
20
|
plivoBrowserSdk = new window.Plivo(options);
|
|
@@ -79,7 +77,6 @@ export function usePlivo(callback) {
|
|
|
79
77
|
}
|
|
80
78
|
};
|
|
81
79
|
const handleCallTerminated = (data, callInfo) => {
|
|
82
|
-
console.log(data, callInfo);
|
|
83
80
|
if (CallUuid === callInfo.callUUID) {
|
|
84
81
|
callback(PLIVO_CALL_STATUS.CALL_END, { message: data?.reason });
|
|
85
82
|
CallUuid = '';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
const baseURL = 'https://go-chat.dev01.dtsmart.dev/';
|
|
3
3
|
// const baseURL = 'https://go-chat-test.dev01.dtsmart.dev'
|
|
4
|
-
// const baseURL = '192.168.1.162:3000'
|
|
5
4
|
const instance = axios.create({
|
|
6
5
|
baseURL,
|
|
7
6
|
timeout: 20000,
|
|
@@ -69,7 +68,6 @@ instance.interceptors.response.use((response) => {
|
|
|
69
68
|
const newToken = res.data.token;
|
|
70
69
|
localStorage.setItem('chat_token', newToken);
|
|
71
70
|
instance.defaults.headers.common['Authorization'] = 'Bearer ' + newToken;
|
|
72
|
-
console.log(newToken, 'asgfasf');
|
|
73
71
|
processQueue(null, newToken);
|
|
74
72
|
return instance(originalRequest);
|
|
75
73
|
}
|