@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
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import IconBackspace from '../../../assets/icons/global/IconBackspace.vue';
|
|
4
|
+
import IconPhoneBase from '../../../assets/icons/call/IconPhoneBase.vue';
|
|
5
|
+
import { phoneNumberFormat, phoneNumberFormatInput } from '../../../utils/string-helper';
|
|
6
|
+
import { useDebounce } from '../../../utils/debounce';
|
|
7
|
+
import ConversationList from '../../../views/home/phone-numpad/ConvercationList.vue';
|
|
8
|
+
import { dataProfile } from '../../../utils/chat/store/auth';
|
|
9
|
+
import IconArrowLeft from '../../../assets/icons/global/IconArrowLeft.vue';
|
|
10
|
+
const props = withDefaults(defineProps(), {});
|
|
11
|
+
const emit = defineEmits();
|
|
12
|
+
const phone = defineModel();
|
|
13
|
+
const keys = [
|
|
14
|
+
{ label: '1', value: '1' },
|
|
15
|
+
{ label: '2', value: '2' },
|
|
16
|
+
{ label: '3', value: '3' },
|
|
17
|
+
{ label: '4', value: '4' },
|
|
18
|
+
{ label: '5', value: '5' },
|
|
19
|
+
{ label: '6', value: '6' },
|
|
20
|
+
{ label: '7', value: '7' },
|
|
21
|
+
{ label: '8', value: '8' },
|
|
22
|
+
{ label: '9', value: '9' },
|
|
23
|
+
{ label: 'C', value: 'Delete' },
|
|
24
|
+
{ label: '0', value: '0' },
|
|
25
|
+
{ label: 'X', value: 'Backspace' }
|
|
26
|
+
];
|
|
27
|
+
const activeKey = ref(null);
|
|
28
|
+
const activeUser = ref(null);
|
|
29
|
+
const conversationListRef = ref();
|
|
30
|
+
const handleKey = (key) => {
|
|
31
|
+
if (props.disabled)
|
|
32
|
+
return;
|
|
33
|
+
if (dataProfile.value?.user_type != 'tenant')
|
|
34
|
+
return;
|
|
35
|
+
activeKey.value = key.value == 'Backspace' ? null : key.value;
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
activeKey.value = null;
|
|
38
|
+
}, 80);
|
|
39
|
+
let newValue = keepOnlyNumber(phone.value ?? '');
|
|
40
|
+
if (key.value === 'Backspace') {
|
|
41
|
+
newValue = newValue.slice(0, -1);
|
|
42
|
+
}
|
|
43
|
+
else if (key.value === 'Delete') {
|
|
44
|
+
newValue = '';
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
newValue += key.value;
|
|
48
|
+
}
|
|
49
|
+
phone.value = phoneNumberFormatInput(newValue);
|
|
50
|
+
handleGetListKeyPad();
|
|
51
|
+
emit('change', newValue);
|
|
52
|
+
};
|
|
53
|
+
const handleInput = () => {
|
|
54
|
+
phone.value = phoneNumberFormatInput(phone.value ?? '');
|
|
55
|
+
handleGetListInput();
|
|
56
|
+
};
|
|
57
|
+
function keepOnlyNumber(value) {
|
|
58
|
+
return value.replace(/\D+/g, '');
|
|
59
|
+
}
|
|
60
|
+
const handleGetListKeyPad = useDebounce(() => conversationListRef.value?.getUserList(keepOnlyNumber(phone.value ?? ''), { reset: true }), 800);
|
|
61
|
+
const handleGetListInput = useDebounce(() => conversationListRef.value?.getUserList(keepOnlyNumber(phone.value ?? ''), { reset: true }), 300);
|
|
62
|
+
const call = () => {
|
|
63
|
+
if (phone)
|
|
64
|
+
conversationListRef.value?.checkActiveUserList();
|
|
65
|
+
let value = keepOnlyNumber(phone.value ?? '');
|
|
66
|
+
let user = {
|
|
67
|
+
phone: activeUser.value?.phone || '1' + value,
|
|
68
|
+
username: activeUser.value?.username ?? '',
|
|
69
|
+
avatar: activeUser.value?.avatar ?? '',
|
|
70
|
+
color: activeUser.value?.color ?? '',
|
|
71
|
+
is_unknown: activeUser.value?.is_unknown
|
|
72
|
+
};
|
|
73
|
+
if (value.length == 10) {
|
|
74
|
+
emit('call', user);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// if (phone.value) Snackbar.error({ message: 'Phone number is invalid!' })
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const reset = () => {
|
|
81
|
+
phone.value = '';
|
|
82
|
+
};
|
|
83
|
+
const handleSelectConversation = (item) => {
|
|
84
|
+
phone.value = phoneNumberFormat(item.phone ?? '');
|
|
85
|
+
};
|
|
86
|
+
const __VLS_exposed = { reset };
|
|
87
|
+
defineExpose(__VLS_exposed);
|
|
88
|
+
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
89
|
+
const __VLS_modelEmit = defineEmits();
|
|
90
|
+
const __VLS_defaults = {};
|
|
91
|
+
const __VLS_ctx = {
|
|
92
|
+
...{},
|
|
93
|
+
...{},
|
|
94
|
+
...{},
|
|
95
|
+
...{},
|
|
96
|
+
...{},
|
|
97
|
+
};
|
|
98
|
+
let __VLS_elements;
|
|
99
|
+
let __VLS_components;
|
|
100
|
+
let __VLS_directives;
|
|
101
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
102
|
+
...{ class: "w-[480px] h-full flex flex-col" },
|
|
103
|
+
});
|
|
104
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
105
|
+
...{ class: "flex items-center justify-between border-chat-gray-5 layout-shadow border-b px-2 sm:px-6" },
|
|
106
|
+
});
|
|
107
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
108
|
+
...{ onClick: (...[$event]) => {
|
|
109
|
+
__VLS_ctx.emit('back');
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
[emit,];
|
|
112
|
+
} },
|
|
113
|
+
...{ class: "flex justify-center w-14 sm:hidden" },
|
|
114
|
+
});
|
|
115
|
+
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
const __VLS_0 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
118
|
+
const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
119
|
+
__VLS_asFunctionalElement(__VLS_elements.input)({
|
|
120
|
+
...{ onInput: (__VLS_ctx.handleInput) },
|
|
121
|
+
...{ class: "py-2 h-[80px] sm:h-[96px] text-xl grow" },
|
|
122
|
+
placeholder: "Enter your phone number",
|
|
123
|
+
disabled: (__VLS_ctx.dataProfile?.user_type != 'tenant'),
|
|
124
|
+
});
|
|
125
|
+
(__VLS_ctx.phone);
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
[handleInput, dataProfile, phone,];
|
|
128
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
129
|
+
...{ onClick: (...[$event]) => {
|
|
130
|
+
__VLS_ctx.call();
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
[call,];
|
|
133
|
+
} },
|
|
134
|
+
...{ class: "shrink-0 h-14 w-14 rounded-full flex-center bg-[#C7DEFF] text-chat-primary" },
|
|
135
|
+
...{ class: ({ 'cursor-not-allowed opacity-[0.3] pointer-events-none': __VLS_ctx.keepOnlyNumber(__VLS_ctx.phone ?? '').length < 10 }) },
|
|
136
|
+
});
|
|
137
|
+
// @ts-ignore
|
|
138
|
+
[phone, keepOnlyNumber,];
|
|
139
|
+
/** @type {[typeof IconPhoneBase, ]} */ ;
|
|
140
|
+
// @ts-ignore
|
|
141
|
+
const __VLS_4 = __VLS_asFunctionalComponent(IconPhoneBase, new IconPhoneBase({}));
|
|
142
|
+
const __VLS_5 = __VLS_4({}, ...__VLS_functionalComponentArgsRest(__VLS_4));
|
|
143
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
144
|
+
...{ class: "grow overflow-hidden relative" },
|
|
145
|
+
});
|
|
146
|
+
/** @type {[typeof ConversationList, ]} */ ;
|
|
147
|
+
// @ts-ignore
|
|
148
|
+
const __VLS_8 = __VLS_asFunctionalComponent(ConversationList, new ConversationList({
|
|
149
|
+
...{ 'onSelectConversation': {} },
|
|
150
|
+
ref: "conversationListRef",
|
|
151
|
+
active: (__VLS_ctx.activeUser),
|
|
152
|
+
}));
|
|
153
|
+
const __VLS_9 = __VLS_8({
|
|
154
|
+
...{ 'onSelectConversation': {} },
|
|
155
|
+
ref: "conversationListRef",
|
|
156
|
+
active: (__VLS_ctx.activeUser),
|
|
157
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_8));
|
|
158
|
+
let __VLS_11;
|
|
159
|
+
let __VLS_12;
|
|
160
|
+
const __VLS_13 = ({ selectConversation: {} },
|
|
161
|
+
{ onSelectConversation: (__VLS_ctx.handleSelectConversation) });
|
|
162
|
+
/** @type {typeof __VLS_ctx.conversationListRef} */ ;
|
|
163
|
+
var __VLS_14 = {};
|
|
164
|
+
// @ts-ignore
|
|
165
|
+
[activeUser, handleSelectConversation, conversationListRef,];
|
|
166
|
+
var __VLS_10;
|
|
167
|
+
if (!__VLS_ctx.hideNumpad) {
|
|
168
|
+
// @ts-ignore
|
|
169
|
+
[hideNumpad,];
|
|
170
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
171
|
+
...{ class: "shrink-0 grid grid-cols-3 w-full h-[400px] sm:h-[500px] px-6 border-chat-gray-5 layout-shadow border-t" },
|
|
172
|
+
});
|
|
173
|
+
for (const [item] of __VLS_getVForSourceType((__VLS_ctx.keys))) {
|
|
174
|
+
// @ts-ignore
|
|
175
|
+
[keys,];
|
|
176
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
177
|
+
...{ onClick: (...[$event]) => {
|
|
178
|
+
if (!(!__VLS_ctx.hideNumpad))
|
|
179
|
+
return;
|
|
180
|
+
__VLS_ctx.handleKey(item);
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
[handleKey,];
|
|
183
|
+
} },
|
|
184
|
+
...{ class: "text-3xl sm:text-[40px] flex-center rounded-lg" },
|
|
185
|
+
...{ class: ({
|
|
186
|
+
'bg-chat-haze-200': false,
|
|
187
|
+
'opacity-[0.6] cursor-not-allowed': __VLS_ctx.dataProfile?.user_type != 'tenant'
|
|
188
|
+
}) },
|
|
189
|
+
key: (item.value),
|
|
190
|
+
});
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
[dataProfile,];
|
|
193
|
+
if (item.label !== 'X') {
|
|
194
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
195
|
+
(item.label);
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({});
|
|
199
|
+
/** @type {[typeof IconBackspace, ]} */ ;
|
|
200
|
+
// @ts-ignore
|
|
201
|
+
const __VLS_17 = __VLS_asFunctionalComponent(IconBackspace, new IconBackspace({
|
|
202
|
+
...{ class: "w-14" },
|
|
203
|
+
}));
|
|
204
|
+
const __VLS_18 = __VLS_17({
|
|
205
|
+
...{ class: "w-14" },
|
|
206
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/** @type {__VLS_StyleScopedClasses['w-[480px]']} */ ;
|
|
211
|
+
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
212
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
213
|
+
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
214
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
215
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
216
|
+
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
217
|
+
/** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
|
|
218
|
+
/** @type {__VLS_StyleScopedClasses['layout-shadow']} */ ;
|
|
219
|
+
/** @type {__VLS_StyleScopedClasses['border-b']} */ ;
|
|
220
|
+
/** @type {__VLS_StyleScopedClasses['px-2']} */ ;
|
|
221
|
+
/** @type {__VLS_StyleScopedClasses['sm:px-6']} */ ;
|
|
222
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
223
|
+
/** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
|
|
224
|
+
/** @type {__VLS_StyleScopedClasses['w-14']} */ ;
|
|
225
|
+
/** @type {__VLS_StyleScopedClasses['sm:hidden']} */ ;
|
|
226
|
+
/** @type {__VLS_StyleScopedClasses['py-2']} */ ;
|
|
227
|
+
/** @type {__VLS_StyleScopedClasses['h-[80px]']} */ ;
|
|
228
|
+
/** @type {__VLS_StyleScopedClasses['sm:h-[96px]']} */ ;
|
|
229
|
+
/** @type {__VLS_StyleScopedClasses['text-xl']} */ ;
|
|
230
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
231
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
232
|
+
/** @type {__VLS_StyleScopedClasses['h-14']} */ ;
|
|
233
|
+
/** @type {__VLS_StyleScopedClasses['w-14']} */ ;
|
|
234
|
+
/** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
|
|
235
|
+
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
236
|
+
/** @type {__VLS_StyleScopedClasses['bg-[#C7DEFF]']} */ ;
|
|
237
|
+
/** @type {__VLS_StyleScopedClasses['text-chat-primary']} */ ;
|
|
238
|
+
/** @type {__VLS_StyleScopedClasses['cursor-not-allowed']} */ ;
|
|
239
|
+
/** @type {__VLS_StyleScopedClasses['opacity-[0.3]']} */ ;
|
|
240
|
+
/** @type {__VLS_StyleScopedClasses['pointer-events-none']} */ ;
|
|
241
|
+
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
242
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
243
|
+
/** @type {__VLS_StyleScopedClasses['relative']} */ ;
|
|
244
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
245
|
+
/** @type {__VLS_StyleScopedClasses['grid']} */ ;
|
|
246
|
+
/** @type {__VLS_StyleScopedClasses['grid-cols-3']} */ ;
|
|
247
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
248
|
+
/** @type {__VLS_StyleScopedClasses['h-[400px]']} */ ;
|
|
249
|
+
/** @type {__VLS_StyleScopedClasses['sm:h-[500px]']} */ ;
|
|
250
|
+
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
251
|
+
/** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
|
|
252
|
+
/** @type {__VLS_StyleScopedClasses['layout-shadow']} */ ;
|
|
253
|
+
/** @type {__VLS_StyleScopedClasses['border-t']} */ ;
|
|
254
|
+
/** @type {__VLS_StyleScopedClasses['text-3xl']} */ ;
|
|
255
|
+
/** @type {__VLS_StyleScopedClasses['sm:text-[40px]']} */ ;
|
|
256
|
+
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
257
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
258
|
+
/** @type {__VLS_StyleScopedClasses['bg-chat-haze-200']} */ ;
|
|
259
|
+
/** @type {__VLS_StyleScopedClasses['opacity-[0.6]']} */ ;
|
|
260
|
+
/** @type {__VLS_StyleScopedClasses['cursor-not-allowed']} */ ;
|
|
261
|
+
/** @type {__VLS_StyleScopedClasses['w-14']} */ ;
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
var __VLS_15 = __VLS_14;
|
|
264
|
+
const __VLS_export = (await import('vue')).defineComponent({
|
|
265
|
+
setup: () => (__VLS_exposed),
|
|
266
|
+
__typeEmits: {},
|
|
267
|
+
__typeProps: {},
|
|
268
|
+
props: {},
|
|
269
|
+
});
|
|
270
|
+
export default {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IResLoginLink, IResProfile } from '
|
|
1
|
+
import type { IResLoginLink, IResProfile } from '../../../types/chat/auth';
|
|
2
2
|
interface IBodyLoginTenant {
|
|
3
3
|
tenant_id: string;
|
|
4
4
|
}
|
|
@@ -16,6 +16,7 @@ export declare const dataProfile: import("vue").Ref<{
|
|
|
16
16
|
phone: string;
|
|
17
17
|
tenant_phone: string;
|
|
18
18
|
tenant_phone_limit: number;
|
|
19
|
+
tenant_phone_forwarding: string;
|
|
19
20
|
avatar: string | null;
|
|
20
21
|
user_type: "customer" | "tenant";
|
|
21
22
|
has_business_tenant_phone?: boolean | undefined;
|
|
@@ -28,6 +29,7 @@ export declare const dataProfile: import("vue").Ref<{
|
|
|
28
29
|
phone: string;
|
|
29
30
|
tenant_phone: string;
|
|
30
31
|
tenant_phone_limit: number;
|
|
32
|
+
tenant_phone_forwarding: string;
|
|
31
33
|
avatar: string | null;
|
|
32
34
|
user_type: "customer" | "tenant";
|
|
33
35
|
has_business_tenant_phone?: boolean | undefined;
|
|
@@ -57,5 +59,6 @@ export declare const submitTenantPhone: (body: {
|
|
|
57
59
|
export declare const updateProfile: (body: {
|
|
58
60
|
phone: string;
|
|
59
61
|
}) => Promise<any>;
|
|
62
|
+
export declare const getBusinessInfo: () => Promise<any>;
|
|
60
63
|
export declare const logout: () => Promise<void>;
|
|
61
64
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IConversation, IParamGetConversation } from '
|
|
2
|
-
import type { DataWithMetaResponse } from '
|
|
3
|
-
import type { IResUser } from '
|
|
1
|
+
import type { IConversation, IParamGetConversation } from '../../../types/conversation';
|
|
2
|
+
import type { DataWithMetaResponse } from '../../../types/global';
|
|
3
|
+
import type { IResUser } from '../../../types/message';
|
|
4
4
|
export declare const getConversation: (param: IParamGetConversation) => Promise<DataWithMetaResponse<IConversation[]>>;
|
|
5
5
|
export declare const getConversationView: (id: any) => Promise<IConversation>;
|
|
6
6
|
export declare const publicTopicConversationUpdate: (data: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DataWithMetaResponse } from '
|
|
2
|
-
import type { IResMessage, IResUser, IUploadFile } from '
|
|
1
|
+
import type { DataWithMetaResponse } from '../../../types/global';
|
|
2
|
+
import type { IResMessage, IResUser, IUploadFile } from '../../../types/message';
|
|
3
3
|
interface IParamsMessage {
|
|
4
4
|
page: number;
|
|
5
5
|
receiver_id: string;
|
|
@@ -9,6 +9,12 @@ export declare const getDetailReceiver: (receiverId: string) => Promise<IResUser
|
|
|
9
9
|
export declare const getDetailUser: (id: any) => Promise<IResUser | null>;
|
|
10
10
|
export declare const readMessages: (conversationId: any) => Promise<import("axios").AxiosResponse<any, any> | undefined>;
|
|
11
11
|
export declare const sendMessage: (body: FormData) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
+
export declare const sendMessageSmsTest: (body: {
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
host_id: string;
|
|
16
|
+
text: string;
|
|
17
|
+
}) => Promise<import("axios").AxiosResponse<any, any> | undefined>;
|
|
12
18
|
export declare const getCountUnread: (params: {
|
|
13
19
|
conversation_id: number;
|
|
14
20
|
receiver_id: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IResUser } from '
|
|
2
|
-
import type { GetCustomerHistoryResponse } from '
|
|
1
|
+
import type { IResUser } from '../../../types/message';
|
|
2
|
+
import type { GetCustomerHistoryResponse } from '../../../types/chat/user';
|
|
3
3
|
export declare const user: import("vue").Ref<{
|
|
4
4
|
id: string;
|
|
5
5
|
username: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IConversation } from '../../../types/conversation';
|
|
2
|
+
type __VLS_ModelProps = {
|
|
3
|
+
'active'?: IConversation | null;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_ModelProps, {
|
|
6
|
+
getUserList: (phone?: string | undefined, option?: {
|
|
7
|
+
reset?: boolean | undefined;
|
|
8
|
+
} | undefined) => Promise<never[] | undefined>;
|
|
9
|
+
checkActiveUserList: () => void;
|
|
10
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:active": (value: IConversation | null | undefined) => any;
|
|
12
|
+
} & {
|
|
13
|
+
selectConversation: (val: any) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
15
|
+
"onUpdate:active"?: ((value: IConversation | null | undefined) => any) | undefined;
|
|
16
|
+
onSelectConversation?: ((val: any) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IResUser } from '../../../types/message';
|
|
2
|
+
type KeyPadProps = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
hideNumpad?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_Props = KeyPadProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
12
|
+
reset: () => void;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
15
|
+
} & {
|
|
16
|
+
change: (value: string) => any;
|
|
17
|
+
"update:modelValue": (value: string) => any;
|
|
18
|
+
call: (value: IResUser) => any;
|
|
19
|
+
back: () => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
onChange?: ((value: string) => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
+
onCall?: ((value: IResUser) => any) | undefined;
|
|
24
|
+
onBack?: (() => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { IResUser } from '../types/message';
|
|
2
|
-
type Offer = {
|
|
3
|
-
link: string;
|
|
4
|
-
offer: any;
|
|
5
|
-
user: any;
|
|
6
|
-
server: any;
|
|
7
|
-
};
|
|
8
|
-
export declare function useCallHelper(): {
|
|
9
|
-
call: (user: IResUser) => Promise<void>;
|
|
10
|
-
end: () => Promise<void>;
|
|
11
|
-
handleOfferResponse: (data: {
|
|
12
|
-
link: string;
|
|
13
|
-
answer: any;
|
|
14
|
-
}) => Promise<void>;
|
|
15
|
-
handleOffer: (data: Offer) => Promise<void>;
|
|
16
|
-
sendOfferOk: () => Promise<void>;
|
|
17
|
-
handleMedia: (message: any) => Promise<void>;
|
|
18
|
-
userRemoter: import("vue").Ref<{
|
|
19
|
-
id: string;
|
|
20
|
-
username: string;
|
|
21
|
-
phone: string;
|
|
22
|
-
avatar: string | null;
|
|
23
|
-
tenant_id: string | null;
|
|
24
|
-
conversation_id: number;
|
|
25
|
-
color: string;
|
|
26
|
-
status: number;
|
|
27
|
-
last_offline_at: string;
|
|
28
|
-
is_unknown: number;
|
|
29
|
-
} | null, IResUser | {
|
|
30
|
-
id: string;
|
|
31
|
-
username: string;
|
|
32
|
-
phone: string;
|
|
33
|
-
avatar: string | null;
|
|
34
|
-
tenant_id: string | null;
|
|
35
|
-
conversation_id: number;
|
|
36
|
-
color: string;
|
|
37
|
-
status: number;
|
|
38
|
-
last_offline_at: string;
|
|
39
|
-
is_unknown: number;
|
|
40
|
-
} | null>;
|
|
41
|
-
testPlay: () => void;
|
|
42
|
-
handleCallAnswer: (data: any) => void;
|
|
43
|
-
callAnswer: (uuid_request: string) => Promise<void>;
|
|
44
|
-
startPeerConnection: () => Promise<void>;
|
|
45
|
-
startIncomingCall: (uuid_request: string) => Promise<void>;
|
|
46
|
-
uuid: import("vue").Ref<string, string>;
|
|
47
|
-
};
|
|
48
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "audio_chunk",
|
|
4
|
-
"size_bytes": 160,
|
|
5
|
-
"hex_preview": "36 25 39 bb c0 41 48 bc c3 32 27 3f c7 f6 ee aa 9f ae b3 9e",
|
|
6
|
-
"samples_count": 160
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"type": "audio_chunk",
|
|
10
|
-
"size_bytes": 160,
|
|
11
|
-
"hex_preview": "3f d9 ac b3 3d 3b b9 a8 ac b4 b3 ac af bc ae 9e 9b a5 ac a9",
|
|
12
|
-
"samples_count": 160
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "audio_chunk",
|
|
16
|
-
"size_bytes": 160,
|
|
17
|
-
"hex_preview": "b1 a3 b3 a9 a8 a8 ae a3 a7 a6 a6 a8 a7 ab a9 ad af ae aa a6 ab",
|
|
18
|
-
"samples_count": 160
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "audio_chunk",
|
|
22
|
-
"size_bytes": 160,
|
|
23
|
-
"hex_preview": "b3 b1 b2 b0 ae ae b0 b2 b3 b1 b1 b0 b0 af af ae ae ae ad ac ac",
|
|
24
|
-
"samples_count": 160
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "audio_chunk",
|
|
28
|
-
"size_bytes": 160,
|
|
29
|
-
"hex_preview": "ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad ad",
|
|
30
|
-
"samples_count": 160
|
|
31
|
-
}
|
|
32
|
-
]
|