@phonghq/go-chat 1.0.71 → 1.0.73
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/chat/IconMenuDot.vue.js +31 -0
- package/dist/assets/icons/customer-appointment/IconChevronRight.vue.d.ts +2 -0
- package/dist/assets/icons/customer-appointment/IconChevronRight.vue.js +22 -0
- package/dist/assets/icons/global/IconMessageOutline.vue.d.ts +2 -0
- package/dist/assets/icons/global/IconMessageOutline.vue.js +22 -0
- package/dist/assets/icons/global/IconSms.vue.js +1 -1
- package/dist/assets/icons/lib/IconZoomOut.vue.d.ts +5 -0
- package/dist/assets/icons/lib/IconZoomOut.vue.js +52 -0
- package/dist/chat/App.vue.d.ts +14 -9
- package/dist/chat/App.vue.js +410 -514
- package/dist/chat/ChatHeader.vue.d.ts +15 -0
- package/dist/chat/ChatHeader.vue.js +218 -0
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.d.ts +8 -1
- package/dist/chat/page/customer-appointment/CustomerAppointment.vue.js +66 -11
- package/dist/chat/page/customer-detail/SubInformation.vue.js +41 -9
- package/dist/chat/page/home/ChatList.vue.d.ts +6 -0
- package/dist/chat/page/home/ChatList.vue.js +65 -32
- package/dist/chat/page/home/ChatMessage.vue.js +11 -1
- package/dist/chat/page/home/ChatMessageItem.vue.d.ts +1 -0
- package/dist/chat/page/home/ChatMessageItem.vue.js +44 -5
- package/dist/chat/page/home/Home.vue.d.ts +1 -0
- package/dist/chat/page/home/Home.vue.js +134 -123
- package/dist/chat/page/home/HomeHeader.vue.js +103 -10
- package/dist/chat/page/home/NewCustomer.vue.js +11 -9
- package/dist/chat/page/home/PhoneNumpad.vue.d.ts +4 -0
- package/dist/chat/page/home/PhoneNumpad.vue.js +39 -21
- package/dist/components/chat/call/Calling.vue.js +5 -18
- package/dist/components/common/dropdown/DropdownBase.vue.d.ts +4 -4
- package/dist/components/common/dropdown/DropdownBase.vue.js +11 -9
- package/dist/components/common/select/SelectBase.vue.d.ts +9 -4
- package/dist/components/common/select/SelectBase.vue.js +49 -31
- package/dist/components/ui/button/c-button.js +1 -1
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +2 -2
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +2 -2
- package/dist/components/ui/drawer/DrawerContent.vue.d.ts +2 -2
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +3 -3
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.js +11 -6
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +4 -4
- package/dist/components/ui/popover/PopoverContent.vue.d.ts +2 -2
- package/dist/components/ui/select/SelectContent.vue.js +7 -2
- package/dist/components/ui/select/SelectItem.vue.js +2 -2
- package/dist/composable/useInitData.js +2 -0
- package/dist/composable/useListConversations.d.ts +5 -1
- package/dist/composable/useListConversations.js +42 -31
- package/dist/composable/useListentEvent.js +20 -2
- package/dist/composable/usePlivo.d.ts +0 -2
- package/dist/composable/usePlivo.js +5 -11
- package/dist/go-chat.es.js +18061 -16541
- package/dist/go-chat.umd.js +23 -23
- package/dist/style.css +1 -1
- package/dist/types/chat/global.d.ts +35 -10
- package/dist/utils/chat/queue.d.ts +7 -0
- package/dist/utils/chat/queue.js +30 -0
- package/dist/utils/chat/store/conversation.d.ts +1 -0
- package/dist/utils/chat/store/conversation.js +4 -0
- package/dist/utils/chat/store/message.d.ts +0 -4
- package/dist/utils/chat/store/message.js +0 -4
- package/dist/utils/chat/store/time-limit.d.ts +5 -0
- package/dist/utils/chat/store/time-limit.js +8 -0
- package/dist/utils/string-helper.d.ts +1 -0
- package/dist/utils/string-helper.js +3 -0
- package/dist/views/home/phone-numpad/ConvercationList.vue.d.ts +1 -0
- package/dist/views/home/phone-numpad/ConvercationList.vue.js +4 -1
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.d.ts +6 -2
- package/dist/views/home/phone-numpad/PhoneNumpad.vue.js +43 -17
- package/package.json +1 -1
- package/dist/assets/icons/call/IconPhoneBase.vue.js +0 -20
- /package/dist/assets/icons/{call/IconPhoneBase.vue.d.ts → chat/IconMenuDot.vue.d.ts} +0 -0
|
@@ -12,11 +12,15 @@ import IconSms from '../../../assets/icons/global/IconSms.vue';
|
|
|
12
12
|
import { activePlivoMode } from '../../../utils/chat/store/message';
|
|
13
13
|
import { ref } from 'vue';
|
|
14
14
|
import ButtonBase from '../../../components/common/button/ButtonBase.vue';
|
|
15
|
+
import IconMenuDot from '../../../assets/icons/chat/IconMenuDot.vue';
|
|
16
|
+
import DropdownBase from '../../../components/common/dropdown/DropdownBase.vue';
|
|
15
17
|
const props = withDefaults(defineProps(), {});
|
|
16
18
|
const emit = defineEmits();
|
|
17
19
|
const activePlivoSms = ref(dataProfile.value?.is_sms_active == 1);
|
|
18
20
|
const loading = ref(false);
|
|
21
|
+
const selectOpen = ref(false);
|
|
19
22
|
const goToViewUser = () => {
|
|
23
|
+
selectOpen.value = false;
|
|
20
24
|
if (props.data?.id.toString() == digibotId.toString())
|
|
21
25
|
return;
|
|
22
26
|
if (dataProfile.value?.user_type == 'tenant') {
|
|
@@ -24,6 +28,17 @@ const goToViewUser = () => {
|
|
|
24
28
|
routerPush(PAGE.CUSTOMER_DETAIL);
|
|
25
29
|
}
|
|
26
30
|
};
|
|
31
|
+
const customer_select_option = [
|
|
32
|
+
{ label: 'Profile', value: 0 },
|
|
33
|
+
{ label: 'Later Appointment', value: 1 }
|
|
34
|
+
];
|
|
35
|
+
const handleSelectChange = (value) => {
|
|
36
|
+
if (value == 0) {
|
|
37
|
+
goToViewUser();
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
}
|
|
41
|
+
};
|
|
27
42
|
const handleActivePlivoSmsChange = async (is_active) => {
|
|
28
43
|
return;
|
|
29
44
|
try {
|
|
@@ -52,13 +67,13 @@ let __VLS_elements;
|
|
|
52
67
|
let __VLS_components;
|
|
53
68
|
let __VLS_directives;
|
|
54
69
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
55
|
-
...{ class: "px-8 py-4 h-[96px] layout-shadow border-b border-chat-gray-5 z-10" },
|
|
70
|
+
...{ class: "w-full px-8 py-4 h-[96px] layout-shadow border-b border-chat-gray-5 z-10" },
|
|
56
71
|
...{ class: ({ '!px-4': __VLS_ctx.responsive == 'mobile' }) },
|
|
57
72
|
});
|
|
58
73
|
// @ts-ignore
|
|
59
74
|
[responsive,];
|
|
60
75
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
61
|
-
...{ class: "flex items-center gap-2 h-full" },
|
|
76
|
+
...{ class: "w-full flex items-center gap-2 h-full overflow-hidden" },
|
|
62
77
|
});
|
|
63
78
|
if (__VLS_ctx.responsive == 'mobile') {
|
|
64
79
|
// @ts-ignore
|
|
@@ -109,17 +124,17 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
|
109
124
|
...{ class: "grow overflow-x-hidden" },
|
|
110
125
|
});
|
|
111
126
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
112
|
-
...{ class: "w-full flex justify-between items-center gap-4" },
|
|
127
|
+
...{ class: "w-full flex justify-between items-center gap-4 overflow-hidden" },
|
|
113
128
|
});
|
|
114
129
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
115
130
|
...{ onClick: (__VLS_ctx.goToViewUser) },
|
|
116
|
-
...{ class: "grow overflow-
|
|
131
|
+
...{ class: "grow overflow-hidden" },
|
|
117
132
|
...{ class: ({ 'cursor-pointer': __VLS_ctx.dataProfile?.user_type == 'tenant' }) },
|
|
118
133
|
});
|
|
119
134
|
// @ts-ignore
|
|
120
135
|
[dataProfile, goToViewUser,];
|
|
121
136
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
122
|
-
...{ class: "flex items-center" },
|
|
137
|
+
...{ class: "flex items-center truncate" },
|
|
123
138
|
});
|
|
124
139
|
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
125
140
|
...{ class: "font-semibold truncate" },
|
|
@@ -127,7 +142,9 @@ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
|
127
142
|
(__VLS_ctx.data?.username || __VLS_ctx.phoneNumberFormat(__VLS_ctx.data?.phone ?? '') || 'n/a');
|
|
128
143
|
// @ts-ignore
|
|
129
144
|
[data, data, phoneNumberFormat,];
|
|
130
|
-
if (__VLS_ctx.data?.id &&
|
|
145
|
+
if (__VLS_ctx.data?.id &&
|
|
146
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
147
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant') {
|
|
131
148
|
// @ts-ignore
|
|
132
149
|
[dataProfile, data, data, digibotId,];
|
|
133
150
|
/** @type {[typeof ButtonBase, typeof ButtonBase, ]} */ ;
|
|
@@ -150,7 +167,9 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
150
167
|
let __VLS_15;
|
|
151
168
|
const __VLS_16 = ({ click: {} },
|
|
152
169
|
{ onClick: (...[$event]) => {
|
|
153
|
-
if (!(__VLS_ctx.data?.id &&
|
|
170
|
+
if (!(__VLS_ctx.data?.id &&
|
|
171
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
172
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant'))
|
|
154
173
|
return;
|
|
155
174
|
__VLS_ctx.handleActivePlivoSmsChange(!__VLS_ctx.activePlivoSms);
|
|
156
175
|
// @ts-ignore
|
|
@@ -173,12 +192,16 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
173
192
|
}
|
|
174
193
|
var __VLS_13;
|
|
175
194
|
}
|
|
176
|
-
if (__VLS_ctx.data?.id &&
|
|
195
|
+
if (__VLS_ctx.data?.id &&
|
|
196
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
197
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant') {
|
|
177
198
|
// @ts-ignore
|
|
178
199
|
[dataProfile, data, data, digibotId,];
|
|
179
200
|
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
180
201
|
...{ onClick: (...[$event]) => {
|
|
181
|
-
if (!(__VLS_ctx.data?.id &&
|
|
202
|
+
if (!(__VLS_ctx.data?.id &&
|
|
203
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
204
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant'))
|
|
182
205
|
return;
|
|
183
206
|
__VLS_ctx.emit('call');
|
|
184
207
|
// @ts-ignore
|
|
@@ -191,6 +214,61 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
191
214
|
const __VLS_22 = __VLS_asFunctionalComponent(IconPhone, new IconPhone({}));
|
|
192
215
|
const __VLS_23 = __VLS_22({}, ...__VLS_functionalComponentArgsRest(__VLS_22));
|
|
193
216
|
}
|
|
217
|
+
if (__VLS_ctx.data?.id &&
|
|
218
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
219
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant') {
|
|
220
|
+
// @ts-ignore
|
|
221
|
+
[dataProfile, data, data, digibotId,];
|
|
222
|
+
/** @type {[typeof DropdownBase, typeof DropdownBase, ]} */ ;
|
|
223
|
+
// @ts-ignore
|
|
224
|
+
const __VLS_26 = __VLS_asFunctionalComponent(DropdownBase, new DropdownBase({
|
|
225
|
+
side: "bottom",
|
|
226
|
+
align: "end",
|
|
227
|
+
open: (__VLS_ctx.selectOpen),
|
|
228
|
+
}));
|
|
229
|
+
const __VLS_27 = __VLS_26({
|
|
230
|
+
side: "bottom",
|
|
231
|
+
align: "end",
|
|
232
|
+
open: (__VLS_ctx.selectOpen),
|
|
233
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_26));
|
|
234
|
+
const { default: __VLS_29 } = __VLS_28.slots;
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
[selectOpen,];
|
|
237
|
+
{
|
|
238
|
+
const { default: __VLS_30 } = __VLS_28.slots;
|
|
239
|
+
__VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
|
|
240
|
+
...{ class: "shrink-0 flex-center w-4" },
|
|
241
|
+
});
|
|
242
|
+
/** @type {[typeof IconMenuDot, ]} */ ;
|
|
243
|
+
// @ts-ignore
|
|
244
|
+
const __VLS_31 = __VLS_asFunctionalComponent(IconMenuDot, new IconMenuDot({
|
|
245
|
+
...{ class: "scale-[1.2]" },
|
|
246
|
+
}));
|
|
247
|
+
const __VLS_32 = __VLS_31({
|
|
248
|
+
...{ class: "scale-[1.2]" },
|
|
249
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_31));
|
|
250
|
+
}
|
|
251
|
+
{
|
|
252
|
+
const { content: __VLS_35 } = __VLS_28.slots;
|
|
253
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
254
|
+
...{ class: "text-base font-medium" },
|
|
255
|
+
});
|
|
256
|
+
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
257
|
+
...{ onClick: (...[$event]) => {
|
|
258
|
+
if (!(__VLS_ctx.data?.id &&
|
|
259
|
+
__VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.toString() &&
|
|
260
|
+
__VLS_ctx.dataProfile?.user_type == 'tenant'))
|
|
261
|
+
return;
|
|
262
|
+
__VLS_ctx.goToViewUser();
|
|
263
|
+
// @ts-ignore
|
|
264
|
+
[goToViewUser,];
|
|
265
|
+
} },
|
|
266
|
+
...{ class: "p-2 hover:bg-chat-haze-200 duration-200 cursor-pointer rounded-lg" },
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
var __VLS_28;
|
|
270
|
+
}
|
|
271
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
194
272
|
/** @type {__VLS_StyleScopedClasses['px-8']} */ ;
|
|
195
273
|
/** @type {__VLS_StyleScopedClasses['py-4']} */ ;
|
|
196
274
|
/** @type {__VLS_StyleScopedClasses['h-[96px]']} */ ;
|
|
@@ -199,10 +277,12 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
199
277
|
/** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
|
|
200
278
|
/** @type {__VLS_StyleScopedClasses['z-10']} */ ;
|
|
201
279
|
/** @type {__VLS_StyleScopedClasses['!px-4']} */ ;
|
|
280
|
+
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
202
281
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
203
282
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
204
283
|
/** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
|
|
205
284
|
/** @type {__VLS_StyleScopedClasses['h-full']} */ ;
|
|
285
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
206
286
|
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
207
287
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
208
288
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
@@ -215,11 +295,13 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
215
295
|
/** @type {__VLS_StyleScopedClasses['justify-between']} */ ;
|
|
216
296
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
217
297
|
/** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
|
|
298
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
218
299
|
/** @type {__VLS_StyleScopedClasses['grow']} */ ;
|
|
219
|
-
/** @type {__VLS_StyleScopedClasses['overflow-
|
|
300
|
+
/** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
|
|
220
301
|
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
221
302
|
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
222
303
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
304
|
+
/** @type {__VLS_StyleScopedClasses['truncate']} */ ;
|
|
223
305
|
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
224
306
|
/** @type {__VLS_StyleScopedClasses['truncate']} */ ;
|
|
225
307
|
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
@@ -240,6 +322,17 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id.toString() != __VLS_ctx.digibotId.t
|
|
|
240
322
|
/** @type {__VLS_StyleScopedClasses['w-9']} */ ;
|
|
241
323
|
/** @type {__VLS_StyleScopedClasses['h-9']} */ ;
|
|
242
324
|
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
325
|
+
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
326
|
+
/** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
|
|
327
|
+
/** @type {__VLS_StyleScopedClasses['w-4']} */ ;
|
|
328
|
+
/** @type {__VLS_StyleScopedClasses['scale-[1.2]']} */ ;
|
|
329
|
+
/** @type {__VLS_StyleScopedClasses['text-base']} */ ;
|
|
330
|
+
/** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
|
|
331
|
+
/** @type {__VLS_StyleScopedClasses['p-2']} */ ;
|
|
332
|
+
/** @type {__VLS_StyleScopedClasses['hover:bg-chat-haze-200']} */ ;
|
|
333
|
+
/** @type {__VLS_StyleScopedClasses['duration-200']} */ ;
|
|
334
|
+
/** @type {__VLS_StyleScopedClasses['cursor-pointer']} */ ;
|
|
335
|
+
/** @type {__VLS_StyleScopedClasses['rounded-lg']} */ ;
|
|
243
336
|
const __VLS_export = (await import('vue')).defineComponent({
|
|
244
337
|
__typeEmits: {},
|
|
245
338
|
__typeProps: {},
|
|
@@ -14,7 +14,7 @@ let __VLS_elements;
|
|
|
14
14
|
let __VLS_components;
|
|
15
15
|
let __VLS_directives;
|
|
16
16
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
17
|
-
...{ class: "flex flex-col items-center justify-center text-center" },
|
|
17
|
+
...{ class: "flex flex-col items-center justify-center text-center px-4 " },
|
|
18
18
|
});
|
|
19
19
|
/** @type {[typeof Avatar, ]} */ ;
|
|
20
20
|
// @ts-ignore
|
|
@@ -36,11 +36,8 @@ const __VLS_1 = __VLS_0({
|
|
|
36
36
|
}, ...__VLS_functionalComponentArgsRest(__VLS_0));
|
|
37
37
|
// @ts-ignore
|
|
38
38
|
[data, data, data, data,];
|
|
39
|
-
__VLS_asFunctionalElement(__VLS_elements.
|
|
40
|
-
...{ class: "
|
|
41
|
-
});
|
|
42
|
-
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
|
|
43
|
-
...{ class: "text-2xl font-semibold" },
|
|
39
|
+
__VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
|
|
40
|
+
...{ class: "text-2xl inline-block vertical-mid font-semibold gap-1" },
|
|
44
41
|
});
|
|
45
42
|
(__VLS_ctx.data?.username || __VLS_ctx.phoneNumberFormat(__VLS_ctx.data?.phone ?? '') || 'n/a');
|
|
46
43
|
// @ts-ignore
|
|
@@ -49,6 +46,7 @@ if (__VLS_ctx.isNew) {
|
|
|
49
46
|
// @ts-ignore
|
|
50
47
|
[isNew,];
|
|
51
48
|
__VLS_asFunctionalElement(__VLS_elements.img)({
|
|
49
|
+
...{ class: "inline-block align-middle ml-1" },
|
|
52
50
|
src: "../../../assets/images/icons/new-customer.png",
|
|
53
51
|
});
|
|
54
52
|
}
|
|
@@ -64,12 +62,16 @@ if (__VLS_ctx.isNew) {
|
|
|
64
62
|
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
65
63
|
/** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
|
|
66
64
|
/** @type {__VLS_StyleScopedClasses['text-center']} */ ;
|
|
65
|
+
/** @type {__VLS_StyleScopedClasses['px-4']} */ ;
|
|
67
66
|
/** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
|
|
68
|
-
/** @type {__VLS_StyleScopedClasses['flex']} */ ;
|
|
69
|
-
/** @type {__VLS_StyleScopedClasses['items-center']} */ ;
|
|
70
|
-
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
71
67
|
/** @type {__VLS_StyleScopedClasses['text-2xl']} */ ;
|
|
68
|
+
/** @type {__VLS_StyleScopedClasses['inline-block']} */ ;
|
|
69
|
+
/** @type {__VLS_StyleScopedClasses['vertical-mid']} */ ;
|
|
72
70
|
/** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
|
|
71
|
+
/** @type {__VLS_StyleScopedClasses['gap-1']} */ ;
|
|
72
|
+
/** @type {__VLS_StyleScopedClasses['inline-block']} */ ;
|
|
73
|
+
/** @type {__VLS_StyleScopedClasses['align-middle']} */ ;
|
|
74
|
+
/** @type {__VLS_StyleScopedClasses['ml-1']} */ ;
|
|
73
75
|
/** @type {__VLS_StyleScopedClasses['text-chat-haze-400']} */ ;
|
|
74
76
|
/** @type {__VLS_StyleScopedClasses['text-sm']} */ ;
|
|
75
77
|
/** @type {__VLS_StyleScopedClasses['mt-3']} */ ;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IResUser } from '../../../types/message';
|
|
2
2
|
import type { PAGE_RESPONSIVE } from '../../../types/chat/global';
|
|
3
|
+
import type { IConversation } from '../../../types/conversation';
|
|
3
4
|
type KeyPadProps = {
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
hideNumpad?: boolean;
|
|
@@ -8,10 +9,13 @@ type KeyPadProps = {
|
|
|
8
9
|
declare const _default: import("vue").DefineComponent<KeyPadProps, {
|
|
9
10
|
openPhoneNumpad: () => void;
|
|
10
11
|
closePhoneNumpad: () => void;
|
|
12
|
+
startSendMessage: (phone: string) => Promise<void> | undefined;
|
|
11
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
message: (data: IConversation) => any;
|
|
12
15
|
call: (data: IResUser) => any;
|
|
13
16
|
"error:noPhoneTenant": () => any;
|
|
14
17
|
}, string, import("vue").PublicProps, Readonly<KeyPadProps> & Readonly<{
|
|
18
|
+
onMessage?: ((data: IConversation) => any) | undefined;
|
|
15
19
|
onCall?: ((data: IResUser) => any) | undefined;
|
|
16
20
|
"onError:noPhoneTenant"?: (() => any) | undefined;
|
|
17
21
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,7 +17,14 @@ const closePhoneNumpad = () => {
|
|
|
17
17
|
const handleCall = (data) => {
|
|
18
18
|
emit('call', data);
|
|
19
19
|
};
|
|
20
|
-
const
|
|
20
|
+
const handleMessage = (data) => {
|
|
21
|
+
emit('message', data);
|
|
22
|
+
drawerVisibleRef.value?.close();
|
|
23
|
+
};
|
|
24
|
+
const startSendMessage = (phone) => {
|
|
25
|
+
return phoneNumpadRef.value?.startSendMessage(phone);
|
|
26
|
+
};
|
|
27
|
+
const __VLS_exposed = { openPhoneNumpad, closePhoneNumpad, startSendMessage };
|
|
21
28
|
defineExpose(__VLS_exposed);
|
|
22
29
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
23
30
|
const __VLS_defaults = {};
|
|
@@ -38,6 +45,8 @@ if (__VLS_ctx.responsive == 'window') {
|
|
|
38
45
|
// @ts-ignore
|
|
39
46
|
const __VLS_0 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
|
|
40
47
|
...{ 'onCall': {} },
|
|
48
|
+
...{ 'onMessage': {} },
|
|
49
|
+
ref: "phoneNumpadRef",
|
|
41
50
|
...{ class: "bg-white shrink-0 border-l layout-border" },
|
|
42
51
|
modelValue: "",
|
|
43
52
|
hideNumpad: (__VLS_ctx.hideNumpad),
|
|
@@ -45,6 +54,8 @@ if (__VLS_ctx.responsive == 'window') {
|
|
|
45
54
|
}));
|
|
46
55
|
const __VLS_1 = __VLS_0({
|
|
47
56
|
...{ 'onCall': {} },
|
|
57
|
+
...{ 'onMessage': {} },
|
|
58
|
+
ref: "phoneNumpadRef",
|
|
48
59
|
...{ class: "bg-white shrink-0 border-l layout-border" },
|
|
49
60
|
modelValue: "",
|
|
50
61
|
hideNumpad: (__VLS_ctx.hideNumpad),
|
|
@@ -54,71 +65,78 @@ if (__VLS_ctx.responsive == 'window') {
|
|
|
54
65
|
let __VLS_4;
|
|
55
66
|
const __VLS_5 = ({ call: {} },
|
|
56
67
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
57
|
-
|
|
68
|
+
const __VLS_6 = ({ message: {} },
|
|
69
|
+
{ onMessage: (__VLS_ctx.handleMessage) });
|
|
70
|
+
/** @type {typeof __VLS_ctx.phoneNumpadRef} */ ;
|
|
71
|
+
var __VLS_7 = {};
|
|
58
72
|
// @ts-ignore
|
|
59
|
-
[responsive, hideNumpad, handleCall,];
|
|
73
|
+
[responsive, hideNumpad, handleCall, handleMessage, phoneNumpadRef,];
|
|
60
74
|
var __VLS_2;
|
|
61
75
|
}
|
|
62
76
|
else {
|
|
63
77
|
/** @type {[typeof DrawerBaseCustom, typeof DrawerBaseCustom, ]} */ ;
|
|
64
78
|
// @ts-ignore
|
|
65
|
-
const
|
|
79
|
+
const __VLS_10 = __VLS_asFunctionalComponent(DrawerBaseCustom, new DrawerBaseCustom({
|
|
66
80
|
ref: "drawerVisibleRef",
|
|
67
81
|
responsive: (__VLS_ctx.responsive),
|
|
68
82
|
absolute: true,
|
|
69
83
|
}));
|
|
70
|
-
const
|
|
84
|
+
const __VLS_11 = __VLS_10({
|
|
71
85
|
ref: "drawerVisibleRef",
|
|
72
86
|
responsive: (__VLS_ctx.responsive),
|
|
73
87
|
absolute: true,
|
|
74
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
88
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_10));
|
|
75
89
|
/** @type {typeof __VLS_ctx.drawerVisibleRef} */ ;
|
|
76
|
-
var
|
|
77
|
-
const { default:
|
|
90
|
+
var __VLS_13 = {};
|
|
91
|
+
const { default: __VLS_15 } = __VLS_12.slots;
|
|
78
92
|
// @ts-ignore
|
|
79
93
|
[responsive, drawerVisibleRef,];
|
|
80
94
|
{
|
|
81
|
-
const { content:
|
|
95
|
+
const { content: __VLS_16 } = __VLS_12.slots;
|
|
82
96
|
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
|
|
83
97
|
...{ class: "h-full flex flex-col" },
|
|
84
98
|
});
|
|
85
99
|
/** @type {[typeof PhoneNumpad, ]} */ ;
|
|
86
100
|
// @ts-ignore
|
|
87
|
-
const
|
|
101
|
+
const __VLS_17 = __VLS_asFunctionalComponent(PhoneNumpad, new PhoneNumpad({
|
|
88
102
|
...{ 'onCall': {} },
|
|
103
|
+
...{ 'onMessage': {} },
|
|
89
104
|
...{ 'onBack': {} },
|
|
90
105
|
ref: "phoneNumpadRef",
|
|
91
106
|
...{ class: "bg-white grow border-l layout-border w-full" },
|
|
92
107
|
hideNumpad: (__VLS_ctx.hideNumpad),
|
|
93
108
|
responsive: (__VLS_ctx.responsive),
|
|
94
109
|
}));
|
|
95
|
-
const
|
|
110
|
+
const __VLS_18 = __VLS_17({
|
|
96
111
|
...{ 'onCall': {} },
|
|
112
|
+
...{ 'onMessage': {} },
|
|
97
113
|
...{ 'onBack': {} },
|
|
98
114
|
ref: "phoneNumpadRef",
|
|
99
115
|
...{ class: "bg-white grow border-l layout-border w-full" },
|
|
100
116
|
hideNumpad: (__VLS_ctx.hideNumpad),
|
|
101
117
|
responsive: (__VLS_ctx.responsive),
|
|
102
|
-
}, ...__VLS_functionalComponentArgsRest(
|
|
103
|
-
let
|
|
104
|
-
let
|
|
105
|
-
const
|
|
118
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
|
119
|
+
let __VLS_20;
|
|
120
|
+
let __VLS_21;
|
|
121
|
+
const __VLS_22 = ({ call: {} },
|
|
106
122
|
{ onCall: (__VLS_ctx.handleCall) });
|
|
107
|
-
const
|
|
123
|
+
const __VLS_23 = ({ message: {} },
|
|
124
|
+
{ onMessage: (__VLS_ctx.handleMessage) });
|
|
125
|
+
const __VLS_24 = ({ back: {} },
|
|
108
126
|
{ onBack: (...[$event]) => {
|
|
109
127
|
if (!!(__VLS_ctx.responsive == 'window'))
|
|
110
128
|
return;
|
|
111
129
|
__VLS_ctx.drawerVisibleRef?.close();
|
|
112
130
|
// @ts-ignore
|
|
113
|
-
[responsive, hideNumpad, handleCall, drawerVisibleRef,];
|
|
131
|
+
[responsive, hideNumpad, handleCall, handleMessage, drawerVisibleRef,];
|
|
114
132
|
} });
|
|
115
133
|
/** @type {typeof __VLS_ctx.phoneNumpadRef} */ ;
|
|
116
|
-
var
|
|
134
|
+
var __VLS_25 = {};
|
|
117
135
|
// @ts-ignore
|
|
118
136
|
[phoneNumpadRef,];
|
|
119
|
-
var
|
|
137
|
+
var __VLS_19;
|
|
120
138
|
}
|
|
121
|
-
var
|
|
139
|
+
var __VLS_12;
|
|
122
140
|
}
|
|
123
141
|
/** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
|
|
124
142
|
/** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
|
|
@@ -133,7 +151,7 @@ else {
|
|
|
133
151
|
/** @type {__VLS_StyleScopedClasses['layout-border']} */ ;
|
|
134
152
|
/** @type {__VLS_StyleScopedClasses['w-full']} */ ;
|
|
135
153
|
// @ts-ignore
|
|
136
|
-
var
|
|
154
|
+
var __VLS_8 = __VLS_7, __VLS_14 = __VLS_13, __VLS_26 = __VLS_25;
|
|
137
155
|
const __VLS_export = (await import('vue')).defineComponent({
|
|
138
156
|
setup: () => (__VLS_exposed),
|
|
139
157
|
__typeEmits: {},
|
|
@@ -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 { computed, onBeforeUnmount, onMounted,
|
|
2
|
+
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
|
|
3
3
|
import IconPhone from '../../../assets/icons/call/IconPhone.vue';
|
|
4
4
|
import { dataProfile } from '../../../utils/chat/store/auth';
|
|
5
5
|
import IconPhoneCancel from '../../../assets/icons/call/IconPhoneCancel.vue';
|
|
@@ -23,6 +23,8 @@ const props = withDefaults(defineProps(), {
|
|
|
23
23
|
});
|
|
24
24
|
const emit = defineEmits();
|
|
25
25
|
const handlePlivoCallBack = (status, data) => {
|
|
26
|
+
if (!drawerVisibleRef.value)
|
|
27
|
+
return;
|
|
26
28
|
callStatus.value = status;
|
|
27
29
|
if (status == PLIVO_CALL_STATUS.RINGING) {
|
|
28
30
|
handleInComingCall(data);
|
|
@@ -46,7 +48,7 @@ const handlePlivoCallBack = (status, data) => {
|
|
|
46
48
|
handleMedialPermissionError();
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
|
-
const { plivoLogin, plivoCallAnswer, plivoCall, plivoEndCall, plivoCallSwishMute, plivoCallSwishSpeaker, plivoRemoveCallBack, checkTimeLimit,
|
|
51
|
+
const { plivoLogin, plivoCallAnswer, plivoCall, plivoEndCall, plivoCallSwishMute, plivoCallSwishSpeaker, plivoRemoveCallBack, checkTimeLimit, } = usePlivo(handlePlivoCallBack);
|
|
50
52
|
const STATUS_LABEL = computed(() => {
|
|
51
53
|
return {
|
|
52
54
|
[PLIVO_CALL_STATUS.CONNECTING]: 'Connecting...',
|
|
@@ -100,21 +102,9 @@ onBeforeUnmount(() => {
|
|
|
100
102
|
if (timeOut)
|
|
101
103
|
clearTimeout(timeOut);
|
|
102
104
|
endCall();
|
|
103
|
-
console.log('aaaaaaaaaaaaaaaaaaaaaaaa');
|
|
104
|
-
plivoRemoveCallBack();
|
|
105
|
-
errorMessage.value = '';
|
|
106
|
-
});
|
|
107
|
-
onUnmounted(() => {
|
|
108
|
-
if (timer)
|
|
109
|
-
clearInterval(timer);
|
|
110
|
-
if (timeOut)
|
|
111
|
-
clearTimeout(timeOut);
|
|
112
|
-
endCall();
|
|
113
|
-
console.log('aaaaaaaaaaaaaaaaaaaaaaaa');
|
|
114
105
|
plivoRemoveCallBack();
|
|
115
106
|
errorMessage.value = '';
|
|
116
107
|
});
|
|
117
|
-
let dataWebSK = null;
|
|
118
108
|
function startTimer() {
|
|
119
109
|
let sec = 0;
|
|
120
110
|
timer = setInterval(() => {
|
|
@@ -254,10 +244,6 @@ const getUserOffer = async (phone) => {
|
|
|
254
244
|
}
|
|
255
245
|
};
|
|
256
246
|
const handleTimeLimitError = () => {
|
|
257
|
-
console.log(isPlivoOn.value, 'isPlivoOn.value isPlivoOn.value');
|
|
258
|
-
console.log(isPlivoOn2, 'isPlivoOn2');
|
|
259
|
-
if (!isPlivoOn.value)
|
|
260
|
-
return;
|
|
261
247
|
errorMessage.value = 'Call time limit reached. This call has ended.';
|
|
262
248
|
endCall();
|
|
263
249
|
};
|
|
@@ -265,6 +251,7 @@ const exportRecordFile = async () => {
|
|
|
265
251
|
downloadRecord(record_link.value);
|
|
266
252
|
};
|
|
267
253
|
const handleAfterClose = () => {
|
|
254
|
+
checkTimeLimit();
|
|
268
255
|
record_link.value = '';
|
|
269
256
|
errorMessage.value = '';
|
|
270
257
|
uuidEnd = '';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { DropdownMenuContentProps } from 'reka-ui';
|
|
2
2
|
declare var __VLS_15: {}, __VLS_22: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
|
|
4
|
+
default?: (props: typeof __VLS_15) => any;
|
|
5
5
|
} & {
|
|
6
6
|
content?: (props: typeof __VLS_22) => any;
|
|
7
7
|
};
|
|
8
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<
|
|
8
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Pick<DropdownMenuContentProps, "side" | "align">, {
|
|
9
9
|
close: () => void;
|
|
10
10
|
openDropdown: () => void;
|
|
11
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
12
12
|
change: (appointment: boolean) => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<Pick<DropdownMenuContentProps, "side" | "align">> & Readonly<{
|
|
14
14
|
onChange?: ((appointment: boolean) => any) | undefined;
|
|
15
15
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
16
16
|
export default _default;
|
|
@@ -1,9 +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 { ref } from 'vue';
|
|
3
3
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '../../../components/ui/dropdown-menu';
|
|
4
|
-
const props =
|
|
5
|
-
placement: 'bottomLeft'
|
|
6
|
-
});
|
|
4
|
+
const props = defineProps();
|
|
7
5
|
const emits = defineEmits();
|
|
8
6
|
const handleChange = (value) => {
|
|
9
7
|
open.value = value;
|
|
@@ -22,9 +20,6 @@ const __VLS_exposed = {
|
|
|
22
20
|
};
|
|
23
21
|
defineExpose(__VLS_exposed);
|
|
24
22
|
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
|
25
|
-
const __VLS_defaults = {
|
|
26
|
-
placement: 'bottomLeft'
|
|
27
|
-
};
|
|
28
23
|
const __VLS_ctx = {
|
|
29
24
|
...{},
|
|
30
25
|
...{},
|
|
@@ -73,9 +68,17 @@ const __VLS_16 = {}.DropdownMenuContent;
|
|
|
73
68
|
// @ts-ignore
|
|
74
69
|
DropdownMenuContent;
|
|
75
70
|
// @ts-ignore
|
|
76
|
-
const __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16({
|
|
77
|
-
|
|
71
|
+
const __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16({
|
|
72
|
+
side: (__VLS_ctx.side),
|
|
73
|
+
align: (__VLS_ctx.align),
|
|
74
|
+
}));
|
|
75
|
+
const __VLS_18 = __VLS_17({
|
|
76
|
+
side: (__VLS_ctx.side),
|
|
77
|
+
align: (__VLS_ctx.align),
|
|
78
|
+
}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
|
78
79
|
const { default: __VLS_20 } = __VLS_19.slots;
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
[side, align,];
|
|
79
82
|
var __VLS_21 = {};
|
|
80
83
|
var __VLS_19;
|
|
81
84
|
var __VLS_3;
|
|
@@ -85,7 +88,6 @@ const __VLS_base = (await import('vue')).defineComponent({
|
|
|
85
88
|
setup: () => (__VLS_exposed),
|
|
86
89
|
__typeEmits: {},
|
|
87
90
|
__typeProps: {},
|
|
88
|
-
props: {},
|
|
89
91
|
});
|
|
90
92
|
const __VLS_export = {};
|
|
91
93
|
export default {};
|
|
@@ -1,23 +1,28 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { SelectContentProps } from 'reka-ui';
|
|
2
|
+
type Props = Pick<SelectContentProps, 'side' | 'align'> & {
|
|
2
3
|
options: {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string | number;
|
|
5
6
|
}[];
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
};
|
|
9
|
+
type __VLS_Props = Props;
|
|
8
10
|
type __VLS_ModelProps = {
|
|
9
11
|
'open'?: boolean;
|
|
10
12
|
};
|
|
11
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
14
|
+
declare var __VLS_15: {}, __VLS_22: {};
|
|
13
15
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
16
|
+
default?: (props: typeof __VLS_15) => any;
|
|
15
17
|
} & {
|
|
16
|
-
content?: (props: typeof
|
|
18
|
+
content?: (props: typeof __VLS_22) => any;
|
|
17
19
|
};
|
|
18
20
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
21
|
"update:open": (value: boolean | undefined) => any;
|
|
22
|
+
} & {
|
|
23
|
+
change: (value: any) => any;
|
|
20
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
onChange?: ((value: any) => any) | undefined;
|
|
21
26
|
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
22
27
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
23
28
|
export default _default;
|