@uzum-tech/ui 1.9.0 → 1.9.1

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 (118) hide show
  1. package/dist/index.js +586 -265
  2. package/dist/index.prod.js +2 -2
  3. package/es/chat/index.d.ts +1 -1
  4. package/es/chat/src/Chat.d.ts +233 -11
  5. package/es/chat/src/Chat.js +73 -22
  6. package/es/chat/src/ChatParts/ChatAttachment.js +14 -12
  7. package/es/chat/src/ChatParts/MainArea.d.ts +1 -0
  8. package/es/chat/src/ChatParts/MainArea.js +95 -57
  9. package/es/chat/src/ChatParts/Sidebar.d.ts +920 -0
  10. package/es/chat/src/ChatParts/Sidebar.js +63 -12
  11. package/es/chat/src/interface.d.ts +24 -3
  12. package/es/chat/src/styles/index.cssr.js +13 -2
  13. package/es/date-picker/src/DatePicker.d.ts +1308 -43
  14. package/es/date-picker/src/DatePicker.js +54 -29
  15. package/es/date-picker/src/interface.d.ts +1 -0
  16. package/es/date-picker/src/panel/date.d.ts +141 -0
  17. package/es/date-picker/src/panel/daterange.d.ts +141 -0
  18. package/es/date-picker/src/panel/datetime.d.ts +141 -0
  19. package/es/date-picker/src/panel/datetimerange.d.ts +141 -0
  20. package/es/date-picker/src/panel/panelMonth.d.ts +282 -0
  21. package/es/date-picker/src/panel/panelMonthContent.d.ts +141 -0
  22. package/es/date-picker/src/panel/panelYear.d.ts +282 -0
  23. package/es/date-picker/src/panel/panelYearContent.d.ts +141 -0
  24. package/es/date-picker/src/panel/use-calendar.d.ts +141 -0
  25. package/es/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
  26. package/es/date-picker/src/panel/use-panel-common.d.ts +141 -0
  27. package/es/date-picker/styles/dark.js +3 -1
  28. package/es/date-picker/styles/light.d.ts +123 -0
  29. package/es/date-picker/styles/light.js +3 -1
  30. package/es/descriptions/src/Descriptions.d.ts +30 -0
  31. package/es/descriptions/src/Descriptions.js +18 -10
  32. package/es/locales/common/arDZ.js +2 -0
  33. package/es/locales/common/deDE.js +2 -0
  34. package/es/locales/common/enGB.js +2 -0
  35. package/es/locales/common/enUS.d.ts +2 -0
  36. package/es/locales/common/enUS.js +2 -0
  37. package/es/locales/common/eo.js +2 -0
  38. package/es/locales/common/esAR.js +2 -0
  39. package/es/locales/common/faIR.js +2 -0
  40. package/es/locales/common/frFR.js +2 -0
  41. package/es/locales/common/idID.js +2 -0
  42. package/es/locales/common/itIT.js +2 -0
  43. package/es/locales/common/jaJP.js +2 -0
  44. package/es/locales/common/koKR.js +2 -0
  45. package/es/locales/common/nbNO.js +2 -0
  46. package/es/locales/common/nlNL.js +2 -0
  47. package/es/locales/common/plPL.js +2 -0
  48. package/es/locales/common/ptBR.js +2 -0
  49. package/es/locales/common/ruRU.js +2 -0
  50. package/es/locales/common/skSK.js +2 -0
  51. package/es/locales/common/svSE.js +2 -0
  52. package/es/locales/common/thTH.js +2 -0
  53. package/es/locales/common/trTR.js +2 -0
  54. package/es/locales/common/ukUA.js +2 -0
  55. package/es/locales/common/viVN.js +2 -0
  56. package/es/locales/common/zhCN.js +2 -0
  57. package/es/locales/common/zhTW.js +2 -0
  58. package/es/version.d.ts +1 -1
  59. package/es/version.js +1 -1
  60. package/lib/chat/index.d.ts +1 -1
  61. package/lib/chat/src/Chat.d.ts +233 -11
  62. package/lib/chat/src/Chat.js +73 -22
  63. package/lib/chat/src/ChatParts/ChatAttachment.js +14 -12
  64. package/lib/chat/src/ChatParts/MainArea.d.ts +1 -0
  65. package/lib/chat/src/ChatParts/MainArea.js +94 -56
  66. package/lib/chat/src/ChatParts/Sidebar.d.ts +920 -0
  67. package/lib/chat/src/ChatParts/Sidebar.js +62 -11
  68. package/lib/chat/src/interface.d.ts +24 -3
  69. package/lib/chat/src/styles/index.cssr.js +13 -2
  70. package/lib/date-picker/src/DatePicker.d.ts +1308 -43
  71. package/lib/date-picker/src/DatePicker.js +53 -28
  72. package/lib/date-picker/src/interface.d.ts +1 -0
  73. package/lib/date-picker/src/panel/date.d.ts +141 -0
  74. package/lib/date-picker/src/panel/daterange.d.ts +141 -0
  75. package/lib/date-picker/src/panel/datetime.d.ts +141 -0
  76. package/lib/date-picker/src/panel/datetimerange.d.ts +141 -0
  77. package/lib/date-picker/src/panel/panelMonth.d.ts +282 -0
  78. package/lib/date-picker/src/panel/panelMonthContent.d.ts +141 -0
  79. package/lib/date-picker/src/panel/panelYear.d.ts +282 -0
  80. package/lib/date-picker/src/panel/panelYearContent.d.ts +141 -0
  81. package/lib/date-picker/src/panel/use-calendar.d.ts +141 -0
  82. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +141 -0
  83. package/lib/date-picker/src/panel/use-panel-common.d.ts +141 -0
  84. package/lib/date-picker/styles/dark.js +3 -1
  85. package/lib/date-picker/styles/light.d.ts +123 -0
  86. package/lib/date-picker/styles/light.js +3 -1
  87. package/lib/descriptions/src/Descriptions.d.ts +30 -0
  88. package/lib/descriptions/src/Descriptions.js +18 -10
  89. package/lib/locales/common/arDZ.js +2 -0
  90. package/lib/locales/common/deDE.js +2 -0
  91. package/lib/locales/common/enGB.js +2 -0
  92. package/lib/locales/common/enUS.d.ts +2 -0
  93. package/lib/locales/common/enUS.js +2 -0
  94. package/lib/locales/common/eo.js +2 -0
  95. package/lib/locales/common/esAR.js +2 -0
  96. package/lib/locales/common/faIR.js +2 -0
  97. package/lib/locales/common/frFR.js +2 -0
  98. package/lib/locales/common/idID.js +2 -0
  99. package/lib/locales/common/itIT.js +2 -0
  100. package/lib/locales/common/jaJP.js +2 -0
  101. package/lib/locales/common/koKR.js +2 -0
  102. package/lib/locales/common/nbNO.js +2 -0
  103. package/lib/locales/common/nlNL.js +2 -0
  104. package/lib/locales/common/plPL.js +2 -0
  105. package/lib/locales/common/ptBR.js +2 -0
  106. package/lib/locales/common/ruRU.js +2 -0
  107. package/lib/locales/common/skSK.js +2 -0
  108. package/lib/locales/common/svSE.js +2 -0
  109. package/lib/locales/common/thTH.js +2 -0
  110. package/lib/locales/common/trTR.js +2 -0
  111. package/lib/locales/common/ukUA.js +2 -0
  112. package/lib/locales/common/viVN.js +2 -0
  113. package/lib/locales/common/zhCN.js +2 -0
  114. package/lib/locales/common/zhTW.js +2 -0
  115. package/lib/version.d.ts +1 -1
  116. package/lib/version.js +1 -1
  117. package/package.json +3 -3
  118. package/web-types.json +95 -4
@@ -1,7 +1,7 @@
1
1
  export { default as UChat } from './src/Chat';
2
2
  export { default as UChatListItems } from './src/ChatListItems';
3
3
  export { default as UChatMessages } from './src/ChatMessages';
4
- export type { ChatId, ChatProps, ChatListItemProps, ChatMessageProps, ChatMarkProps, ChatHeaderProps, ChatFooterProps, ChatListHeaderProps, ChatSlots, ChatListItemSlots, ChatMessageSlots, ChatMarkSlots, ChatHeaderSlots, ChatFooterSlots, ChatListItemData, ChatMessageData, ChatAttachment, OnChatSelect, OnMessageSend, OnAttachmentUpload, OnFilterChange, OnLoadMoreChats, OnNetworkError, OnUploadError, OnSendError, ChatInst, ChatListInst, chatInjectionKey } from './src/interface';
4
+ export type { ChatId, ChatProps, ChatListItemProps, ChatMessageProps, ChatMarkProps, ChatHeaderProps, ChatFooterProps, ChatListHeaderProps, ChatSlots, ChatListItemSlots, ChatMessageSlots, ChatMarkSlots, ChatHeaderSlots, ChatFooterSlots, ChatListItemData, ChatMessageData, ChatAttachment, OnChatSelect, OnMessageSend, OnAttachmentUpload, OnFilterChange, OnNetworkError, OnUploadError, OnSendError, ChatInst, ChatListInst, chatInjectionKey } from './src/interface';
5
5
  export { MessageStatus, ChatMessageType, ChatMarkType } from './src/interface';
6
6
  export type { ChatListItemsProps } from './src/ChatListItems';
7
7
  export type { ChatMessagesProps } from './src/ChatMessages';
@@ -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
- onLoadMoreChats: {
171
- type: PropType<ChatPropsType["onLoadMoreChats"]>;
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
- onLoadMoreChats: {
2349
- type: PropType<ChatPropsType["onLoadMoreChats"]>;
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
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("message-retry" | "update:selectedChatId" | "message-send" | "attachment-upload" | "mark-messages-read" | "filter-change" | "load-more-chats" | "network-error" | "upload-error" | "send-error")[], "message-retry" | "update:selectedChatId" | "message-send" | "attachment-upload" | "mark-messages-read" | "filter-change" | "load-more-chats" | "network-error" | "upload-error" | "send-error", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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
- onLoadMoreChats: {
5469
- type: PropType<ChatPropsType["onLoadMoreChats"]>;
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
- "onLoad-more-chats"?: ((...args: any[]) => any) | undefined;
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: import("./interface").ChatId | undefined;
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;
@@ -55,6 +55,21 @@ export const chatProps = Object.assign(Object.assign({}, useTheme.props), { chat
55
55
  }, headerIconProps: {
56
56
  type: Object,
57
57
  default: undefined
58
+ }, headerShareButtonProps: {
59
+ type: Object,
60
+ default: undefined
61
+ }, headerProfileButtonProps: {
62
+ type: Object,
63
+ default: undefined
64
+ }, headerCloseButtonProps: {
65
+ type: Object,
66
+ default: undefined
67
+ }, headerShareIconProps: {
68
+ type: Object,
69
+ default: undefined
70
+ }, headerProfileIconProps: {
71
+ type: Object,
72
+ default: undefined
58
73
  }, messageSenderAvatarProps: {
59
74
  type: Object,
60
75
  default: undefined
@@ -91,6 +106,12 @@ export const chatProps = Object.assign(Object.assign({}, useTheme.props), { chat
91
106
  }, closeButtonText: {
92
107
  type: String,
93
108
  default: undefined
109
+ }, shareButtonTooltip: {
110
+ type: String,
111
+ default: undefined
112
+ }, profileButtonTooltip: {
113
+ type: String,
114
+ default: undefined
94
115
  }, unreadNotificationText: {
95
116
  type: String,
96
117
  default: undefined
@@ -130,7 +151,7 @@ export const chatProps = Object.assign(Object.assign({}, useTheme.props), { chat
130
151
  }, onFilterChange: {
131
152
  type: Function,
132
153
  default: undefined
133
- }, onLoadMoreChats: {
154
+ }, onFooterInputChange: {
134
155
  type: Function,
135
156
  default: undefined
136
157
  }, onNetworkError: {
@@ -142,6 +163,18 @@ export const chatProps = Object.assign(Object.assign({}, useTheme.props), { chat
142
163
  }, onSendError: {
143
164
  type: Function,
144
165
  default: undefined
166
+ }, onChatItemsScrollToTop: {
167
+ type: Function,
168
+ default: undefined
169
+ }, onChatItemsScrollToBottom: {
170
+ type: Function,
171
+ default: undefined
172
+ }, onMessagesScrollToTop: {
173
+ type: Function,
174
+ default: undefined
175
+ }, onMessagesScrollToBottom: {
176
+ type: Function,
177
+ default: undefined
145
178
  } });
146
179
  export default defineComponent({
147
180
  name: 'Chat',
@@ -153,12 +186,16 @@ export default defineComponent({
153
186
  'attachment-upload',
154
187
  'mark-messages-read',
155
188
  'filter-change',
156
- 'load-more-chats',
189
+ 'footer-input-change',
157
190
  'network-error',
158
191
  'upload-error',
159
- 'send-error'
192
+ 'send-error',
193
+ 'chat-items-scroll-to-top',
194
+ 'chat-items-scroll-to-bottom',
195
+ 'messages-scroll-to-top',
196
+ 'messages-scroll-to-bottom'
160
197
  ],
161
- setup(props, { slots, emit }) {
198
+ setup(props, { slots, emit, expose }) {
162
199
  const { mergedClsPrefixRef } = useConfig(props);
163
200
  const themeRef = useTheme('Chat', '-chat', style, chatLight, props, mergedClsPrefixRef);
164
201
  const { localeRef } = useLocale('Chat');
@@ -271,37 +308,25 @@ export default defineComponent({
271
308
  emit('message-send', content, attachments);
272
309
  };
273
310
  const handleMessageRetry = (message) => {
274
- var _a;
275
311
  emit('message-retry', message);
276
- (_a = props.onMessageRetry) === null || _a === void 0 ? void 0 : _a.call(props, message);
277
312
  };
278
313
  const markMessagesAsRead = (chatId) => {
279
314
  emit('mark-messages-read', chatId);
280
315
  };
281
316
  const handleFilterChange = (filter) => {
282
- var _a;
283
317
  emit('filter-change', filter);
284
- (_a = props.onFilterChange) === null || _a === void 0 ? void 0 : _a.call(props, filter);
285
318
  };
286
- const handleLoadMoreChats = (offset, limit) => {
287
- var _a;
288
- emit('load-more-chats', { offset, limit });
289
- (_a = props.onLoadMoreChats) === null || _a === void 0 ? void 0 : _a.call(props, offset, limit);
319
+ const handleFooterInputChange = (value, chatId) => {
320
+ emit('footer-input-change', value, chatId);
290
321
  };
291
322
  const handleNetworkError = (error) => {
292
- var _a;
293
323
  emit('network-error', error);
294
- (_a = props.onNetworkError) === null || _a === void 0 ? void 0 : _a.call(props, error);
295
324
  };
296
325
  const handleUploadError = (error) => {
297
- var _a;
298
326
  emit('upload-error', error);
299
- (_a = props.onUploadError) === null || _a === void 0 ? void 0 : _a.call(props, error);
300
327
  };
301
328
  const handleSendError = (error) => {
302
- var _a;
303
329
  emit('send-error', error);
304
- (_a = props.onSendError) === null || _a === void 0 ? void 0 : _a.call(props, error);
305
330
  };
306
331
  const mergedInputPlaceholderRef = computed(() => {
307
332
  var _a;
@@ -314,6 +339,8 @@ export default defineComponent({
314
339
  const mergedRetryTextRef = computed(() => { var _a; return (_a = props.retryText) !== null && _a !== void 0 ? _a : localeRef.value.retryText; });
315
340
  const mergedTypingTextRef = computed(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
316
341
  const mergedCloseButtonTextRef = computed(() => { var _a; return (_a = props.closeButtonText) !== null && _a !== void 0 ? _a : localeRef.value.closeButtonText; });
342
+ const mergedShareButtonTooltipRef = computed(() => { var _a; return (_a = props.shareButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.shareButtonTooltip; });
343
+ const mergedProfileButtonTooltipRef = computed(() => { var _a; return (_a = props.profileButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.profileButtonTooltip; });
317
344
  const mergedUnreadNotificationTextRef = computed(() => { var _a; return (_a = props.unreadNotificationText) !== null && _a !== void 0 ? _a : localeRef.value.unreadNotificationText; });
318
345
  provide(chatInjectionKey, {
319
346
  mergedClsPrefixRef,
@@ -335,6 +362,11 @@ export default defineComponent({
335
362
  emptyPropsRef: toRef(props, 'emptyProps'),
336
363
  headerButtonPropsRef: toRef(props, 'headerButtonProps'),
337
364
  headerIconPropsRef: toRef(props, 'headerIconProps'),
365
+ headerShareButtonPropsRef: toRef(props, 'headerShareButtonProps'),
366
+ headerProfileButtonPropsRef: toRef(props, 'headerProfileButtonProps'),
367
+ headerCloseButtonPropsRef: toRef(props, 'headerCloseButtonProps'),
368
+ headerShareIconPropsRef: toRef(props, 'headerShareIconProps'),
369
+ headerProfileIconPropsRef: toRef(props, 'headerProfileIconProps'),
338
370
  messageSenderAvatarPropsRef: toRef(props, 'messageSenderAvatarProps'),
339
371
  messageUploadPropsRef: toRef(props, 'messageUploadProps'),
340
372
  messageButtonPropsRef: toRef(props, 'messageButtonProps'),
@@ -347,6 +379,8 @@ export default defineComponent({
347
379
  retryTextRef: mergedRetryTextRef,
348
380
  typingTextRef: mergedTypingTextRef,
349
381
  closeButtonTextRef: mergedCloseButtonTextRef,
382
+ shareButtonTooltipRef: mergedShareButtonTooltipRef,
383
+ profileButtonTooltipRef: mergedProfileButtonTooltipRef,
350
384
  unreadNotificationTextRef: mergedUnreadNotificationTextRef,
351
385
  notificationsShownSetRef: notificationsShownSet,
352
386
  unreadCountsBeforeReadRef: unreadCountsBeforeRead,
@@ -356,20 +390,37 @@ export default defineComponent({
356
390
  handleMessageRetry,
357
391
  markMessagesAsRead,
358
392
  handleFilterChange,
359
- handleLoadMoreChats,
393
+ handleFooterInputChange,
360
394
  handleNetworkError,
361
395
  handleUploadError,
362
396
  handleSendError,
363
397
  onChatClose: toRef(props, 'onChatClose'),
364
398
  onChatShare: toRef(props, 'onChatShare'),
365
- onUserProfile: toRef(props, 'onUserProfile')
399
+ onUserProfile: toRef(props, 'onUserProfile'),
400
+ onChatItemsScrollToTop: toRef(props, 'onChatItemsScrollToTop'),
401
+ onChatItemsScrollToBottom: toRef(props, 'onChatItemsScrollToBottom'),
402
+ onMessagesScrollToTop: toRef(props, 'onMessagesScrollToTop'),
403
+ onMessagesScrollToBottom: toRef(props, 'onMessagesScrollToBottom')
404
+ });
405
+ const mainAreaRef = ref(null);
406
+ const scrollToBottom = () => {
407
+ var _a;
408
+ (_a = mainAreaRef.value) === null || _a === void 0 ? void 0 : _a.scrollToBottom();
409
+ };
410
+ const sendMessage = (content, attachments) => {
411
+ handleMessageSend(content, attachments);
412
+ };
413
+ expose({
414
+ scrollToBottom,
415
+ sendMessage
366
416
  });
367
417
  return {
368
418
  mergedClsPrefix: mergedClsPrefixRef,
369
419
  mergedTheme: themeRef,
370
420
  cssVars: cssVarsRef,
371
421
  themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
372
- onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
422
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
423
+ mainAreaRef
373
424
  };
374
425
  },
375
426
  render() {
@@ -392,7 +443,7 @@ export default defineComponent({
392
443
  ]),
393
444
  this.selectedChatId &&
394
445
  resolveSlot($slots.default, () => [
395
- h(ChatMainArea, null, {
446
+ h(ChatMainArea, { ref: "mainAreaRef" }, {
396
447
  headerActions: $slots.headerActions
397
448
  })
398
449
  ])))
@@ -21,21 +21,21 @@ export default defineComponent({
21
21
  }
22
22
  },
23
23
  setup(props, { slots }) {
24
- const getThumbnailUrl = (att) => {
25
- const url = [att.preview, att.thumbnail].find((value) => typeof value === 'string');
24
+ const getThumbnailUrl = (attachment) => {
25
+ const url = [attachment.preview, attachment.thumbnail].find((value) => typeof value === 'string');
26
26
  return url !== null && url !== void 0 ? url : null;
27
27
  };
28
28
  const renderAttachment = () => {
29
- const fileList = props.attachments.map((att, index) => {
29
+ const fileList = props.attachments.map((attachment, index) => {
30
30
  var _a, _b, _c;
31
31
  return ({
32
32
  id: `${String(props.message.id)}-attachment-${index}`,
33
- name: att.name,
34
- status: att.status || 'finished',
35
- percentage: (_a = att.percentage) !== null && _a !== void 0 ? _a : null,
36
- url: (_b = att.url) !== null && _b !== void 0 ? _b : null,
37
- thumbnailUrl: getThumbnailUrl(att),
38
- type: (_c = att.type) !== null && _c !== void 0 ? _c : null,
33
+ name: attachment.name,
34
+ status: attachment.status || 'finished',
35
+ percentage: (_a = attachment.percentage) !== null && _a !== void 0 ? _a : null,
36
+ url: (_b = attachment.url) !== null && _b !== void 0 ? _b : null,
37
+ thumbnailUrl: getThumbnailUrl(attachment),
38
+ type: (_c = attachment.type) !== null && _c !== void 0 ? _c : null,
39
39
  file: null,
40
40
  batchId: null
41
41
  });
@@ -47,7 +47,9 @@ export default defineComponent({
47
47
  gap: '2px',
48
48
  marginTop: '0'
49
49
  }
50
- : undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((att) => att.status === 'finished'), showRetryButton: props.attachments.some((att) => att.status === 'error') }, props.uploadProps), {
50
+ : undefined, showRemoveButton: false, showDownloadButton: props.attachments.some((attachment) => attachment.status === 'finished' &&
51
+ attachment.url &&
52
+ attachment.url !== '#'), showRetryButton: props.attachments.some((attachment) => attachment.status === 'error') }, props.uploadProps), {
51
53
  default: () => (h(UUploadFileList, null, {
52
54
  'upload-file-title': slots['upload-file-title']
53
55
  ? ({ file }) => { var _a; return (_a = slots['upload-file-title']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
@@ -56,8 +58,8 @@ export default defineComponent({
56
58
  ? ({ file }) => { var _a; return (_a = slots['upload-file-subtitle']) === null || _a === void 0 ? void 0 : _a.call(slots, file); }
57
59
  : ({ file }) => {
58
60
  var _a;
59
- const att = props.attachments.find((a) => a.name === file.name);
60
- return (h("span", { style: { fontSize: '12px', color: '#999' } }, (att === null || att === void 0 ? void 0 : att.size) || ((_a = file.file) === null || _a === void 0 ? void 0 : _a.size)));
61
+ const attachment = props.attachments.find((attachment) => attachment.name === file.name);
62
+ return (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)));
61
63
  }
62
64
  }))
63
65
  }));
@@ -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;