@phonghq/go-chat 1.0.32 → 1.0.34

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.
@@ -35,18 +35,24 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
35
35
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
36
36
  ...{ class: "flex items-center gap-2" },
37
37
  });
38
- __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
39
- ...{ onClick: (...[$event]) => {
40
- __VLS_ctx.emit('back');
41
- // @ts-ignore
42
- [emit,];
43
- } },
44
- ...{ class: "shrink-0 flex items-center" },
45
- });
46
- /** @type {[typeof IconArrowLeft, ]} */ ;
47
- // @ts-ignore
48
- const __VLS_0 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
49
- const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
38
+ if (__VLS_ctx.responsive == 'mobile') {
39
+ // @ts-ignore
40
+ [responsive,];
41
+ __VLS_asFunctionalElement(__VLS_elements.button, __VLS_elements.button)({
42
+ ...{ onClick: (...[$event]) => {
43
+ if (!(__VLS_ctx.responsive == 'mobile'))
44
+ return;
45
+ __VLS_ctx.emit('back');
46
+ // @ts-ignore
47
+ [emit,];
48
+ } },
49
+ ...{ class: "shrink-0 flex items-center" },
50
+ });
51
+ /** @type {[typeof IconArrowLeft, ]} */ ;
52
+ // @ts-ignore
53
+ const __VLS_0 = __VLS_asFunctionalComponent(IconArrowLeft, new IconArrowLeft({}));
54
+ const __VLS_1 = __VLS_0({}, ...__VLS_functionalComponentArgsRest(__VLS_0));
55
+ }
50
56
  /** @type {[typeof Avatar, ]} */ ;
51
57
  // @ts-ignore
52
58
  const __VLS_4 = __VLS_asFunctionalComponent(Avatar, new Avatar({
@@ -36,7 +36,6 @@ const isPhoneMatchDial = (countryDial, phone) => {
36
36
  };
37
37
  const onSubmit = async () => {
38
38
  try {
39
- console.log(isPhoneMatchDial(selected.value.dial, phoneValue.value));
40
39
  if (!nameValue.value) {
41
40
  error.value = `Business name is required.`;
42
41
  return;
@@ -77,10 +76,13 @@ __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
77
76
  ...{ class: "mx-auto w-full h-full max-w-[700px] flex flex-col gap-4 justify-center px-5" },
78
77
  });
79
78
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
80
- ...{ class: "flex gap-4" },
79
+ ...{ class: " mb-2" },
81
80
  });
82
81
  __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
83
- ...{ class: "text-3xl md:text-3xl text-chat-haze-800 font-bold text-center mb-2" },
82
+ ...{ class: "text-3xl md:text-3xl text-chat-haze-800 font-bold text-center" },
83
+ });
84
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
85
+ ...{ class: "italic text-lg text-center" },
84
86
  });
85
87
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({});
86
88
  __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
@@ -155,11 +157,14 @@ __VLS_asFunctionalElement(__VLS_elements.input)({
155
157
  (__VLS_ctx.phoneValue);
156
158
  // @ts-ignore
157
159
  [handleInput, phoneValue,];
160
+ __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
161
+ ...{ class: "italic text-base text-chat-haze-500" },
162
+ });
158
163
  __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
159
164
  ...{ class: "relative" },
160
165
  });
161
166
  __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
162
- ...{ class: "text-chat-error absolute -top-4 left-4" },
167
+ ...{ class: "text-chat-error absolute -top-4 left-0" },
163
168
  });
164
169
  __VLS_asFunctionalDirective(__VLS_directives.vShow)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.error) }, null, null);
165
170
  // @ts-ignore
@@ -176,13 +181,13 @@ const __VLS_4 = __VLS_asFunctionalComponent(ButtonBase, new ButtonBase({
176
181
  ...{ 'onClick': {} },
177
182
  loading: (__VLS_ctx.loading),
178
183
  type: "primary",
179
- ...{ class: "w-[150px] h-12 font-medium" },
184
+ ...{ class: "w-[230px] h-12 font-medium" },
180
185
  }));
181
186
  const __VLS_5 = __VLS_4({
182
187
  ...{ 'onClick': {} },
183
188
  loading: (__VLS_ctx.loading),
184
189
  type: "primary",
185
- ...{ class: "w-[150px] h-12 font-medium" },
190
+ ...{ class: "w-[230px] h-12 font-medium" },
186
191
  }, ...__VLS_functionalComponentArgsRest(__VLS_4));
187
192
  let __VLS_7;
188
193
  let __VLS_8;
@@ -203,14 +208,15 @@ var __VLS_6;
203
208
  /** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
204
209
  /** @type {__VLS_StyleScopedClasses['justify-center']} */ ;
205
210
  /** @type {__VLS_StyleScopedClasses['px-5']} */ ;
206
- /** @type {__VLS_StyleScopedClasses['flex']} */ ;
207
- /** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
211
+ /** @type {__VLS_StyleScopedClasses['mb-2']} */ ;
208
212
  /** @type {__VLS_StyleScopedClasses['text-3xl']} */ ;
209
213
  /** @type {__VLS_StyleScopedClasses['md:text-3xl']} */ ;
210
214
  /** @type {__VLS_StyleScopedClasses['text-chat-haze-800']} */ ;
211
215
  /** @type {__VLS_StyleScopedClasses['font-bold']} */ ;
212
216
  /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
213
- /** @type {__VLS_StyleScopedClasses['mb-2']} */ ;
217
+ /** @type {__VLS_StyleScopedClasses['italic']} */ ;
218
+ /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
219
+ /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
214
220
  /** @type {__VLS_StyleScopedClasses['text-xl']} */ ;
215
221
  /** @type {__VLS_StyleScopedClasses['text-left']} */ ;
216
222
  /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
@@ -254,14 +260,17 @@ var __VLS_6;
254
260
  /** @type {__VLS_StyleScopedClasses['h-4']} */ ;
255
261
  /** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
256
262
  /** @type {__VLS_StyleScopedClasses['!outline-none']} */ ;
263
+ /** @type {__VLS_StyleScopedClasses['italic']} */ ;
264
+ /** @type {__VLS_StyleScopedClasses['text-base']} */ ;
265
+ /** @type {__VLS_StyleScopedClasses['text-chat-haze-500']} */ ;
257
266
  /** @type {__VLS_StyleScopedClasses['relative']} */ ;
258
267
  /** @type {__VLS_StyleScopedClasses['text-chat-error']} */ ;
259
268
  /** @type {__VLS_StyleScopedClasses['absolute']} */ ;
260
269
  /** @type {__VLS_StyleScopedClasses['-top-4']} */ ;
261
- /** @type {__VLS_StyleScopedClasses['left-4']} */ ;
270
+ /** @type {__VLS_StyleScopedClasses['left-0']} */ ;
262
271
  /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
263
272
  /** @type {__VLS_StyleScopedClasses['mt-2']} */ ;
264
- /** @type {__VLS_StyleScopedClasses['w-[150px]']} */ ;
273
+ /** @type {__VLS_StyleScopedClasses['w-[230px]']} */ ;
265
274
  /** @type {__VLS_StyleScopedClasses['h-12']} */ ;
266
275
  /** @type {__VLS_StyleScopedClasses['font-medium']} */ ;
267
276
  const __VLS_export = (await import('vue')).defineComponent({});
@@ -37,9 +37,12 @@ export function usePlivo(callback) {
37
37
  plivoBrowserSdk?.client?.on?.('onLoginFailed', (e) => handleLoginFailed(e));
38
38
  // plivoBrowserSdk?.client?.on?.('remoteAudioStatus', () => console.log('remoteAudioStatus'))
39
39
  const payload = JSON.parse(atob(token.split('.')[1]));
40
- // await plivoBrowserSdk?.client?.tokenLogin(username, token)
40
+ console.log(payload);
41
+ // await plivoBrowserSdk?.client?.tokenLogin(payload.sub ?? '', token)
41
42
  // await plivoBrowserSdk?.client?.login('webcall003079673454891827', '123456abcA!')
43
+ // await plivoBrowserSdk?.client?.login(payload.sub , null, token)
42
44
  await plivoBrowserSdk?.client?.loginWithAccessToken(token);
45
+ // await plivoBrowserSdk?.client?.on?.(payload)
43
46
  // console.log('Registered with token')
44
47
  }
45
48
  catch (err) {
@@ -43,9 +43,9 @@ export const checkTenantPhone = async () => {
43
43
  const res = await axios.get(`/api/v1/message/tenant/get-info?tenant_name=${id}`);
44
44
  if (res.error || !res?.data)
45
45
  throw new Error(res.error);
46
- // if(dataProfile.value) dataProfile.value.tenant_phone = res?.data?.go_chat_phone ?? ''
47
46
  if (dataProfile.value)
48
- dataProfile.value.tenant_phone = '';
47
+ dataProfile.value.tenant_phone = res?.data?.go_chat_phone ?? '';
48
+ // if(dataProfile.value) dataProfile.value.tenant_phone = ''
49
49
  if (dataProfile.value)
50
50
  dataProfile.value.tenant_phone_limit = Number(res?.data?.go_chat_phone_limit ?? 0);
51
51
  return res;
@@ -53,7 +53,6 @@ export const checkTenantPhone = async () => {
53
53
  export const submitTenantPhone = async (body) => {
54
54
  const res = await axios.post('/api/v1/message/tenant/update-phone', body);
55
55
  dataLoginLink.value = res;
56
- console.log(res);
57
56
  return res;
58
57
  };
59
58
  export const logout = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phonghq/go-chat",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"