@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
@@ -1,164 +0,0 @@
1
- /// <reference types="C:/phonghq/go-chat-v2/node_modules/.vue-global-types/vue_3.5_0.d.ts" />
2
- import { ref, onBeforeUnmount, onMounted } from 'vue';
3
- import ModalBase from '../../components/common/modal/ModalBase.vue';
4
- import ButtonBase from '../../components/common/button/ButtonBase.vue';
5
- import { useModalConfirm } from '../../composable/useModalConfirm';
6
- const { setHandleConfirm } = useModalConfirm();
7
- const confirmPayload = ref(null);
8
- const isVisible = ref(false);
9
- const isResolved = ref(false);
10
- const isOpeningModal = ref(false);
11
- onMounted(() => {
12
- setHandleConfirm(open);
13
- });
14
- onBeforeUnmount(() => { });
15
- const open = (data) => {
16
- if (isOpeningModal.value)
17
- return;
18
- if (!data?.type) {
19
- data.type = 'confirm';
20
- }
21
- confirmPayload.value = data;
22
- isVisible.value = true;
23
- isOpeningModal.value = true;
24
- };
25
- const handleOk = () => {
26
- confirmPayload.value?.resolve('ok');
27
- isResolved.value = true;
28
- isVisible.value = false;
29
- };
30
- const handleCancel = () => {
31
- isVisible.value = false;
32
- };
33
- const handleAfterClose = () => {
34
- if (!isResolved.value)
35
- confirmPayload.value?.reject();
36
- isResolved.value = false;
37
- confirmPayload.value = null;
38
- isOpeningModal.value = false;
39
- };
40
- debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
41
- const __VLS_ctx = {
42
- ...{},
43
- ...{},
44
- };
45
- let __VLS_elements;
46
- let __VLS_components;
47
- let __VLS_directives;
48
- /** @type {[typeof ModalBase, typeof ModalBase, ]} */ ;
49
- // @ts-ignore
50
- const __VLS_0 = __VLS_asFunctionalComponent(ModalBase, new ModalBase({
51
- wrapClassName: "confirm-modal",
52
- open: (__VLS_ctx.isVisible),
53
- width: (652),
54
- title: (__VLS_ctx.confirmPayload?.headerTitle),
55
- showButtonClose: (false),
56
- maskClosable: (false),
57
- footer: (null),
58
- centered: true,
59
- afterClose: (__VLS_ctx.handleAfterClose),
60
- zIndex: (9000),
61
- }));
62
- const __VLS_1 = __VLS_0({
63
- wrapClassName: "confirm-modal",
64
- open: (__VLS_ctx.isVisible),
65
- width: (652),
66
- title: (__VLS_ctx.confirmPayload?.headerTitle),
67
- showButtonClose: (false),
68
- maskClosable: (false),
69
- footer: (null),
70
- centered: true,
71
- afterClose: (__VLS_ctx.handleAfterClose),
72
- zIndex: (9000),
73
- }, ...__VLS_functionalComponentArgsRest(__VLS_0));
74
- var __VLS_3 = {};
75
- const { default: __VLS_4 } = __VLS_2.slots;
76
- // @ts-ignore
77
- [isVisible, confirmPayload, handleAfterClose,];
78
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
79
- ...{ class: "text-center p-8" },
80
- });
81
- __VLS_asFunctionalElement(__VLS_elements.p, __VLS_elements.p)({
82
- ...{ class: "text-lg font-semibold mb-1" },
83
- });
84
- (__VLS_ctx.confirmPayload?.bodyTitle || '');
85
- // @ts-ignore
86
- [confirmPayload,];
87
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
88
- ...{ class: "mb-0" },
89
- });
90
- __VLS_asFunctionalDirective(__VLS_directives.vHtml)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.confirmPayload?.bodyMessage) }, null, null);
91
- // @ts-ignore
92
- [confirmPayload,];
93
- __VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)({
94
- ...{ class: "flex-center gap-4 pb-7 pt-4" },
95
- });
96
- if (__VLS_ctx.confirmPayload?.type === 'confirm') {
97
- // @ts-ignore
98
- [confirmPayload,];
99
- /** @type {[typeof ButtonBase, typeof ButtonBase, ]} */ ;
100
- // @ts-ignore
101
- const __VLS_5 = __VLS_asFunctionalComponent(ButtonBase, new ButtonBase({
102
- ...{ 'onClick': {} },
103
- ...{ class: "min-w-[100px]" },
104
- danger: true,
105
- ghost: true,
106
- type: "danger-outline",
107
- }));
108
- const __VLS_6 = __VLS_5({
109
- ...{ 'onClick': {} },
110
- ...{ class: "min-w-[100px]" },
111
- danger: true,
112
- ghost: true,
113
- type: "danger-outline",
114
- }, ...__VLS_functionalComponentArgsRest(__VLS_5));
115
- let __VLS_8;
116
- let __VLS_9;
117
- const __VLS_10 = ({ click: {} },
118
- { onClick: (__VLS_ctx.handleCancel) });
119
- const { default: __VLS_11 } = __VLS_7.slots;
120
- // @ts-ignore
121
- [handleCancel,];
122
- (__VLS_ctx.confirmPayload?.cancelButtonText || 'No');
123
- // @ts-ignore
124
- [confirmPayload,];
125
- var __VLS_7;
126
- }
127
- /** @type {[typeof ButtonBase, typeof ButtonBase, ]} */ ;
128
- // @ts-ignore
129
- const __VLS_12 = __VLS_asFunctionalComponent(ButtonBase, new ButtonBase({
130
- ...{ 'onClick': {} },
131
- ...{ class: "min-w-[100px]" },
132
- type: ('primary'),
133
- }));
134
- const __VLS_13 = __VLS_12({
135
- ...{ 'onClick': {} },
136
- ...{ class: "min-w-[100px]" },
137
- type: ('primary'),
138
- }, ...__VLS_functionalComponentArgsRest(__VLS_12));
139
- let __VLS_15;
140
- let __VLS_16;
141
- const __VLS_17 = ({ click: {} },
142
- { onClick: (__VLS_ctx.handleOk) });
143
- const { default: __VLS_18 } = __VLS_14.slots;
144
- // @ts-ignore
145
- [handleOk,];
146
- (__VLS_ctx.confirmPayload?.confirmButtonText || 'Yes');
147
- // @ts-ignore
148
- [confirmPayload,];
149
- var __VLS_14;
150
- var __VLS_2;
151
- /** @type {__VLS_StyleScopedClasses['text-center']} */ ;
152
- /** @type {__VLS_StyleScopedClasses['p-8']} */ ;
153
- /** @type {__VLS_StyleScopedClasses['text-lg']} */ ;
154
- /** @type {__VLS_StyleScopedClasses['font-semibold']} */ ;
155
- /** @type {__VLS_StyleScopedClasses['mb-1']} */ ;
156
- /** @type {__VLS_StyleScopedClasses['mb-0']} */ ;
157
- /** @type {__VLS_StyleScopedClasses['flex-center']} */ ;
158
- /** @type {__VLS_StyleScopedClasses['gap-4']} */ ;
159
- /** @type {__VLS_StyleScopedClasses['pb-7']} */ ;
160
- /** @type {__VLS_StyleScopedClasses['pt-4']} */ ;
161
- /** @type {__VLS_StyleScopedClasses['min-w-[100px]']} */ ;
162
- /** @type {__VLS_StyleScopedClasses['min-w-[100px]']} */ ;
163
- const __VLS_export = (await import('vue')).defineComponent({});
164
- export default {};
@@ -1,10 +0,0 @@
1
- import { ref } from 'vue';
2
- export const goChatError = ref('');
3
- export function useError() {
4
- const showError = (error) => {
5
- goChatError.value = error;
6
- };
7
- return {
8
- showError
9
- };
10
- }
@@ -1,39 +0,0 @@
1
- import { ref } from 'vue';
2
- // export type ConfirmPayload = {
3
- // headerTitle?: string
4
- // bodyTitle?: string
5
- // bodyImage?: string
6
- // bodyMessage?: string
7
- // confirmButtonText?: string
8
- // cancelButtonText?: string
9
- // timeOut?: number //seconds
10
- // type?: 'confirm' | 'information'
11
- // }
12
- //
13
- // export type ConfirmPayloadPromise = AddPromise<ConfirmPayload>
14
- const handleConfirm = ref(null);
15
- function setHandleConfirm(callback) {
16
- handleConfirm.value = callback;
17
- }
18
- export function useModalConfirm() {
19
- function setHandleConfirm(callback) {
20
- handleConfirm.value = callback;
21
- }
22
- function modalConfirm(data) {
23
- return new Promise((resolve, reject) => {
24
- if (handleConfirm.value == null) {
25
- reject('Modal is not already active');
26
- return;
27
- }
28
- handleConfirm.value({
29
- ...data,
30
- resolve,
31
- reject
32
- });
33
- });
34
- }
35
- return {
36
- setHandleConfirm,
37
- modalConfirm
38
- };
39
- }