@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,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 ChatList from '../chat/page/home/ChatList.vue';
|
|
3
3
|
import HomeComponent from '../chat/page/home/Home.vue';
|
|
4
|
-
import IconArrowLeft from '../assets/icons/IconArrowLeft.vue';
|
|
4
|
+
import IconArrowLeft from '../assets/icons/global/IconArrowLeft.vue';
|
|
5
5
|
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue';
|
|
6
6
|
import { PAGE } from '../constant/general';
|
|
7
7
|
import CustomerDetail from '../chat/page/customer-detail/CustomerDetail.vue';
|
|
@@ -12,15 +12,17 @@ import Error from '../chat/page/error/Error.vue';
|
|
|
12
12
|
import { currentPage, routerPush } from '../utils/chat/chat-router';
|
|
13
13
|
import BaseSpin from '../components/chat/common/spin/BaseSpin.vue';
|
|
14
14
|
import Calling from '../components/chat/call/Calling.vue';
|
|
15
|
-
import { dataProfile, logout } from '../utils/chat/auth';
|
|
15
|
+
import { dataProfile, logout } from '../utils/chat/store/auth';
|
|
16
16
|
import '../style/index.scss';
|
|
17
17
|
import { defineRootColor } from '../constant/color';
|
|
18
|
-
import IconCloseCircle from '../assets/icons/IconCloseCircle.vue';
|
|
18
|
+
import IconCloseCircle from '../assets/icons/global/IconCloseCircle.vue';
|
|
19
19
|
import Setting from '../chat/page/setting/Setting.vue';
|
|
20
20
|
import SettingSuccess from '../chat/page/setting/SettingSuccess.vue';
|
|
21
21
|
import NotTenantPhone from '../views/NotTenantPhone.vue';
|
|
22
22
|
import { phoneNumberFormat } from '../utils/string-helper';
|
|
23
23
|
import { responsiveObserver, useListenEvent } from '../composable/useListentEvent';
|
|
24
|
+
import PhoneNumpad from './page/home/PhoneNumpad.vue';
|
|
25
|
+
import PageError from '../components/layout/PageError.vue';
|
|
24
26
|
const routerConfig = [
|
|
25
27
|
{ id: PAGE.HOME, backFunc: null, backTitle: '' },
|
|
26
28
|
{
|
|
@@ -92,20 +94,30 @@ const props = withDefaults(defineProps(), {
|
|
|
92
94
|
response: 'tablet'
|
|
93
95
|
});
|
|
94
96
|
const emit = defineEmits();
|
|
97
|
+
let initTimer = null;
|
|
95
98
|
const handleExposeInit = (init_data) => {
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
if (initTimer)
|
|
100
|
+
return;
|
|
101
|
+
const func = (data) => {
|
|
102
|
+
if (chatListRef.value) {
|
|
103
|
+
if (init_data?.conversation_id) {
|
|
104
|
+
chatListRef.value?.initData({
|
|
105
|
+
conversation_id: data?.conversation_id,
|
|
106
|
+
is_unknown: data?.is_unknown || '0'
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else
|
|
110
|
+
chatListRef.value?.initData();
|
|
111
|
+
clearInterval(initTimer);
|
|
112
|
+
initTimer = null;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
initTimer = setInterval(() => func(init_data), 500);
|
|
104
116
|
};
|
|
105
117
|
const { initPage } = useInitData();
|
|
106
118
|
const { getResponsiveObserver } = useListenEvent(handleExposeInit);
|
|
107
119
|
onMounted(() => {
|
|
108
|
-
getResponsiveObserver();
|
|
120
|
+
getResponsiveObserver(true);
|
|
109
121
|
if (props.isLib) {
|
|
110
122
|
defineRootColor();
|
|
111
123
|
handleInitPage();
|
|
@@ -138,6 +150,7 @@ const customerDetailRef = ref(null);
|
|
|
138
150
|
const homeComponentRef = ref(null);
|
|
139
151
|
const chatListRef = ref(null);
|
|
140
152
|
const drawerVisibleRef = ref(null);
|
|
153
|
+
const phoneNumpadRef = ref();
|
|
141
154
|
const selectReceiver = async (data) => {
|
|
142
155
|
if (receiverId.value != data?.receiver_id || responsiveRender.value === 'mobile') {
|
|
143
156
|
if (currentPage.value != PAGE.HOME) {
|
|
@@ -159,56 +172,23 @@ const handleCall = (user) => {
|
|
|
159
172
|
emit('call', user);
|
|
160
173
|
}
|
|
161
174
|
};
|
|
162
|
-
// const getResponsiveObserver = () => {
|
|
163
|
-
// if (!appChatRef.value) return
|
|
164
|
-
// const width = appChatRef.value?.offsetWidth ?? 0
|
|
165
|
-
// if (width >= 640) {
|
|
166
|
-
// if (responsiveObserver.value != 'tablet') {
|
|
167
|
-
// responsiveObserver.value = 'tablet'
|
|
168
|
-
// }
|
|
169
|
-
// } else {
|
|
170
|
-
// if (responsiveObserver.value != 'mobile') {
|
|
171
|
-
// if (currentPage.value == PAGE.HOME) {
|
|
172
|
-
// currentPage.value = PAGE.CHAT_LIST
|
|
173
|
-
// }
|
|
174
|
-
// responsiveObserver.value = 'mobile'
|
|
175
|
-
// }
|
|
176
|
-
// }
|
|
177
|
-
// }
|
|
178
|
-
// const getResponsiveObserverDebounce = useDebounce(() => {
|
|
179
|
-
// getResponsiveObserver()
|
|
180
|
-
// }, 50)
|
|
181
175
|
const handleInitPage = async () => {
|
|
182
176
|
const init_data = await initPage({ props: props, responsive: responsiveRender.value });
|
|
183
177
|
if (!dataProfile.value?.tenant_phone && dataProfile.value?.user_type == 'tenant') {
|
|
184
178
|
emit('error:noPhoneTenant');
|
|
185
179
|
routerPush(PAGE.NOT_TENANT_PHONE);
|
|
186
|
-
// if (dataProfile.value?.has_business_tenant_phone) {
|
|
187
|
-
// routerPush(PAGE.REGISTER_SUCCESS)
|
|
188
|
-
// } else {
|
|
189
|
-
// // emit('error:noPhoneTenant')
|
|
190
|
-
// routerPush(PAGE.REGISTER_TENANT)
|
|
191
|
-
// }
|
|
192
180
|
}
|
|
193
181
|
handleExposeInit(init_data);
|
|
194
182
|
};
|
|
195
|
-
// const handleEndCall = (data: IResUser | null, type: string) => {
|
|
196
|
-
// setTimeout(() => {
|
|
197
|
-
// if (data?.phone && homeComponentRef.value?.infoUser?.phone == data?.phone) {
|
|
198
|
-
// // homeComponentRef.value?.handleGetMessage({ resetList: true })
|
|
199
|
-
// }
|
|
200
|
-
// // publicTopicConversationUpdate({
|
|
201
|
-
// // infoUser: homeComponentRef.value?.infoUser ?? null,
|
|
202
|
-
// // isCall: type
|
|
203
|
-
// // })
|
|
204
|
-
// }, 2000)
|
|
205
|
-
// }
|
|
206
183
|
const openSettings = () => {
|
|
207
184
|
drawerVisibleRef.value?.open();
|
|
208
185
|
};
|
|
209
186
|
const handleReadMessage = () => {
|
|
210
187
|
chatListRef.value?.handleReadMessage();
|
|
211
188
|
};
|
|
189
|
+
const handleOpenPhoneNumpad = () => {
|
|
190
|
+
phoneNumpadRef.value?.openPhoneNumpad();
|
|
191
|
+
};
|
|
212
192
|
let __VLS_exposed;
|
|
213
193
|
defineExpose({
|
|
214
194
|
get unreadCount() {
|
|
@@ -328,6 +308,18 @@ else {
|
|
|
328
308
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
329
309
|
...{ class: "grow h-full overflow-hidden flex flex-col" },
|
|
330
310
|
});
|
|
311
|
+
if (__VLS_ctx.isLib) {
|
|
312
|
+
// @ts-ignore
|
|
313
|
+
[isLib,];
|
|
314
|
+
/** @type {[typeof PageError, ]} */ ;
|
|
315
|
+
// @ts-ignore
|
|
316
|
+
const __VLS_23 = __VLS_asFunctionalComponent(PageError, new PageError({
|
|
317
|
+
...{ class: "shrink-0" },
|
|
318
|
+
}));
|
|
319
|
+
const __VLS_24 = __VLS_23({
|
|
320
|
+
...{ class: "shrink-0" },
|
|
321
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_23));
|
|
322
|
+
}
|
|
331
323
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
332
324
|
...{ class: "w-full grow flex overflow-hidden relative" },
|
|
333
325
|
});
|
|
@@ -336,19 +328,19 @@ else {
|
|
|
336
328
|
[isLib,];
|
|
337
329
|
/** @type {[typeof Calling, ]} */ ;
|
|
338
330
|
// @ts-ignore
|
|
339
|
-
const
|
|
331
|
+
const __VLS_27 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
340
332
|
...{ 'onUserCalling': {} },
|
|
341
333
|
ref: "callingRef",
|
|
342
334
|
responsive: (__VLS_ctx.responsiveRender),
|
|
343
335
|
}));
|
|
344
|
-
const
|
|
336
|
+
const __VLS_28 = __VLS_27({
|
|
345
337
|
...{ 'onUserCalling': {} },
|
|
346
338
|
ref: "callingRef",
|
|
347
339
|
responsive: (__VLS_ctx.responsiveRender),
|
|
348
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
349
|
-
let
|
|
350
|
-
let
|
|
351
|
-
const
|
|
340
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_27));
|
|
341
|
+
let __VLS_30;
|
|
342
|
+
let __VLS_31;
|
|
343
|
+
const __VLS_32 = ({ userCalling: {} },
|
|
352
344
|
{ onUserCalling: (...[$event]) => {
|
|
353
345
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
354
346
|
return;
|
|
@@ -367,10 +359,10 @@ else {
|
|
|
367
359
|
[responsiveRender, emit,];
|
|
368
360
|
} });
|
|
369
361
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
370
|
-
var
|
|
362
|
+
var __VLS_33 = {};
|
|
371
363
|
// @ts-ignore
|
|
372
364
|
[callingRef,];
|
|
373
|
-
var
|
|
365
|
+
var __VLS_29;
|
|
374
366
|
}
|
|
375
367
|
if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
376
368
|
// @ts-ignore
|
|
@@ -411,8 +403,8 @@ else {
|
|
|
411
403
|
});
|
|
412
404
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
413
405
|
// @ts-ignore
|
|
414
|
-
const
|
|
415
|
-
const
|
|
406
|
+
const __VLS_36 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
407
|
+
const __VLS_37 = __VLS_36({}, ...__VLS_functionalComponentArgsRest(__VLS_36));
|
|
416
408
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
417
409
|
...{ class: "ml-3" },
|
|
418
410
|
});
|
|
@@ -473,41 +465,61 @@ else {
|
|
|
473
465
|
});
|
|
474
466
|
/** @type {[typeof IconCloseCircle, ]} */ ;
|
|
475
467
|
// @ts-ignore
|
|
476
|
-
const
|
|
477
|
-
const
|
|
468
|
+
const __VLS_40 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
|
|
469
|
+
const __VLS_41 = __VLS_40({}, ...__VLS_functionalComponentArgsRest(__VLS_40));
|
|
478
470
|
}
|
|
479
471
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
480
472
|
...{ class: "grow overflow-hidden" },
|
|
481
473
|
});
|
|
482
474
|
/** @type {[typeof ChatList, ]} */ ;
|
|
483
475
|
// @ts-ignore
|
|
484
|
-
const
|
|
476
|
+
const __VLS_44 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
485
477
|
...{ 'onSelectReceiver': {} },
|
|
478
|
+
...{ 'onOpenPhoneNumpad': {} },
|
|
486
479
|
ref: "chatListRef",
|
|
487
480
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
488
481
|
responsive: (__VLS_ctx.responsiveRender),
|
|
489
482
|
receiverId: (__VLS_ctx.receiverId),
|
|
490
483
|
}));
|
|
491
|
-
const
|
|
484
|
+
const __VLS_45 = __VLS_44({
|
|
492
485
|
...{ 'onSelectReceiver': {} },
|
|
486
|
+
...{ 'onOpenPhoneNumpad': {} },
|
|
493
487
|
ref: "chatListRef",
|
|
494
488
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
495
489
|
responsive: (__VLS_ctx.responsiveRender),
|
|
496
490
|
receiverId: (__VLS_ctx.receiverId),
|
|
497
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
498
|
-
let
|
|
499
|
-
let
|
|
500
|
-
const
|
|
491
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_44));
|
|
492
|
+
let __VLS_47;
|
|
493
|
+
let __VLS_48;
|
|
494
|
+
const __VLS_49 = ({ selectReceiver: {} },
|
|
501
495
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
496
|
+
const __VLS_50 = ({ openPhoneNumpad: {} },
|
|
497
|
+
{ onOpenPhoneNumpad: (...[$event]) => {
|
|
498
|
+
if (!!(!__VLS_ctx.isRouterReady))
|
|
499
|
+
return;
|
|
500
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.TENANT_ERROR))
|
|
501
|
+
return;
|
|
502
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_TENANT))
|
|
503
|
+
return;
|
|
504
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.REGISTER_SUCCESS))
|
|
505
|
+
return;
|
|
506
|
+
if (!!(__VLS_ctx.currentPage == __VLS_ctx.PAGE.NOT_TENANT_PHONE))
|
|
507
|
+
return;
|
|
508
|
+
if (!(__VLS_ctx.responsiveRender == 'mobile'))
|
|
509
|
+
return;
|
|
510
|
+
__VLS_ctx.handleOpenPhoneNumpad();
|
|
511
|
+
// @ts-ignore
|
|
512
|
+
[responsiveRender, receiverId, selectReceiver, handleOpenPhoneNumpad,];
|
|
513
|
+
} });
|
|
502
514
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
|
|
503
515
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
504
|
-
var
|
|
516
|
+
var __VLS_51 = {};
|
|
505
517
|
// @ts-ignore
|
|
506
|
-
[currentPage, PAGE,
|
|
507
|
-
var
|
|
518
|
+
[currentPage, PAGE, chatListRef,];
|
|
519
|
+
var __VLS_46;
|
|
508
520
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
509
521
|
// @ts-ignore
|
|
510
|
-
const
|
|
522
|
+
const __VLS_54 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
511
523
|
...{ 'onCall': {} },
|
|
512
524
|
...{ 'onBack': {} },
|
|
513
525
|
...{ 'onInputFocus': {} },
|
|
@@ -517,7 +529,7 @@ else {
|
|
|
517
529
|
conversation: (__VLS_ctx.currentConversation),
|
|
518
530
|
responsive: (__VLS_ctx.responsiveRender),
|
|
519
531
|
}));
|
|
520
|
-
const
|
|
532
|
+
const __VLS_55 = __VLS_54({
|
|
521
533
|
...{ 'onCall': {} },
|
|
522
534
|
...{ 'onBack': {} },
|
|
523
535
|
...{ 'onInputFocus': {} },
|
|
@@ -526,12 +538,12 @@ else {
|
|
|
526
538
|
...{ class: "h-full" },
|
|
527
539
|
conversation: (__VLS_ctx.currentConversation),
|
|
528
540
|
responsive: (__VLS_ctx.responsiveRender),
|
|
529
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
530
|
-
let
|
|
531
|
-
let
|
|
532
|
-
const
|
|
541
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_54));
|
|
542
|
+
let __VLS_57;
|
|
543
|
+
let __VLS_58;
|
|
544
|
+
const __VLS_59 = ({ call: {} },
|
|
533
545
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
534
|
-
const
|
|
546
|
+
const __VLS_60 = ({ back: {} },
|
|
535
547
|
{ onBack: (...[$event]) => {
|
|
536
548
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
537
549
|
return;
|
|
@@ -549,60 +561,60 @@ else {
|
|
|
549
561
|
// @ts-ignore
|
|
550
562
|
[responsiveRender, currentPageConfig, receiverId, currentConversation, handleCall,];
|
|
551
563
|
} });
|
|
552
|
-
const
|
|
564
|
+
const __VLS_61 = ({ inputFocus: {} },
|
|
553
565
|
{ onInputFocus: (__VLS_ctx.handleReadMessage) });
|
|
554
566
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
555
567
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
556
|
-
var
|
|
568
|
+
var __VLS_62 = {};
|
|
557
569
|
// @ts-ignore
|
|
558
570
|
[currentPage, PAGE, handleReadMessage, homeComponentRef,];
|
|
559
|
-
var
|
|
571
|
+
var __VLS_56;
|
|
560
572
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
561
573
|
// @ts-ignore
|
|
562
574
|
[currentPage, PAGE,];
|
|
563
575
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
564
576
|
// @ts-ignore
|
|
565
|
-
const
|
|
577
|
+
const __VLS_65 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
566
578
|
ref: "customerDetailRef",
|
|
567
579
|
receiverId: (__VLS_ctx.receiverId),
|
|
568
580
|
...{ class: "w-full h-full" },
|
|
569
581
|
responsive: (__VLS_ctx.responsiveRender),
|
|
570
582
|
}));
|
|
571
|
-
const
|
|
583
|
+
const __VLS_66 = __VLS_65({
|
|
572
584
|
ref: "customerDetailRef",
|
|
573
585
|
receiverId: (__VLS_ctx.receiverId),
|
|
574
586
|
...{ class: "w-full h-full" },
|
|
575
587
|
responsive: (__VLS_ctx.responsiveRender),
|
|
576
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
588
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_65));
|
|
577
589
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
578
|
-
var
|
|
590
|
+
var __VLS_68 = {};
|
|
579
591
|
// @ts-ignore
|
|
580
592
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
581
|
-
var
|
|
593
|
+
var __VLS_67;
|
|
582
594
|
}
|
|
583
595
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
584
596
|
// @ts-ignore
|
|
585
597
|
[currentPage, PAGE,];
|
|
586
598
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
587
599
|
// @ts-ignore
|
|
588
|
-
const
|
|
600
|
+
const __VLS_71 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
589
601
|
...{ class: "w-full h-full" },
|
|
590
602
|
}));
|
|
591
|
-
const
|
|
603
|
+
const __VLS_72 = __VLS_71({
|
|
592
604
|
...{ class: "w-full h-full" },
|
|
593
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
605
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_71));
|
|
594
606
|
}
|
|
595
607
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
596
608
|
// @ts-ignore
|
|
597
609
|
[currentPage, PAGE,];
|
|
598
610
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
599
611
|
// @ts-ignore
|
|
600
|
-
const
|
|
612
|
+
const __VLS_75 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
601
613
|
...{ class: "w-full h-full" },
|
|
602
614
|
}));
|
|
603
|
-
const
|
|
615
|
+
const __VLS_76 = __VLS_75({
|
|
604
616
|
...{ class: "w-full h-full" },
|
|
605
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
617
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_75));
|
|
606
618
|
}
|
|
607
619
|
}
|
|
608
620
|
else {
|
|
@@ -611,7 +623,7 @@ else {
|
|
|
611
623
|
});
|
|
612
624
|
/** @type {[typeof ChatList, ]} */ ;
|
|
613
625
|
// @ts-ignore
|
|
614
|
-
const
|
|
626
|
+
const __VLS_79 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
615
627
|
...{ 'onSelectReceiver': {} },
|
|
616
628
|
...{ 'onOpenPhoneNumpad': {} },
|
|
617
629
|
ref: "chatListRef",
|
|
@@ -619,19 +631,19 @@ else {
|
|
|
619
631
|
responsive: (__VLS_ctx.responsiveRender),
|
|
620
632
|
receiverId: (__VLS_ctx.receiverId),
|
|
621
633
|
}));
|
|
622
|
-
const
|
|
634
|
+
const __VLS_80 = __VLS_79({
|
|
623
635
|
...{ 'onSelectReceiver': {} },
|
|
624
636
|
...{ 'onOpenPhoneNumpad': {} },
|
|
625
637
|
ref: "chatListRef",
|
|
626
638
|
...{ class: "w-[38%] max-w-[500px] min-w-[300px] xl:min-w-[450px] border-r layout-border" },
|
|
627
639
|
responsive: (__VLS_ctx.responsiveRender),
|
|
628
640
|
receiverId: (__VLS_ctx.receiverId),
|
|
629
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
630
|
-
let
|
|
631
|
-
let
|
|
632
|
-
const
|
|
641
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_79));
|
|
642
|
+
let __VLS_82;
|
|
643
|
+
let __VLS_83;
|
|
644
|
+
const __VLS_84 = ({ selectReceiver: {} },
|
|
633
645
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
634
|
-
const
|
|
646
|
+
const __VLS_85 = ({ openPhoneNumpad: {} },
|
|
635
647
|
{ onOpenPhoneNumpad: (...[$event]) => {
|
|
636
648
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
637
649
|
return;
|
|
@@ -645,15 +657,15 @@ else {
|
|
|
645
657
|
return;
|
|
646
658
|
if (!!(__VLS_ctx.responsiveRender == 'mobile'))
|
|
647
659
|
return;
|
|
648
|
-
__VLS_ctx.
|
|
660
|
+
__VLS_ctx.handleOpenPhoneNumpad();
|
|
649
661
|
// @ts-ignore
|
|
650
|
-
[responsiveRender,
|
|
662
|
+
[responsiveRender, receiverId, selectReceiver, handleOpenPhoneNumpad,];
|
|
651
663
|
} });
|
|
652
664
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
653
|
-
var
|
|
665
|
+
var __VLS_86 = {};
|
|
654
666
|
// @ts-ignore
|
|
655
667
|
[chatListRef,];
|
|
656
|
-
var
|
|
668
|
+
var __VLS_81;
|
|
657
669
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
658
670
|
...{ class: "bg-white grow flex flex-col h-full overflow-hidden" },
|
|
659
671
|
});
|
|
@@ -687,8 +699,8 @@ else {
|
|
|
687
699
|
});
|
|
688
700
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
689
701
|
// @ts-ignore
|
|
690
|
-
const
|
|
691
|
-
const
|
|
702
|
+
const __VLS_89 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
703
|
+
const __VLS_90 = __VLS_89({}, ...__VLS_functionalComponentArgsRest(__VLS_89));
|
|
692
704
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
693
705
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
694
706
|
});
|
|
@@ -701,7 +713,7 @@ else {
|
|
|
701
713
|
});
|
|
702
714
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
703
715
|
// @ts-ignore
|
|
704
|
-
const
|
|
716
|
+
const __VLS_93 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
705
717
|
...{ 'onCall': {} },
|
|
706
718
|
...{ 'onInputFocus': {} },
|
|
707
719
|
ref: "homeComponentRef",
|
|
@@ -710,7 +722,7 @@ else {
|
|
|
710
722
|
responsive: (__VLS_ctx.responsiveRender),
|
|
711
723
|
conversation: (__VLS_ctx.currentConversation),
|
|
712
724
|
}));
|
|
713
|
-
const
|
|
725
|
+
const __VLS_94 = __VLS_93({
|
|
714
726
|
...{ 'onCall': {} },
|
|
715
727
|
...{ 'onInputFocus': {} },
|
|
716
728
|
ref: "homeComponentRef",
|
|
@@ -718,68 +730,90 @@ else {
|
|
|
718
730
|
...{ class: "h-full" },
|
|
719
731
|
responsive: (__VLS_ctx.responsiveRender),
|
|
720
732
|
conversation: (__VLS_ctx.currentConversation),
|
|
721
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
722
|
-
let
|
|
723
|
-
let
|
|
724
|
-
const
|
|
733
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_93));
|
|
734
|
+
let __VLS_96;
|
|
735
|
+
let __VLS_97;
|
|
736
|
+
const __VLS_98 = ({ call: {} },
|
|
725
737
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
726
|
-
const
|
|
738
|
+
const __VLS_99 = ({ inputFocus: {} },
|
|
727
739
|
{ onInputFocus: (__VLS_ctx.handleReadMessage) });
|
|
728
740
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
|
|
729
741
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
730
|
-
var
|
|
742
|
+
var __VLS_100 = {};
|
|
731
743
|
// @ts-ignore
|
|
732
744
|
[currentPage, PAGE, responsiveRender, receiverId, receiverId, currentConversation, handleCall, handleReadMessage, homeComponentRef,];
|
|
733
|
-
var
|
|
745
|
+
var __VLS_95;
|
|
734
746
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
735
747
|
// @ts-ignore
|
|
736
748
|
[currentPage, PAGE,];
|
|
737
749
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
738
750
|
// @ts-ignore
|
|
739
|
-
const
|
|
751
|
+
const __VLS_103 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
740
752
|
ref: "customerDetailRef",
|
|
741
753
|
receiverId: (__VLS_ctx.receiverId),
|
|
742
754
|
...{ class: "h-full" },
|
|
743
755
|
responsive: (__VLS_ctx.responsiveRender),
|
|
744
756
|
}));
|
|
745
|
-
const
|
|
757
|
+
const __VLS_104 = __VLS_103({
|
|
746
758
|
ref: "customerDetailRef",
|
|
747
759
|
receiverId: (__VLS_ctx.receiverId),
|
|
748
760
|
...{ class: "h-full" },
|
|
749
761
|
responsive: (__VLS_ctx.responsiveRender),
|
|
750
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
762
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_103));
|
|
751
763
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
752
|
-
var
|
|
764
|
+
var __VLS_106 = {};
|
|
753
765
|
// @ts-ignore
|
|
754
766
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
755
|
-
var
|
|
767
|
+
var __VLS_105;
|
|
756
768
|
}
|
|
757
769
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
758
770
|
// @ts-ignore
|
|
759
771
|
[currentPage, PAGE,];
|
|
760
772
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
761
773
|
// @ts-ignore
|
|
762
|
-
const
|
|
774
|
+
const __VLS_109 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
763
775
|
...{ class: "h-full" },
|
|
764
776
|
}));
|
|
765
|
-
const
|
|
777
|
+
const __VLS_110 = __VLS_109({
|
|
766
778
|
...{ class: "h-full" },
|
|
767
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
779
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_109));
|
|
768
780
|
}
|
|
769
781
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
770
782
|
// @ts-ignore
|
|
771
783
|
[currentPage, PAGE,];
|
|
772
784
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
773
785
|
// @ts-ignore
|
|
774
|
-
const
|
|
786
|
+
const __VLS_113 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
775
787
|
...{ class: "h-full" },
|
|
776
788
|
}));
|
|
777
|
-
const
|
|
789
|
+
const __VLS_114 = __VLS_113({
|
|
778
790
|
...{ class: "h-full" },
|
|
779
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
791
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_113));
|
|
780
792
|
}
|
|
781
793
|
}
|
|
782
|
-
|
|
794
|
+
/** @type {[typeof PhoneNumpad, ]} */ ;
|
|
795
|
+
// @ts-ignore
|
|
796
|
+
const __VLS_117 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
|
|
797
|
+
...{ 'onCall': {} },
|
|
798
|
+
ref: "phoneNumpadRef",
|
|
799
|
+
...{ class: "bg-white shrink-0 border-l layout-border" },
|
|
800
|
+
modelValue: "",
|
|
801
|
+
}));
|
|
802
|
+
const __VLS_118 = __VLS_117({
|
|
803
|
+
...{ 'onCall': {} },
|
|
804
|
+
ref: "phoneNumpadRef",
|
|
805
|
+
...{ class: "bg-white shrink-0 border-l layout-border" },
|
|
806
|
+
modelValue: "",
|
|
807
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_117));
|
|
808
|
+
let __VLS_120;
|
|
809
|
+
let __VLS_121;
|
|
810
|
+
const __VLS_122 = ({ call: {} },
|
|
811
|
+
{ onCall: (__VLS_ctx.handleCall) });
|
|
812
|
+
/** @type {typeof __VLS_ctx.phoneNumpadRef} */ ;
|
|
813
|
+
var __VLS_123 = {};
|
|
814
|
+
// @ts-ignore
|
|
815
|
+
[handleCall, phoneNumpadRef,];
|
|
816
|
+
var __VLS_119;
|
|
783
817
|
}
|
|
784
818
|
/** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
|
|
785
819
|
/** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
|
|
@@ -792,6 +826,7 @@ else {
|
|
|
792
826
|
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
793
827
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
794
828
|
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
829
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
795
830
|
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
796
831
|
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
797
832
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
@@ -874,13 +909,16 @@ else {
|
|
|
874
909
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
875
910
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
876
911
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
912
|
+
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
913
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
914
|
+
/** @type {__VLS_StyleScopedClasses['border-l']} */ ;
|
|
915
|
+
/** @type {__VLS_StyleScopedClasses['layout-border']} */ ;
|
|
877
916
|
// @ts-ignore
|
|
878
|
-
var
|
|
879
|
-
const
|
|
917
|
+
var __VLS_34 = __VLS_33, __VLS_52 = __VLS_51, __VLS_63 = __VLS_62, __VLS_69 = __VLS_68, __VLS_87 = __VLS_86, __VLS_101 = __VLS_100, __VLS_107 = __VLS_106, __VLS_124 = __VLS_123;
|
|
918
|
+
const __VLS_export = (await import('vue')).defineComponent({
|
|
880
919
|
setup: () => (__VLS_exposed),
|
|
881
920
|
__typeEmits: {},
|
|
882
921
|
__typeProps: {},
|
|
883
922
|
props: {},
|
|
884
923
|
});
|
|
885
|
-
const __VLS_export = {};
|
|
886
924
|
export default {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail.vue';
|
|
3
3
|
import IconFilter from '../../../assets/icons/customer-appointment/IconFilter.vue';
|
|
4
4
|
import { computed } from 'vue';
|
|
5
|
-
import { getItemsByYear, userHistory } from '../../../utils/chat/user';
|
|
5
|
+
import { getItemsByYear, userHistory } from '../../../utils/chat/store/user';
|
|
6
6
|
import { CalendarStatus } from '../../../constant/user';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { DATE_FORMATS } from '../../../constant/datetime';
|
|
@@ -3,7 +3,7 @@ import CardCustomerDetail from '../../../components/chat/card/CardCustomerDetail
|
|
|
3
3
|
import { Status_Color } from '../../../constant/color';
|
|
4
4
|
import { computed, ref } from 'vue';
|
|
5
5
|
import CollapseCheckIn from '../../../chat/page/customer-check-in/CollapseCheckIn.vue';
|
|
6
|
-
import { getItemsByYear, userHistory } from '../../../utils/chat/user';
|
|
6
|
+
import { getItemsByYear, userHistory } from '../../../utils/chat/store/user';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { DATE_FORMATS } from '../../../constant/datetime';
|
|
9
9
|
const checkin = computed(() => {
|
|
@@ -10,7 +10,7 @@ import IconGroup from '../../../assets/icons/customer-detail/IconGroup.vue';
|
|
|
10
10
|
import IconNote from '../../../assets/icons/customer-detail/IconNote.vue';
|
|
11
11
|
import IconSearch from '../../../assets/icons/customer-detail/IconSearch.vue';
|
|
12
12
|
import IconPin from '../../../assets/icons/customer-detail/IconPin.vue';
|
|
13
|
-
import { getUserHistory, user, userHistory } from '../../../utils/chat/user';
|
|
13
|
+
import { getUserHistory, user, userHistory } from '../../../utils/chat/store/user';
|
|
14
14
|
import { computed } from 'vue';
|
|
15
15
|
import { phoneNumberFormat } from '../../../utils/string-helper';
|
|
16
16
|
import { routerPush } from '../../../utils/chat/chat-router';
|
|
@@ -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 { logout } from '../../../utils/chat/auth
|
|
2
|
+
import { logout } from '../../../utils/chat/store/auth';
|
|
3
3
|
const reload = () => window.location.reload();
|
|
4
4
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
5
5
|
const __VLS_ctx = {
|