@phonghq/go-chat 1.0.53 → 1.0.54

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.
@@ -138,19 +138,21 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
138
138
  }
139
139
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({});
140
140
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
141
- ...{ class: "px-3 py-2 rounded-2xl max-w-xs text-left" },
141
+ ...{ class: "px-3 py-2 rounded-2xl max-w-[280px] text-left w-max" },
142
142
  ...{ class: ({
143
- 'rounded-tl-none': !__VLS_ctx.isChatStart && !__VLS_ctx.isMyMessage,
144
- 'rounded-bl-none': !__VLS_ctx.isChatFinished && !__VLS_ctx.isMyMessage,
145
- 'rounded-tr-none': !__VLS_ctx.isChatStart && __VLS_ctx.isMyMessage,
146
- 'rounded-br-none': !__VLS_ctx.isChatFinished && __VLS_ctx.isMyMessage,
143
+ 'rounded-tl-[6px]': !__VLS_ctx.isChatStart && !__VLS_ctx.isMyMessage,
144
+ 'rounded-bl-[6px]': !__VLS_ctx.isChatFinished && !__VLS_ctx.isMyMessage,
145
+ 'rounded-tr-[6px]': !__VLS_ctx.isChatStart && __VLS_ctx.isMyMessage,
146
+ 'rounded-br-[6px]': !__VLS_ctx.isChatFinished && __VLS_ctx.isMyMessage,
147
147
  '!text-white !bg-chat-success': (__VLS_ctx.message.message_uuid && !__VLS_ctx.message.is_call) || __VLS_ctx.message.is_sms,
148
148
  'bg-chat-primary text-white': __VLS_ctx.isMyMessage && !__VLS_ctx.message.is_call,
149
- 'bg-[#E4E4E4D4] text-chat-haze-600 w-max ': !__VLS_ctx.isMyMessage || __VLS_ctx.message.is_call
149
+ 'bg-[#E4E4E4D4] text-chat-haze-600': !__VLS_ctx.isMyMessage || __VLS_ctx.message.is_call,
150
+ ' ml-auto ': __VLS_ctx.isMyMessage,
151
+ ' mr-auto ': !__VLS_ctx.isMyMessage
150
152
  }) },
151
153
  });
152
154
  // @ts-ignore
153
- [isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, message, message, message, message, message, isChatStart, isChatStart, isChatFinished, isChatFinished,];
155
+ [isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, message, message, message, message, message, isChatStart, isChatStart, isChatFinished, isChatFinished,];
154
156
  if (__VLS_ctx.message.is_call == 1) {
155
157
  // @ts-ignore
156
158
  [message,];
@@ -286,19 +288,21 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
286
288
  /** @type {__VLS_StyleScopedClasses['px-3']} */ ;
287
289
  /** @type {__VLS_StyleScopedClasses['py-2']} */ ;
288
290
  /** @type {__VLS_StyleScopedClasses['rounded-2xl']} */ ;
289
- /** @type {__VLS_StyleScopedClasses['max-w-xs']} */ ;
291
+ /** @type {__VLS_StyleScopedClasses['max-w-[280px]']} */ ;
290
292
  /** @type {__VLS_StyleScopedClasses['text-left']} */ ;
291
- /** @type {__VLS_StyleScopedClasses['rounded-tl-none']} */ ;
292
- /** @type {__VLS_StyleScopedClasses['rounded-bl-none']} */ ;
293
- /** @type {__VLS_StyleScopedClasses['rounded-tr-none']} */ ;
294
- /** @type {__VLS_StyleScopedClasses['rounded-br-none']} */ ;
293
+ /** @type {__VLS_StyleScopedClasses['w-max']} */ ;
294
+ /** @type {__VLS_StyleScopedClasses['rounded-tl-[6px]']} */ ;
295
+ /** @type {__VLS_StyleScopedClasses['rounded-bl-[6px]']} */ ;
296
+ /** @type {__VLS_StyleScopedClasses['rounded-tr-[6px]']} */ ;
297
+ /** @type {__VLS_StyleScopedClasses['rounded-br-[6px]']} */ ;
295
298
  /** @type {__VLS_StyleScopedClasses['!text-white']} */ ;
296
299
  /** @type {__VLS_StyleScopedClasses['!bg-chat-success']} */ ;
297
300
  /** @type {__VLS_StyleScopedClasses['bg-chat-primary']} */ ;
298
301
  /** @type {__VLS_StyleScopedClasses['text-white']} */ ;
299
302
  /** @type {__VLS_StyleScopedClasses['bg-[#E4E4E4D4]']} */ ;
300
303
  /** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
301
- /** @type {__VLS_StyleScopedClasses['w-max']} */ ;
304
+ /** @type {__VLS_StyleScopedClasses['ml-auto']} */ ;
305
+ /** @type {__VLS_StyleScopedClasses['mr-auto']} */ ;
302
306
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
303
307
  /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
304
308
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
@@ -44,7 +44,7 @@ const handleConnectMqtt = async () => {
44
44
  };
45
45
  const handleDisconnectMqtt = async () => {
46
46
  // unsubscribeFromTopic(topic)
47
- unsubscribeFromTopic(topic_plivo_chat);
47
+ await unsubscribeFromTopic(topic_plivo_chat);
48
48
  // removeHandleMqttMessage('chat-home')
49
49
  removeHandleMqttMessage('chat-home-1');
50
50
  };
@@ -112,7 +112,7 @@ const handleGetDetailReceiver = async (data) => {
112
112
  const res = (await getDetailReceiver(props.receiverId)) ?? null;
113
113
  if (id == props.receiverId) {
114
114
  infoUser.value = res;
115
- handleDisconnectMqtt();
115
+ await handleDisconnectMqtt();
116
116
  await handleConnectMqtt();
117
117
  }
118
118
  };
@@ -53,7 +53,10 @@ let __VLS_components;
53
53
  let __VLS_directives;
54
54
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
55
55
  ...{ class: "px-8 py-4 h-[96px] layout-shadow border-b border-chat-gray-5 z-10" },
56
+ ...{ class: ({ '!px-4': __VLS_ctx.responsive == 'mobile' }) },
56
57
  });
58
+ // @ts-ignore
59
+ [responsive,];
57
60
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
58
61
  ...{ class: "flex items-center gap-2 h-full" },
59
62
  });
@@ -193,6 +196,7 @@ if (__VLS_ctx.data?.id && __VLS_ctx.data?.id != __VLS_ctx.digibotId.toString() &
193
196
  /** @type {__VLS_StyleScopedClasses['border-b']} */ ;
194
197
  /** @type {__VLS_StyleScopedClasses['border-chat-gray-5']} */ ;
195
198
  /** @type {__VLS_StyleScopedClasses['z-10']} */ ;
199
+ /** @type {__VLS_StyleScopedClasses['!px-4']} */ ;
196
200
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
197
201
  /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
198
202
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
@@ -46,7 +46,7 @@ const handleSendMessage = async (type) => {
46
46
  keyword.value = '';
47
47
  // chatInputRef.value.style.height = 'auto'
48
48
  chatId++;
49
- const id = props.data?.id.toString() + '-' + chatId;
49
+ const id = props.data?.id.toString() + '-' + chatId + '-' + Date.now();
50
50
  const data = {
51
51
  conversation_id: props.data?.conversation_id,
52
52
  created_at: dayjs().tz(TIME_ZONE_UTC).format(DATE_FORMATS['DATE_FORMAT_FULL']),
@@ -149,7 +149,7 @@ __VLS_asFunctionalElement(__VLS_elements.textarea)({
149
149
  // @ts-ignore
150
150
  [setInputHeight,];
151
151
  } },
152
- ...{ class: "text-[14px] sm:text-base w-full min-h-11 overflow-hidden chat-input !rounded-xl px-4 py-2 border border-chat-haze-200" },
152
+ ...{ class: "text-[14px] sm:text-base w-full min-h-11 overflow-hidden chat-input !rounded-xl px-4 py-2 border border-chat-haze-200 leading-[24px]" },
153
153
  ref: "chatInputRef",
154
154
  rows: "1",
155
155
  placeholder: "Send Message",
@@ -310,6 +310,7 @@ const __VLS_19 = __VLS_18({
310
310
  /** @type {__VLS_StyleScopedClasses['py-2']} */ ;
311
311
  /** @type {__VLS_StyleScopedClasses['border']} */ ;
312
312
  /** @type {__VLS_StyleScopedClasses['border-chat-haze-200']} */ ;
313
+ /** @type {__VLS_StyleScopedClasses['leading-[24px]']} */ ;
313
314
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
314
315
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
315
316
  /** @type {__VLS_StyleScopedClasses['-translate-y-2']} */ ;