@phonghq/go-chat 1.0.42 → 1.0.44

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.
Files changed (114) hide show
  1. package/dist/assets/icons/IconPlan.vue.d.ts +13 -1
  2. package/dist/assets/icons/call/IconPhoneCancel.vue.d.ts +13 -1
  3. package/dist/assets/icons/customer-detail/IconPhone.vue.d.ts +13 -1
  4. package/dist/chat/App.vue.d.ts +13 -2
  5. package/dist/chat/page/home/ChatList.vue.d.ts +10 -0
  6. package/dist/chat/page/home/ChatMessageItem.vue.d.ts +1 -0
  7. package/dist/chat/page/home/ChatMessageItem2.vue.d.ts +19 -0
  8. package/dist/chat/page/home/Home.vue.d.ts +2 -0
  9. package/dist/chat/page/home/InputChat.vue.d.ts +2 -0
  10. package/dist/components/chat/call/Calling.vue.d.ts +4 -2
  11. package/dist/components/chat/common/tabs/TabBase.vue.d.ts +18 -0
  12. package/dist/components/common/drawer/DrawerBaseCustom.vue.d.ts +1 -1
  13. package/dist/components/ui/select/Select.vue.d.ts +20 -0
  14. package/dist/components/ui/select/SelectContent.vue.d.ts +24 -0
  15. package/dist/components/ui/select/SelectGroup.vue.d.ts +10 -0
  16. package/dist/components/ui/select/SelectItem.vue.d.ts +18 -0
  17. package/dist/components/ui/select/SelectItemText.vue.d.ts +10 -0
  18. package/dist/components/ui/select/SelectLabel.vue.d.ts +14 -0
  19. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +14 -0
  20. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +14 -0
  21. package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
  22. package/dist/components/ui/select/SelectTrigger.vue.d.ts +17 -0
  23. package/dist/components/ui/select/SelectValue.vue.d.ts +10 -0
  24. package/dist/components/ui/select/index.d.ts +11 -0
  25. package/dist/components/ui/tabs/Tabs.vue.d.ts +20 -0
  26. package/dist/components/ui/tabs/TabsContent.vue.d.ts +14 -0
  27. package/dist/components/ui/tabs/TabsList.vue.d.ts +14 -0
  28. package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +14 -0
  29. package/dist/components/ui/tabs/index.d.ts +4 -0
  30. package/dist/composable/useDigibot.d.ts +1 -1
  31. package/dist/composable/useInitData.d.ts +5 -2
  32. package/dist/composable/useListConversations.d.ts +4 -1
  33. package/dist/composable/useListentEvent.d.ts +5 -0
  34. package/dist/composable/usePlivo.d.ts +1 -0
  35. package/dist/constant/color.d.ts +2 -2
  36. package/dist/go-chat.es.js +14663 -14004
  37. package/dist/go-chat.umd.js +15 -15
  38. package/dist/style.css +1 -1
  39. package/dist/test/assets/icons/IconPlan.vue.js +23 -3
  40. package/dist/test/assets/icons/IconUser.vue.js +25 -0
  41. package/dist/test/assets/icons/call/IconPhone.vue.js +6 -19
  42. package/dist/test/assets/icons/call/IconPhoneCancel.vue.js +32 -21
  43. package/dist/test/assets/icons/customer-detail/IconPhone.vue.js +23 -3
  44. package/dist/test/chat/App.vue.js +303 -282
  45. package/dist/test/chat/page/customer-check-in/CustomerCheckIn.vue.js +3 -1
  46. package/dist/test/chat/page/customer-detail/CustomerDetail.vue.js +4 -4
  47. package/dist/test/chat/page/home/ChatList.vue.js +113 -43
  48. package/dist/test/chat/page/home/ChatMessage.vue.js +10 -1
  49. package/dist/test/chat/page/home/ChatMessageItem.vue.js +75 -83
  50. package/dist/test/chat/page/home/ChatMessageItem2.vue.js +351 -0
  51. package/dist/test/chat/page/home/Home.vue.js +29 -9
  52. package/dist/test/chat/page/home/HomeHeader.vue.js +8 -4
  53. package/dist/test/chat/page/home/InputChat.vue.js +58 -37
  54. package/dist/test/components/chat/call/Calling.vue.js +117 -71
  55. package/dist/test/components/chat/common/tab/TabBase.vue.js +1 -0
  56. package/dist/test/components/chat/common/tabs/TabBase.vue.js +92 -0
  57. package/dist/test/components/chat/customer/Avatar.vue.js +23 -4
  58. package/dist/test/components/chat/layout/mobile/Footer.vue.js +6 -1
  59. package/dist/test/components/common/drawer/DrawerBaseCustom.vue.js +1 -0
  60. package/dist/test/components/common/select/SelectBase.vue.js +139 -0
  61. package/dist/test/components/ui/select/Select.vue.js +49 -0
  62. package/dist/test/components/ui/select/SelectContent.vue.js +98 -0
  63. package/dist/test/components/ui/select/SelectGroup.vue.js +37 -0
  64. package/dist/test/components/ui/select/SelectItem.vue.js +86 -0
  65. package/dist/test/components/ui/select/SelectItemText.vue.js +37 -0
  66. package/dist/test/components/ui/select/SelectLabel.vue.js +40 -0
  67. package/dist/test/components/ui/select/SelectScrollDownButton.vue.js +58 -0
  68. package/dist/test/components/ui/select/SelectScrollUpButton.vue.js +58 -0
  69. package/dist/test/components/ui/select/SelectSeparator.vue.js +39 -0
  70. package/dist/test/components/ui/select/SelectTrigger.vue.js +76 -0
  71. package/dist/test/components/ui/select/SelectValue.vue.js +37 -0
  72. package/dist/test/components/ui/select/index.js +11 -0
  73. package/dist/test/components/ui/tabs/Tabs.vue.js +54 -0
  74. package/dist/test/components/ui/tabs/TabsContent.vue.js +44 -0
  75. package/dist/test/components/ui/tabs/TabsList.vue.js +44 -0
  76. package/dist/test/components/ui/tabs/TabsTrigger.vue.js +45 -0
  77. package/dist/test/components/ui/tabs/index.js +4 -0
  78. package/dist/test/composable/useDigibot.js +3 -3
  79. package/dist/test/composable/useInitData.js +23 -14
  80. package/dist/test/composable/useListConversations.js +51 -33
  81. package/dist/test/composable/useListentEvent.js +45 -0
  82. package/dist/test/composable/usePlivo.js +6 -1
  83. package/dist/test/constant/color.js +4 -2
  84. package/dist/test/plugins/axios-gci.js +1 -1
  85. package/dist/test/utils/chat/auth.js +1 -1
  86. package/dist/test/utils/chat/cache.js +63 -0
  87. package/dist/test/utils/chat/call.js +2 -3
  88. package/dist/test/utils/chat/conversation.js +9 -2
  89. package/dist/test/utils/chat/page-error.js +25 -0
  90. package/dist/test/utils/chat/user.js +7 -2
  91. package/dist/test/utils/string-helper.js +13 -0
  92. package/dist/test/views/NotTenantPhone.vue.js +99 -0
  93. package/dist/types/chat/global.d.ts +6 -5
  94. package/dist/types/conversation.d.ts +2 -0
  95. package/dist/utils/chat/auth.d.ts +1 -1
  96. package/dist/utils/chat/cache.d.ts +7 -0
  97. package/dist/utils/chat/conversation.d.ts +2 -0
  98. package/dist/utils/chat/page-error.d.ts +4 -0
  99. package/dist/utils/chat/user.d.ts +3 -0
  100. package/dist/utils/string-helper.d.ts +1 -0
  101. package/dist/views/NotTenantPhone.vue.d.ts +9 -0
  102. package/package.json +3 -2
  103. package/dist/components/layout/Blank.vue.d.ts +0 -9
  104. package/dist/components/layout/Default.vue.d.ts +0 -9
  105. package/dist/composable/useError.d.ts +0 -4
  106. package/dist/composable/useModalConfirm.d.ts +0 -5
  107. package/dist/test/components/ListenEvent.vue.js +0 -45
  108. package/dist/test/components/layout/Blank.vue.js +0 -19
  109. package/dist/test/components/layout/Default.vue.js +0 -21
  110. package/dist/test/components/modal/Confirm.vue.js +0 -164
  111. package/dist/test/composable/useError.js +0 -10
  112. package/dist/test/composable/useModalConfirm.js +0 -39
  113. /package/dist/{components/ListenEvent.vue.d.ts → assets/icons/IconUser.vue.d.ts} +0 -0
  114. /package/dist/components/{modal/Confirm.vue.d.ts → common/select/SelectBase.vue.d.ts} +0 -0
@@ -47,9 +47,11 @@ for (const [year, i] of __VLS_getVForSourceType((__VLS_ctx.checkin))) {
47
47
  key: (i),
48
48
  }, ...__VLS_functionalComponentArgsRest(__VLS_0));
49
49
  const { default: __VLS_3 } = __VLS_2.slots;
50
+ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
51
+ ...{ class: "flex flex-col gap-y-3" },
52
+ });
50
53
  for (const [item] of __VLS_getVForSourceType((year.items))) {
51
54
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
52
- ...{ class: "flex flex-col gap-y-3" },
53
55
  key: (item.id),
54
56
  });
55
57
  /** @type {[typeof CardCustomerDetail, typeof CardCustomerDetail, ]} */ ;
@@ -104,12 +104,12 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
104
104
  __VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({
105
105
  ...{ class: "text-lg font-semibold text-gray-800" },
106
106
  });
107
- (__VLS_ctx.user?.username ?? 'n/a');
107
+ (__VLS_ctx.user?.username ?? __VLS_ctx.phoneNumberFormat(__VLS_ctx.user?.phone ?? ''));
108
108
  // @ts-ignore
109
- [user,];
109
+ [user, user, phoneNumberFormat,];
110
110
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
111
111
  ...{ class: " mt-5 text-center mx-auto" },
112
- ...{ class: ({ 'flex justify-between w-max': __VLS_ctx.responsive == 'tablet', 'grid grid-cols-3 w-full': __VLS_ctx.responsive == 'mobile' }) },
112
+ ...{ class: ({ 'flex justify-between w-max': __VLS_ctx.responsive != 'mobile', 'grid grid-cols-3 w-full': __VLS_ctx.responsive == 'mobile' }) },
113
113
  });
114
114
  // @ts-ignore
115
115
  [responsive, responsive,];
@@ -118,7 +118,7 @@ for (const [item, i] of __VLS_getVForSourceType((__VLS_ctx.customerTotalDetail))
118
118
  [customerTotalDetail,];
119
119
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
120
120
  ...{ class: "border-l border-chat-haze-100 first:border-none" },
121
- ...{ class: ({ 'w-full': __VLS_ctx.responsive == 'mobile', 'w-[130px]': __VLS_ctx.responsive == 'tablet' }) },
121
+ ...{ class: ({ 'w-full': __VLS_ctx.responsive == 'mobile', 'w-[130px]': __VLS_ctx.responsive != 'mobile' }) },
122
122
  key: (i),
123
123
  });
124
124
  // @ts-ignore
@@ -1,6 +1,8 @@
1
1
  import InputSearch from '../../../components/chat/common/input/InputSearch.vue';
2
+ import IconPlus from '../../../assets/icons/IconPlus.vue';
2
3
  import { computed, ref } from 'vue';
3
4
  import Avatar from '../../../components/chat/customer/Avatar.vue';
5
+ import { getConversationView } from '../../../utils/chat/conversation';
4
6
  import ScrollEvent from '../../../components/chat/ScrollEvent/ScrollEvent.vue';
5
7
  import { useDebounce } from '../../../utils/debounce';
6
8
  import { dataProfile } from '../../../utils/chat/auth';
@@ -12,7 +14,7 @@ import timezone from 'dayjs/plugin/timezone';
12
14
  import { useDigibot } from '../../../composable/useDigibot';
13
15
  import { TIME_ZONE_UTC } from '../../../constant/datetime';
14
16
  import IconAiCheck from '../../../assets/icons/IconAiCheck.vue';
15
- import TabBase from '../../../components/chat/common/tab/TabBase.vue';
17
+ import TabBase2 from '../../../components/chat/common/tabs/TabBase.vue';
16
18
  import { useListConversations } from '../../../composable/useListConversations';
17
19
  import { phoneNumberFormat } from '../../../utils/string-helper';
18
20
  dayjs.extend(updateLocale);
@@ -44,17 +46,24 @@ const TAB_VALUE = {
44
46
  };
45
47
  const tabs = computed(() => [
46
48
  { label: 'All', value: TAB_VALUE.ALL },
47
- { label: 'Message Requests', value: TAB_VALUE.UNKNOWN, badge: (listConversationsUnknown.value?.length || '').toString() }
49
+ {
50
+ label: 'Message Requests',
51
+ value: TAB_VALUE.UNKNOWN,
52
+ badge: (listConversationsUnknownUnread.value || '').toString()
53
+ }
48
54
  ]);
49
55
  const { digibotData, digibotId } = useDigibot();
50
- const { listConversations: listConversationsAll, getData: getDataAll, params: paramsAll, pageCount: pageCountAll, handleReadMessage: handleReadMessageAll } = useListConversations(TAB_VALUE.ALL);
51
- const { listConversations: listConversationsUnknown, getData: getDataUnknown, params: paramsUnknown, pageCount: pageCountUnknown, handleReadMessage: handleReadMessageUnknown } = useListConversations(TAB_VALUE.UNKNOWN);
56
+ const { listConversations: listConversationsAll, getData: getDataAll, params: paramsAll, pageCount: pageCountAll, handleReadMessage: handleReadMessageAll, getDataCache: getDataCacheAll } = useListConversations(TAB_VALUE.ALL, dataProfile.value?.user_type === 'tenant');
57
+ const { listConversations: listConversationsUnknown, getData: getDataUnknown, params: paramsUnknown, pageCount: pageCountUnknown, handleReadMessage: handleReadMessageUnknown, getDataCache: getDataCacheUnknown } = useListConversations(TAB_VALUE.UNKNOWN, dataProfile.value?.user_type === 'tenant');
52
58
  const receiver_id = defineModel('receiverId');
53
59
  const listConversations = computed(() => {
54
60
  if (activeTabs.value == TAB_VALUE.ALL)
55
61
  return listConversationsAll.value;
56
62
  return listConversationsUnknown.value;
57
63
  });
64
+ const listConversationsUnknownUnread = computed(() => {
65
+ return (listConversationsUnknown.value.reduce((total, cur) => total + (cur?.unread_count ?? 0), 0) ?? 0);
66
+ });
58
67
  const keyword = ref('');
59
68
  const activeTabs = ref(TAB_VALUE.ALL);
60
69
  const scrollEventRef = ref(null);
@@ -64,13 +73,26 @@ const getData = async (data, option) => {
64
73
  const tab_value = option?.tab ?? activeTabs.value;
65
74
  if (!option?.hideLoading)
66
75
  isLoadingSearch.value = true;
76
+ if (option?.reset) {
77
+ let cache = false;
78
+ if (tab_value == TAB_VALUE.ALL) {
79
+ cache = getDataCacheAll();
80
+ }
81
+ else if (tab_value == TAB_VALUE.UNKNOWN) {
82
+ cache = getDataCacheUnknown();
83
+ }
84
+ if (cache)
85
+ isLoadingSearch.value = false;
86
+ }
67
87
  if (tab_value == TAB_VALUE.ALL) {
68
88
  await getDataAll(data, option);
69
89
  }
70
90
  else if (tab_value == TAB_VALUE.UNKNOWN) {
71
91
  await getDataUnknown(data, option);
72
92
  }
73
- checkHasReceiveId();
93
+ if (!option?.hideCheckHasReceiveId) {
94
+ checkHasReceiveId();
95
+ }
74
96
  if (option?.reset) {
75
97
  getAllList();
76
98
  }
@@ -98,7 +120,7 @@ const getAllList = async () => {
98
120
  };
99
121
  const checkHasReceiveId = () => {
100
122
  const hasReceiveId = listConversations.value?.some((e) => e.receiver_id === receiver_id.value && receiver_id.value);
101
- if (props.responsive == 'tablet') {
123
+ if (props.responsive != 'mobile') {
102
124
  if (!hasReceiveId) {
103
125
  if (listConversations.value?.length) {
104
126
  emit('selectReceiver', listConversations.value[0]);
@@ -147,21 +169,43 @@ const getTimeFromNow = (data) => {
147
169
  }
148
170
  return data ?? '';
149
171
  };
150
- const handleTabChange = async (tab) => {
172
+ const handleTabChange = async (tab, option) => {
151
173
  if (tab == TAB_VALUE.ALL && !listConversationsAll.value?.length) {
152
- await getData({}, { reset: true, tab });
174
+ await getData({}, { reset: true, tab, ...(option ?? {}) });
153
175
  }
154
176
  else if (tab == TAB_VALUE.UNKNOWN && !listConversationsUnknown.value?.length) {
155
- await getData({}, { reset: true, tab });
177
+ await getData({}, { reset: true, tab, ...(option ?? {}) });
156
178
  }
157
- checkHasReceiveId();
179
+ // checkHasReceiveId()
158
180
  };
159
181
  const getCurrentConversation = () => {
160
- return listConversations.value?.find(user => user.receiver_id == receiver_id.value);
182
+ return listConversations.value?.find((user) => user.receiver_id == receiver_id.value);
183
+ };
184
+ const initData = async (option) => {
185
+ if (option?.is_unknown || option?.is_unknown == '0') {
186
+ activeTabs.value = Number(option?.is_unknown);
187
+ }
188
+ let hideCheckHasReceiveId = false;
189
+ if (option?.conversation_id) {
190
+ const conversation = await getConversationView(option?.conversation_id);
191
+ if (conversation.receiver_id) {
192
+ hideCheckHasReceiveId = true;
193
+ selectUser(conversation);
194
+ }
195
+ }
196
+ handleTabChange(TAB_VALUE.ALL, { hideCheckHasReceiveId: activeTabs.value != TAB_VALUE.UNKNOWN });
197
+ handleTabChange(TAB_VALUE.UNKNOWN, {
198
+ hideCheckHasReceiveId,
199
+ hideLoading: activeTabs.value != TAB_VALUE.UNKNOWN
200
+ });
201
+ };
202
+ const __VLS_exposed = {
203
+ handleReadMessage,
204
+ listConversationsAll,
205
+ listConversationsUnknown,
206
+ getCurrentConversation,
207
+ initData
161
208
  };
162
- handleTabChange(TAB_VALUE.ALL);
163
- handleTabChange(TAB_VALUE.UNKNOWN);
164
- const __VLS_exposed = { handleReadMessage, listConversationsAll, listConversationsUnknown, getCurrentConversation };
165
209
  defineExpose(__VLS_exposed);
166
210
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
167
211
  const __VLS_modelEmit = defineEmits();
@@ -177,7 +221,7 @@ let __VLS_elements;
177
221
  let __VLS_components;
178
222
  let __VLS_directives;
179
223
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
180
- ...{ class: "h-full flex flex-col chat-box-white pt-6" },
224
+ ...{ class: "h-full flex flex-col bg-white pt-6" },
181
225
  });
182
226
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
183
227
  ...{ class: "shrink-0 w-full px-6 flex gap-2 mb-4" },
@@ -203,55 +247,71 @@ const __VLS_5 = ({ search: {} },
203
247
  // @ts-ignore
204
248
  [responsive, keyword, handleSearch,];
205
249
  var __VLS_2;
250
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
251
+ ...{ onClick: (...[$event]) => {
252
+ __VLS_ctx.emit('openPhoneNumpad');
253
+ // @ts-ignore
254
+ [emit,];
255
+ } },
256
+ ...{ class: "shrink-0 h-11 w-11 rounded-full flex-center bg-[#C7DEFF] block xl:hidden" },
257
+ });
258
+ /** @type {[typeof IconPlus, ]} */ ;
259
+ // @ts-ignore
260
+ const __VLS_7 = __VLS_asFunctionalComponent(IconPlus, new IconPlus({
261
+ ...{ class: "text-[#004AB3]" },
262
+ }));
263
+ const __VLS_8 = __VLS_7({
264
+ ...{ class: "text-[#004AB3]" },
265
+ }, ...__VLS_functionalComponentArgsRest(__VLS_7));
206
266
  if (__VLS_ctx.dataProfile?.user_type == 'tenant') {
207
267
  // @ts-ignore
208
268
  [dataProfile,];
209
- /** @type {[typeof TabBase, ]} */ ;
269
+ /** @type {[typeof TabBase2, ]} */ ;
210
270
  // @ts-ignore
211
- const __VLS_7 = __VLS_asFunctionalComponent(TabBase, new TabBase({
271
+ const __VLS_11 = __VLS_asFunctionalComponent(TabBase2, new TabBase2({
212
272
  ...{ 'onChange': {} },
213
- ...{ class: "shrink-0 px-6" },
273
+ ...{ class: "shrink-0 px-6 mb-4" },
214
274
  tabs: (__VLS_ctx.tabs),
215
275
  active: (__VLS_ctx.activeTabs),
216
276
  }));
217
- const __VLS_8 = __VLS_7({
277
+ const __VLS_12 = __VLS_11({
218
278
  ...{ 'onChange': {} },
219
- ...{ class: "shrink-0 px-6" },
279
+ ...{ class: "shrink-0 px-6 mb-4" },
220
280
  tabs: (__VLS_ctx.tabs),
221
281
  active: (__VLS_ctx.activeTabs),
222
- }, ...__VLS_functionalComponentArgsRest(__VLS_7));
223
- let __VLS_10;
224
- let __VLS_11;
225
- const __VLS_12 = ({ change: {} },
282
+ }, ...__VLS_functionalComponentArgsRest(__VLS_11));
283
+ let __VLS_14;
284
+ let __VLS_15;
285
+ const __VLS_16 = ({ change: {} },
226
286
  { onChange: (__VLS_ctx.handleTabChange) });
227
287
  // @ts-ignore
228
288
  [tabs, activeTabs, handleTabChange,];
229
- var __VLS_9;
289
+ var __VLS_13;
230
290
  }
231
291
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
232
292
  ...{ class: "grow relative overflow-hidden" },
233
293
  });
234
294
  /** @type {[typeof ScrollEvent, typeof ScrollEvent, ]} */ ;
235
295
  // @ts-ignore
236
- const __VLS_14 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
296
+ const __VLS_18 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
237
297
  ...{ 'onGetDataBottom': {} },
238
298
  ref: "scrollEventRef",
239
299
  ...{ class: "h-full overflow-auto" },
240
300
  bottom: true,
241
301
  }));
242
- const __VLS_15 = __VLS_14({
302
+ const __VLS_19 = __VLS_18({
243
303
  ...{ 'onGetDataBottom': {} },
244
304
  ref: "scrollEventRef",
245
305
  ...{ class: "h-full overflow-auto" },
246
306
  bottom: true,
247
- }, ...__VLS_functionalComponentArgsRest(__VLS_14));
248
- let __VLS_17;
249
- let __VLS_18;
250
- const __VLS_19 = ({ getDataBottom: {} },
307
+ }, ...__VLS_functionalComponentArgsRest(__VLS_18));
308
+ let __VLS_21;
309
+ let __VLS_22;
310
+ const __VLS_23 = ({ getDataBottom: {} },
251
311
  { onGetDataBottom: (__VLS_ctx.handleScroll) });
252
312
  /** @type {typeof __VLS_ctx.scrollEventRef} */ ;
253
- var __VLS_20 = {};
254
- const { default: __VLS_22 } = __VLS_16.slots;
313
+ var __VLS_24 = {};
314
+ const { default: __VLS_26 } = __VLS_20.slots;
255
315
  // @ts-ignore
256
316
  [handleScroll, scrollEventRef,];
257
317
  for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
@@ -268,26 +328,26 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
268
328
  });
269
329
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
270
330
  ...{ class: "w-full overflow-hidden flex items-center hover:bg-[#EDF5FF] cursor-pointer px-6 py-2" },
271
- ...{ class: ({ 'bg-[#EDF5FF]': __VLS_ctx.receiver_id == user.receiver_id && __VLS_ctx.responsive == 'tablet' }) },
331
+ ...{ class: ({ 'bg-[#EDF5FF]': __VLS_ctx.receiver_id == user.receiver_id && __VLS_ctx.responsive != 'mobile' }) },
272
332
  });
273
333
  // @ts-ignore
274
334
  [responsive, receiver_id,];
275
335
  /** @type {[typeof Avatar, ]} */ ;
276
336
  // @ts-ignore
277
- const __VLS_23 = __VLS_asFunctionalComponent(Avatar, new Avatar({
337
+ const __VLS_27 = __VLS_asFunctionalComponent(Avatar, new Avatar({
278
338
  id: (user.id),
279
339
  ...{ class: "shrink-0" },
280
340
  src: (user.avatar ?? ''),
281
341
  color: (user.color),
282
342
  name: (user.username ?? ''),
283
343
  }));
284
- const __VLS_24 = __VLS_23({
344
+ const __VLS_28 = __VLS_27({
285
345
  id: (user.id),
286
346
  ...{ class: "shrink-0" },
287
347
  src: (user.avatar ?? ''),
288
348
  color: (user.color),
289
349
  name: (user.username ?? ''),
290
- }, ...__VLS_functionalComponentArgsRest(__VLS_23));
350
+ }, ...__VLS_functionalComponentArgsRest(__VLS_27));
291
351
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
292
352
  ...{ class: "grow ml-3 overflow-hidden" },
293
353
  });
@@ -311,12 +371,12 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
311
371
  [digibotId,];
312
372
  /** @type {[typeof IconAiCheck, ]} */ ;
313
373
  // @ts-ignore
314
- const __VLS_27 = __VLS_asFunctionalComponent(IconAiCheck, new IconAiCheck({
374
+ const __VLS_31 = __VLS_asFunctionalComponent(IconAiCheck, new IconAiCheck({
315
375
  ...{ class: "ml-2" },
316
376
  }));
317
- const __VLS_28 = __VLS_27({
377
+ const __VLS_32 = __VLS_31({
318
378
  ...{ class: "ml-2" },
319
- }, ...__VLS_functionalComponentArgsRest(__VLS_27));
379
+ }, ...__VLS_functionalComponentArgsRest(__VLS_31));
320
380
  }
321
381
  if (user.unread_count) {
322
382
  __VLS_asFunctionalElement(__VLS_elements.span, __VLS_elements.span)({
@@ -339,12 +399,12 @@ for (const [user] of __VLS_getVForSourceType((__VLS_ctx.listConversations))) {
339
399
  // @ts-ignore
340
400
  [getTimeFromNow,];
341
401
  }
342
- var __VLS_16;
402
+ var __VLS_20;
343
403
  /** @type {__VLS_StyleScopedClasses['']} */ ;
344
404
  /** @type {__VLS_StyleScopedClasses['h-full']} */ ;
345
405
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
346
406
  /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
347
- /** @type {__VLS_StyleScopedClasses['chat-box-white']} */ ;
407
+ /** @type {__VLS_StyleScopedClasses['bg-white']} */ ;
348
408
  /** @type {__VLS_StyleScopedClasses['pt-6']} */ ;
349
409
  /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
350
410
  /** @type {__VLS_StyleScopedClasses['w-full']} */ ;
@@ -355,7 +415,17 @@ var __VLS_16;
355
415
  /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
356
416
  /** @type {__VLS_StyleScopedClasses['grow']} */ ;
357
417
  /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
418
+ /** @type {__VLS_StyleScopedClasses['h-11']} */ ;
419
+ /** @type {__VLS_StyleScopedClasses['w-11']} */ ;
420
+ /** @type {__VLS_StyleScopedClasses['rounded-full']} */ ;
421
+ /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
422
+ /** @type {__VLS_StyleScopedClasses['bg-[#C7DEFF]']} */ ;
423
+ /** @type {__VLS_StyleScopedClasses['block']} */ ;
424
+ /** @type {__VLS_StyleScopedClasses['xl:hidden']} */ ;
425
+ /** @type {__VLS_StyleScopedClasses['text-[#004AB3]']} */ ;
426
+ /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
358
427
  /** @type {__VLS_StyleScopedClasses['px-6']} */ ;
428
+ /** @type {__VLS_StyleScopedClasses['mb-4']} */ ;
359
429
  /** @type {__VLS_StyleScopedClasses['grow']} */ ;
360
430
  /** @type {__VLS_StyleScopedClasses['relative']} */ ;
361
431
  /** @type {__VLS_StyleScopedClasses['overflow-hidden']} */ ;
@@ -406,7 +476,7 @@ var __VLS_16;
406
476
  /** @type {__VLS_StyleScopedClasses['w-[80px]']} */ ;
407
477
  /** @type {__VLS_StyleScopedClasses['md:w-[130px]']} */ ;
408
478
  // @ts-ignore
409
- var __VLS_21 = __VLS_20;
479
+ var __VLS_25 = __VLS_24;
410
480
  const __VLS_export = (await import('vue')).defineComponent({
411
481
  setup: () => (__VLS_exposed),
412
482
  __typeEmits: {},
@@ -33,6 +33,13 @@ const isChatFinished = (index) => {
33
33
  const time2 = dayjs(props.message[index + 1].created_at);
34
34
  return time2.diff(time1, 'minute') > 10;
35
35
  };
36
+ const isChatStart = (index) => {
37
+ if (shouldShowAvatar(index))
38
+ return true;
39
+ const time1 = dayjs(props.message[index - 1].created_at);
40
+ const time2 = dayjs(props.message[index].created_at);
41
+ return time2.diff(time1, 'minute') > 10;
42
+ };
36
43
  const handleScrollTop = () => {
37
44
  emit('scrollTop');
38
45
  };
@@ -122,6 +129,7 @@ for (const [item, index] of __VLS_getVForSourceType((__VLS_ctx.message))) {
122
129
  isLastMessage: (index == __VLS_ctx.message.length - 1),
123
130
  isEndMessage: (__VLS_ctx.isEndMessage(index)),
124
131
  isChatFinished: (__VLS_ctx.isChatFinished(index)),
132
+ isChatStart: (__VLS_ctx.isChatStart(index)),
125
133
  }));
126
134
  const __VLS_14 = __VLS_13({
127
135
  ...{ 'onCallAgain': {} },
@@ -134,6 +142,7 @@ for (const [item, index] of __VLS_getVForSourceType((__VLS_ctx.message))) {
134
142
  isLastMessage: (index == __VLS_ctx.message.length - 1),
135
143
  isEndMessage: (__VLS_ctx.isEndMessage(index)),
136
144
  isChatFinished: (__VLS_ctx.isChatFinished(index)),
145
+ isChatStart: (__VLS_ctx.isChatStart(index)),
137
146
  }, ...__VLS_functionalComponentArgsRest(__VLS_13));
138
147
  let __VLS_16;
139
148
  let __VLS_17;
@@ -141,7 +150,7 @@ for (const [item, index] of __VLS_getVForSourceType((__VLS_ctx.message))) {
141
150
  { onCallAgain: (...[$event]) => {
142
151
  __VLS_ctx.emit('callBack');
143
152
  // @ts-ignore
144
- [data, message, responsive, dataProfile, shouldShowAvatar, isEndMessage, isChatFinished, emit,];
153
+ [data, message, responsive, dataProfile, shouldShowAvatar, isEndMessage, isChatFinished, isChatStart, emit,];
145
154
  } });
146
155
  var __VLS_15;
147
156
  }