@uzum-tech/ui 1.9.0 → 1.10.0
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.
- package/dist/index.js +5789 -1014
- package/dist/index.prod.js +12 -3
- package/es/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +1 -1
- package/es/chat/index.d.ts +1 -1
- package/es/chat/src/Chat.d.ts +233 -11
- package/es/chat/src/Chat.js +73 -22
- package/es/chat/src/ChatParts/ChatAttachment.js +14 -12
- package/es/chat/src/ChatParts/MainArea.d.ts +1 -0
- package/es/chat/src/ChatParts/MainArea.js +95 -57
- package/es/chat/src/ChatParts/Sidebar.d.ts +920 -0
- package/es/chat/src/ChatParts/Sidebar.js +63 -12
- package/es/chat/src/interface.d.ts +24 -3
- package/es/chat/src/styles/index.cssr.js +13 -2
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/crop/index.d.ts +3 -0
- package/es/crop/index.js +1 -0
- package/es/crop/src/Crop.d.ts +222 -0
- package/es/crop/src/Crop.js +157 -0
- package/es/crop/src/interface.d.ts +6 -0
- package/es/crop/src/interface.js +7 -0
- package/es/crop/src/styles/index.cssr.d.ts +2 -0
- package/es/crop/src/styles/index.cssr.js +333 -0
- package/es/crop/styles/_common.d.ts +4 -0
- package/es/crop/styles/_common.js +3 -0
- package/es/crop/styles/dark.d.ts +3 -0
- package/es/crop/styles/dark.js +9 -0
- package/es/crop/styles/index.d.ts +3 -0
- package/es/crop/styles/index.js +2 -0
- package/es/crop/styles/light.d.ts +14 -0
- package/es/crop/styles/light.js +14 -0
- package/es/date-picker/src/DatePicker.d.ts +1308 -43
- package/es/date-picker/src/DatePicker.js +54 -29
- package/es/date-picker/src/interface.d.ts +1 -0
- package/es/date-picker/src/panel/date.d.ts +141 -0
- package/es/date-picker/src/panel/daterange.d.ts +141 -0
- package/es/date-picker/src/panel/datetime.d.ts +141 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +141 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +283 -1
- package/es/date-picker/src/panel/panelMonthContent.d.ts +141 -0
- package/es/date-picker/src/panel/panelYear.d.ts +283 -1
- package/es/date-picker/src/panel/panelYearContent.d.ts +141 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +141 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +141 -0
- package/es/date-picker/styles/dark.js +3 -1
- package/es/date-picker/styles/light.d.ts +123 -0
- package/es/date-picker/styles/light.js +3 -1
- package/es/descriptions/src/Descriptions.d.ts +30 -0
- package/es/descriptions/src/Descriptions.js +18 -10
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/es/dynamic-tags/styles/light.d.ts +3 -0
- package/es/infinite-scroll/src/InfiniteScroll.js +3 -6
- package/es/input/src/Input.d.ts +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +1 -1
- package/es/locales/common/arDZ.js +2 -0
- package/es/locales/common/deDE.js +2 -0
- package/es/locales/common/enGB.js +2 -0
- package/es/locales/common/enUS.d.ts +2 -0
- package/es/locales/common/enUS.js +2 -0
- package/es/locales/common/eo.js +2 -0
- package/es/locales/common/esAR.js +2 -0
- package/es/locales/common/faIR.js +2 -0
- package/es/locales/common/frFR.js +2 -0
- package/es/locales/common/idID.js +2 -0
- package/es/locales/common/itIT.js +2 -0
- package/es/locales/common/jaJP.js +2 -0
- package/es/locales/common/koKR.js +2 -0
- package/es/locales/common/nbNO.js +2 -0
- package/es/locales/common/nlNL.js +2 -0
- package/es/locales/common/plPL.js +2 -0
- package/es/locales/common/ptBR.js +2 -0
- package/es/locales/common/ruRU.js +2 -0
- package/es/locales/common/skSK.js +2 -0
- package/es/locales/common/svSE.js +2 -0
- package/es/locales/common/thTH.js +2 -0
- package/es/locales/common/trTR.js +2 -0
- package/es/locales/common/ukUA.js +2 -0
- package/es/locales/common/viVN.js +2 -0
- package/es/locales/common/zhCN.js +2 -0
- package/es/locales/common/zhTW.js +2 -0
- package/es/modal-fullscreen/index.d.ts +2 -0
- package/es/modal-fullscreen/index.js +1 -0
- package/es/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/es/modal-fullscreen/src/ModalFull.js +250 -0
- package/es/modal-fullscreen/src/interface.d.ts +0 -0
- package/es/modal-fullscreen/src/interface.js +1 -0
- package/es/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/es/modal-fullscreen/src/styles/index.cssr.js +85 -0
- package/es/modal-fullscreen/styles/_common.d.ts +12 -0
- package/es/modal-fullscreen/styles/_common.js +11 -0
- package/es/modal-fullscreen/styles/dark.d.ts +3 -0
- package/es/modal-fullscreen/styles/dark.js +14 -0
- package/es/modal-fullscreen/styles/index.d.ts +3 -0
- package/es/modal-fullscreen/styles/index.js +2 -0
- package/es/modal-fullscreen/styles/light.d.ts +100 -0
- package/es/modal-fullscreen/styles/light.js +19 -0
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/select/src/Select.d.ts +1 -1
- package/es/slider/src/Slider.d.ts +1 -1
- package/es/switch/src/Switch.d.ts +1 -1
- package/es/tag/index.d.ts +2 -0
- package/es/tag/index.js +1 -0
- package/es/tag/src/Tag.d.ts +40 -0
- package/es/tag/src/Tag.js +3 -0
- package/es/tag/src/TagGroup.d.ts +644 -0
- package/es/tag/src/TagGroup.js +109 -0
- package/es/tag/src/styles/index.cssr.d.ts +1 -0
- package/es/tag/src/styles/index.cssr.js +8 -1
- package/es/tag/styles/light.d.ts +3 -0
- package/es/tag/styles/light.js +5 -0
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +1 -1
- package/es/virtual-list/index.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +1 -1
- package/lib/chat/index.d.ts +1 -1
- package/lib/chat/src/Chat.d.ts +233 -11
- package/lib/chat/src/Chat.js +73 -22
- package/lib/chat/src/ChatParts/ChatAttachment.js +14 -12
- package/lib/chat/src/ChatParts/MainArea.d.ts +1 -0
- package/lib/chat/src/ChatParts/MainArea.js +94 -56
- package/lib/chat/src/ChatParts/Sidebar.d.ts +920 -0
- package/lib/chat/src/ChatParts/Sidebar.js +62 -11
- package/lib/chat/src/interface.d.ts +24 -3
- package/lib/chat/src/styles/index.cssr.js +13 -2
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/crop/index.d.ts +3 -0
- package/lib/crop/index.js +9 -0
- package/lib/crop/src/Crop.d.ts +222 -0
- package/lib/crop/src/Crop.js +163 -0
- package/lib/crop/src/interface.d.ts +6 -0
- package/lib/crop/src/interface.js +10 -0
- package/lib/crop/src/styles/index.cssr.d.ts +2 -0
- package/lib/crop/src/styles/index.cssr.js +338 -0
- package/lib/crop/styles/_common.d.ts +4 -0
- package/lib/crop/styles/_common.js +5 -0
- package/lib/crop/styles/dark.d.ts +3 -0
- package/lib/crop/styles/dark.js +11 -0
- package/lib/crop/styles/index.d.ts +3 -0
- package/lib/crop/styles/index.js +10 -0
- package/lib/crop/styles/light.d.ts +14 -0
- package/lib/crop/styles/light.js +21 -0
- package/lib/date-picker/src/DatePicker.d.ts +1308 -43
- package/lib/date-picker/src/DatePicker.js +53 -28
- package/lib/date-picker/src/interface.d.ts +1 -0
- package/lib/date-picker/src/panel/date.d.ts +141 -0
- package/lib/date-picker/src/panel/daterange.d.ts +141 -0
- package/lib/date-picker/src/panel/datetime.d.ts +141 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +141 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +283 -1
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +141 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +283 -1
- package/lib/date-picker/src/panel/panelYearContent.d.ts +141 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +141 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +141 -0
- package/lib/date-picker/styles/dark.js +3 -1
- package/lib/date-picker/styles/light.d.ts +123 -0
- package/lib/date-picker/styles/light.js +3 -1
- package/lib/descriptions/src/Descriptions.d.ts +30 -0
- package/lib/descriptions/src/Descriptions.js +18 -10
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/lib/dynamic-tags/styles/light.d.ts +3 -0
- package/lib/infinite-scroll/src/InfiniteScroll.js +3 -6
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +1 -1
- package/lib/locales/common/arDZ.js +2 -0
- package/lib/locales/common/deDE.js +2 -0
- package/lib/locales/common/enGB.js +2 -0
- package/lib/locales/common/enUS.d.ts +2 -0
- package/lib/locales/common/enUS.js +2 -0
- package/lib/locales/common/eo.js +2 -0
- package/lib/locales/common/esAR.js +2 -0
- package/lib/locales/common/faIR.js +2 -0
- package/lib/locales/common/frFR.js +2 -0
- package/lib/locales/common/idID.js +2 -0
- package/lib/locales/common/itIT.js +2 -0
- package/lib/locales/common/jaJP.js +2 -0
- package/lib/locales/common/koKR.js +2 -0
- package/lib/locales/common/nbNO.js +2 -0
- package/lib/locales/common/nlNL.js +2 -0
- package/lib/locales/common/plPL.js +2 -0
- package/lib/locales/common/ptBR.js +2 -0
- package/lib/locales/common/ruRU.js +2 -0
- package/lib/locales/common/skSK.js +2 -0
- package/lib/locales/common/svSE.js +2 -0
- package/lib/locales/common/thTH.js +2 -0
- package/lib/locales/common/trTR.js +2 -0
- package/lib/locales/common/ukUA.js +2 -0
- package/lib/locales/common/viVN.js +2 -0
- package/lib/locales/common/zhCN.js +2 -0
- package/lib/locales/common/zhTW.js +2 -0
- package/lib/modal-fullscreen/index.d.ts +2 -0
- package/lib/modal-fullscreen/index.js +9 -0
- package/lib/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/lib/modal-fullscreen/src/ModalFull.js +256 -0
- package/lib/modal-fullscreen/src/interface.d.ts +0 -0
- package/lib/modal-fullscreen/src/interface.js +1 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.js +90 -0
- package/lib/modal-fullscreen/styles/_common.d.ts +12 -0
- package/lib/modal-fullscreen/styles/_common.js +13 -0
- package/lib/modal-fullscreen/styles/dark.d.ts +3 -0
- package/lib/modal-fullscreen/styles/dark.js +16 -0
- package/lib/modal-fullscreen/styles/index.d.ts +3 -0
- package/lib/modal-fullscreen/styles/index.js +10 -0
- package/lib/modal-fullscreen/styles/light.d.ts +100 -0
- package/lib/modal-fullscreen/styles/light.js +26 -0
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/slider/src/Slider.d.ts +1 -1
- package/lib/switch/src/Switch.d.ts +1 -1
- package/lib/tag/index.d.ts +2 -0
- package/lib/tag/index.js +3 -1
- package/lib/tag/src/Tag.d.ts +40 -0
- package/lib/tag/src/Tag.js +3 -0
- package/lib/tag/src/TagGroup.d.ts +644 -0
- package/lib/tag/src/TagGroup.js +112 -0
- package/lib/tag/src/styles/index.cssr.d.ts +1 -0
- package/lib/tag/src/styles/index.cssr.js +9 -1
- package/lib/tag/styles/light.d.ts +3 -0
- package/lib/tag/styles/light.js +5 -0
- package/lib/themes/dark.js +5 -1
- package/lib/themes/light.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +1 -1
- package/lib/virtual-list/index.js +2 -2
- package/package.json +4 -3
- package/volar.d.ts +4 -0
- package/web-types.json +472 -4
package/lib/chat/src/Chat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
import { type ChatProps as ChatPropsInterface, type ChatListItemData, type ChatMessageData } from './interface';
|
|
2
|
+
import { type ChatProps as ChatPropsInterface, type ChatListItemData, type ChatMessageData, type ChatId } from './interface';
|
|
3
3
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
4
4
|
type ChatPropsType = ChatPropsInterface;
|
|
5
5
|
export declare const chatProps: {
|
|
@@ -67,6 +67,26 @@ export declare const chatProps: {
|
|
|
67
67
|
type: PropType<Partial<ChatPropsType["headerIconProps"]>>;
|
|
68
68
|
default: undefined;
|
|
69
69
|
};
|
|
70
|
+
headerShareButtonProps: {
|
|
71
|
+
type: PropType<Partial<ChatPropsType["headerShareButtonProps"]>>;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
headerProfileButtonProps: {
|
|
75
|
+
type: PropType<Partial<ChatPropsType["headerProfileButtonProps"]>>;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
78
|
+
headerCloseButtonProps: {
|
|
79
|
+
type: PropType<Partial<ChatPropsType["headerCloseButtonProps"]>>;
|
|
80
|
+
default: undefined;
|
|
81
|
+
};
|
|
82
|
+
headerShareIconProps: {
|
|
83
|
+
type: PropType<Partial<ChatPropsType["headerShareIconProps"]>>;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
headerProfileIconProps: {
|
|
87
|
+
type: PropType<Partial<ChatPropsType["headerProfileIconProps"]>>;
|
|
88
|
+
default: undefined;
|
|
89
|
+
};
|
|
70
90
|
messageSenderAvatarProps: {
|
|
71
91
|
type: PropType<Partial<ChatPropsType["messageSenderAvatarProps"]>>;
|
|
72
92
|
default: undefined;
|
|
@@ -115,6 +135,14 @@ export declare const chatProps: {
|
|
|
115
135
|
type: PropType<ChatPropsType["closeButtonText"]>;
|
|
116
136
|
default: undefined;
|
|
117
137
|
};
|
|
138
|
+
shareButtonTooltip: {
|
|
139
|
+
type: PropType<ChatPropsType["shareButtonTooltip"]>;
|
|
140
|
+
default: undefined;
|
|
141
|
+
};
|
|
142
|
+
profileButtonTooltip: {
|
|
143
|
+
type: PropType<ChatPropsType["profileButtonTooltip"]>;
|
|
144
|
+
default: undefined;
|
|
145
|
+
};
|
|
118
146
|
unreadNotificationText: {
|
|
119
147
|
type: PropType<ChatPropsType["unreadNotificationText"]>;
|
|
120
148
|
default: undefined;
|
|
@@ -167,8 +195,8 @@ export declare const chatProps: {
|
|
|
167
195
|
type: PropType<ChatPropsType["onFilterChange"]>;
|
|
168
196
|
default: undefined;
|
|
169
197
|
};
|
|
170
|
-
|
|
171
|
-
type: PropType<
|
|
198
|
+
onFooterInputChange: {
|
|
199
|
+
type: PropType<(value: string, chatId: ChatId) => void>;
|
|
172
200
|
default: undefined;
|
|
173
201
|
};
|
|
174
202
|
onNetworkError: {
|
|
@@ -183,6 +211,22 @@ export declare const chatProps: {
|
|
|
183
211
|
type: PropType<ChatPropsType["onSendError"]>;
|
|
184
212
|
default: undefined;
|
|
185
213
|
};
|
|
214
|
+
onChatItemsScrollToTop: {
|
|
215
|
+
type: PropType<() => void>;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
onChatItemsScrollToBottom: {
|
|
219
|
+
type: PropType<() => void>;
|
|
220
|
+
default: undefined;
|
|
221
|
+
};
|
|
222
|
+
onMessagesScrollToTop: {
|
|
223
|
+
type: PropType<() => void>;
|
|
224
|
+
default: undefined;
|
|
225
|
+
};
|
|
226
|
+
onMessagesScrollToBottom: {
|
|
227
|
+
type: PropType<() => void>;
|
|
228
|
+
default: undefined;
|
|
229
|
+
};
|
|
186
230
|
theme: PropType<import("../../_mixins").Theme<"Chat", {
|
|
187
231
|
backgroundColor: string;
|
|
188
232
|
borderColor: string;
|
|
@@ -2245,6 +2289,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2245
2289
|
type: PropType<Partial<ChatPropsType["headerIconProps"]>>;
|
|
2246
2290
|
default: undefined;
|
|
2247
2291
|
};
|
|
2292
|
+
headerShareButtonProps: {
|
|
2293
|
+
type: PropType<Partial<ChatPropsType["headerShareButtonProps"]>>;
|
|
2294
|
+
default: undefined;
|
|
2295
|
+
};
|
|
2296
|
+
headerProfileButtonProps: {
|
|
2297
|
+
type: PropType<Partial<ChatPropsType["headerProfileButtonProps"]>>;
|
|
2298
|
+
default: undefined;
|
|
2299
|
+
};
|
|
2300
|
+
headerCloseButtonProps: {
|
|
2301
|
+
type: PropType<Partial<ChatPropsType["headerCloseButtonProps"]>>;
|
|
2302
|
+
default: undefined;
|
|
2303
|
+
};
|
|
2304
|
+
headerShareIconProps: {
|
|
2305
|
+
type: PropType<Partial<ChatPropsType["headerShareIconProps"]>>;
|
|
2306
|
+
default: undefined;
|
|
2307
|
+
};
|
|
2308
|
+
headerProfileIconProps: {
|
|
2309
|
+
type: PropType<Partial<ChatPropsType["headerProfileIconProps"]>>;
|
|
2310
|
+
default: undefined;
|
|
2311
|
+
};
|
|
2248
2312
|
messageSenderAvatarProps: {
|
|
2249
2313
|
type: PropType<Partial<ChatPropsType["messageSenderAvatarProps"]>>;
|
|
2250
2314
|
default: undefined;
|
|
@@ -2293,6 +2357,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2293
2357
|
type: PropType<ChatPropsType["closeButtonText"]>;
|
|
2294
2358
|
default: undefined;
|
|
2295
2359
|
};
|
|
2360
|
+
shareButtonTooltip: {
|
|
2361
|
+
type: PropType<ChatPropsType["shareButtonTooltip"]>;
|
|
2362
|
+
default: undefined;
|
|
2363
|
+
};
|
|
2364
|
+
profileButtonTooltip: {
|
|
2365
|
+
type: PropType<ChatPropsType["profileButtonTooltip"]>;
|
|
2366
|
+
default: undefined;
|
|
2367
|
+
};
|
|
2296
2368
|
unreadNotificationText: {
|
|
2297
2369
|
type: PropType<ChatPropsType["unreadNotificationText"]>;
|
|
2298
2370
|
default: undefined;
|
|
@@ -2345,8 +2417,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2345
2417
|
type: PropType<ChatPropsType["onFilterChange"]>;
|
|
2346
2418
|
default: undefined;
|
|
2347
2419
|
};
|
|
2348
|
-
|
|
2349
|
-
type: PropType<
|
|
2420
|
+
onFooterInputChange: {
|
|
2421
|
+
type: PropType<(value: string, chatId: ChatId) => void>;
|
|
2350
2422
|
default: undefined;
|
|
2351
2423
|
};
|
|
2352
2424
|
onNetworkError: {
|
|
@@ -2361,6 +2433,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2361
2433
|
type: PropType<ChatPropsType["onSendError"]>;
|
|
2362
2434
|
default: undefined;
|
|
2363
2435
|
};
|
|
2436
|
+
onChatItemsScrollToTop: {
|
|
2437
|
+
type: PropType<() => void>;
|
|
2438
|
+
default: undefined;
|
|
2439
|
+
};
|
|
2440
|
+
onChatItemsScrollToBottom: {
|
|
2441
|
+
type: PropType<() => void>;
|
|
2442
|
+
default: undefined;
|
|
2443
|
+
};
|
|
2444
|
+
onMessagesScrollToTop: {
|
|
2445
|
+
type: PropType<() => void>;
|
|
2446
|
+
default: undefined;
|
|
2447
|
+
};
|
|
2448
|
+
onMessagesScrollToBottom: {
|
|
2449
|
+
type: PropType<() => void>;
|
|
2450
|
+
default: undefined;
|
|
2451
|
+
};
|
|
2364
2452
|
theme: PropType<import("../../_mixins").Theme<"Chat", {
|
|
2365
2453
|
backgroundColor: string;
|
|
2366
2454
|
borderColor: string;
|
|
@@ -5300,7 +5388,82 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5300
5388
|
}>;
|
|
5301
5389
|
themeClass: import("vue").Ref<string>;
|
|
5302
5390
|
onRender: () => void;
|
|
5303
|
-
|
|
5391
|
+
mainAreaRef: import("vue").Ref<({
|
|
5392
|
+
$: import("vue").ComponentInternalInstance;
|
|
5393
|
+
$data: {};
|
|
5394
|
+
$props: {
|
|
5395
|
+
ref?: import("vue").VNodeRef | undefined;
|
|
5396
|
+
class?: unknown;
|
|
5397
|
+
style?: unknown;
|
|
5398
|
+
key?: (string | number | symbol) | undefined;
|
|
5399
|
+
ref_for?: boolean | undefined;
|
|
5400
|
+
ref_key?: string | undefined;
|
|
5401
|
+
onVnodeBeforeMount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
5402
|
+
onVnodeMounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
5403
|
+
onVnodeBeforeUpdate?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
5404
|
+
onVnodeUpdated?: (((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[]) | undefined;
|
|
5405
|
+
onVnodeBeforeUnmount?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
5406
|
+
onVnodeUnmounted?: (((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[]) | undefined;
|
|
5407
|
+
};
|
|
5408
|
+
$attrs: {
|
|
5409
|
+
[x: string]: unknown;
|
|
5410
|
+
};
|
|
5411
|
+
$refs: {
|
|
5412
|
+
[x: string]: unknown;
|
|
5413
|
+
};
|
|
5414
|
+
$slots: Readonly<{
|
|
5415
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
5416
|
+
}>;
|
|
5417
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
5418
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
5419
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
5420
|
+
$el: any;
|
|
5421
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{}>>, {
|
|
5422
|
+
renderHeader: () => JSX.Element;
|
|
5423
|
+
renderMessages: () => JSX.Element;
|
|
5424
|
+
renderFooter: () => JSX.Element;
|
|
5425
|
+
messagesBodyRef: import("vue").Ref<HTMLElement | {
|
|
5426
|
+
$el: HTMLElement;
|
|
5427
|
+
} | undefined>;
|
|
5428
|
+
inputRef: import("vue").Ref<HTMLInputElement | undefined>;
|
|
5429
|
+
inputValue: import("vue").Ref<string>;
|
|
5430
|
+
handleSendMessage: () => Promise<void>;
|
|
5431
|
+
handleMessagesScroll: (e: Event) => void;
|
|
5432
|
+
scrollToBottom: () => void;
|
|
5433
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & {
|
|
5434
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
5435
|
+
created?: (() => void) | (() => void)[];
|
|
5436
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
5437
|
+
mounted?: (() => void) | (() => void)[];
|
|
5438
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
5439
|
+
updated?: (() => void) | (() => void)[];
|
|
5440
|
+
activated?: (() => void) | (() => void)[];
|
|
5441
|
+
deactivated?: (() => void) | (() => void)[];
|
|
5442
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
5443
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
5444
|
+
destroyed?: (() => void) | (() => void)[];
|
|
5445
|
+
unmounted?: (() => void) | (() => void)[];
|
|
5446
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
5447
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
5448
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
5449
|
+
};
|
|
5450
|
+
$forceUpdate: () => void;
|
|
5451
|
+
$nextTick: typeof import("vue").nextTick;
|
|
5452
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
5453
|
+
} & Readonly<import("vue").ExtractPropTypes<{}>> & import("vue").ShallowUnwrapRef<{
|
|
5454
|
+
renderHeader: () => JSX.Element;
|
|
5455
|
+
renderMessages: () => JSX.Element;
|
|
5456
|
+
renderFooter: () => JSX.Element;
|
|
5457
|
+
messagesBodyRef: import("vue").Ref<HTMLElement | {
|
|
5458
|
+
$el: HTMLElement;
|
|
5459
|
+
} | undefined>;
|
|
5460
|
+
inputRef: import("vue").Ref<HTMLInputElement | undefined>;
|
|
5461
|
+
inputValue: import("vue").Ref<string>;
|
|
5462
|
+
handleSendMessage: () => Promise<void>;
|
|
5463
|
+
handleMessagesScroll: (e: Event) => void;
|
|
5464
|
+
scrollToBottom: () => void;
|
|
5465
|
+
}> & {} & import("vue").ComponentCustomProperties & {}) | null>;
|
|
5466
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("message-retry" | "update:selectedChatId" | "message-send" | "attachment-upload" | "mark-messages-read" | "filter-change" | "footer-input-change" | "network-error" | "upload-error" | "send-error" | "chat-items-scroll-to-top" | "chat-items-scroll-to-bottom" | "messages-scroll-to-top" | "messages-scroll-to-bottom")[], "message-retry" | "update:selectedChatId" | "message-send" | "attachment-upload" | "mark-messages-read" | "filter-change" | "footer-input-change" | "network-error" | "upload-error" | "send-error" | "chat-items-scroll-to-top" | "chat-items-scroll-to-bottom" | "messages-scroll-to-top" | "messages-scroll-to-bottom", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
5304
5467
|
chatItems: {
|
|
5305
5468
|
type: PropType<ChatPropsType["chatItems"]>;
|
|
5306
5469
|
default: () => never[];
|
|
@@ -5365,6 +5528,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5365
5528
|
type: PropType<Partial<ChatPropsType["headerIconProps"]>>;
|
|
5366
5529
|
default: undefined;
|
|
5367
5530
|
};
|
|
5531
|
+
headerShareButtonProps: {
|
|
5532
|
+
type: PropType<Partial<ChatPropsType["headerShareButtonProps"]>>;
|
|
5533
|
+
default: undefined;
|
|
5534
|
+
};
|
|
5535
|
+
headerProfileButtonProps: {
|
|
5536
|
+
type: PropType<Partial<ChatPropsType["headerProfileButtonProps"]>>;
|
|
5537
|
+
default: undefined;
|
|
5538
|
+
};
|
|
5539
|
+
headerCloseButtonProps: {
|
|
5540
|
+
type: PropType<Partial<ChatPropsType["headerCloseButtonProps"]>>;
|
|
5541
|
+
default: undefined;
|
|
5542
|
+
};
|
|
5543
|
+
headerShareIconProps: {
|
|
5544
|
+
type: PropType<Partial<ChatPropsType["headerShareIconProps"]>>;
|
|
5545
|
+
default: undefined;
|
|
5546
|
+
};
|
|
5547
|
+
headerProfileIconProps: {
|
|
5548
|
+
type: PropType<Partial<ChatPropsType["headerProfileIconProps"]>>;
|
|
5549
|
+
default: undefined;
|
|
5550
|
+
};
|
|
5368
5551
|
messageSenderAvatarProps: {
|
|
5369
5552
|
type: PropType<Partial<ChatPropsType["messageSenderAvatarProps"]>>;
|
|
5370
5553
|
default: undefined;
|
|
@@ -5413,6 +5596,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5413
5596
|
type: PropType<ChatPropsType["closeButtonText"]>;
|
|
5414
5597
|
default: undefined;
|
|
5415
5598
|
};
|
|
5599
|
+
shareButtonTooltip: {
|
|
5600
|
+
type: PropType<ChatPropsType["shareButtonTooltip"]>;
|
|
5601
|
+
default: undefined;
|
|
5602
|
+
};
|
|
5603
|
+
profileButtonTooltip: {
|
|
5604
|
+
type: PropType<ChatPropsType["profileButtonTooltip"]>;
|
|
5605
|
+
default: undefined;
|
|
5606
|
+
};
|
|
5416
5607
|
unreadNotificationText: {
|
|
5417
5608
|
type: PropType<ChatPropsType["unreadNotificationText"]>;
|
|
5418
5609
|
default: undefined;
|
|
@@ -5465,8 +5656,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5465
5656
|
type: PropType<ChatPropsType["onFilterChange"]>;
|
|
5466
5657
|
default: undefined;
|
|
5467
5658
|
};
|
|
5468
|
-
|
|
5469
|
-
type: PropType<
|
|
5659
|
+
onFooterInputChange: {
|
|
5660
|
+
type: PropType<(value: string, chatId: ChatId) => void>;
|
|
5470
5661
|
default: undefined;
|
|
5471
5662
|
};
|
|
5472
5663
|
onNetworkError: {
|
|
@@ -5481,6 +5672,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5481
5672
|
type: PropType<ChatPropsType["onSendError"]>;
|
|
5482
5673
|
default: undefined;
|
|
5483
5674
|
};
|
|
5675
|
+
onChatItemsScrollToTop: {
|
|
5676
|
+
type: PropType<() => void>;
|
|
5677
|
+
default: undefined;
|
|
5678
|
+
};
|
|
5679
|
+
onChatItemsScrollToBottom: {
|
|
5680
|
+
type: PropType<() => void>;
|
|
5681
|
+
default: undefined;
|
|
5682
|
+
};
|
|
5683
|
+
onMessagesScrollToTop: {
|
|
5684
|
+
type: PropType<() => void>;
|
|
5685
|
+
default: undefined;
|
|
5686
|
+
};
|
|
5687
|
+
onMessagesScrollToBottom: {
|
|
5688
|
+
type: PropType<() => void>;
|
|
5689
|
+
default: undefined;
|
|
5690
|
+
};
|
|
5484
5691
|
theme: PropType<import("../../_mixins").Theme<"Chat", {
|
|
5485
5692
|
backgroundColor: string;
|
|
5486
5693
|
borderColor: string;
|
|
@@ -7483,27 +7690,37 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7483
7690
|
"onAttachment-upload"?: ((...args: any[]) => any) | undefined;
|
|
7484
7691
|
"onMark-messages-read"?: ((...args: any[]) => any) | undefined;
|
|
7485
7692
|
"onFilter-change"?: ((...args: any[]) => any) | undefined;
|
|
7486
|
-
"
|
|
7693
|
+
"onFooter-input-change"?: ((...args: any[]) => any) | undefined;
|
|
7487
7694
|
"onNetwork-error"?: ((...args: any[]) => any) | undefined;
|
|
7488
7695
|
"onUpload-error"?: ((...args: any[]) => any) | undefined;
|
|
7489
7696
|
"onSend-error"?: ((...args: any[]) => any) | undefined;
|
|
7697
|
+
"onChat-items-scroll-to-top"?: ((...args: any[]) => any) | undefined;
|
|
7698
|
+
"onChat-items-scroll-to-bottom"?: ((...args: any[]) => any) | undefined;
|
|
7699
|
+
"onMessages-scroll-to-top"?: ((...args: any[]) => any) | undefined;
|
|
7700
|
+
"onMessages-scroll-to-bottom"?: ((...args: any[]) => any) | undefined;
|
|
7490
7701
|
}, {
|
|
7491
7702
|
disabled: boolean | undefined;
|
|
7492
7703
|
typingText: string | undefined;
|
|
7493
7704
|
retryText: string | undefined;
|
|
7494
7705
|
closeButtonText: string | undefined;
|
|
7706
|
+
shareButtonTooltip: string | undefined;
|
|
7707
|
+
profileButtonTooltip: string | undefined;
|
|
7495
7708
|
unreadNotificationText: string | undefined;
|
|
7496
7709
|
height: string | number;
|
|
7497
7710
|
emptyProps: Partial<Partial<import("../..").EmptyProps> | undefined>;
|
|
7498
7711
|
chatItems: ChatListItemData[] | undefined;
|
|
7499
|
-
selectedChatId:
|
|
7712
|
+
selectedChatId: ChatId | undefined;
|
|
7500
7713
|
typingChatIds: (string | number | symbol)[];
|
|
7501
7714
|
onChatSelect: import("./interface").OnChatSelect | undefined;
|
|
7715
|
+
onChatItemsScrollToTop: () => void;
|
|
7716
|
+
onChatItemsScrollToBottom: () => void;
|
|
7502
7717
|
messages: ChatMessageData[] | undefined;
|
|
7503
7718
|
onMessageRetry: ((message: ChatMessageData) => void) | undefined;
|
|
7504
7719
|
onChatClose: () => void;
|
|
7505
7720
|
onChatShare: () => void;
|
|
7506
7721
|
onUserProfile: () => void;
|
|
7722
|
+
onMessagesScrollToTop: () => void;
|
|
7723
|
+
onMessagesScrollToBottom: () => void;
|
|
7507
7724
|
headerActions: (() => import("vue").VNodeChild)[] | undefined;
|
|
7508
7725
|
listEmptyProps: Partial<Partial<import("../..").EmptyProps> | undefined>;
|
|
7509
7726
|
listHeaderTitle: string | (() => import("vue").VNodeChild) | undefined;
|
|
@@ -7515,6 +7732,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7515
7732
|
headerTitle: string | (() => import("vue").VNodeChild) | undefined;
|
|
7516
7733
|
headerButtonProps: Partial<Partial<import("../..").ButtonProps> | undefined>;
|
|
7517
7734
|
headerIconProps: Partial<Partial<import("../..").IconProps> | undefined>;
|
|
7735
|
+
headerShareButtonProps: Partial<Partial<import("../..").ButtonProps> | undefined>;
|
|
7736
|
+
headerProfileButtonProps: Partial<Partial<import("../..").ButtonProps> | undefined>;
|
|
7737
|
+
headerCloseButtonProps: Partial<Partial<import("../..").ButtonProps> | undefined>;
|
|
7738
|
+
headerShareIconProps: Partial<Partial<import("../..").IconProps> | undefined>;
|
|
7739
|
+
headerProfileIconProps: Partial<Partial<import("../..").IconProps> | undefined>;
|
|
7518
7740
|
messageSenderAvatarProps: Partial<Partial<import("../..").AvatarProps> | undefined>;
|
|
7519
7741
|
messageUploadProps: Partial<Partial<import("../..").UploadProps> | undefined>;
|
|
7520
7742
|
messageButtonProps: Partial<Partial<import("../..").ButtonProps> | undefined>;
|
|
@@ -7529,9 +7751,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7529
7751
|
messagesLoadingCount: number | undefined;
|
|
7530
7752
|
onAttachmentUpload: import("./interface").OnAttachmentUpload | undefined;
|
|
7531
7753
|
onFilterChange: import("./interface").OnFilterChange | undefined;
|
|
7532
|
-
onLoadMoreChats: import("./interface").OnLoadMoreChats | undefined;
|
|
7533
7754
|
onNetworkError: import("./interface").OnNetworkError | undefined;
|
|
7534
7755
|
onUploadError: import("./interface").OnUploadError | undefined;
|
|
7535
7756
|
onSendError: import("./interface").OnSendError | undefined;
|
|
7757
|
+
onFooterInputChange: (value: string, chatId: ChatId) => void;
|
|
7536
7758
|
}, {}>;
|
|
7537
7759
|
export default _default;
|
package/lib/chat/src/Chat.js
CHANGED
|
@@ -61,6 +61,21 @@ exports.chatProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
61
61
|
}, headerIconProps: {
|
|
62
62
|
type: Object,
|
|
63
63
|
default: undefined
|
|
64
|
+
}, headerShareButtonProps: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default: undefined
|
|
67
|
+
}, headerProfileButtonProps: {
|
|
68
|
+
type: Object,
|
|
69
|
+
default: undefined
|
|
70
|
+
}, headerCloseButtonProps: {
|
|
71
|
+
type: Object,
|
|
72
|
+
default: undefined
|
|
73
|
+
}, headerShareIconProps: {
|
|
74
|
+
type: Object,
|
|
75
|
+
default: undefined
|
|
76
|
+
}, headerProfileIconProps: {
|
|
77
|
+
type: Object,
|
|
78
|
+
default: undefined
|
|
64
79
|
}, messageSenderAvatarProps: {
|
|
65
80
|
type: Object,
|
|
66
81
|
default: undefined
|
|
@@ -97,6 +112,12 @@ exports.chatProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
97
112
|
}, closeButtonText: {
|
|
98
113
|
type: String,
|
|
99
114
|
default: undefined
|
|
115
|
+
}, shareButtonTooltip: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: undefined
|
|
118
|
+
}, profileButtonTooltip: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: undefined
|
|
100
121
|
}, unreadNotificationText: {
|
|
101
122
|
type: String,
|
|
102
123
|
default: undefined
|
|
@@ -136,7 +157,7 @@ exports.chatProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
136
157
|
}, onFilterChange: {
|
|
137
158
|
type: Function,
|
|
138
159
|
default: undefined
|
|
139
|
-
},
|
|
160
|
+
}, onFooterInputChange: {
|
|
140
161
|
type: Function,
|
|
141
162
|
default: undefined
|
|
142
163
|
}, onNetworkError: {
|
|
@@ -148,6 +169,18 @@ exports.chatProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), {
|
|
|
148
169
|
}, onSendError: {
|
|
149
170
|
type: Function,
|
|
150
171
|
default: undefined
|
|
172
|
+
}, onChatItemsScrollToTop: {
|
|
173
|
+
type: Function,
|
|
174
|
+
default: undefined
|
|
175
|
+
}, onChatItemsScrollToBottom: {
|
|
176
|
+
type: Function,
|
|
177
|
+
default: undefined
|
|
178
|
+
}, onMessagesScrollToTop: {
|
|
179
|
+
type: Function,
|
|
180
|
+
default: undefined
|
|
181
|
+
}, onMessagesScrollToBottom: {
|
|
182
|
+
type: Function,
|
|
183
|
+
default: undefined
|
|
151
184
|
} });
|
|
152
185
|
exports.default = (0, vue_1.defineComponent)({
|
|
153
186
|
name: 'Chat',
|
|
@@ -159,12 +192,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
159
192
|
'attachment-upload',
|
|
160
193
|
'mark-messages-read',
|
|
161
194
|
'filter-change',
|
|
162
|
-
'
|
|
195
|
+
'footer-input-change',
|
|
163
196
|
'network-error',
|
|
164
197
|
'upload-error',
|
|
165
|
-
'send-error'
|
|
198
|
+
'send-error',
|
|
199
|
+
'chat-items-scroll-to-top',
|
|
200
|
+
'chat-items-scroll-to-bottom',
|
|
201
|
+
'messages-scroll-to-top',
|
|
202
|
+
'messages-scroll-to-bottom'
|
|
166
203
|
],
|
|
167
|
-
setup(props, { slots, emit }) {
|
|
204
|
+
setup(props, { slots, emit, expose }) {
|
|
168
205
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
169
206
|
const themeRef = (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
170
207
|
const { localeRef } = (0, _mixins_1.useLocale)('Chat');
|
|
@@ -277,37 +314,25 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
277
314
|
emit('message-send', content, attachments);
|
|
278
315
|
};
|
|
279
316
|
const handleMessageRetry = (message) => {
|
|
280
|
-
var _a;
|
|
281
317
|
emit('message-retry', message);
|
|
282
|
-
(_a = props.onMessageRetry) === null || _a === void 0 ? void 0 : _a.call(props, message);
|
|
283
318
|
};
|
|
284
319
|
const markMessagesAsRead = (chatId) => {
|
|
285
320
|
emit('mark-messages-read', chatId);
|
|
286
321
|
};
|
|
287
322
|
const handleFilterChange = (filter) => {
|
|
288
|
-
var _a;
|
|
289
323
|
emit('filter-change', filter);
|
|
290
|
-
(_a = props.onFilterChange) === null || _a === void 0 ? void 0 : _a.call(props, filter);
|
|
291
324
|
};
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
emit('load-more-chats', { offset, limit });
|
|
295
|
-
(_a = props.onLoadMoreChats) === null || _a === void 0 ? void 0 : _a.call(props, offset, limit);
|
|
325
|
+
const handleFooterInputChange = (value, chatId) => {
|
|
326
|
+
emit('footer-input-change', value, chatId);
|
|
296
327
|
};
|
|
297
328
|
const handleNetworkError = (error) => {
|
|
298
|
-
var _a;
|
|
299
329
|
emit('network-error', error);
|
|
300
|
-
(_a = props.onNetworkError) === null || _a === void 0 ? void 0 : _a.call(props, error);
|
|
301
330
|
};
|
|
302
331
|
const handleUploadError = (error) => {
|
|
303
|
-
var _a;
|
|
304
332
|
emit('upload-error', error);
|
|
305
|
-
(_a = props.onUploadError) === null || _a === void 0 ? void 0 : _a.call(props, error);
|
|
306
333
|
};
|
|
307
334
|
const handleSendError = (error) => {
|
|
308
|
-
var _a;
|
|
309
335
|
emit('send-error', error);
|
|
310
|
-
(_a = props.onSendError) === null || _a === void 0 ? void 0 : _a.call(props, error);
|
|
311
336
|
};
|
|
312
337
|
const mergedInputPlaceholderRef = (0, vue_1.computed)(() => {
|
|
313
338
|
var _a;
|
|
@@ -320,6 +345,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
320
345
|
const mergedRetryTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.retryText) !== null && _a !== void 0 ? _a : localeRef.value.retryText; });
|
|
321
346
|
const mergedTypingTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
|
|
322
347
|
const mergedCloseButtonTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.closeButtonText) !== null && _a !== void 0 ? _a : localeRef.value.closeButtonText; });
|
|
348
|
+
const mergedShareButtonTooltipRef = (0, vue_1.computed)(() => { var _a; return (_a = props.shareButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.shareButtonTooltip; });
|
|
349
|
+
const mergedProfileButtonTooltipRef = (0, vue_1.computed)(() => { var _a; return (_a = props.profileButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.profileButtonTooltip; });
|
|
323
350
|
const mergedUnreadNotificationTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.unreadNotificationText) !== null && _a !== void 0 ? _a : localeRef.value.unreadNotificationText; });
|
|
324
351
|
(0, vue_1.provide)(interface_1.chatInjectionKey, {
|
|
325
352
|
mergedClsPrefixRef,
|
|
@@ -341,6 +368,11 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
341
368
|
emptyPropsRef: (0, vue_1.toRef)(props, 'emptyProps'),
|
|
342
369
|
headerButtonPropsRef: (0, vue_1.toRef)(props, 'headerButtonProps'),
|
|
343
370
|
headerIconPropsRef: (0, vue_1.toRef)(props, 'headerIconProps'),
|
|
371
|
+
headerShareButtonPropsRef: (0, vue_1.toRef)(props, 'headerShareButtonProps'),
|
|
372
|
+
headerProfileButtonPropsRef: (0, vue_1.toRef)(props, 'headerProfileButtonProps'),
|
|
373
|
+
headerCloseButtonPropsRef: (0, vue_1.toRef)(props, 'headerCloseButtonProps'),
|
|
374
|
+
headerShareIconPropsRef: (0, vue_1.toRef)(props, 'headerShareIconProps'),
|
|
375
|
+
headerProfileIconPropsRef: (0, vue_1.toRef)(props, 'headerProfileIconProps'),
|
|
344
376
|
messageSenderAvatarPropsRef: (0, vue_1.toRef)(props, 'messageSenderAvatarProps'),
|
|
345
377
|
messageUploadPropsRef: (0, vue_1.toRef)(props, 'messageUploadProps'),
|
|
346
378
|
messageButtonPropsRef: (0, vue_1.toRef)(props, 'messageButtonProps'),
|
|
@@ -353,6 +385,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
353
385
|
retryTextRef: mergedRetryTextRef,
|
|
354
386
|
typingTextRef: mergedTypingTextRef,
|
|
355
387
|
closeButtonTextRef: mergedCloseButtonTextRef,
|
|
388
|
+
shareButtonTooltipRef: mergedShareButtonTooltipRef,
|
|
389
|
+
profileButtonTooltipRef: mergedProfileButtonTooltipRef,
|
|
356
390
|
unreadNotificationTextRef: mergedUnreadNotificationTextRef,
|
|
357
391
|
notificationsShownSetRef: notificationsShownSet,
|
|
358
392
|
unreadCountsBeforeReadRef: unreadCountsBeforeRead,
|
|
@@ -362,20 +396,37 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
362
396
|
handleMessageRetry,
|
|
363
397
|
markMessagesAsRead,
|
|
364
398
|
handleFilterChange,
|
|
365
|
-
|
|
399
|
+
handleFooterInputChange,
|
|
366
400
|
handleNetworkError,
|
|
367
401
|
handleUploadError,
|
|
368
402
|
handleSendError,
|
|
369
403
|
onChatClose: (0, vue_1.toRef)(props, 'onChatClose'),
|
|
370
404
|
onChatShare: (0, vue_1.toRef)(props, 'onChatShare'),
|
|
371
|
-
onUserProfile: (0, vue_1.toRef)(props, 'onUserProfile')
|
|
405
|
+
onUserProfile: (0, vue_1.toRef)(props, 'onUserProfile'),
|
|
406
|
+
onChatItemsScrollToTop: (0, vue_1.toRef)(props, 'onChatItemsScrollToTop'),
|
|
407
|
+
onChatItemsScrollToBottom: (0, vue_1.toRef)(props, 'onChatItemsScrollToBottom'),
|
|
408
|
+
onMessagesScrollToTop: (0, vue_1.toRef)(props, 'onMessagesScrollToTop'),
|
|
409
|
+
onMessagesScrollToBottom: (0, vue_1.toRef)(props, 'onMessagesScrollToBottom')
|
|
410
|
+
});
|
|
411
|
+
const mainAreaRef = (0, vue_1.ref)(null);
|
|
412
|
+
const scrollToBottom = () => {
|
|
413
|
+
var _a;
|
|
414
|
+
(_a = mainAreaRef.value) === null || _a === void 0 ? void 0 : _a.scrollToBottom();
|
|
415
|
+
};
|
|
416
|
+
const sendMessage = (content, attachments) => {
|
|
417
|
+
handleMessageSend(content, attachments);
|
|
418
|
+
};
|
|
419
|
+
expose({
|
|
420
|
+
scrollToBottom,
|
|
421
|
+
sendMessage
|
|
372
422
|
});
|
|
373
423
|
return {
|
|
374
424
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
375
425
|
mergedTheme: themeRef,
|
|
376
426
|
cssVars: cssVarsRef,
|
|
377
427
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
378
|
-
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
|
|
428
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
|
|
429
|
+
mainAreaRef
|
|
379
430
|
};
|
|
380
431
|
},
|
|
381
432
|
render() {
|
|
@@ -398,7 +449,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
398
449
|
]),
|
|
399
450
|
this.selectedChatId &&
|
|
400
451
|
(0, _utils_1.resolveSlot)($slots.default, () => [
|
|
401
|
-
(0, vue_1.h)(MainArea_1.default,
|
|
452
|
+
(0, vue_1.h)(MainArea_1.default, { ref: "mainAreaRef" }, {
|
|
402
453
|
headerActions: $slots.headerActions
|
|
403
454
|
})
|
|
404
455
|
])))
|
|
@@ -23,21 +23,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
setup(props, { slots }) {
|
|
26
|
-
const getThumbnailUrl = (
|
|
27
|
-
const url = [
|
|
26
|
+
const getThumbnailUrl = (attachment) => {
|
|
27
|
+
const url = [attachment.preview, attachment.thumbnail].find((value) => typeof value === 'string');
|
|
28
28
|
return url !== null && url !== void 0 ? url : null;
|
|
29
29
|
};
|
|
30
30
|
const renderAttachment = () => {
|
|
31
|
-
const fileList = props.attachments.map((
|
|
31
|
+
const fileList = props.attachments.map((attachment, index) => {
|
|
32
32
|
var _a, _b, _c;
|
|
33
33
|
return ({
|
|
34
34
|
id: `${String(props.message.id)}-attachment-${index}`,
|
|
35
|
-
name:
|
|
36
|
-
status:
|
|
37
|
-
percentage: (_a =
|
|
38
|
-
url: (_b =
|
|
39
|
-
thumbnailUrl: getThumbnailUrl(
|
|
40
|
-
type: (_c =
|
|
35
|
+
name: attachment.name,
|
|
36
|
+
status: attachment.status || 'finished',
|
|
37
|
+
percentage: (_a = attachment.percentage) !== null && _a !== void 0 ? _a : null,
|
|
38
|
+
url: (_b = attachment.url) !== null && _b !== void 0 ? _b : null,
|
|
39
|
+
thumbnailUrl: getThumbnailUrl(attachment),
|
|
40
|
+
type: (_c = attachment.type) !== null && _c !== void 0 ? _c : null,
|
|
41
41
|
file: null,
|
|
42
42
|
batchId: null
|
|
43
43
|
});
|
|
@@ -49,7 +49,9 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
49
49
|
gap: '2px',
|
|
50
50
|
marginTop: '0'
|
|
51
51
|
}
|
|
52
|
-
: undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((
|
|
52
|
+
: undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((attachment) => attachment.status === 'finished' &&
|
|
53
|
+
attachment.url &&
|
|
54
|
+
attachment.url !== '#'), showRetryButton: props.attachments.some((attachment) => attachment.status === 'error') }, props.uploadProps), {
|
|
53
55
|
default: () => ((0, vue_1.h)(upload_1.UUploadFileList, null, {
|
|
54
56
|
'upload-file-title': slots['upload-file-title']
|
|
55
57
|
? ({ file }) => { var _a; return (_a = slots['upload-file-title']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
|
|
@@ -58,8 +60,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
58
60
|
? ({ file }) => { var _a; return (_a = slots['upload-file-subtitle']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
|
|
59
61
|
: ({ file }) => {
|
|
60
62
|
var _a;
|
|
61
|
-
const
|
|
62
|
-
return ((0, vue_1.h)("span", { style: { fontSize: '12px', color: '#999' } }, (
|
|
63
|
+
const attachment = props.attachments.find((attachment) => attachment.name === file.name);
|
|
64
|
+
return ((0, vue_1.h)("span", { style: { fontSize: '12px', color: '#999' } }, (attachment === null || attachment === void 0 ? void 0 : attachment.size) || ((_a = file.file) === null || _a === void 0 ? void 0 : _a.size)));
|
|
63
65
|
}
|
|
64
66
|
}))
|
|
65
67
|
}));
|
|
@@ -8,6 +8,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
8
8
|
inputRef: import("vue").Ref<HTMLInputElement | undefined>;
|
|
9
9
|
inputValue: import("vue").Ref<string>;
|
|
10
10
|
handleSendMessage: () => Promise<void>;
|
|
11
|
+
handleMessagesScroll: (e: Event) => void;
|
|
11
12
|
scrollToBottom: () => void;
|
|
12
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
13
14
|
export default _default;
|