@phonghq/go-chat 1.0.23 → 1.0.25
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/README.md +1 -1
- package/dist/assets/icons/IconCloseCircle.vue.d.ts +2 -0
- package/dist/assets/icons/IconSetting.vue.d.ts +2 -0
- package/dist/chat/App.vue.d.ts +2 -0
- package/dist/chat/page/home/ChatList.vue.d.ts +6 -3
- package/dist/chat/page/home/ChatMessage.vue.d.ts +2 -0
- package/dist/chat/page/home/ChatMessageItem.vue.d.ts +18 -0
- package/dist/chat/page/home/Home.vue.d.ts +4 -0
- package/dist/chat/page/setting/Setting.vue.d.ts +2 -0
- package/dist/components/chat/call/Calling.vue.d.ts +2 -0
- package/dist/components/chat/common/switch/SwitchBase.vue.d.ts +14 -0
- package/dist/components/chat/common/tab/TabBase.vue.d.ts +30 -0
- package/dist/components/chat/select/SelectBase.vue.d.ts +2 -0
- package/dist/components/common/drawer/DrawerBase.vue.d.ts +1 -1
- package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +1 -0
- package/dist/composable/useCallHelper.d.ts +2 -0
- package/dist/composable/useListConversations.d.ts +48 -0
- package/dist/constant/color.d.ts +2 -2
- package/dist/go-chat.es.js +28838 -28734
- package/dist/go-chat.umd.js +14 -14
- package/dist/style.css +1 -1
- package/dist/test/assets/icons/IconCloseCircle.vue.js +36 -0
- package/dist/test/assets/icons/IconSetting.vue.js +33 -0
- package/dist/test/chat/App.vue.js +191 -90
- package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +0 -3
- package/dist/test/chat/page/home/ChatList.vue.js +225 -137
- package/dist/test/chat/page/home/ChatMessage.vue.js +45 -181
- package/dist/test/chat/page/home/ChatMessageItem.vue.js +335 -0
- package/dist/test/chat/page/home/Home.vue.js +38 -65
- package/dist/test/chat/page/home/HomeHeader.vue.js +18 -18
- package/dist/test/chat/page/home/InputChat.vue.js +62 -34
- package/dist/test/chat/page/setting/Setting.vue.js +125 -0
- package/dist/test/components/chat/call/Calling.vue.js +36 -24
- package/dist/test/components/chat/common/switch/SwitchBase.vue.js +70 -0
- package/dist/test/components/chat/common/tab/TabBase.vue.js +85 -0
- package/dist/test/components/chat/select/SelectBase.vue.js +26 -18
- package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +9 -4
- package/dist/test/composable/useDigibot.js +2 -1
- package/dist/test/composable/useInitData.js +4 -7
- package/dist/test/composable/useListConversations.js +124 -0
- package/dist/test/composable/usePlivo.js +18 -6
- package/dist/test/constant/color.js +4 -2
- package/dist/test/types/chat/call.js +4 -1
- package/dist/test/utils/chat/auth.js +15 -0
- package/dist/test/utils/chat/conversation.js +57 -0
- package/dist/test/utils/chat/phone-string.js +1 -1
- package/dist/types/chat/auth.d.ts +2 -0
- package/dist/types/chat/call.d.ts +3 -0
- package/dist/types/chat/global.d.ts +1 -0
- package/dist/types/conversation.d.ts +3 -1
- package/dist/types/message.d.ts +6 -0
- package/dist/utils/chat/auth.d.ts +5 -0
- package/dist/utils/chat/conversation.d.ts +7 -0
- package/dist/utils/chat/phone-string.d.ts +1 -1
- package/dist/utils/chat/user.d.ts +2 -0
- package/package.json +1 -1
|
@@ -12,10 +12,15 @@ 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 { logout } from '../utils/chat/auth';
|
|
15
|
+
import { dataProfile, logout } from '../utils/chat/auth';
|
|
16
16
|
import MobileFooter from '../components/chat/layout/mobile/Footer.vue';
|
|
17
17
|
import '../style/index.scss';
|
|
18
18
|
import { useDebounce } from '../utils/debounce';
|
|
19
|
+
import { defineRootColor } from '../constant/color';
|
|
20
|
+
import { publicTopicConversationUpdate } from '../utils/chat/conversation';
|
|
21
|
+
import DrawerBaseCustom from '../components/common/drawer/DrawerBaseCustom.vue';
|
|
22
|
+
import IconCloseCircle from '../assets/icons/IconCloseCircle.vue';
|
|
23
|
+
import Setting from '../chat/page/setting/Setting.vue';
|
|
19
24
|
const routerConfig = [
|
|
20
25
|
{ id: PAGE.HOME, backFunc: null, backTitle: '' },
|
|
21
26
|
{
|
|
@@ -85,11 +90,15 @@ const props = withDefaults(defineProps(), {
|
|
|
85
90
|
const emit = defineEmits();
|
|
86
91
|
const { initPage } = useInitData();
|
|
87
92
|
onMounted(() => {
|
|
93
|
+
if (props.isLib) {
|
|
94
|
+
defineRootColor();
|
|
95
|
+
}
|
|
88
96
|
getResponsiveObserver();
|
|
89
|
-
window.addEventListener('resize',
|
|
97
|
+
window.addEventListener('resize', getResponsiveObserverDebounce);
|
|
98
|
+
handleInitPage();
|
|
90
99
|
});
|
|
91
100
|
onUnmounted(() => {
|
|
92
|
-
window.removeEventListener('resize',
|
|
101
|
+
window.removeEventListener('resize', getResponsiveObserverDebounce);
|
|
93
102
|
});
|
|
94
103
|
const currentPageConfig = computed(() => {
|
|
95
104
|
if (responsiveRender.value === 'mobile') {
|
|
@@ -100,7 +109,7 @@ const currentPageConfig = computed(() => {
|
|
|
100
109
|
const responsiveRender = computed(() => {
|
|
101
110
|
return props.response == 'mobile' ? props.response : responsiveObserver.value;
|
|
102
111
|
});
|
|
103
|
-
const list = computed(() => chatListRef.value?.
|
|
112
|
+
const list = computed(() => chatListRef.value?.listConversationsAll ?? []);
|
|
104
113
|
const unreadCount = computed(() => list.value?.reduce((total, cur) => total + (cur?.unread_count ?? 0), 0) ?? 0);
|
|
105
114
|
const callStatus = computed(() => callingRef.value?.callStatus ?? null);
|
|
106
115
|
const responsiveObserver = ref('tablet');
|
|
@@ -110,6 +119,7 @@ const receiverId = ref(null);
|
|
|
110
119
|
const customerDetailRef = ref(null);
|
|
111
120
|
const homeComponentRef = ref(null);
|
|
112
121
|
const chatListRef = ref(null);
|
|
122
|
+
const drawerVisibleRef = ref(null);
|
|
113
123
|
const selectReceiver = async (data) => {
|
|
114
124
|
if (receiverId.value != data?.receiver_id || responsiveRender.value === 'mobile') {
|
|
115
125
|
if (currentPage.value != PAGE.HOME) {
|
|
@@ -123,10 +133,8 @@ const selectReceiver = async (data) => {
|
|
|
123
133
|
};
|
|
124
134
|
const handleCall = (user) => {
|
|
125
135
|
callingRef.value?.startCall(user);
|
|
126
|
-
// callingRef.value?.startAnswer('16013818811')
|
|
127
136
|
};
|
|
128
|
-
const getResponsiveObserver =
|
|
129
|
-
// const div = document.getElementById('appChatMain')
|
|
137
|
+
const getResponsiveObserver = () => {
|
|
130
138
|
if (!appChatRef.value)
|
|
131
139
|
return;
|
|
132
140
|
const width = appChatRef.value?.offsetWidth ?? 0;
|
|
@@ -143,8 +151,30 @@ const getResponsiveObserver = useDebounce(() => {
|
|
|
143
151
|
responsiveObserver.value = 'mobile';
|
|
144
152
|
}
|
|
145
153
|
}
|
|
154
|
+
};
|
|
155
|
+
const getResponsiveObserverDebounce = useDebounce(() => {
|
|
156
|
+
getResponsiveObserver();
|
|
146
157
|
}, 50);
|
|
147
|
-
|
|
158
|
+
const handleInitPage = async () => {
|
|
159
|
+
await initPage({ props: props, response: responsiveRender.value });
|
|
160
|
+
if (!dataProfile.value?.tenant_phone) {
|
|
161
|
+
emit('error:noPhoneTenant');
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const handleEndCall = (data, type) => {
|
|
165
|
+
setTimeout(() => {
|
|
166
|
+
if (data?.phone && homeComponentRef.value?.infoUser?.phone == data?.phone) {
|
|
167
|
+
homeComponentRef.value?.handleGetMessage({ resetList: true });
|
|
168
|
+
}
|
|
169
|
+
publicTopicConversationUpdate({
|
|
170
|
+
infoUser: homeComponentRef.value?.infoUser ?? null,
|
|
171
|
+
isCall: type
|
|
172
|
+
});
|
|
173
|
+
}, 2000);
|
|
174
|
+
};
|
|
175
|
+
const openSettings = () => {
|
|
176
|
+
drawerVisibleRef.value?.open();
|
|
177
|
+
};
|
|
148
178
|
let __VLS_exposed;
|
|
149
179
|
defineExpose({
|
|
150
180
|
get unreadCount() {
|
|
@@ -162,7 +192,8 @@ defineExpose({
|
|
|
162
192
|
startCall: async () => {
|
|
163
193
|
await callingRef.value?.answer();
|
|
164
194
|
},
|
|
165
|
-
endCall: () => callingRef.value?.endCall()
|
|
195
|
+
endCall: () => callingRef.value?.endCall(),
|
|
196
|
+
openSettings
|
|
166
197
|
});
|
|
167
198
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
168
199
|
const __VLS_defaults = {
|
|
@@ -179,8 +210,8 @@ let __VLS_elements;
|
|
|
179
210
|
let __VLS_components;
|
|
180
211
|
let __VLS_directives;
|
|
181
212
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
182
|
-
...{ class: "go-chat-main max-w-full" },
|
|
183
|
-
...{ class: ({ 'p-8': !__VLS_ctx.isLib }) },
|
|
213
|
+
...{ class: "go-chat-main max-w-full p-0" },
|
|
214
|
+
...{ class: ({ 'md:p-8': !__VLS_ctx.isLib }) },
|
|
184
215
|
id: "appChatMain",
|
|
185
216
|
ref: "appChatRef",
|
|
186
217
|
});
|
|
@@ -210,17 +241,19 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
210
241
|
// @ts-ignore
|
|
211
242
|
[responsiveRender,];
|
|
212
243
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
213
|
-
...{ class: "relative flex flex-col mx-auto w-full
|
|
244
|
+
...{ class: "relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4" },
|
|
214
245
|
});
|
|
215
246
|
/** @type {[typeof Calling, ]} */ ;
|
|
216
247
|
// @ts-ignore
|
|
217
248
|
const __VLS_8 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
218
249
|
...{ 'onUserCalling': {} },
|
|
250
|
+
...{ 'onEndCall': {} },
|
|
219
251
|
ref: "callingRef",
|
|
220
252
|
responsive: (__VLS_ctx.responsiveRender),
|
|
221
253
|
}));
|
|
222
254
|
const __VLS_9 = __VLS_8({
|
|
223
255
|
...{ 'onUserCalling': {} },
|
|
256
|
+
...{ 'onEndCall': {} },
|
|
224
257
|
ref: "callingRef",
|
|
225
258
|
responsive: (__VLS_ctx.responsiveRender),
|
|
226
259
|
}, ...__VLS_functionalComponentArgsRest(__VLS_8));
|
|
@@ -238,10 +271,12 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
238
271
|
// @ts-ignore
|
|
239
272
|
[responsiveRender, emit,];
|
|
240
273
|
} });
|
|
274
|
+
const __VLS_14 = ({ endCall: {} },
|
|
275
|
+
{ onEndCall: (__VLS_ctx.handleEndCall) });
|
|
241
276
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
242
|
-
var
|
|
277
|
+
var __VLS_15 = {};
|
|
243
278
|
// @ts-ignore
|
|
244
|
-
[callingRef,];
|
|
279
|
+
[handleEndCall, callingRef,];
|
|
245
280
|
var __VLS_10;
|
|
246
281
|
if (__VLS_ctx.currentPageConfig?.backFunc) {
|
|
247
282
|
// @ts-ignore
|
|
@@ -267,8 +302,8 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
267
302
|
});
|
|
268
303
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
269
304
|
// @ts-ignore
|
|
270
|
-
const
|
|
271
|
-
const
|
|
305
|
+
const __VLS_18 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
306
|
+
const __VLS_19 = __VLS_18({}, ...__VLS_functionalComponentArgsRest(__VLS_18));
|
|
272
307
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
273
308
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
274
309
|
});
|
|
@@ -281,114 +316,114 @@ else if (__VLS_ctx.responsiveRender == 'mobile') {
|
|
|
281
316
|
});
|
|
282
317
|
/** @type {[typeof ChatList, ]} */ ;
|
|
283
318
|
// @ts-ignore
|
|
284
|
-
const
|
|
319
|
+
const __VLS_22 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
285
320
|
...{ 'onSelectReceiver': {} },
|
|
286
321
|
ref: "chatListRef",
|
|
287
322
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
288
323
|
responsive: (__VLS_ctx.responsiveRender),
|
|
289
324
|
receiverId: (__VLS_ctx.receiverId),
|
|
290
325
|
}));
|
|
291
|
-
const
|
|
326
|
+
const __VLS_23 = __VLS_22({
|
|
292
327
|
...{ 'onSelectReceiver': {} },
|
|
293
328
|
ref: "chatListRef",
|
|
294
329
|
...{ class: "w-full max-w-[500px] !bg-[#F9FAFC]" },
|
|
295
330
|
responsive: (__VLS_ctx.responsiveRender),
|
|
296
331
|
receiverId: (__VLS_ctx.receiverId),
|
|
297
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
298
|
-
let __VLS_24;
|
|
332
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_22));
|
|
299
333
|
let __VLS_25;
|
|
300
|
-
|
|
334
|
+
let __VLS_26;
|
|
335
|
+
const __VLS_27 = ({ selectReceiver: {} },
|
|
301
336
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
302
337
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CHAT_LIST) }, null, null);
|
|
303
338
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
304
|
-
var
|
|
339
|
+
var __VLS_28 = {};
|
|
305
340
|
// @ts-ignore
|
|
306
341
|
[currentPage, PAGE, responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
307
|
-
var
|
|
342
|
+
var __VLS_24;
|
|
308
343
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
309
344
|
// @ts-ignore
|
|
310
|
-
const
|
|
345
|
+
const __VLS_31 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
311
346
|
...{ 'onCall': {} },
|
|
312
347
|
ref: "homeComponentRef",
|
|
313
348
|
receiverId: (__VLS_ctx.receiverId),
|
|
314
349
|
...{ class: "h-full pt-4" },
|
|
315
350
|
responsive: (__VLS_ctx.responsiveRender),
|
|
316
351
|
}));
|
|
317
|
-
const
|
|
352
|
+
const __VLS_32 = __VLS_31({
|
|
318
353
|
...{ 'onCall': {} },
|
|
319
354
|
ref: "homeComponentRef",
|
|
320
355
|
receiverId: (__VLS_ctx.receiverId),
|
|
321
356
|
...{ class: "h-full pt-4" },
|
|
322
357
|
responsive: (__VLS_ctx.responsiveRender),
|
|
323
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
324
|
-
let __VLS_33;
|
|
358
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_31));
|
|
325
359
|
let __VLS_34;
|
|
326
|
-
|
|
360
|
+
let __VLS_35;
|
|
361
|
+
const __VLS_36 = ({ call: {} },
|
|
327
362
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
328
363
|
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
329
364
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
330
|
-
var
|
|
365
|
+
var __VLS_37 = {};
|
|
331
366
|
// @ts-ignore
|
|
332
367
|
[currentPage, PAGE, responsiveRender, receiverId, handleCall, homeComponentRef,];
|
|
333
|
-
var
|
|
368
|
+
var __VLS_33;
|
|
334
369
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
335
370
|
// @ts-ignore
|
|
336
371
|
[currentPage, PAGE,];
|
|
337
372
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
338
373
|
// @ts-ignore
|
|
339
|
-
const
|
|
374
|
+
const __VLS_40 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
340
375
|
ref: "customerDetailRef",
|
|
341
376
|
receiverId: (__VLS_ctx.receiverId),
|
|
342
|
-
...{ class: "h-full" },
|
|
377
|
+
...{ class: "w-full h-full" },
|
|
343
378
|
responsive: (__VLS_ctx.responsiveRender),
|
|
344
379
|
}));
|
|
345
|
-
const
|
|
380
|
+
const __VLS_41 = __VLS_40({
|
|
346
381
|
ref: "customerDetailRef",
|
|
347
382
|
receiverId: (__VLS_ctx.receiverId),
|
|
348
|
-
...{ class: "h-full" },
|
|
383
|
+
...{ class: "w-full h-full" },
|
|
349
384
|
responsive: (__VLS_ctx.responsiveRender),
|
|
350
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
385
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_40));
|
|
351
386
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
352
|
-
var
|
|
387
|
+
var __VLS_43 = {};
|
|
353
388
|
// @ts-ignore
|
|
354
389
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
355
|
-
var
|
|
390
|
+
var __VLS_42;
|
|
356
391
|
}
|
|
357
392
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
358
393
|
// @ts-ignore
|
|
359
394
|
[currentPage, PAGE,];
|
|
360
395
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
361
396
|
// @ts-ignore
|
|
362
|
-
const
|
|
363
|
-
...{ class: "h-full" },
|
|
397
|
+
const __VLS_46 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
398
|
+
...{ class: "w-full h-full" },
|
|
364
399
|
}));
|
|
365
|
-
const
|
|
366
|
-
...{ class: "h-full" },
|
|
367
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
400
|
+
const __VLS_47 = __VLS_46({
|
|
401
|
+
...{ class: "w-full h-full" },
|
|
402
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_46));
|
|
368
403
|
}
|
|
369
404
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
370
405
|
// @ts-ignore
|
|
371
406
|
[currentPage, PAGE,];
|
|
372
407
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
373
408
|
// @ts-ignore
|
|
374
|
-
const
|
|
375
|
-
...{ class: "h-full" },
|
|
409
|
+
const __VLS_50 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
410
|
+
...{ class: "w-full h-full" },
|
|
376
411
|
}));
|
|
377
|
-
const
|
|
378
|
-
...{ class: "h-full" },
|
|
379
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
412
|
+
const __VLS_51 = __VLS_50({
|
|
413
|
+
...{ class: "w-full h-full" },
|
|
414
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_50));
|
|
380
415
|
}
|
|
381
416
|
if (__VLS_ctx.currentPage != __VLS_ctx.PAGE.HOME) {
|
|
382
417
|
// @ts-ignore
|
|
383
418
|
[currentPage, PAGE,];
|
|
384
419
|
/** @type {[typeof MobileFooter, ]} */ ;
|
|
385
420
|
// @ts-ignore
|
|
386
|
-
const
|
|
421
|
+
const __VLS_54 = __VLS_asFunctionalComponent(MobileFooter, new MobileFooter({
|
|
387
422
|
...{ class: "shrink-0" },
|
|
388
423
|
}));
|
|
389
|
-
const
|
|
424
|
+
const __VLS_55 = __VLS_54({
|
|
390
425
|
...{ class: "shrink-0" },
|
|
391
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
426
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_54));
|
|
392
427
|
}
|
|
393
428
|
}
|
|
394
429
|
else {
|
|
@@ -397,29 +432,29 @@ else {
|
|
|
397
432
|
});
|
|
398
433
|
/** @type {[typeof ChatList, ]} */ ;
|
|
399
434
|
// @ts-ignore
|
|
400
|
-
const
|
|
435
|
+
const __VLS_58 = __VLS_asFunctionalComponent(ChatList, new ChatList({
|
|
401
436
|
...{ 'onSelectReceiver': {} },
|
|
402
437
|
ref: "chatListRef",
|
|
403
438
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
404
439
|
responsive: (__VLS_ctx.responsiveRender),
|
|
405
440
|
receiverId: (__VLS_ctx.receiverId),
|
|
406
441
|
}));
|
|
407
|
-
const
|
|
442
|
+
const __VLS_59 = __VLS_58({
|
|
408
443
|
...{ 'onSelectReceiver': {} },
|
|
409
444
|
ref: "chatListRef",
|
|
410
445
|
...{ class: "w-[38%] max-w-[500px] min-w-[450px]" },
|
|
411
446
|
responsive: (__VLS_ctx.responsiveRender),
|
|
412
447
|
receiverId: (__VLS_ctx.receiverId),
|
|
413
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
414
|
-
let __VLS_60;
|
|
448
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_58));
|
|
415
449
|
let __VLS_61;
|
|
416
|
-
|
|
450
|
+
let __VLS_62;
|
|
451
|
+
const __VLS_63 = ({ selectReceiver: {} },
|
|
417
452
|
{ onSelectReceiver: (__VLS_ctx.selectReceiver) });
|
|
418
453
|
/** @type {typeof __VLS_ctx.chatListRef} */ ;
|
|
419
|
-
var
|
|
454
|
+
var __VLS_64 = {};
|
|
420
455
|
// @ts-ignore
|
|
421
456
|
[responsiveRender, receiverId, selectReceiver, chatListRef,];
|
|
422
|
-
var
|
|
457
|
+
var __VLS_60;
|
|
423
458
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
424
459
|
...{ class: "chat-box-white grow flex flex-col h-full pt-6 overflow-hidden" },
|
|
425
460
|
});
|
|
@@ -447,8 +482,8 @@ else {
|
|
|
447
482
|
});
|
|
448
483
|
/** @type {[typeof IconArrowLeft, ]} */ ;
|
|
449
484
|
// @ts-ignore
|
|
450
|
-
const
|
|
451
|
-
const
|
|
485
|
+
const __VLS_67 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
|
|
486
|
+
const __VLS_68 = __VLS_67({}, ...__VLS_functionalComponentArgsRest(__VLS_67));
|
|
452
487
|
__VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
|
|
453
488
|
...{ class: "text-xl font-semibold text-chat-haze-900 ml-3" },
|
|
454
489
|
});
|
|
@@ -461,92 +496,94 @@ else {
|
|
|
461
496
|
});
|
|
462
497
|
/** @type {[typeof HomeComponent, ]} */ ;
|
|
463
498
|
// @ts-ignore
|
|
464
|
-
const
|
|
499
|
+
const __VLS_71 = __VLS_asFunctionalComponent(HomeComponent, new HomeComponent({
|
|
465
500
|
...{ 'onCall': {} },
|
|
466
501
|
ref: "homeComponentRef",
|
|
467
502
|
receiverId: (__VLS_ctx.receiverId),
|
|
468
503
|
...{ class: "h-full" },
|
|
469
504
|
responsive: (__VLS_ctx.responsiveRender),
|
|
470
505
|
}));
|
|
471
|
-
const
|
|
506
|
+
const __VLS_72 = __VLS_71({
|
|
472
507
|
...{ 'onCall': {} },
|
|
473
508
|
ref: "homeComponentRef",
|
|
474
509
|
receiverId: (__VLS_ctx.receiverId),
|
|
475
510
|
...{ class: "h-full" },
|
|
476
511
|
responsive: (__VLS_ctx.responsiveRender),
|
|
477
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
478
|
-
let __VLS_73;
|
|
512
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_71));
|
|
479
513
|
let __VLS_74;
|
|
480
|
-
|
|
514
|
+
let __VLS_75;
|
|
515
|
+
const __VLS_76 = ({ call: {} },
|
|
481
516
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
482
|
-
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME) }, null, null);
|
|
517
|
+
__VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.currentPage == __VLS_ctx.PAGE.HOME && __VLS_ctx.receiverId) }, null, null);
|
|
483
518
|
/** @type {typeof __VLS_ctx.homeComponentRef} */ ;
|
|
484
|
-
var
|
|
519
|
+
var __VLS_77 = {};
|
|
485
520
|
// @ts-ignore
|
|
486
|
-
[currentPage, PAGE, responsiveRender, receiverId, handleCall, homeComponentRef,];
|
|
487
|
-
var
|
|
521
|
+
[currentPage, PAGE, responsiveRender, receiverId, receiverId, handleCall, homeComponentRef,];
|
|
522
|
+
var __VLS_73;
|
|
488
523
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_DETAIL) {
|
|
489
524
|
// @ts-ignore
|
|
490
525
|
[currentPage, PAGE,];
|
|
491
526
|
/** @type {[typeof CustomerDetail, ]} */ ;
|
|
492
527
|
// @ts-ignore
|
|
493
|
-
const
|
|
528
|
+
const __VLS_80 = __VLS_asFunctionalComponent(CustomerDetail, new CustomerDetail({
|
|
494
529
|
ref: "customerDetailRef",
|
|
495
530
|
receiverId: (__VLS_ctx.receiverId),
|
|
496
531
|
...{ class: "h-full" },
|
|
497
532
|
responsive: (__VLS_ctx.responsiveRender),
|
|
498
533
|
}));
|
|
499
|
-
const
|
|
534
|
+
const __VLS_81 = __VLS_80({
|
|
500
535
|
ref: "customerDetailRef",
|
|
501
536
|
receiverId: (__VLS_ctx.receiverId),
|
|
502
537
|
...{ class: "h-full" },
|
|
503
538
|
responsive: (__VLS_ctx.responsiveRender),
|
|
504
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
539
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_80));
|
|
505
540
|
/** @type {typeof __VLS_ctx.customerDetailRef} */ ;
|
|
506
|
-
var
|
|
541
|
+
var __VLS_83 = {};
|
|
507
542
|
// @ts-ignore
|
|
508
543
|
[responsiveRender, receiverId, customerDetailRef,];
|
|
509
|
-
var
|
|
544
|
+
var __VLS_82;
|
|
510
545
|
}
|
|
511
546
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_CHECK_IN) {
|
|
512
547
|
// @ts-ignore
|
|
513
548
|
[currentPage, PAGE,];
|
|
514
549
|
/** @type {[typeof CustomerCheckIn, ]} */ ;
|
|
515
550
|
// @ts-ignore
|
|
516
|
-
const
|
|
551
|
+
const __VLS_86 = __VLS_asFunctionalComponent(CustomerCheckIn, new CustomerCheckIn({
|
|
517
552
|
...{ class: "h-full" },
|
|
518
553
|
}));
|
|
519
|
-
const
|
|
554
|
+
const __VLS_87 = __VLS_86({
|
|
520
555
|
...{ class: "h-full" },
|
|
521
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
556
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_86));
|
|
522
557
|
}
|
|
523
558
|
if (__VLS_ctx.currentPage == __VLS_ctx.PAGE.CUSTOMER_APPOINTMENT) {
|
|
524
559
|
// @ts-ignore
|
|
525
560
|
[currentPage, PAGE,];
|
|
526
561
|
/** @type {[typeof CustomerAppointment, ]} */ ;
|
|
527
562
|
// @ts-ignore
|
|
528
|
-
const
|
|
563
|
+
const __VLS_90 = __VLS_asFunctionalComponent(CustomerAppointment, new CustomerAppointment({
|
|
529
564
|
...{ class: "h-full" },
|
|
530
565
|
}));
|
|
531
|
-
const
|
|
566
|
+
const __VLS_91 = __VLS_90({
|
|
532
567
|
...{ class: "h-full" },
|
|
533
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
568
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_90));
|
|
534
569
|
}
|
|
535
570
|
/** @type {[typeof Calling, ]} */ ;
|
|
536
571
|
// @ts-ignore
|
|
537
|
-
const
|
|
572
|
+
const __VLS_94 = __VLS_asFunctionalComponent(Calling, new Calling({
|
|
538
573
|
...{ 'onUserCalling': {} },
|
|
574
|
+
...{ 'onEndCall': {} },
|
|
539
575
|
ref: "callingRef",
|
|
540
576
|
responsive: (__VLS_ctx.responsiveRender),
|
|
541
577
|
}));
|
|
542
|
-
const
|
|
578
|
+
const __VLS_95 = __VLS_94({
|
|
543
579
|
...{ 'onUserCalling': {} },
|
|
580
|
+
...{ 'onEndCall': {} },
|
|
544
581
|
ref: "callingRef",
|
|
545
582
|
responsive: (__VLS_ctx.responsiveRender),
|
|
546
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
547
|
-
let __VLS_96;
|
|
583
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_94));
|
|
548
584
|
let __VLS_97;
|
|
549
|
-
|
|
585
|
+
let __VLS_98;
|
|
586
|
+
const __VLS_99 = ({ userCalling: {} },
|
|
550
587
|
{ onUserCalling: (...[$event]) => {
|
|
551
588
|
if (!!(!__VLS_ctx.isRouterReady))
|
|
552
589
|
return;
|
|
@@ -558,15 +595,62 @@ else {
|
|
|
558
595
|
// @ts-ignore
|
|
559
596
|
[responsiveRender, emit,];
|
|
560
597
|
} });
|
|
598
|
+
const __VLS_100 = ({ endCall: {} },
|
|
599
|
+
{ onEndCall: (__VLS_ctx.handleEndCall) });
|
|
561
600
|
/** @type {typeof __VLS_ctx.callingRef} */ ;
|
|
562
|
-
var
|
|
601
|
+
var __VLS_101 = {};
|
|
602
|
+
// @ts-ignore
|
|
603
|
+
[handleEndCall, callingRef,];
|
|
604
|
+
var __VLS_96;
|
|
605
|
+
/** @type {[typeof DrawerBaseCustom, typeof DrawerBaseCustom, ]} */ ;
|
|
563
606
|
// @ts-ignore
|
|
564
|
-
|
|
565
|
-
|
|
607
|
+
const __VLS_104 = __VLS_asFunctionalComponent(DrawerBaseCustom, new DrawerBaseCustom({
|
|
608
|
+
ref: "drawerVisibleRef",
|
|
609
|
+
width: (500),
|
|
610
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
611
|
+
}));
|
|
612
|
+
const __VLS_105 = __VLS_104({
|
|
613
|
+
ref: "drawerVisibleRef",
|
|
614
|
+
width: (500),
|
|
615
|
+
responsive: (__VLS_ctx.responsiveRender),
|
|
616
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_104));
|
|
617
|
+
/** @type {typeof __VLS_ctx.drawerVisibleRef} */ ;
|
|
618
|
+
var __VLS_107 = {};
|
|
619
|
+
const { default: __VLS_109 } = __VLS_106.slots;
|
|
620
|
+
// @ts-ignore
|
|
621
|
+
[responsiveRender, drawerVisibleRef,];
|
|
622
|
+
{
|
|
623
|
+
const { content: __VLS_110 } = __VLS_106.slots;
|
|
624
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
625
|
+
...{ class: "flex flex-col" },
|
|
626
|
+
});
|
|
627
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
628
|
+
...{ class: "flex justify-between items-center h-[64px] w-full bg-chat-haze-200 px-6" },
|
|
629
|
+
});
|
|
630
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
631
|
+
...{ class: "font-semibold text-2xl" },
|
|
632
|
+
});
|
|
633
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
634
|
+
...{ class: "w-10 h-10" },
|
|
635
|
+
});
|
|
636
|
+
/** @type {[typeof IconCloseCircle, ]} */ ;
|
|
637
|
+
// @ts-ignore
|
|
638
|
+
const __VLS_111 = __VLS_asFunctionalComponent(IconCloseCircle, new IconCloseCircle({}));
|
|
639
|
+
const __VLS_112 = __VLS_111({}, ...__VLS_functionalComponentArgsRest(__VLS_111));
|
|
640
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
641
|
+
...{ class: "px-4 py-6" },
|
|
642
|
+
});
|
|
643
|
+
/** @type {[typeof Setting, ]} */ ;
|
|
644
|
+
// @ts-ignore
|
|
645
|
+
const __VLS_115 = __VLS_asFunctionalComponent(Setting, new Setting({}));
|
|
646
|
+
const __VLS_116 = __VLS_115({}, ...__VLS_functionalComponentArgsRest(__VLS_115));
|
|
647
|
+
}
|
|
648
|
+
var __VLS_106;
|
|
566
649
|
}
|
|
567
650
|
/** @type {__VLS_StyleScopedClasses['go-chat-main']} */ ;
|
|
568
651
|
/** @type {__VLS_StyleScopedClasses['max-w-full']} */ ;
|
|
569
|
-
/** @type {__VLS_StyleScopedClasses['p-
|
|
652
|
+
/** @type {__VLS_StyleScopedClasses['p-0']} */ ;
|
|
653
|
+
/** @type {__VLS_StyleScopedClasses['md:p-8']} */ ;
|
|
570
654
|
/** @type {__VLS_StyleScopedClasses['m-auto']} */ ;
|
|
571
655
|
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
572
656
|
/** @type {__VLS_StyleScopedClasses['sc-full']} */ ;
|
|
@@ -575,7 +659,6 @@ else {
|
|
|
575
659
|
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
576
660
|
/** @type {__VLS_StyleScopedClasses['mx-auto']} */ ;
|
|
577
661
|
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
578
|
-
/** @type {__VLS_StyleScopedClasses['max-w-[350px]']} */ ;
|
|
579
662
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
580
663
|
/** @type {__VLS_StyleScopedClasses['bg-[#F9FAFC]']} */ ;
|
|
581
664
|
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
@@ -597,8 +680,11 @@ else {
|
|
|
597
680
|
/** @type {__VLS_StyleScopedClasses['!bg-[#F9FAFC]']} */ ;
|
|
598
681
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
599
682
|
/** @type {__VLS_StyleScopedClasses['pt-4']} */ ;
|
|
683
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
600
684
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
685
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
601
686
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
687
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
602
688
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
603
689
|
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
604
690
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
@@ -629,8 +715,23 @@ else {
|
|
|
629
715
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
630
716
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
631
717
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
718
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
719
|
+
/** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
|
|
720
|
+
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
721
|
+
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
722
|
+
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
723
|
+
/** @type {__VLS_StyleScopedClasses['h-[64px]']} */ ;
|
|
724
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
725
|
+
/** @type {__VLS_StyleScopedClasses['bg-chat-haze-200']} */ ;
|
|
726
|
+
/** @type {__VLS_StyleScopedClasses['px-6']} */ ;
|
|
727
|
+
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
728
|
+
/** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
|
|
729
|
+
/** @type {__VLS_StyleScopedClasses['w-10']} */ ;
|
|
730
|
+
/** @type {__VLS_StyleScopedClasses['h-10']} */ ;
|
|
731
|
+
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
|
|
732
|
+
/** @type {__VLS_StyleScopedClasses['py-6']} */ ;
|
|
632
733
|
// @ts-ignore
|
|
633
|
-
var
|
|
734
|
+
var __VLS_16 = __VLS_15, __VLS_29 = __VLS_28, __VLS_38 = __VLS_37, __VLS_44 = __VLS_43, __VLS_65 = __VLS_64, __VLS_78 = __VLS_77, __VLS_84 = __VLS_83, __VLS_102 = __VLS_101, __VLS_108 = __VLS_107;
|
|
634
735
|
const __VLS_export = (await import('vue')).defineComponent({
|
|
635
736
|
setup: () => (__VLS_exposed),
|
|
636
737
|
__typeEmits: {},
|
|
@@ -107,9 +107,6 @@ __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
|
|
|
107
107
|
(__VLS_ctx.user?.username ?? 'n/a');
|
|
108
108
|
// @ts-ignore
|
|
109
109
|
[user,];
|
|
110
|
-
__VLS_asFunctionalElement(__VLS_elements.img)({
|
|
111
|
-
src: "../../../assets/images/icons/new-customer.png",
|
|
112
|
-
});
|
|
113
110
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
114
111
|
...{ class: " mt-5 text-center mx-auto" },
|
|
115
112
|
...{ class: ({ 'flex justify-between w-max': __VLS_ctx.responsive == 'tablet', 'grid grid-cols-3 w-full': __VLS_ctx.responsive == 'mobile' }) },
|