@webitel/ui-chats 0.0.19 → 0.0.20
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/ui/messaging/components/{the-chat-messages-container.vue → the-messages-container.vue} +6 -4
- package/src/ui/the-chat-container.vue +2 -2
- package/types/ui/messaging/components/the-chat-messages-container.vue.d.ts +35 -13
- package/types/ui/messaging/components/the-messages-container.vue.d.ts +18 -0
package/package.json
CHANGED
package/src/ui/messaging/components/{the-chat-messages-container.vue → the-messages-container.vue}
RENAMED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
v-if="props.next"
|
|
14
14
|
:next="props.next"
|
|
15
15
|
:loading="props.isLoading"
|
|
16
|
-
@
|
|
16
|
+
@[ChatAction.LoadNextMessages]="emit(ChatAction.LoadNextMessages)"
|
|
17
17
|
/>
|
|
18
18
|
<chat-message
|
|
19
19
|
v-for="(message, index) of props.messages"
|
|
@@ -95,10 +95,12 @@ function clickOnImage(message: ChatMessageType) {
|
|
|
95
95
|
uiChatsEmitter!.emit("clickChatMessageImage", message);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
onMounted(() => {
|
|
99
|
-
|
|
98
|
+
onMounted(async () => {
|
|
99
|
+
/* TODO: add loader on all chat(in the-chat-container?) and remove timeout after that */
|
|
100
|
+
await nextTick();
|
|
101
|
+
setTimeout(() => {
|
|
100
102
|
scrollToBottom();
|
|
101
|
-
});
|
|
103
|
+
}, 500);
|
|
102
104
|
});
|
|
103
105
|
</script>
|
|
104
106
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@dragleave.prevent="handleDragLeave"
|
|
11
11
|
@drop="sendFile"
|
|
12
12
|
/>
|
|
13
|
-
<
|
|
13
|
+
<messages-container
|
|
14
14
|
:messages="props.messages"
|
|
15
15
|
:next="props.canLoadNextMessages"
|
|
16
16
|
:is-loading="props.isNextMessagesLoading"
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
type SharedActionSlots,
|
|
60
60
|
} from "./chat-footer/modules/user-input/enums/ChatAction.enum";
|
|
61
61
|
import Dropzone from "./messaging/components/dropzone.vue";
|
|
62
|
-
import
|
|
62
|
+
import MessagesContainer from "./messaging/components/the-messages-container.vue";
|
|
63
63
|
import { useDropzoneHandlers } from "./messaging/composables/useDropzoneHandlers";
|
|
64
64
|
import { MessageAction } from "./messaging/modules/message/enums/MessageAction.enum";
|
|
65
65
|
import type { ChatMessageType } from "./messaging/types/ChatMessage.types";
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
import type { ChatMessageType } from "../types/ChatMessage.types";
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
messages: ChatMessageType[];
|
|
4
|
+
next?: boolean;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
withoutAvatars?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const __VLS_export: import("vue").DefineComponent<
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<
|
|
9
|
+
__VLS_Props,
|
|
10
|
+
{},
|
|
11
|
+
{},
|
|
12
|
+
{},
|
|
13
|
+
{},
|
|
14
|
+
import("vue").ComponentOptionsMixin,
|
|
15
|
+
import("vue").ComponentOptionsMixin,
|
|
16
|
+
{} & {
|
|
17
|
+
loadNextMessages: () => any;
|
|
18
|
+
},
|
|
19
|
+
string,
|
|
20
|
+
import("vue").PublicProps,
|
|
21
|
+
Readonly<__VLS_Props> &
|
|
22
|
+
Readonly<{
|
|
23
|
+
onLoadNextMessages?: () => any;
|
|
24
|
+
}>,
|
|
25
|
+
{
|
|
26
|
+
withoutAvatars: boolean;
|
|
27
|
+
next: boolean;
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
},
|
|
30
|
+
{},
|
|
31
|
+
{},
|
|
32
|
+
{},
|
|
33
|
+
string,
|
|
34
|
+
import("vue").ComponentProvideOptions,
|
|
35
|
+
false,
|
|
36
|
+
{},
|
|
37
|
+
any
|
|
38
|
+
>;
|
|
17
39
|
declare const _default: typeof __VLS_export;
|
|
18
40
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChatMessageType } from "../types/ChatMessage.types";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
messages: ChatMessageType[];
|
|
4
|
+
next?: boolean;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
withoutAvatars?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
loadNextMessages: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onLoadNextMessages?: () => any;
|
|
12
|
+
}>, {
|
|
13
|
+
withoutAvatars: boolean;
|
|
14
|
+
next: boolean;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|