@mobilon-dev/chotto 0.3.18 → 0.3.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/dist/{CreateChat-B60kyrtg.js → CreateChat-BMkQLuPd.js} +1 -1
- package/dist/{CreateChat2-COe2EXy5.js → CreateChat2-CUxgSz4p.js} +1 -1
- package/dist/{CreateDialog-DRllcb8x.js → CreateDialog-CrL6l5Yr.js} +1 -1
- package/dist/{ModalVideoRecorder-CgDAJqKd.js → ModalVideoRecorder-D86XmPA8.js} +1 -1
- package/dist/{SelectUser2-DxKXYqx3.js → SelectUser2-CgmFwrUT.js} +1 -1
- package/dist/chotto.css +1 -1
- package/dist/index-DdDDz7e5.js +21787 -0
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.d.ts +2 -0
- package/dist/types/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.d.ts +2 -0
- package/dist/types/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.d.ts +1 -1
- package/dist/types/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.d.ts +2 -2
- package/dist/types/components/2_chatinput_elements/WABATemplateSelector/stories/WABATemplateSelector.stories.d.ts +2 -2
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +2 -0
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +11 -11
- package/dist/types/components/3_compounds/Feed/composables/index.d.ts +10 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedButton.d.ts +20 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedComponents.d.ts +6 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedGrouping.d.ts +33 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedKeyboard.d.ts +15 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedLoadMore.d.ts +23 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedMessageVisibility.d.ts +16 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedReply.d.ts +37 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedScroll.d.ts +26 -0
- package/dist/types/components/3_compounds/Feed/composables/useFeedScrollTo.d.ts +14 -0
- package/dist/types/components/3_compounds/Feed/composables/useStickyDate.d.ts +16 -0
- package/dist/types/hooks/validators/index.d.ts +1 -0
- package/dist/types/hooks/validators/useValidation.d.ts +84 -0
- package/dist/vuessages.es.js +17 -16
- package/dist/vuessages.umd.js +30 -27
- package/package.json +1 -1
- package/dist/index-Dn5sRdJY.js +0 -21534
- package/dist/types/components/1_atoms/Tooltip/Tooltip.stories.d.ts +0 -6
|
@@ -4,12 +4,14 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
4
4
|
templates: unknown[];
|
|
5
5
|
groupTemplates: unknown[];
|
|
6
6
|
elevatedWindow: boolean;
|
|
7
|
+
chatBackground?: string | undefined;
|
|
7
8
|
$props: {
|
|
8
9
|
readonly mode?: string | undefined;
|
|
9
10
|
readonly state?: string | undefined;
|
|
10
11
|
readonly templates?: unknown[] | undefined;
|
|
11
12
|
readonly groupTemplates?: unknown[] | undefined;
|
|
12
13
|
readonly elevatedWindow?: boolean | undefined;
|
|
14
|
+
readonly chatBackground?: string | undefined;
|
|
13
15
|
};
|
|
14
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
17
|
export default _default;
|
|
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
6
6
|
elevatedWindow: boolean;
|
|
7
7
|
wabaTemplates: unknown[];
|
|
8
8
|
filebumpUrl: string;
|
|
9
|
+
chatBackground?: string | undefined;
|
|
9
10
|
$props: {
|
|
10
11
|
readonly mode?: string | undefined;
|
|
11
12
|
readonly state?: string | undefined;
|
|
@@ -13,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
13
14
|
readonly elevatedWindow?: boolean | undefined;
|
|
14
15
|
readonly wabaTemplates?: unknown[] | undefined;
|
|
15
16
|
readonly filebumpUrl?: string | undefined;
|
|
17
|
+
readonly chatBackground?: string | undefined;
|
|
16
18
|
};
|
|
17
19
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
20
|
export default _default;
|
package/dist/types/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3
3
|
templates: unknown[];
|
|
4
4
|
groupTemplates: unknown[];
|
|
5
5
|
elevatedWindow: boolean;
|
|
6
|
-
chatBackground
|
|
6
|
+
chatBackground?: string | undefined;
|
|
7
7
|
$props: {
|
|
8
8
|
readonly templates?: unknown[] | undefined;
|
|
9
9
|
readonly groupTemplates?: unknown[] | undefined;
|
|
@@ -2,13 +2,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
2
2
|
$emit: (event: "closeTemplateWindow" | "sendWabaValues", ...args: any[]) => void;
|
|
3
3
|
groupTemplates: unknown[];
|
|
4
4
|
elevatedWindow: boolean;
|
|
5
|
-
chatBackground: string;
|
|
6
5
|
wabaTemplates: unknown[];
|
|
6
|
+
chatBackground?: string | undefined;
|
|
7
7
|
$props: {
|
|
8
8
|
readonly groupTemplates?: unknown[] | undefined;
|
|
9
9
|
readonly elevatedWindow?: boolean | undefined;
|
|
10
|
-
readonly chatBackground?: string | undefined;
|
|
11
10
|
readonly wabaTemplates?: unknown[] | undefined;
|
|
11
|
+
readonly chatBackground?: string | undefined;
|
|
12
12
|
};
|
|
13
13
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
14
|
export default _default;
|
|
@@ -5,13 +5,13 @@ declare const meta: {
|
|
|
5
5
|
$emit: (event: "closeTemplateWindow" | "sendWabaValues", ...args: any[]) => void;
|
|
6
6
|
groupTemplates: unknown[];
|
|
7
7
|
elevatedWindow: boolean;
|
|
8
|
-
chatBackground: string;
|
|
9
8
|
wabaTemplates: unknown[];
|
|
9
|
+
chatBackground?: string | undefined;
|
|
10
10
|
$props: {
|
|
11
11
|
readonly groupTemplates?: unknown[] | undefined;
|
|
12
12
|
readonly elevatedWindow?: boolean | undefined;
|
|
13
|
-
readonly chatBackground?: string | undefined;
|
|
14
13
|
readonly wabaTemplates?: unknown[] | undefined;
|
|
14
|
+
readonly chatBackground?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
17
|
args: {};
|
|
@@ -5,6 +5,7 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
7
|
$emit: (event: "search" | "select" | "action" | "expand" | "tab-click" | "loadMoreChats" | "clear-search", ...args: any[]) => void;
|
|
8
|
+
title: string;
|
|
8
9
|
chats: unknown[];
|
|
9
10
|
searchQuery: string;
|
|
10
11
|
titleEnabled: boolean;
|
|
@@ -16,6 +17,7 @@ declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
|
16
17
|
searchProgress: string;
|
|
17
18
|
searchStats: Record<string, any>;
|
|
18
19
|
$props: {
|
|
20
|
+
readonly title?: string | undefined;
|
|
19
21
|
readonly chats?: unknown[] | undefined;
|
|
20
22
|
readonly searchQuery?: string | undefined;
|
|
21
23
|
readonly titleEnabled?: boolean | undefined;
|
|
@@ -63,7 +63,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
63
63
|
};
|
|
64
64
|
chatBackground: {
|
|
65
65
|
type: StringConstructor;
|
|
66
|
-
default:
|
|
66
|
+
default: undefined;
|
|
67
67
|
};
|
|
68
68
|
isLoadingMore: {
|
|
69
69
|
type: BooleanConstructor;
|
|
@@ -71,13 +71,13 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
71
71
|
};
|
|
72
72
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
73
73
|
loadMore: (...args: any[]) => void;
|
|
74
|
-
|
|
74
|
+
keyboardAction: (...args: any[]) => void;
|
|
75
|
+
feedAction: (...args: any[]) => void;
|
|
75
76
|
loadMoreDown: (...args: any[]) => void;
|
|
76
|
-
|
|
77
|
+
messageAction: (...args: any[]) => void;
|
|
77
78
|
clickRepliedMessage: (...args: any[]) => void;
|
|
79
|
+
messageVisible: (...args: any[]) => void;
|
|
78
80
|
forceScrollToBottom: (...args: any[]) => void;
|
|
79
|
-
keyboardAction: (...args: any[]) => void;
|
|
80
|
-
feedAction: (...args: any[]) => void;
|
|
81
81
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
82
82
|
objects: {
|
|
83
83
|
type: {
|
|
@@ -138,7 +138,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
138
138
|
};
|
|
139
139
|
chatBackground: {
|
|
140
140
|
type: StringConstructor;
|
|
141
|
-
default:
|
|
141
|
+
default: undefined;
|
|
142
142
|
};
|
|
143
143
|
isLoadingMore: {
|
|
144
144
|
type: BooleanConstructor;
|
|
@@ -146,20 +146,20 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
146
146
|
};
|
|
147
147
|
}>> & Readonly<{
|
|
148
148
|
onLoadMore?: ((...args: any[]) => any) | undefined;
|
|
149
|
-
|
|
149
|
+
onKeyboardAction?: ((...args: any[]) => any) | undefined;
|
|
150
|
+
onFeedAction?: ((...args: any[]) => any) | undefined;
|
|
150
151
|
onLoadMoreDown?: ((...args: any[]) => any) | undefined;
|
|
151
|
-
|
|
152
|
+
onMessageAction?: ((...args: any[]) => any) | undefined;
|
|
152
153
|
onClickRepliedMessage?: ((...args: any[]) => any) | undefined;
|
|
154
|
+
onMessageVisible?: ((...args: any[]) => any) | undefined;
|
|
153
155
|
onForceScrollToBottom?: ((...args: any[]) => any) | undefined;
|
|
154
|
-
onKeyboardAction?: ((...args: any[]) => any) | undefined;
|
|
155
|
-
onFeedAction?: ((...args: any[]) => any) | undefined;
|
|
156
156
|
}>, {
|
|
157
157
|
typing: boolean | IFeedTyping;
|
|
158
158
|
chatBackground: string;
|
|
159
159
|
applyStyle: Function;
|
|
160
|
+
enableDoubleClickReply: boolean;
|
|
160
161
|
buttonParams: IFeedUnreadButton;
|
|
161
162
|
scrollToBottom: boolean;
|
|
162
|
-
enableDoubleClickReply: boolean;
|
|
163
163
|
scrollTo: string;
|
|
164
164
|
keyboardAlign: "left" | "right" | "center";
|
|
165
165
|
feedKeyboards: IFeedKeyboard[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './useFeedButton';
|
|
2
|
+
export * from './useFeedComponents';
|
|
3
|
+
export * from './useFeedGrouping';
|
|
4
|
+
export * from './useFeedKeyboard';
|
|
5
|
+
export * from './useFeedLoadMore';
|
|
6
|
+
export * from './useFeedMessageVisibility';
|
|
7
|
+
export * from './useFeedReply';
|
|
8
|
+
export * from './useFeedScroll';
|
|
9
|
+
export * from './useFeedScrollTo';
|
|
10
|
+
export * from './useStickyDate';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFeedButtonOptions {
|
|
3
|
+
feedRef: Ref<HTMLElement | null>;
|
|
4
|
+
keyboardRef: Ref<{
|
|
5
|
+
refKeyboard: {
|
|
6
|
+
clientHeight: number;
|
|
7
|
+
};
|
|
8
|
+
} | null>;
|
|
9
|
+
onButtonShow?: () => void;
|
|
10
|
+
onKeyboardPlace?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Композабл для управления кнопкой "прокрутить вниз" и позиционированием клавиатуры
|
|
14
|
+
*/
|
|
15
|
+
export declare function useFeedButton({ feedRef, keyboardRef, onButtonShow, onKeyboardPlace }: UseFeedButtonOptions): {
|
|
16
|
+
isShowButton: Ref<boolean, boolean>;
|
|
17
|
+
isKeyboardPlace: Ref<boolean, boolean>;
|
|
18
|
+
checkButtonVisibility: () => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { IFeedObject } from '@/types';
|
|
3
|
+
interface UseFeedGroupingOptions {
|
|
4
|
+
objects: ComputedRef<IFeedObject[]>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Композабл для группировки сообщений в серии (по отправителю)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFeedGrouping({ objects }: UseFeedGroupingOptions): {
|
|
10
|
+
groupedObjects: ComputedRef<{
|
|
11
|
+
isFirstInSeries: boolean;
|
|
12
|
+
messageId: string;
|
|
13
|
+
type: string;
|
|
14
|
+
header?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
position?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
time?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
alt?: string;
|
|
21
|
+
filename?: string;
|
|
22
|
+
avatar?: string;
|
|
23
|
+
subtext?: string;
|
|
24
|
+
actions?: import("@/types").IAction[];
|
|
25
|
+
views?: number;
|
|
26
|
+
callDuration?: string;
|
|
27
|
+
isMissedCall?: boolean;
|
|
28
|
+
reply?: import("@/types").Reply;
|
|
29
|
+
linkPreview?: import("@/types").ILinkPreview;
|
|
30
|
+
keyboard?: import("@/types").IKeyBoard[];
|
|
31
|
+
}[]>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFeedKeyboardOptions {
|
|
3
|
+
isKeyboardPlace: Ref<boolean>;
|
|
4
|
+
objects: Ref<any[]>;
|
|
5
|
+
emit: (event: 'keyboardAction' | 'feedAction', payload: any) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Композабл для управления видимостью и действиями клавиатур
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFeedKeyboard({ isKeyboardPlace, objects, emit }: UseFeedKeyboardOptions): {
|
|
11
|
+
showKeyboard: import("vue").ComputedRef<boolean>;
|
|
12
|
+
keyboardAction: (action: string | (() => void)) => void;
|
|
13
|
+
feedKeyboardAction: (action: string | (() => void)) => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFeedLoadMoreOptions {
|
|
3
|
+
feedRef: Ref<HTMLElement | null>;
|
|
4
|
+
emit?: (event: 'loadMore' | 'loadMoreDown', ...args: unknown[]) => void;
|
|
5
|
+
isLoadingMoreRef?: Ref<boolean>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Композабл для управления подгрузкой сообщений сверху/снизу и восстановлением позиции скролла
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFeedLoadMore({ feedRef, emit, isLoadingMoreRef }: UseFeedLoadMoreOptions): {
|
|
11
|
+
allowLoadMoreTop: Ref<boolean, boolean>;
|
|
12
|
+
allowLoadMoreBottom: Ref<boolean, boolean>;
|
|
13
|
+
movingDown: Ref<boolean, boolean>;
|
|
14
|
+
isScrollByMouseButton: Ref<boolean, boolean>;
|
|
15
|
+
pendingTopRestore: Ref<boolean, boolean>;
|
|
16
|
+
topLoadJustHappened: Ref<boolean, boolean>;
|
|
17
|
+
checkScrollPosition: (allowLoadMore?: boolean) => void;
|
|
18
|
+
restoreScrollPosition: (delay?: number) => void;
|
|
19
|
+
startScrollWatch: (event: MouseEvent) => void;
|
|
20
|
+
stopScrollWatch: () => void;
|
|
21
|
+
resetAllowFlags: () => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFeedMessageVisibilityOptions<T = unknown> {
|
|
3
|
+
feedRef: Ref<HTMLElement | null>;
|
|
4
|
+
trackingObjects: Ref<NodeListOf<Element> | undefined>;
|
|
5
|
+
chatAppId: string;
|
|
6
|
+
onMessageVisible: (message: T) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Композабл для отслеживания видимости сообщений с помощью Intersection Observer
|
|
10
|
+
*/
|
|
11
|
+
export declare function useFeedMessageVisibility<T = unknown>({ trackingObjects, chatAppId, onMessageVisible, }: UseFeedMessageVisibilityOptions<T>): {
|
|
12
|
+
observer: IntersectionObserver;
|
|
13
|
+
observeMessages: () => void;
|
|
14
|
+
restartObserving: () => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IFeedObject } from '@/types';
|
|
2
|
+
interface UseFeedReplyOptions {
|
|
3
|
+
enableDoubleClickReply: boolean;
|
|
4
|
+
emit: (event: 'messageAction' | 'clickRepliedMessage', payload: IFeedObject | string) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Композабл для обработки ответов на сообщения
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFeedReply({ enableDoubleClickReply, emit }: UseFeedReplyOptions): {
|
|
10
|
+
getMessage: () => {
|
|
11
|
+
id: string;
|
|
12
|
+
text: string;
|
|
13
|
+
file?: {
|
|
14
|
+
url: string;
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
size?: number | undefined;
|
|
17
|
+
type?: string | undefined;
|
|
18
|
+
} | undefined;
|
|
19
|
+
reply?: {
|
|
20
|
+
messageId: string;
|
|
21
|
+
type: string;
|
|
22
|
+
text?: string | undefined;
|
|
23
|
+
url?: string | undefined;
|
|
24
|
+
filename?: string | undefined;
|
|
25
|
+
header?: string | undefined;
|
|
26
|
+
callDuration?: string | undefined;
|
|
27
|
+
isMissedCall?: boolean | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
forceSend: boolean;
|
|
30
|
+
isRecording: boolean;
|
|
31
|
+
};
|
|
32
|
+
messageAction: (message: IFeedObject) => void;
|
|
33
|
+
handleClickReplied: (messageId: string) => void;
|
|
34
|
+
feedObjectDoubleClick: (event: MouseEvent, object: IFeedObject) => void;
|
|
35
|
+
handleResetReply: () => void;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Композабл для управления скроллом ленты сообщений.
|
|
4
|
+
* Инкапсулирует типичные сценарии: принудительный скролл вниз,
|
|
5
|
+
* гарантирование положения внизу, первичную инициализацию и
|
|
6
|
+
* плавную прокрутку (например, по кнопке «вниз»).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Параметры и зависимости композабла.
|
|
10
|
+
*/
|
|
11
|
+
interface UseFeedScrollOptions<T = unknown> {
|
|
12
|
+
/** Ссылка на DOM-элемент контейнера ленты */
|
|
13
|
+
feedRef: Ref<HTMLElement | null>;
|
|
14
|
+
/** Реактивный список объектов ленты (для определения, когда есть контент) */
|
|
15
|
+
objectsRef: Ref<T[]>;
|
|
16
|
+
/** Внешний флаг, который триггерит прокрутку вниз */
|
|
17
|
+
scrollToBottomRef: Ref<boolean>;
|
|
18
|
+
}
|
|
19
|
+
export declare function useFeedScroll<T = unknown>({ feedRef, objectsRef, scrollToBottomRef }: UseFeedScrollOptions<T>): {
|
|
20
|
+
isInitialized: Ref<boolean, boolean>;
|
|
21
|
+
performScrollToBottom: () => void;
|
|
22
|
+
ensureScrollToBottom: () => void;
|
|
23
|
+
initializeScroll: () => void;
|
|
24
|
+
smoothScrollToBottom: () => void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseFeedScrollToOptions {
|
|
3
|
+
/** ID целевого элемента для прокрутки */
|
|
4
|
+
targetIdRef: Ref<string | null>;
|
|
5
|
+
/** ID контейнера ленты */
|
|
6
|
+
feedContainerId: string;
|
|
7
|
+
/** CSS-класс для фокуса на сообщении */
|
|
8
|
+
focusClass?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Композабл для прокрутки к определённому сообщению с подсветкой
|
|
12
|
+
*/
|
|
13
|
+
export declare function useFeedScrollTo({ targetIdRef, feedContainerId, focusClass }: UseFeedScrollToOptions): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseStickyDateOptions {
|
|
3
|
+
feedRef: Ref<HTMLElement | null>;
|
|
4
|
+
trackingObjects: Ref<NodeListOf<Element> | undefined>;
|
|
5
|
+
autoHideDelay?: number;
|
|
6
|
+
onUpdate?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useStickyDate(options: UseStickyDateOptions): {
|
|
9
|
+
showStickyDate: Ref<boolean, boolean>;
|
|
10
|
+
stickyDateText: Ref<string, string>;
|
|
11
|
+
updateStickyDate: () => void;
|
|
12
|
+
show: () => void;
|
|
13
|
+
hide: () => void;
|
|
14
|
+
cleanup: () => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable для объединённой валидации чатов и сообщений
|
|
3
|
+
* Переносит типовую оркестрацию из приложений в саму библиотеку,
|
|
4
|
+
* чтобы сократить пользовательский код.
|
|
5
|
+
*
|
|
6
|
+
* Примеры использования:
|
|
7
|
+
*
|
|
8
|
+
* 1) Только чаты и сообщения (без sidebar):
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { useValidation } from '@mobilon-dev/chotto';
|
|
11
|
+
*
|
|
12
|
+
* const { chatValidator, messageValidator, validateAll } = useValidation(
|
|
13
|
+
* chatsRef,
|
|
14
|
+
* messagesRef,
|
|
15
|
+
* {
|
|
16
|
+
* enable: { chats: true, messages: true, sidebar: false },
|
|
17
|
+
* debounce: 300,
|
|
18
|
+
* // validateMessagesOnlyWhenSelected: true, // по умолчанию true
|
|
19
|
+
* }
|
|
20
|
+
* );
|
|
21
|
+
*
|
|
22
|
+
* validateAll();
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* 2) Все три валидатора (чаты, сообщения, sidebar):
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { useValidation } from '@mobilon-dev/chotto';
|
|
28
|
+
*
|
|
29
|
+
* const { validateAll, validateSidebar } = useValidation(
|
|
30
|
+
* chatsRef,
|
|
31
|
+
* messagesRef,
|
|
32
|
+
* {
|
|
33
|
+
* enable: { chats: true, messages: true, sidebar: true },
|
|
34
|
+
* sidebarData: sidebarItemsRef,
|
|
35
|
+
* debounce: 300,
|
|
36
|
+
* }
|
|
37
|
+
* );
|
|
38
|
+
*
|
|
39
|
+
* validateSidebar();
|
|
40
|
+
* validateAll();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
import { type Ref } from 'vue';
|
|
44
|
+
import { useChatValidator } from './chats/useChatValidator';
|
|
45
|
+
import { useMessageValidator } from './messages/useMessageValidator';
|
|
46
|
+
import { useSidebarValidator } from './sidebar/useSidebarValidator';
|
|
47
|
+
export interface UseCombinedValidationOptions {
|
|
48
|
+
autoValidate?: boolean;
|
|
49
|
+
debounce?: number;
|
|
50
|
+
enableConsoleLogging?: boolean;
|
|
51
|
+
validateMessagesOnlyWhenSelected?: boolean;
|
|
52
|
+
enable?: {
|
|
53
|
+
chats?: boolean;
|
|
54
|
+
messages?: boolean;
|
|
55
|
+
sidebar?: boolean;
|
|
56
|
+
};
|
|
57
|
+
sidebarData?: Ref<unknown>;
|
|
58
|
+
}
|
|
59
|
+
export interface UseCombinedValidationReturn {
|
|
60
|
+
chatValidator: ReturnType<typeof useChatValidator>;
|
|
61
|
+
messageValidator: ReturnType<typeof useMessageValidator>;
|
|
62
|
+
sidebarValidator: ReturnType<typeof useSidebarValidator> | null;
|
|
63
|
+
validateChats: () => void;
|
|
64
|
+
validateMessages: () => void;
|
|
65
|
+
validateSidebar: () => void;
|
|
66
|
+
validateAll: () => void;
|
|
67
|
+
getValidationStats: () => {
|
|
68
|
+
chatErrors: number;
|
|
69
|
+
chatWarnings: number;
|
|
70
|
+
messageErrors: number;
|
|
71
|
+
messageWarnings: number;
|
|
72
|
+
sidebarErrors: number;
|
|
73
|
+
sidebarWarnings: number;
|
|
74
|
+
totalErrors: number;
|
|
75
|
+
totalWarnings: number;
|
|
76
|
+
};
|
|
77
|
+
setupGlobalValidationFunctions: () => void;
|
|
78
|
+
logValidationInfo: () => void;
|
|
79
|
+
validateOnChatSelect: () => void;
|
|
80
|
+
updateChatsData: (chats: unknown[]) => void;
|
|
81
|
+
updateSidebarData: (items: unknown[]) => void;
|
|
82
|
+
initializeValidation: () => void;
|
|
83
|
+
}
|
|
84
|
+
export declare function useValidation(chatsData: Ref<unknown>, messagesData: Ref<unknown>, options?: UseCombinedValidationOptions): UseCombinedValidationReturn;
|
package/dist/vuessages.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ai as s, H as t, w as o, A as l, al as i, ag as
|
|
1
|
+
import { ai as s, H as t, w as o, A as l, al as i, ag as n, I as r, i as d, B as u, j as c, k as M, l as g, J as p, x as m, t as C, y as h, ac as y, u as S, ad as B, z as F, v as I, ak as A, a as R, b as T, f as b, c as V, D as v, C as P, K as f, N as x, E as D, ah as k, ae as L, F as W, g as w, O as E, aj as U, h as j, Q as K, m as N, n as O, am as Q, R as q, L as z, M as G, X as H, a8 as J, a9 as X, aa as Y, P as Z, Y as $, Z as _, $ as aa, a0 as ea, a1 as sa, a2 as ta, S as oa, ab as la, d as ia, af as na, a3 as ra, a4 as da, e as ua, o as ca, a5 as Ma, G as ga, T as pa, a6 as ma, U as Ca, a7 as ha, V as ya, p as Sa, q as Ba, r as Fa, s as Ia, W as Aa, aM as Ra, an as Ta, aE as ba, aH as Va, aL as va, ao as Pa, aB as fa, aO as xa, aN as Da, aP as ka, aK as La, ap as Wa, aC as wa, aq as Ea, ar as Ua, as as ja, aF as Ka, av as Na, aw as Oa, ax as Qa, ay as qa, az as za, at as Ga, aI as Ha, au as Ja, aJ as Xa, aA as Ya, aD as Za, aG as $a } from "./index-DdDDz7e5.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AdaptiveExtendedLayout,
|
|
4
4
|
t as AudioMessage,
|
|
5
5
|
o as AudioRecorder,
|
|
6
6
|
l as AvatarIcon,
|
|
7
7
|
i as BaseContainer,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
n as BaseLayout,
|
|
9
|
+
r as BaseReplyMessage,
|
|
10
10
|
d as ButtonCommandsSelector,
|
|
11
11
|
u as ButtonContextMenu,
|
|
12
12
|
c as ButtonEmojiPicker,
|
|
@@ -25,10 +25,10 @@ export {
|
|
|
25
25
|
R as CheckIcon,
|
|
26
26
|
T as CloseButtonIcon,
|
|
27
27
|
b as CommunicationPanel,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
V as ContactCRMIcon,
|
|
29
|
+
v as ContactInfo,
|
|
30
|
+
P as ContextMenu,
|
|
31
|
+
f as DateMessage,
|
|
32
32
|
x as DateMessageSticky,
|
|
33
33
|
D as EmbedPreview,
|
|
34
34
|
k as ExtendedLayout,
|
|
@@ -59,8 +59,8 @@ export {
|
|
|
59
59
|
oa as SearchIcon,
|
|
60
60
|
la as SelectUser,
|
|
61
61
|
ia as SettingsIcon,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
na as SideBar,
|
|
63
|
+
ra as SplashScreen,
|
|
64
64
|
da as SystemMessage,
|
|
65
65
|
ua as TelegramIcon,
|
|
66
66
|
ca as TemplateSelector,
|
|
@@ -79,10 +79,10 @@ export {
|
|
|
79
79
|
Ra as formatTimestamp,
|
|
80
80
|
Ta as generatePreview,
|
|
81
81
|
ba as getMessageValidationReport,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
Va as getSidebarValidationReport,
|
|
83
|
+
va as getStatus,
|
|
84
|
+
Pa as getTypeFileByMime,
|
|
85
|
+
fa as getValidationReport,
|
|
86
86
|
xa as insertDaySeparators,
|
|
87
87
|
Da as playNotificationAudio,
|
|
88
88
|
ka as sortByTimestamp,
|
|
@@ -101,7 +101,8 @@ export {
|
|
|
101
101
|
Ga as useSearchModel,
|
|
102
102
|
Ha as useSidebarValidator,
|
|
103
103
|
Ja as useTheme,
|
|
104
|
-
Xa as
|
|
105
|
-
Ya as
|
|
106
|
-
Za as
|
|
104
|
+
Xa as useValidation,
|
|
105
|
+
Ya as validateChats,
|
|
106
|
+
Za as validateMessages,
|
|
107
|
+
$a as validateSidebarItems
|
|
107
108
|
};
|