@phonghq/go-chat 1.0.54 → 1.0.56

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.
@@ -189,6 +189,10 @@ const handleReadMessage = () => {
189
189
  const handleOpenPhoneNumpad = () => {
190
190
  phoneNumpadRef.value?.openPhoneNumpad();
191
191
  };
192
+ const handleCloseBtn = () => {
193
+ emit('close');
194
+ phoneNumpadRef.value?.closePhoneNumpad();
195
+ };
192
196
  let __VLS_exposed;
193
197
  defineExpose({
194
198
  get unreadCount() {
@@ -209,6 +213,7 @@ defineExpose({
209
213
  endCall: () => callingRef.value?.endCall(),
210
214
  openSettings,
211
215
  initData: (data) => handleExposeInit(data),
216
+ closePhoneNumpad: () => phoneNumpadRef.value?.closePhoneNumpad(),
212
217
  });
213
218
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
214
219
  const __VLS_defaults = {
@@ -391,8 +396,11 @@ else {
391
396
  ...{ class: "grow relative flex flex-col mx-auto w-full h-full bg-[#F9FAFC] overflow-hidden chat-mobile pt-4" },
392
397
  });
393
398
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
394
- ...{ class: "text-[#141B34] px-6 shrink-0" },
399
+ ...{ class: "text-[#141B34] shrink-0" },
400
+ ...{ class: (__VLS_ctx.responsiveRender == 'mobile' ? 'px-4' : 'px-6') },
395
401
  });
402
+ // @ts-ignore
403
+ [responsiveRender,];
396
404
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
397
405
  ...{ class: "flex items-center justify-between" },
398
406
  });
@@ -477,9 +485,9 @@ else {
477
485
  return;
478
486
  if (!(props.isLib))
479
487
  return;
480
- __VLS_ctx.emit('close');
488
+ __VLS_ctx.handleCloseBtn();
481
489
  // @ts-ignore
482
- [emit,];
490
+ [handleCloseBtn,];
483
491
  } },
484
492
  ...{ class: "w-10 h-10" },
485
493
  });
@@ -866,7 +874,6 @@ else {
866
874
  /** @type {__VLS_StyleScopedClasses['chat-mobile']} */ ;
867
875
  /** @type {__VLS_StyleScopedClasses['pt-4']} */ ;
868
876
  /** @type {__VLS_StyleScopedClasses['text-[#141B34]']} */ ;
869
- /** @type {__VLS_StyleScopedClasses['px-6']} */ ;
870
877
  /** @type {__VLS_StyleScopedClasses['shrink-0']} */ ;
871
878
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
872
879
  /** @type {__VLS_StyleScopedClasses['items-center']} */ ;
@@ -112,7 +112,8 @@ const getAllList = async (tab_value) => {
112
112
  }
113
113
  }
114
114
  else if (tab_value == TAB_VALUE.UNKNOWN) {
115
- while (paramsUnknown.value.page < pageCountUnknown.value && !scrollEventRef.value?.canScroll()) {
115
+ while (paramsUnknown.value.page < pageCountUnknown.value &&
116
+ !scrollEventRef.value?.canScroll()) {
116
117
  let page = paramsUnknown.value.page + 1;
117
118
  await getData({ page }, { tab: tab_value });
118
119
  }
@@ -303,14 +304,18 @@ const __VLS_18 = __VLS_asFunctionalComponent(ScrollEvent, new ScrollEvent({
303
304
  ...{ 'onGetDataBottom': {} },
304
305
  ref: "scrollEventRef",
305
306
  ...{ class: "h-full overflow-auto" },
306
- disabled: (__VLS_ctx.activeTabs == __VLS_ctx.TAB_VALUE.ALL ? __VLS_ctx.paramsAll.page >= __VLS_ctx.pageCountAll : __VLS_ctx.paramsUnknown.page >= __VLS_ctx.pageCountUnknown),
307
+ disabled: (__VLS_ctx.activeTabs == __VLS_ctx.TAB_VALUE.ALL
308
+ ? __VLS_ctx.paramsAll.page >= __VLS_ctx.pageCountAll
309
+ : __VLS_ctx.paramsUnknown.page >= __VLS_ctx.pageCountUnknown),
307
310
  bottom: true,
308
311
  }));
309
312
  const __VLS_19 = __VLS_18({
310
313
  ...{ 'onGetDataBottom': {} },
311
314
  ref: "scrollEventRef",
312
315
  ...{ class: "h-full overflow-auto" },
313
- disabled: (__VLS_ctx.activeTabs == __VLS_ctx.TAB_VALUE.ALL ? __VLS_ctx.paramsAll.page >= __VLS_ctx.pageCountAll : __VLS_ctx.paramsUnknown.page >= __VLS_ctx.pageCountUnknown),
316
+ disabled: (__VLS_ctx.activeTabs == __VLS_ctx.TAB_VALUE.ALL
317
+ ? __VLS_ctx.paramsAll.page >= __VLS_ctx.pageCountAll
318
+ : __VLS_ctx.paramsUnknown.page >= __VLS_ctx.pageCountUnknown),
314
319
  bottom: true,
315
320
  }, ...__VLS_functionalComponentArgsRest(__VLS_18));
316
321
  let __VLS_21;
@@ -138,7 +138,7 @@ 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-[280px] text-left w-max" },
141
+ ...{ class: "px-3 py-2 rounded-2xl text-left w-max" },
142
142
  ...{ class: ({
143
143
  'rounded-tl-[6px]': !__VLS_ctx.isChatStart && !__VLS_ctx.isMyMessage,
144
144
  'rounded-bl-[6px]': !__VLS_ctx.isChatFinished && !__VLS_ctx.isMyMessage,
@@ -147,12 +147,14 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
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
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
+ 'ml-auto': __VLS_ctx.isMyMessage,
151
+ 'mr-auto': !__VLS_ctx.isMyMessage,
152
+ 'max-w-[280px]': __VLS_ctx.responsive == 'mobile',
153
+ 'max-w-[480px]': __VLS_ctx.responsive !== 'mobile',
152
154
  }) },
153
155
  });
154
156
  // @ts-ignore
155
- [isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, message, message, message, message, message, isChatStart, isChatStart, isChatFinished, isChatFinished,];
157
+ [isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, isMyMessage, message, message, message, message, message, responsive, responsive, isChatStart, isChatStart, isChatFinished, isChatFinished,];
156
158
  if (__VLS_ctx.message.is_call == 1) {
157
159
  // @ts-ignore
158
160
  [message,];
@@ -288,7 +290,6 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
288
290
  /** @type {__VLS_StyleScopedClasses['px-3']} */ ;
289
291
  /** @type {__VLS_StyleScopedClasses['py-2']} */ ;
290
292
  /** @type {__VLS_StyleScopedClasses['rounded-2xl']} */ ;
291
- /** @type {__VLS_StyleScopedClasses['max-w-[280px]']} */ ;
292
293
  /** @type {__VLS_StyleScopedClasses['text-left']} */ ;
293
294
  /** @type {__VLS_StyleScopedClasses['w-max']} */ ;
294
295
  /** @type {__VLS_StyleScopedClasses['rounded-tl-[6px]']} */ ;
@@ -303,6 +304,8 @@ if (__VLS_ctx.message.state != __VLS_ctx.MessageState.Sending || __VLS_ctx.isMyM
303
304
  /** @type {__VLS_StyleScopedClasses['text-chat-haze-600']} */ ;
304
305
  /** @type {__VLS_StyleScopedClasses['ml-auto']} */ ;
305
306
  /** @type {__VLS_StyleScopedClasses['mr-auto']} */ ;
307
+ /** @type {__VLS_StyleScopedClasses['max-w-[280px]']} */ ;
308
+ /** @type {__VLS_StyleScopedClasses['max-w-[480px]']} */ ;
306
309
  /** @type {__VLS_StyleScopedClasses['flex']} */ ;
307
310
  /** @type {__VLS_StyleScopedClasses['flex-col']} */ ;
308
311
  /** @type {__VLS_StyleScopedClasses['gap-2']} */ ;
@@ -7,6 +7,7 @@ type KeyPadProps = {
7
7
  };
8
8
  declare const _default: import("vue").DefineComponent<KeyPadProps, {
9
9
  openPhoneNumpad: () => void;
10
+ closePhoneNumpad: () => void;
10
11
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
11
12
  call: (data: IResUser) => any;
12
13
  "error:noPhoneTenant": () => any;
@@ -10,10 +10,14 @@ const openPhoneNumpad = () => {
10
10
  phoneNumpadRef.value?.reset();
11
11
  drawerVisibleRef.value?.open();
12
12
  };
13
+ const closePhoneNumpad = () => {
14
+ phoneNumpadRef.value?.reset();
15
+ drawerVisibleRef.value?.close();
16
+ };
13
17
  const handleCall = (data) => {
14
18
  emit('call', data);
15
19
  };
16
- const __VLS_exposed = { openPhoneNumpad };
20
+ const __VLS_exposed = { openPhoneNumpad, closePhoneNumpad };
17
21
  defineExpose(__VLS_exposed);
18
22
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
19
23
  const __VLS_defaults = {};