@webitel/ui-chats 0.1.49 → 0.1.51
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/package.json +1 -1
- package/src/declaration.d.ts +7 -0
- package/src/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue +2 -2
- package/src/ui/chat-footer/modules/user-input/components/chat-text-field.vue +4 -4
- package/src/ui/chat-footer/modules/user-input/enums/ChatAction.enum.ts +5 -0
- package/src/ui/messaging/composables/useChatScroll.ts +34 -3
- package/src/ui/messaging/modules/message/components/chat-message.vue +1 -1
- package/src/ui/messaging/modules/message/components/details/chat-message-player.vue +5 -4
- package/src/ui/the-chat-container.vue +2 -2
- package/types/.tsbuildinfo +1 -1
- package/types/ui/chat-footer/modules/user-input/components/actions/attach-files-action.vue.d.ts +1 -1
- package/types/ui/chat-footer/modules/user-input/components/actions/send-message-action.vue.d.ts +1 -1
- package/types/ui/chat-footer/modules/user-input/components/chat-input-actions-bar.vue.d.ts +4 -4
- package/types/ui/chat-footer/modules/user-input/components/chat-text-field.vue.d.ts +4 -5
- package/types/ui/chat-footer/modules/user-input/enums/ChatAction.enum.d.ts +4 -0
- package/types/ui/image-viewer/image-viewer.vue.d.ts +1 -1
- package/types/ui/messaging/components/chat-observer.vue.d.ts +2 -2
- package/types/ui/messaging/components/scroll-to-bottom-btn.vue.d.ts +2 -2
- package/types/ui/messaging/components/the-messages-container.vue.d.ts +1 -1
- package/types/ui/messaging/composables/useChatScroll.d.ts +1 -0
- package/types/ui/messaging/modules/message/components/chat-message.vue.d.ts +2 -2
- package/types/ui/messaging/modules/message/components/details/chat-message-image.vue.d.ts +1 -1
- package/types/ui/messaging/modules/message/components/details/chat-message-player.vue.d.ts +2 -2
- package/types/ui/messaging/modules/message/components/details/chat-message-size-exceeded-error.vue.d.ts +1 -1
- package/types/ui/messaging/modules/message/components/details/chat-message-time.vue.d.ts +1 -1
- package/types/ui/messaging/modules/message/composables/useChatMessageFile.d.ts +19 -19
- package/types/ui/the-chat-container.vue.d.ts +3 -3
package/types/ui/chat-footer/modules/user-input/components/actions/attach-files-action.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
2
|
attachFiles: (files: File[]) => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onAttachFiles?: (files: File[]) => any;
|
|
4
|
+
onAttachFiles?: ((files: File[]) => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: typeof __VLS_export;
|
|
7
7
|
export default _default;
|
package/types/ui/chat-footer/modules/user-input/components/actions/send-message-action.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
2
2
|
sendMessage: () => any;
|
|
3
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onSendMessage?: () => any;
|
|
4
|
+
onSendMessage?: (() => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
6
|
declare const _default: typeof __VLS_export;
|
|
7
7
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ChatAction, type
|
|
1
|
+
import { ChatAction, type ChatActionSlots } from '../enums/ChatAction.enum';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
actions: ChatAction[];
|
|
4
4
|
};
|
|
5
|
-
type __VLS_Slots =
|
|
5
|
+
type __VLS_Slots = ChatActionSlots;
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
7
|
sendMessage: () => any;
|
|
8
8
|
attachFiles: (files: File[]) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onSendMessage?: () => any;
|
|
11
|
-
onAttachFiles?: (files: File[]) => any;
|
|
10
|
+
onSendMessage?: (() => any) | undefined;
|
|
11
|
+
onAttachFiles?: ((files: File[]) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
14
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
2
1
|
type __VLS_ModelProps = {
|
|
3
|
-
'text':
|
|
2
|
+
'text': string;
|
|
4
3
|
};
|
|
5
4
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
5
|
enter: () => any;
|
|
7
|
-
"update:text": (value:
|
|
6
|
+
"update:text": (value: string) => any;
|
|
8
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
9
|
-
onEnter?: () => any;
|
|
10
|
-
"onUpdate:text"?: (value:
|
|
8
|
+
onEnter?: (() => any) | undefined;
|
|
9
|
+
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
11
10
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
11
|
declare const _default: typeof __VLS_export;
|
|
13
12
|
export default _default;
|
|
@@ -9,3 +9,7 @@ export type ChatAction = (typeof ChatAction)[keyof typeof ChatAction];
|
|
|
9
9
|
export type SharedActionSlots = {
|
|
10
10
|
[key in `action:${ChatAction}`]?: () => unknown;
|
|
11
11
|
};
|
|
12
|
+
/** slots `chat-input-actions-bar` itself exposes, keyed by the bare action name */
|
|
13
|
+
export type ChatActionSlots = {
|
|
14
|
+
[key in ChatAction]?: (props: Record<string, unknown>) => unknown;
|
|
15
|
+
};
|
|
@@ -5,7 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
close: () => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
onClose?: () => any;
|
|
8
|
+
onClose?: (() => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -5,10 +5,10 @@ type __VLS_Props = {
|
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
6
|
loadNextMessages: () => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
onLoadNextMessages?: () => any;
|
|
8
|
+
onLoadNextMessages?: (() => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
10
|
next: boolean;
|
|
11
11
|
loading: boolean;
|
|
12
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
@@ -4,9 +4,9 @@ type __VLS_Props = {
|
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
5
|
scroll: () => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
onScroll?: () => any;
|
|
7
|
+
onScroll?: (() => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
newMessageCount: number;
|
|
10
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
export default _default;
|
|
@@ -13,7 +13,7 @@ type __VLS_Props = {
|
|
|
13
13
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
14
|
loadNextMessages: () => any;
|
|
15
15
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onLoadNextMessages?: () => any;
|
|
16
|
+
onLoadNextMessages?: (() => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
chatId: string;
|
|
19
19
|
isChatClosed: boolean;
|
|
@@ -21,6 +21,7 @@ export declare const useChatScroll: ({ chatContainer, chatContent, messages, cha
|
|
|
21
21
|
showScrollToBottomBtn: Ref<boolean, boolean>;
|
|
22
22
|
newUnseenMessagesCount: Ref<number, number>;
|
|
23
23
|
scrollToBottom: (behavior?: ScrollBehavior) => void;
|
|
24
|
+
markSeenIfAtBottom: () => void;
|
|
24
25
|
loadNextMessages: (canLoadMore: boolean, onLoadNextMessages: () => void) => void;
|
|
25
26
|
handleChatScroll: () => void;
|
|
26
27
|
};
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
16
16
|
clickOnImage: () => any;
|
|
17
17
|
initializedPlayer: (player: object) => any;
|
|
18
18
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
-
onClickOnImage?: () => any;
|
|
20
|
-
onInitializedPlayer?: (player: object) => any;
|
|
19
|
+
onClickOnImage?: (() => any) | undefined;
|
|
20
|
+
onInitializedPlayer?: ((player: object) => any) | undefined;
|
|
21
21
|
}>, {
|
|
22
22
|
showAvatar: boolean;
|
|
23
23
|
withoutAvatars: boolean;
|
|
@@ -5,7 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
6
|
open: (args_0: ChatMessageFile) => any;
|
|
7
7
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
onOpen?: (args_0: ChatMessageFile) => any;
|
|
8
|
+
onOpen?: ((args_0: ChatMessageFile) => any) | undefined;
|
|
9
9
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
7
7
|
open: (args_0: ChatMessageFile) => any;
|
|
8
8
|
initialized: (args_0: object) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onOpen?: (args_0: ChatMessageFile) => any;
|
|
11
|
-
onInitialized?: (args_0: object) => any;
|
|
10
|
+
onOpen?: ((args_0: ChatMessageFile) => any) | undefined;
|
|
11
|
+
onInitialized?: ((args_0: object) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const _default: typeof __VLS_export;
|
|
14
14
|
export default _default;
|
|
@@ -3,6 +3,6 @@ interface IChatMessageSizeExceededErrorProps {
|
|
|
3
3
|
}
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<IChatMessageSizeExceededErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IChatMessageSizeExceededErrorProps> & Readonly<{}>, {
|
|
5
5
|
selfSide: boolean;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
6
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
@@ -3,6 +3,6 @@ type __VLS_Props = {
|
|
|
3
3
|
};
|
|
4
4
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
5
5
|
date: string | number;
|
|
6
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions,
|
|
6
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import type { ChatMessageFile } from '../../../types/ChatMessage.types';
|
|
3
3
|
export declare function useChatMessageFile(file: ChatMessageFile | Ref<ChatMessageFile | undefined> | undefined): {
|
|
4
|
-
image: import("vue").ComputedRef<ChatMessageFile>;
|
|
5
|
-
media: import("vue").ComputedRef<ChatMessageFile | {
|
|
6
|
-
id?: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
size?: string;
|
|
9
|
-
mime?: string;
|
|
10
|
-
url?: string;
|
|
11
|
-
streamUrl?: string;
|
|
12
|
-
malware?: boolean;
|
|
13
|
-
}>;
|
|
14
|
-
document: import("vue").ComputedRef<ChatMessageFile | {
|
|
15
|
-
id?: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
size?: string;
|
|
18
|
-
mime?: string;
|
|
19
|
-
url?: string;
|
|
20
|
-
streamUrl?: string;
|
|
21
|
-
malware?: boolean;
|
|
22
|
-
}>;
|
|
4
|
+
image: import("vue").ComputedRef<false | ChatMessageFile | null | undefined>;
|
|
5
|
+
media: import("vue").ComputedRef<false | ChatMessageFile | {
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
size?: string | undefined;
|
|
9
|
+
mime?: string | undefined;
|
|
10
|
+
url?: string | undefined;
|
|
11
|
+
streamUrl?: string | undefined;
|
|
12
|
+
malware?: boolean | undefined;
|
|
13
|
+
} | undefined>;
|
|
14
|
+
document: import("vue").ComputedRef<false | ChatMessageFile | {
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
size?: string | undefined;
|
|
18
|
+
mime?: string | undefined;
|
|
19
|
+
url?: string | undefined;
|
|
20
|
+
streamUrl?: string | undefined;
|
|
21
|
+
malware?: boolean | undefined;
|
|
22
|
+
} | undefined>;
|
|
23
23
|
};
|
|
@@ -25,9 +25,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
25
25
|
"action:sendMessage": (text: string, options: ResultCallbacks) => any;
|
|
26
26
|
"action:attachFiles": (files: File[], options: ResultCallbacks) => any;
|
|
27
27
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
-
onLoadNextMessages?: () => any;
|
|
29
|
-
"onAction:sendMessage"?: (text: string, options: ResultCallbacks) => any;
|
|
30
|
-
"onAction:attachFiles"?: (files: File[], options: ResultCallbacks) => any;
|
|
28
|
+
onLoadNextMessages?: (() => any) | undefined;
|
|
29
|
+
"onAction:sendMessage"?: ((text: string, options: ResultCallbacks) => any) | undefined;
|
|
30
|
+
"onAction:attachFiles"?: ((files: File[], options: ResultCallbacks) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
32
|
chatId: string;
|
|
33
33
|
isChatClosed: boolean;
|