@mobilon-dev/chotto 0.3.23 → 0.3.25
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/README.md +111 -22
- package/dist/{CreateChat-CdkAwYO5.js → CreateChat-CNWNXaD9.js} +1 -1
- package/dist/{CreateChat2-sDETTpTU.js → CreateChat2-J1zCJAH1.js} +1 -1
- package/dist/{CreateDialog-Bw8bOym2.js → CreateDialog-D_VjGFWg.js} +1 -1
- package/dist/{ModalVideoRecorder-BP9FfPE8.js → ModalVideoRecorder-BumRO5hZ.js} +1 -1
- package/dist/{SelectUser2-BAKccRXs.js → SelectUser2-DsxsLuNu.js} +1 -1
- package/dist/chotto.css +1 -1
- package/dist/{index-4foc416D.js → index-D8kOhf51.js} +2322 -2025
- 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/apps/stories/BasicChatExample.stories.d.ts +5 -0
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -2
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +56 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.d.ts +49 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts +42 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.d.ts +26 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +32 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +25 -0
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +2 -2
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/MessageReactions/stories/MessageReactions.stories.d.ts +15 -0
- package/dist/types/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.d.ts +65 -0
- package/dist/types/components/2_feed_elements/MessageStatusIndicator/stories/MessageStatusIndicator.stories.d.ts +12 -0
- package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/TextMessage/stories/TextMessage.stories.d.ts +5 -39
- package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +9 -0
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +1 -5
- package/dist/types/components/3_compounds/ChatList/ChatListHeader.vue.d.ts +16 -0
- package/dist/types/components/3_compounds/ChatList/composables/index.d.ts +4 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListActions.d.ts +29 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListFilter.d.ts +58 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListScroll.d.ts +34 -0
- package/dist/types/components/3_compounds/ChatList/composables/useChatListSelection.d.ts +56 -0
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +9 -0
- package/dist/types/components/3_compounds/Feed/stories/Feed.stories.d.ts +0 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/vuessages.es.js +97 -95
- package/dist/vuessages.umd.js +12 -12
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$emit: (event: "select-attribute-channel" | "phone-call", ...args: any[]) => void;
|
|
3
3
|
channels: unknown[];
|
|
4
|
+
channelTooltips: Record<string, any>;
|
|
4
5
|
contactAttributes: unknown[];
|
|
5
6
|
recentAttributeChannels: Record<string, any>;
|
|
6
7
|
selectedDialog: Record<string, any>;
|
|
7
|
-
channelTooltips: Record<string, any>;
|
|
8
8
|
$props: {
|
|
9
9
|
readonly channels?: unknown[] | undefined;
|
|
10
|
+
readonly channelTooltips?: Record<string, any> | undefined;
|
|
10
11
|
readonly contactAttributes?: unknown[] | undefined;
|
|
11
12
|
readonly recentAttributeChannels?: Record<string, any> | undefined;
|
|
12
13
|
readonly selectedDialog?: Record<string, any> | undefined;
|
|
13
|
-
readonly channelTooltips?: Record<string, any> | undefined;
|
|
14
14
|
};
|
|
15
15
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
16
|
export default _default;
|
package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import type { ContactAttribute } from './useCommunicationAttributes';
|
|
3
|
+
/**
|
|
4
|
+
* Тип канала панели коммуникаций.
|
|
5
|
+
*/
|
|
6
|
+
type Channel = {
|
|
7
|
+
channelId: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Тип информации о недавно использованном атрибуте для канала.
|
|
13
|
+
*/
|
|
14
|
+
type RecentAttributeMap = Record<string, {
|
|
15
|
+
channelId?: string;
|
|
16
|
+
} | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Сигнатуры событий, которые эмитит панель.
|
|
19
|
+
*/
|
|
20
|
+
interface CommunicationActionsEmit {
|
|
21
|
+
(event: 'select-attribute-channel', payload: {
|
|
22
|
+
attributeId: string;
|
|
23
|
+
channelId: string;
|
|
24
|
+
}): void;
|
|
25
|
+
(event: 'phone-call', payload: {
|
|
26
|
+
attributeId: string;
|
|
27
|
+
phoneNumber: unknown;
|
|
28
|
+
}): void;
|
|
29
|
+
}
|
|
30
|
+
interface UseCommunicationActionsOptions {
|
|
31
|
+
activeChannelType: Ref<string | null>;
|
|
32
|
+
channels: ComputedRef<Channel[]>;
|
|
33
|
+
recentAttributeChannels: ComputedRef<RecentAttributeMap>;
|
|
34
|
+
selectedChannel: Ref<Channel | Record<string, unknown>>;
|
|
35
|
+
selectedChannelType: Ref<string | null>;
|
|
36
|
+
isRecentAttributeHovered: Ref<boolean>;
|
|
37
|
+
hoveredAttribute: Ref<ContactAttribute | null>;
|
|
38
|
+
closeMenu: () => void;
|
|
39
|
+
hasMultipleChannels: (channelType: string) => boolean;
|
|
40
|
+
getSingleChannelForType: (channelType: string) => Channel | null;
|
|
41
|
+
getAvailableChannels: (channelType: string) => Channel[];
|
|
42
|
+
emit: CommunicationActionsEmit;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Инкапсулирует действия панели: звонок, выбор каналов, выбор атрибутов и работу с недавними атрибутами.
|
|
46
|
+
*/
|
|
47
|
+
export declare function useCommunicationActions({ activeChannelType, channels, recentAttributeChannels, selectedChannel, selectedChannelType, isRecentAttributeHovered, hoveredAttribute, closeMenu, hasMultipleChannels, getSingleChannelForType, getAvailableChannels, emit, }: UseCommunicationActionsOptions): {
|
|
48
|
+
handlePhoneCall: (attribute: ContactAttribute | null | undefined) => void;
|
|
49
|
+
handleRecentAttributeClick: (recentAttribute: ContactAttribute | null) => void;
|
|
50
|
+
handleAttributeClick: (attribute: ContactAttribute) => void;
|
|
51
|
+
selectSingleChannel: (attribute: ContactAttribute, channelId: string) => void;
|
|
52
|
+
selectChannelForRecentAttribute: (channelId: string, recentAttribute: ContactAttribute | null) => void;
|
|
53
|
+
selectChannel: (channelId: string) => void;
|
|
54
|
+
availableChannels: () => Channel[];
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Тип контактного атрибута из панели коммуникаций.
|
|
4
|
+
*/
|
|
5
|
+
export type ContactAttribute = {
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
data?: unknown;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Тип описания недавнего атрибута в пропсах.
|
|
14
|
+
*/
|
|
15
|
+
export type RecentAttributeChannel = {
|
|
16
|
+
attributeId?: string;
|
|
17
|
+
channelId?: string;
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
type MaybeRef<T> = T | Ref<T> | ComputedRef<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Параметры composable для работы с контактными атрибутами.
|
|
24
|
+
*/
|
|
25
|
+
interface UseCommunicationAttributesOptions {
|
|
26
|
+
/** Реактивный список контактных атрибутов */
|
|
27
|
+
contactAttributes: MaybeRef<ContactAttribute[]>;
|
|
28
|
+
/** Реактивная карта недавних атрибутов по типам */
|
|
29
|
+
recentAttributeChannels: MaybeRef<Record<string, RecentAttributeChannel>>;
|
|
30
|
+
/** Текущий активный тип канала */
|
|
31
|
+
activeChannelType: Ref<string | null>;
|
|
32
|
+
/** Текущий замороженный атрибут (подсвеченный) */
|
|
33
|
+
frozenAttribute: Ref<{
|
|
34
|
+
id?: string;
|
|
35
|
+
} | null>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Формирует структуру организованных атрибутов, вычисляет "последний" атрибут
|
|
39
|
+
* для активного канала и предоставляет вспомогательные методы для панели коммуникаций.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useCommunicationAttributes({ contactAttributes, recentAttributeChannels, activeChannelType, frozenAttribute, }: UseCommunicationAttributesOptions): {
|
|
42
|
+
organizedContactAttributes: Ref<Record<string, ContactAttribute[]>, Record<string, ContactAttribute[]>>;
|
|
43
|
+
organizeContactAttributes: () => void;
|
|
44
|
+
recentAttribute: ComputedRef<ContactAttribute | null>;
|
|
45
|
+
getRecentAttributeByType: (channelType: string) => ContactAttribute | null;
|
|
46
|
+
showRecentAttribute: ComputedRef<boolean>;
|
|
47
|
+
isAttributeFrozen: (attribute: ContactAttribute | null | undefined) => boolean;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type Component, type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Список поддерживаемых типов каналов в панели коммуникаций.
|
|
4
|
+
*/
|
|
5
|
+
export declare const CHANNEL_TYPES: readonly ["phone", "whatsapp", "telegram", "max", "sms"];
|
|
6
|
+
export type ChannelType = (typeof CHANNEL_TYPES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* Базовое описание канала.
|
|
9
|
+
*/
|
|
10
|
+
type Channel = {
|
|
11
|
+
channelId: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
type MaybeRef<T> = T | Ref<T> | ComputedRef<T>;
|
|
16
|
+
type ChannelTooltips = Record<string, string>;
|
|
17
|
+
type ChannelsRef = MaybeRef<Channel[]>;
|
|
18
|
+
type ChannelTooltipsRef = MaybeRef<ChannelTooltips | undefined>;
|
|
19
|
+
interface UseCommunicationChannelsOptions {
|
|
20
|
+
/** Реактивный список каналов */
|
|
21
|
+
channels: ChannelsRef;
|
|
22
|
+
/** Реактивная карта пользовательских подсказок */
|
|
23
|
+
channelTooltips?: ChannelTooltipsRef;
|
|
24
|
+
/** Текущий выбранный тип канала */
|
|
25
|
+
selectedChannelType: Ref<string | null>;
|
|
26
|
+
}
|
|
27
|
+
export declare function useCommunicationChannels({ channels, channelTooltips, selectedChannelType }: UseCommunicationChannelsOptions): {
|
|
28
|
+
channelsTypes: ComputedRef<{
|
|
29
|
+
type: "phone" | "whatsapp" | "telegram" | "max" | "sms";
|
|
30
|
+
component: Component;
|
|
31
|
+
}[]>;
|
|
32
|
+
getTooltipText: (channelType: string) => string;
|
|
33
|
+
getChannelTypeFromId: (channelId: string | null | undefined) => string | null;
|
|
34
|
+
hasMultipleChannels: (channelType: string) => boolean;
|
|
35
|
+
isChannelActive: (channelType: string) => boolean;
|
|
36
|
+
getSingleChannelForType: (channelType: string) => Channel | null;
|
|
37
|
+
getMenuChannelIconComponent: (channelType: string) => Component | null;
|
|
38
|
+
getMenuChannelIconComponentForChannelId: (channelId: string) => Component | null;
|
|
39
|
+
getSingleMenuChannelIconComponent: (channelType: string) => Component | null;
|
|
40
|
+
getAvailableChannels: (channelType: string) => Channel[];
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Ref, type MaybeRef } from 'vue';
|
|
2
|
+
interface Dialog {
|
|
3
|
+
channelId?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
interface Channel {
|
|
7
|
+
channelId: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface UseCommunicationDialogSyncOptions {
|
|
11
|
+
/** Текущее выбранное значение типа канала */
|
|
12
|
+
selectedChannelType: Ref<string | null>;
|
|
13
|
+
/** Текущий выбранный канал */
|
|
14
|
+
selectedChannel: Ref<Channel | Record<string, unknown>>;
|
|
15
|
+
/** Список доступных каналов */
|
|
16
|
+
channels: Ref<Channel[]>;
|
|
17
|
+
/** Текущий выбранный диалог */
|
|
18
|
+
selectedDialog: MaybeRef<Dialog | null | undefined>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Синхронизирует выбранный канал панели с внешним диалогом.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useCommunicationDialogSync({ selectedChannelType, selectedChannel, channels, selectedDialog, }: UseCommunicationDialogSyncOptions): {
|
|
24
|
+
updateSelectedChannelFromDialog: (dialog: Dialog | null | undefined) => void;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Опции для composable управления меню коммуникаций.
|
|
4
|
+
*/
|
|
5
|
+
interface UseCommunicationMenuOptions {
|
|
6
|
+
/** Ссылка на корневой контейнер панели */
|
|
7
|
+
panelRef: Ref<HTMLElement | null>;
|
|
8
|
+
/** Ссылка на панель с кнопками каналов */
|
|
9
|
+
channelsPanelRef: Ref<HTMLElement | null>;
|
|
10
|
+
/** Текущий выбранный тип канала */
|
|
11
|
+
selectedChannelType: Ref<string | null>;
|
|
12
|
+
/** Замороженный атрибут (для подсветки при наведении) */
|
|
13
|
+
frozenAttribute: Ref<unknown>;
|
|
14
|
+
/** Флаг наведения на недавний атрибут */
|
|
15
|
+
isRecentAttributeHovered: Ref<boolean>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Компонует состояние и методы открытия/закрытия меню каналов, обработки кликов
|
|
19
|
+
* и вычисления ширины меню.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useCommunicationMenu({ panelRef, channelsPanelRef, selectedChannelType, frozenAttribute, isRecentAttributeHovered, }: UseCommunicationMenuOptions): {
|
|
22
|
+
activeChannelType: Ref<string | null, string | null>;
|
|
23
|
+
hoveredChannel: Ref<string | null, string | null>;
|
|
24
|
+
showMenu: Ref<boolean, boolean>;
|
|
25
|
+
showSubMenu: Ref<boolean, boolean>;
|
|
26
|
+
menuWidth: Ref<string, string>;
|
|
27
|
+
updateMenuWidth: () => void;
|
|
28
|
+
handleChannelClick: (channelType: string) => void;
|
|
29
|
+
closeMenu: () => void;
|
|
30
|
+
handleClickOutside: (event: Event) => void;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { ContactAttribute } from './useCommunicationAttributes';
|
|
3
|
+
interface UseCommunicationSubMenuOptions {
|
|
4
|
+
activeChannelType: Ref<string | null>;
|
|
5
|
+
showSubMenu: Ref<boolean>;
|
|
6
|
+
frozenAttribute: Ref<ContactAttribute | null>;
|
|
7
|
+
hoveredAttribute: Ref<ContactAttribute | null>;
|
|
8
|
+
isRecentAttributeHovered: Ref<boolean>;
|
|
9
|
+
hasMultipleChannels: (channelType: string) => boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Управляет состоянием подменю выбора канала и hover-состояниями атрибутов.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useCommunicationSubMenu({ activeChannelType, showSubMenu, frozenAttribute, hoveredAttribute, isRecentAttributeHovered, hasMultipleChannels, }: UseCommunicationSubMenuOptions): {
|
|
15
|
+
subMenuTop: Ref<number, number>;
|
|
16
|
+
resetRegularAttributeHover: () => void;
|
|
17
|
+
handleRecentAttributeMouseEnter: (eventTarget: EventTarget | null) => EventTarget | null | undefined;
|
|
18
|
+
handleRecentAttributeMouseLeave: () => void;
|
|
19
|
+
handleAttributeMouseEnter: (attribute: ContactAttribute, eventTarget: EventTarget | null) => EventTarget | null;
|
|
20
|
+
handleAttributeMouseLeave: () => void;
|
|
21
|
+
keepSubMenuOpen: () => void;
|
|
22
|
+
closeSubMenu: () => void;
|
|
23
|
+
alignSubMenuWithTarget: (panelRef: Ref<HTMLElement | null>, targetEl: HTMLElement | null) => void;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ declare const meta: {
|
|
|
4
4
|
component: import("vue").DefineComponent<{}, {
|
|
5
5
|
$emit: (event: "select-attribute-channel" | "phone-call", ...args: any[]) => void;
|
|
6
6
|
channels: unknown[];
|
|
7
|
+
channelTooltips: Record<string, any>;
|
|
7
8
|
contactAttributes: unknown[];
|
|
8
9
|
recentAttributeChannels: Record<string, any>;
|
|
9
10
|
selectedDialog: Record<string, any>;
|
|
10
|
-
channelTooltips: Record<string, any>;
|
|
11
11
|
$props: {
|
|
12
12
|
readonly channels?: unknown[] | undefined;
|
|
13
|
+
readonly channelTooltips?: Record<string, any> | undefined;
|
|
13
14
|
readonly contactAttributes?: unknown[] | undefined;
|
|
14
15
|
readonly recentAttributeChannels?: Record<string, any> | undefined;
|
|
15
16
|
readonly selectedDialog?: Record<string, any> | undefined;
|
|
16
|
-
readonly channelTooltips?: Record<string, any> | undefined;
|
|
17
17
|
};
|
|
18
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
19
|
args: {};
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
reactionsEnabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
reply: (...args: any[]) => void;
|
|
17
21
|
action: (...args: any[]) => void;
|
|
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
32
|
type: BooleanConstructor;
|
|
29
33
|
default: boolean;
|
|
30
34
|
};
|
|
35
|
+
reactionsEnabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
31
39
|
}>> & Readonly<{
|
|
32
40
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
33
41
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
34
42
|
}>, {
|
|
35
43
|
applyStyle: Function;
|
|
36
44
|
isFirstInSeries: boolean;
|
|
45
|
+
reactionsEnabled: boolean;
|
|
37
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
47
|
export default _default;
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
reactionsEnabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
reply: (...args: any[]) => void;
|
|
17
21
|
action: (...args: any[]) => void;
|
|
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
32
|
type: BooleanConstructor;
|
|
29
33
|
default: boolean;
|
|
30
34
|
};
|
|
35
|
+
reactionsEnabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
31
39
|
}>> & Readonly<{
|
|
32
40
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
33
41
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
34
42
|
}>, {
|
|
35
43
|
applyStyle: Function;
|
|
36
44
|
isFirstInSeries: boolean;
|
|
45
|
+
reactionsEnabled: boolean;
|
|
37
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
47
|
export default _default;
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
reactionsEnabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
reply: (...args: any[]) => void;
|
|
17
21
|
action: (...args: any[]) => void;
|
|
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
32
|
type: BooleanConstructor;
|
|
29
33
|
default: boolean;
|
|
30
34
|
};
|
|
35
|
+
reactionsEnabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
31
39
|
}>> & Readonly<{
|
|
32
40
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
33
41
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
34
42
|
}>, {
|
|
35
43
|
applyStyle: Function;
|
|
36
44
|
isFirstInSeries: boolean;
|
|
45
|
+
reactionsEnabled: boolean;
|
|
37
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
47
|
export default _default;
|
|
@@ -14,6 +14,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
14
14
|
type: BooleanConstructor;
|
|
15
15
|
default: boolean;
|
|
16
16
|
};
|
|
17
|
+
enabled: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
17
21
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
22
|
"toggle-reaction": (payload: {
|
|
19
23
|
messageId: string | number;
|
|
@@ -41,6 +45,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
41
45
|
type: BooleanConstructor;
|
|
42
46
|
default: boolean;
|
|
43
47
|
};
|
|
48
|
+
enabled: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
44
52
|
}>> & Readonly<{
|
|
45
53
|
"onToggle-reaction"?: ((payload: {
|
|
46
54
|
messageId: string | number;
|
|
@@ -57,5 +65,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
57
65
|
}>, {
|
|
58
66
|
reactions: MessageReactions | undefined;
|
|
59
67
|
readonly: boolean;
|
|
68
|
+
enabled: boolean;
|
|
60
69
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
61
70
|
export default _default;
|
package/dist/types/components/2_feed_elements/MessageReactions/stories/MessageReactions.stories.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
2
|
import TextMessage from '../../TextMessage/TextMessage.vue';
|
|
3
|
+
import ImageMessage from '../../ImageMessage/ImageMessage.vue';
|
|
4
|
+
import AudioMessage from '../../AudioMessage/AudioMessage.vue';
|
|
5
|
+
import VideoMessage from '../../VideoMessage/VideoMessage.vue';
|
|
6
|
+
import FileMessage from '../../FileMessage/FileMessage.vue';
|
|
7
|
+
import StickerMessage from '../../StickerMessage/StickerMessage.vue';
|
|
3
8
|
declare const meta: Meta<typeof TextMessage>;
|
|
4
9
|
export default meta;
|
|
5
10
|
type Story = StoryObj<typeof TextMessage>;
|
|
@@ -14,3 +19,13 @@ export declare const RightMessageMultipleReactions: Story;
|
|
|
14
19
|
export declare const RightMessageNoReactions: Story;
|
|
15
20
|
export declare const AllReactionsActive: Story;
|
|
16
21
|
export declare const LargeCountReactions: Story;
|
|
22
|
+
export declare const ImageMessageWithReactions: StoryObj<typeof ImageMessage>;
|
|
23
|
+
export declare const ImageMessageRightWithReactions: StoryObj<typeof ImageMessage>;
|
|
24
|
+
export declare const AudioMessageWithReactions: StoryObj<typeof AudioMessage>;
|
|
25
|
+
export declare const AudioMessageRightWithReactions: StoryObj<typeof AudioMessage>;
|
|
26
|
+
export declare const VideoMessageWithReactions: StoryObj<typeof VideoMessage>;
|
|
27
|
+
export declare const VideoMessageRightWithReactions: StoryObj<typeof VideoMessage>;
|
|
28
|
+
export declare const FileMessageWithReactions: StoryObj<typeof FileMessage>;
|
|
29
|
+
export declare const FileMessageRightWithReactions: StoryObj<typeof FileMessage>;
|
|
30
|
+
export declare const StickerMessageWithReactions: StoryObj<typeof StickerMessage>;
|
|
31
|
+
export declare const StickerMessageRightWithReactions: StoryObj<typeof StickerMessage>;
|
package/dist/types/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
baseClass: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
messageStatus: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
statusClass: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
statusTitle: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
messageClass: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
tooltipPosition: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
statuses: {
|
|
27
|
+
type: () => string[];
|
|
28
|
+
default: () => string[];
|
|
29
|
+
};
|
|
30
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
baseClass: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
required: true;
|
|
34
|
+
};
|
|
35
|
+
messageStatus: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
statusClass: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
statusTitle: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
messageClass: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
tooltipPosition: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
statuses: {
|
|
56
|
+
type: () => string[];
|
|
57
|
+
default: () => string[];
|
|
58
|
+
};
|
|
59
|
+
}>> & Readonly<{}>, {
|
|
60
|
+
statuses: string[];
|
|
61
|
+
statusClass: string;
|
|
62
|
+
statusTitle: string;
|
|
63
|
+
tooltipPosition: string;
|
|
64
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
65
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import MessageStatusIndicator from '../MessageStatusIndicator.vue';
|
|
3
|
+
declare const meta: Meta<typeof MessageStatusIndicator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MessageStatusIndicator>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Read: Story;
|
|
8
|
+
export declare const Received: Story;
|
|
9
|
+
export declare const Sent: Story;
|
|
10
|
+
export declare const Pending: Story;
|
|
11
|
+
export declare const Error: Story;
|
|
12
|
+
export declare const HiddenForLeftMessage: Story;
|
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
+
reactionsEnabled: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
18
22
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
23
|
reply: (...args: any[]) => void;
|
|
20
24
|
action: (...args: any[]) => void;
|
|
@@ -31,11 +35,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
31
35
|
type: BooleanConstructor;
|
|
32
36
|
default: boolean;
|
|
33
37
|
};
|
|
38
|
+
reactionsEnabled: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
34
42
|
}>> & Readonly<{
|
|
35
43
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
36
44
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
37
45
|
}>, {
|
|
38
46
|
applyStyle: Function;
|
|
39
47
|
isFirstInSeries: boolean;
|
|
48
|
+
reactionsEnabled: boolean;
|
|
40
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
50
|
export default _default;
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
reactionsEnabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
reply: (...args: any[]) => void;
|
|
17
21
|
action: (...args: any[]) => void;
|
|
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
32
|
type: BooleanConstructor;
|
|
29
33
|
default: boolean;
|
|
30
34
|
};
|
|
35
|
+
reactionsEnabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
31
39
|
}>> & Readonly<{
|
|
32
40
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
33
41
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
34
42
|
}>, {
|
|
35
43
|
applyStyle: Function;
|
|
36
44
|
isFirstInSeries: boolean;
|
|
45
|
+
reactionsEnabled: boolean;
|
|
37
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
47
|
export default _default;
|
|
@@ -4,44 +4,10 @@ declare const meta: Meta<typeof TextMessage>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof TextMessage>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const LeftMessageLongText: Story;
|
|
10
|
-
export declare const LeftMessageWithSubtext: Story;
|
|
11
|
-
export declare const LeftMessageWithoutTime: Story;
|
|
12
|
-
export declare const LeftMessageWithActions: Story;
|
|
13
|
-
export declare const LeftMessageWithAvatar: Story;
|
|
14
|
-
export declare const LeftMessageWithLongTime: Story;
|
|
15
|
-
export declare const RightMessage: Story;
|
|
16
|
-
export declare const RightMessageWithViews: Story;
|
|
17
|
-
export declare const RightMessageLongText: Story;
|
|
18
|
-
export declare const RightMessageWithSubtext: Story;
|
|
19
|
-
export declare const RightMessageWithoutTime: Story;
|
|
20
|
-
export declare const RightMessageStatusSent: Story;
|
|
21
|
-
export declare const RightMessageStatusReceived: Story;
|
|
22
|
-
export declare const RightMessageStatusRead: Story;
|
|
23
|
-
export declare const RightMessageStatusPending: Story;
|
|
24
|
-
export declare const RightMessageStatusError: Story;
|
|
25
|
-
export declare const RightMessageWithActions: Story;
|
|
26
|
-
export declare const RightMessageWithAvatar: Story;
|
|
27
|
-
export declare const RightMessageWithLongTime: Story;
|
|
7
|
+
export declare const LeftMessages: Story;
|
|
8
|
+
export declare const RightMessages: Story;
|
|
28
9
|
export declare const LeftMessageMax: Story;
|
|
29
10
|
export declare const RightMessageMax: Story;
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const RightMessageWithReplyText: Story;
|
|
34
|
-
export declare const LeftMessageWithReplyImage: Story;
|
|
35
|
-
export declare const RightMessageWithReplyImage: Story;
|
|
36
|
-
export declare const LeftMessageWithReplyVideo: Story;
|
|
37
|
-
export declare const RightMessageWithReplyVideo: Story;
|
|
38
|
-
export declare const LeftMessageWithReplyFile: Story;
|
|
39
|
-
export declare const RightMessageWithReplyFile: Story;
|
|
40
|
-
export declare const LeftMessageWithReplyAudio: Story;
|
|
41
|
-
export declare const RightMessageWithReplyAudio: Story;
|
|
42
|
-
export declare const LeftMessageWithReplyCall: Story;
|
|
43
|
-
export declare const RightMessageWithReplyCall: Story;
|
|
44
|
-
export declare const LeftMessageWithPreviewLink: Story;
|
|
45
|
-
export declare const RightMessageWithPreviewLink: Story;
|
|
46
|
-
export declare const LeftMessageWithEmbed: Story;
|
|
47
|
-
export declare const RightMessageWithEmbed: Story;
|
|
11
|
+
export declare const MessagesWithLinks: Story;
|
|
12
|
+
export declare const MessagesWithReply: Story;
|
|
13
|
+
export declare const MessagesWithPreviewAndEmbed: Story;
|
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
12
12
|
type: BooleanConstructor;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
reactionsEnabled: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
15
19
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
20
|
reply: (...args: any[]) => void;
|
|
17
21
|
action: (...args: any[]) => void;
|
|
@@ -28,11 +32,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
28
32
|
type: BooleanConstructor;
|
|
29
33
|
default: boolean;
|
|
30
34
|
};
|
|
35
|
+
reactionsEnabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
31
39
|
}>> & Readonly<{
|
|
32
40
|
onReply?: ((...args: any[]) => any) | undefined;
|
|
33
41
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
34
42
|
}>, {
|
|
35
43
|
applyStyle: Function;
|
|
36
44
|
isFirstInSeries: boolean;
|
|
45
|
+
reactionsEnabled: boolean;
|
|
37
46
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
47
|
export default _default;
|