@mobilon-dev/chotto 0.3.111 → 0.3.112
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/chotto.css +1 -1
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +2 -2
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +37 -25
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +341 -253
- package/dist/hooks/messages/buildReplyPayload.js +14 -12
- package/dist/hooks/messages/getImageMessageItems.js +21 -0
- package/dist/hooks/validators/messages/messageValidator.js +49 -42
- package/dist/index.js +80 -77
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/src/apps/data/messages.d.ts +250 -77
- package/dist/types/src/components/2_feed_elements/ImageMessage/stories/ImageMessage.stories.d.ts +3 -0
- package/dist/types/src/components/2_feed_elements/ImageMessage/styles/types.d.ts +40 -0
- package/dist/types/src/components/2_feed_elements/types/components.d.ts +3 -1
- package/dist/types/src/components/2_feed_elements/types/messages.d.ts +15 -1
- package/dist/types/src/hooks/messages/buildReplyPayload.d.ts +2 -1
- package/dist/types/src/hooks/messages/getImageMessageItems.d.ts +12 -0
- package/dist/types/src/hooks/messages/index.d.ts +1 -0
- package/dist/types/src/hooks/validators/messages/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { getPrimaryImageItem as l } from "./getImageMessageItems.js";
|
|
2
|
+
function o(e, i) {
|
|
3
|
+
const r = i === "message.image" || e.type === "message.image" ? l(e) : void 0;
|
|
2
4
|
return {
|
|
3
|
-
messageId: String(
|
|
4
|
-
type:
|
|
5
|
-
text:
|
|
6
|
-
filename: r.filename,
|
|
7
|
-
url: r.url,
|
|
8
|
-
imagePreviewUrl: r.imagePreviewUrl,
|
|
9
|
-
videoPreviewUrl:
|
|
10
|
-
coverUrl:
|
|
11
|
-
header:
|
|
12
|
-
callDuration:
|
|
5
|
+
messageId: String(e.messageId),
|
|
6
|
+
type: e.type ?? i,
|
|
7
|
+
text: e.text,
|
|
8
|
+
filename: e.filename ?? (r == null ? void 0 : r.filename),
|
|
9
|
+
url: e.url || (r == null ? void 0 : r.url),
|
|
10
|
+
imagePreviewUrl: e.imagePreviewUrl || (r == null ? void 0 : r.imagePreviewUrl),
|
|
11
|
+
videoPreviewUrl: e.videoPreviewUrl,
|
|
12
|
+
coverUrl: e.coverUrl,
|
|
13
|
+
header: e.header,
|
|
14
|
+
callDuration: e.callDuration
|
|
13
15
|
};
|
|
14
16
|
}
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
o as buildReplyPayload
|
|
17
19
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function e(r) {
|
|
2
|
+
if (!r || typeof r != "object") return !1;
|
|
3
|
+
const t = r.url;
|
|
4
|
+
return typeof t == "string" && t.length > 0;
|
|
5
|
+
}
|
|
6
|
+
function n(r) {
|
|
7
|
+
if (!r) return [];
|
|
8
|
+
const t = (r.items ?? []).filter(e);
|
|
9
|
+
return t.length ? t : typeof r.url == "string" && r.url ? [{
|
|
10
|
+
url: r.url,
|
|
11
|
+
imagePreviewUrl: r.imagePreviewUrl,
|
|
12
|
+
filename: r.filename
|
|
13
|
+
}] : [];
|
|
14
|
+
}
|
|
15
|
+
function i(r) {
|
|
16
|
+
return n(r)[0];
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
n as getImageMessageItems,
|
|
20
|
+
i as getPrimaryImageItem
|
|
21
|
+
};
|
|
@@ -1,78 +1,85 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
return typeof e != "object" || e === null ? (
|
|
1
|
+
function d(e, r) {
|
|
2
|
+
const i = [], t = `messages[${r}].reply`;
|
|
3
|
+
return typeof e != "object" || e === null ? (i.push({ path: t, message: "Reply должен быть объектом", value: e }), i) : (e.messageId === void 0 ? i.push({ path: `${t}.messageId`, message: "Поле messageId обязательно", value: e.messageId }) : typeof e.messageId != "string" && typeof e.messageId != "number" && i.push({ path: `${t}.messageId`, message: "Поле messageId должно быть строкой или числом", value: e.messageId }), (!e.type || typeof e.type != "string") && i.push({ path: `${t}.type`, message: "Поле type обязательно и должно быть строкой", value: e.type }), e.text !== void 0 && typeof e.text != "string" && i.push({ path: `${t}.text`, message: "Поле text должно быть строкой", value: e.text }), e.url !== void 0 && typeof e.url != "string" && i.push({ path: `${t}.url`, message: "Поле url должно быть строкой", value: e.url }), e.imagePreviewUrl !== void 0 && typeof e.imagePreviewUrl != "string" && i.push({ path: `${t}.imagePreviewUrl`, message: "Поле imagePreviewUrl должно быть строкой", value: e.imagePreviewUrl }), e.videoPreviewUrl !== void 0 && typeof e.videoPreviewUrl != "string" && i.push({ path: `${t}.videoPreviewUrl`, message: "Поле videoPreviewUrl должно быть строкой", value: e.videoPreviewUrl }), e.coverUrl !== void 0 && typeof e.coverUrl != "string" && i.push({ path: `${t}.coverUrl`, message: "Поле coverUrl должно быть строкой", value: e.coverUrl }), e.filename !== void 0 && typeof e.filename != "string" && i.push({ path: `${t}.filename`, message: "Поле filename должно быть строкой", value: e.filename }), i);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
const
|
|
5
|
+
function v(e, r) {
|
|
6
|
+
const i = [], t = `messages[${r}]`;
|
|
7
7
|
if (typeof e != "object" || e === null)
|
|
8
|
-
return
|
|
9
|
-
if (e.chatId !== void 0 && typeof e.chatId != "string" &&
|
|
8
|
+
return i.push({ path: t, message: "Сообщение должно быть объектом", value: e }), i;
|
|
9
|
+
if (e.chatId !== void 0 && typeof e.chatId != "string" && i.push({ path: `${t}.chatId`, message: "Поле chatId должно быть строкой", value: e.chatId }), e.type !== "system.date" && (e.messageId === void 0 ? i.push({ path: `${t}.messageId`, message: "Поле messageId обязательно", value: e.messageId }) : typeof e.messageId != "string" && typeof e.messageId != "number" && i.push({ path: `${t}.messageId`, message: "Поле messageId должно быть строкой или числом", value: e.messageId })), (!e.type || typeof e.type != "string") && i.push({ path: `${t}.type`, message: "Поле type обязательно и должно быть строкой", value: e.type }), e.type !== "system.date" && (e.timestamp === void 0 ? i.push({ path: `${t}.timestamp`, message: "Поле timestamp обязательно", value: e.timestamp }) : typeof e.timestamp != "string" && typeof e.timestamp != "number" && i.push({ path: `${t}.timestamp`, message: "Поле timestamp должно быть строкой или числом", value: e.timestamp })), e.dialogId !== void 0 && typeof e.dialogId != "string" && i.push({ path: `${t}.dialogId`, message: "Поле dialogId должно быть строкой", value: e.dialogId }), e.direction !== void 0) {
|
|
10
10
|
const a = ["incoming", "outgoing"];
|
|
11
|
-
a.includes(e.direction) ||
|
|
12
|
-
path: `${
|
|
11
|
+
a.includes(e.direction) || i.push({
|
|
12
|
+
path: `${t}.direction`,
|
|
13
13
|
message: `Поле direction должно быть одним из: ${a.join(", ")}`,
|
|
14
14
|
value: e.direction
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
if (e.status !== void 0) {
|
|
18
18
|
const a = ["read", "sent", "received"];
|
|
19
|
-
a.includes(e.status) ||
|
|
20
|
-
path: `${
|
|
19
|
+
a.includes(e.status) || i.push({
|
|
20
|
+
path: `${t}.status`,
|
|
21
21
|
message: `Поле status должно быть одним из: ${a.join(", ")}`,
|
|
22
22
|
value: e.status
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
return e.text !== void 0 && typeof e.text != "string" &&
|
|
25
|
+
return e.text !== void 0 && typeof e.text != "string" && i.push({ path: `${t}.text`, message: "Поле text должно быть строкой", value: e.text }), e.header !== void 0 && typeof e.header != "string" && i.push({ path: `${t}.header`, message: "Поле header должно быть строкой", value: e.header }), e.subText !== void 0 && typeof e.subText != "string" && i.push({ path: `${t}.subText`, message: "Поле subText должно быть строкой", value: e.subText }), e.avatar !== void 0 && typeof e.avatar != "string" && i.push({ path: `${t}.avatar`, message: "Поле avatar должно быть строкой", value: e.avatar }), e.url !== void 0 && typeof e.url != "string" && i.push({ path: `${t}.url`, message: "Поле url должно быть строкой", value: e.url }), e.imagePreviewUrl !== void 0 && typeof e.imagePreviewUrl != "string" && i.push({ path: `${t}.imagePreviewUrl`, message: "Поле imagePreviewUrl должно быть строкой", value: e.imagePreviewUrl }), e.videoPreviewUrl !== void 0 && typeof e.videoPreviewUrl != "string" && i.push({ path: `${t}.videoPreviewUrl`, message: "Поле videoPreviewUrl должно быть строкой", value: e.videoPreviewUrl }), e.coverUrl !== void 0 && typeof e.coverUrl != "string" && i.push({ path: `${t}.coverUrl`, message: "Поле coverUrl должно быть строкой", value: e.coverUrl }), e.filename !== void 0 && typeof e.filename != "string" && i.push({ path: `${t}.filename`, message: "Поле filename должно быть строкой", value: e.filename }), e.views !== void 0 && typeof e.views != "number" && i.push({ path: `${t}.views`, message: "Поле views должно быть числом", value: e.views }), e.items !== void 0 && (Array.isArray(e.items) ? e.items.forEach((a, s) => {
|
|
26
|
+
const o = `${t}.items[${s}]`;
|
|
27
|
+
if (typeof a != "object" || a === null) {
|
|
28
|
+
i.push({ path: o, message: "Элемент items должен быть объектом", value: a });
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
(!a.url || typeof a.url != "string") && i.push({ path: `${o}.url`, message: "Поле url обязательно и должно быть строкой", value: a.url }), a.imagePreviewUrl !== void 0 && typeof a.imagePreviewUrl != "string" && i.push({ path: `${o}.imagePreviewUrl`, message: "Поле imagePreviewUrl должно быть строкой", value: a.imagePreviewUrl }), a.filename !== void 0 && typeof a.filename != "string" && i.push({ path: `${o}.filename`, message: "Поле filename должно быть строкой", value: a.filename }), a.size !== void 0 && typeof a.size != "number" && typeof a.size != "string" && i.push({ path: `${o}.size`, message: "Поле size должно быть числом или строкой", value: a.size });
|
|
32
|
+
}) : i.push({ path: `${t}.items`, message: "Поле items должно быть массивом", value: e.items })), e.reply !== void 0 && i.push(...d(e.reply, r)), e.embed !== void 0 && (typeof e.embed != "object" || e.embed === null ? i.push({ path: `${t}.embed`, message: "Поле embed должно быть объектом", value: e.embed }) : ((!e.embed.type || typeof e.embed.type != "string") && i.push({ path: `${t}.embed.type`, message: "Поле embed.type обязательно и должно быть строкой", value: e.embed.type }), (!e.embed.url || typeof e.embed.url != "string") && i.push({ path: `${t}.embed.url`, message: "Поле embed.url обязательно и должно быть строкой", value: e.embed.url }))), i;
|
|
26
33
|
}
|
|
27
|
-
function
|
|
28
|
-
const
|
|
34
|
+
function l(e) {
|
|
35
|
+
const r = [], i = [];
|
|
29
36
|
if (!Array.isArray(e))
|
|
30
37
|
return {
|
|
31
38
|
isValid: !1,
|
|
32
39
|
errors: [{ path: "messages", message: "Данные должны быть массивом", value: e }],
|
|
33
40
|
warnings: []
|
|
34
41
|
};
|
|
35
|
-
e.length === 0 &&
|
|
36
|
-
const
|
|
37
|
-
return e.forEach((a,
|
|
42
|
+
e.length === 0 && i.push({ path: "messages", message: "Массив сообщений пустой" });
|
|
43
|
+
const t = /* @__PURE__ */ new Map();
|
|
44
|
+
return e.forEach((a, s) => {
|
|
38
45
|
if (a && typeof a == "object" && a.chatId !== void 0 && a.messageId !== void 0) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const u =
|
|
46
|
+
const o = a.dialogId ? `${a.chatId}:${a.dialogId}` : `${a.chatId}`;
|
|
47
|
+
t.has(o) || t.set(o, /* @__PURE__ */ new Set());
|
|
48
|
+
const u = t.get(o);
|
|
42
49
|
if (u.has(a.messageId)) {
|
|
43
50
|
const p = a.dialogId ? `в чате ${a.chatId}, диалоге ${a.dialogId}` : `в чате ${a.chatId}`;
|
|
44
|
-
|
|
45
|
-
path: `messages[${
|
|
51
|
+
r.push({
|
|
52
|
+
path: `messages[${s}].messageId`,
|
|
46
53
|
message: `Дублирующийся messageId ${p}`,
|
|
47
54
|
value: a.messageId
|
|
48
55
|
});
|
|
49
56
|
} else
|
|
50
57
|
u.add(a.messageId);
|
|
51
58
|
}
|
|
52
|
-
}), e.forEach((a,
|
|
53
|
-
|
|
59
|
+
}), e.forEach((a, s) => {
|
|
60
|
+
r.push(...v(a, s));
|
|
54
61
|
}), {
|
|
55
|
-
isValid:
|
|
56
|
-
errors:
|
|
57
|
-
warnings:
|
|
62
|
+
isValid: r.length === 0,
|
|
63
|
+
errors: r,
|
|
64
|
+
warnings: i
|
|
58
65
|
};
|
|
59
66
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
`), e.isValid ?
|
|
64
|
-
`) :
|
|
65
|
-
`), e.errors.length > 0 && (
|
|
66
|
-
🔴 ОШИБКИ (${e.errors.length}):`), e.errors.forEach((
|
|
67
|
-
|
|
68
|
-
})), e.warnings.length > 0 && (
|
|
69
|
-
⚠️ ПРЕДУПРЕЖДЕНИЯ (${e.warnings.length}):`), e.warnings.forEach((
|
|
70
|
-
|
|
71
|
-
})),
|
|
72
|
-
` + "=".repeat(40)),
|
|
67
|
+
function h(e) {
|
|
68
|
+
const r = [];
|
|
69
|
+
return r.push(`=== РЕЗУЛЬТАТ ВАЛИДАЦИИ СООБЩЕНИЙ ===
|
|
70
|
+
`), e.isValid ? r.push(`✅ Данные валидны!
|
|
71
|
+
`) : r.push(`❌ Обнаружены ошибки!
|
|
72
|
+
`), e.errors.length > 0 && (r.push(`
|
|
73
|
+
🔴 ОШИБКИ (${e.errors.length}):`), e.errors.forEach((i, t) => {
|
|
74
|
+
r.push(` ${t + 1}. [${i.path}] ${i.message}`), i.value !== void 0 && r.push(` Значение: ${JSON.stringify(i.value)}`);
|
|
75
|
+
})), e.warnings.length > 0 && (r.push(`
|
|
76
|
+
⚠️ ПРЕДУПРЕЖДЕНИЯ (${e.warnings.length}):`), e.warnings.forEach((i, t) => {
|
|
77
|
+
r.push(` ${t + 1}. [${i.path}] ${i.message}`), i.value !== void 0 && r.push(` Значение: ${JSON.stringify(i.value)}`);
|
|
78
|
+
})), r.push(`
|
|
79
|
+
` + "=".repeat(40)), r.join(`
|
|
73
80
|
`);
|
|
74
81
|
}
|
|
75
82
|
export {
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
h as getMessageValidationReport,
|
|
84
|
+
l as validateMessages
|
|
78
85
|
};
|
package/dist/index.js
CHANGED
|
@@ -9,11 +9,11 @@ import { default as n } from "./components/1_atoms/Tooltip/Tooltip.vue.js";
|
|
|
9
9
|
import { default as M } from "./components/1_icons/AvatarIcon.vue.js";
|
|
10
10
|
import { default as S } from "./components/1_icons/CheckIcon.vue.js";
|
|
11
11
|
import { default as h } from "./components/1_icons/CloseButtonIcon.vue.js";
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
12
|
+
import { default as I } from "./components/1_icons/ContactCRMIcon.vue.js";
|
|
13
|
+
import { default as T } from "./components/1_icons/MenuIcon.vue.js";
|
|
14
|
+
import { default as F } from "./components/1_icons/SearchIcon.vue.js";
|
|
15
15
|
import { default as E } from "./components/1_icons/SettingsIcon.vue.js";
|
|
16
|
-
import { default as
|
|
16
|
+
import { default as D } from "./components/1_icons/TelegramIcon.vue.js";
|
|
17
17
|
import { default as b } from "./components/1_icons/WhatsAppIcon.vue.js";
|
|
18
18
|
import { default as k } from "./components/1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
19
19
|
import { default as V } from "./components/1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
@@ -36,11 +36,11 @@ import { default as ne } from "./components/2_chatinput_elements/TemplateSelecto
|
|
|
36
36
|
import { default as Me } from "./components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
|
|
37
37
|
import { default as Se } from "./components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js";
|
|
38
38
|
import { default as he } from "./components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js";
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
39
|
+
import { default as Ie } from "./components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js";
|
|
40
|
+
import { default as Te } from "./components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js";
|
|
41
|
+
import { default as Fe } from "./components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js";
|
|
42
42
|
import { default as Ee } from "./components/2_chatlist_elements/ChatItem/ChatItem.vue.js";
|
|
43
|
-
import { default as
|
|
43
|
+
import { default as De } from "./components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js";
|
|
44
44
|
import { default as be } from "./components/2_elements/AudioRecorder/AudioRecorder.vue.js";
|
|
45
45
|
import { default as ke } from "./components/2_elements/ChannelSelector/ChannelSelector.vue.js";
|
|
46
46
|
import { default as Ve } from "./components/2_elements/ChatInfo/ChatInfo.vue.js";
|
|
@@ -63,11 +63,11 @@ import { default as nt } from "./components/2_feed_elements/EditTextMessage/Edit
|
|
|
63
63
|
import { default as Mt } from "./components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js";
|
|
64
64
|
import { default as St } from "./components/2_feed_elements/FileMessage/FileMessage.vue.js";
|
|
65
65
|
import { default as ht } from "./components/2_feed_elements/ImageMessage/ImageMessage.vue.js";
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
66
|
+
import { default as It } from "./components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
|
|
67
|
+
import { default as Tt } from "./components/2_feed_elements/MessageReactions/MessageReactions.vue.js";
|
|
68
|
+
import { default as Ft } from "./components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js";
|
|
69
69
|
import { default as Et } from "./components/2_feed_elements/StickerMessage/StickerMessage.vue.js";
|
|
70
|
-
import { default as
|
|
70
|
+
import { default as Dt } from "./components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js";
|
|
71
71
|
import { default as bt } from "./components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js";
|
|
72
72
|
import { default as kt } from "./components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js";
|
|
73
73
|
import { default as Vt } from "./components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js";
|
|
@@ -90,10 +90,10 @@ import { default as co } from "./components/3_compounds/ChatList/ChatList.vue.js
|
|
|
90
90
|
import { default as go } from "./components/3_compounds/Feed/Feed.vue.js";
|
|
91
91
|
import { default as Co } from "./components/3_compounds/SideBar/SideBar.vue.js";
|
|
92
92
|
import { default as yo } from "./components/4_layouts/BaseLayout/BaseLayout.vue.js";
|
|
93
|
-
import { default as
|
|
94
|
-
import { default as
|
|
93
|
+
import { default as Ro } from "./components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js";
|
|
94
|
+
import { default as Ao } from "./components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js";
|
|
95
95
|
import { default as vo } from "./components/4_layouts/FeedLayout/FeedLayout.vue.js";
|
|
96
|
-
import { default as
|
|
96
|
+
import { default as Po } from "./components/4_layouts/ChatWrapper/ChatWrapper.vue.js";
|
|
97
97
|
import { default as Bo } from "./components/5_containers/BaseContainer/BaseContainer.vue.js";
|
|
98
98
|
import { default as Lo } from "./components/5_containers/FloatContainer/FloatContainer.vue.js";
|
|
99
99
|
import { buildFilePreview as wo, generatePreview as Vo } from "./hooks/uploadFile/generatePreview.js";
|
|
@@ -107,11 +107,11 @@ import { MAX_ATTACHED_FILES as Jo, commitChatDraftToList as Zo, createMessageDra
|
|
|
107
107
|
import { createSearchModelStore as lr, provideSearchModelStore as pr, searchModelStoreKey as dr, useSearchModel as mr } from "./hooks/useSearchModel.js";
|
|
108
108
|
import { createThemeStore as xr, provideThemeStore as ir, themeStoreKey as nr, useTheme as cr } from "./hooks/useTheme.js";
|
|
109
109
|
import { createEmojiNativeStore as gr, emojiNativeStoreKey as Sr, provideEmojiNativeStore as Cr, useEmojiNative as hr } from "./hooks/useEmojiNative.js";
|
|
110
|
-
import { provideChatAppStores as
|
|
111
|
-
import { useModalCreateChat as
|
|
112
|
-
import { useModalCreateChat2 as
|
|
110
|
+
import { provideChatAppStores as Ir } from "./hooks/provideChatAppStores.js";
|
|
111
|
+
import { useModalCreateChat as Tr } from "./hooks/modals/useCreateChat.js";
|
|
112
|
+
import { useModalCreateChat2 as Fr } from "./hooks/modals/useCreateChat2.js";
|
|
113
113
|
import { useModalCreateDialog as Er } from "./hooks/modals/useCreateDialog.js";
|
|
114
|
-
import { useConfirmDeleteMessage as
|
|
114
|
+
import { useConfirmDeleteMessage as Dr } from "./hooks/modals/useConfirmDeleteMessage.js";
|
|
115
115
|
import { useModalSelectUser2 as br } from "./hooks/modals/useModalSelectUser2.js";
|
|
116
116
|
import { useModalVideoRecorder as kr } from "./hooks/modals/useVideoRecorder.js";
|
|
117
117
|
import { getValidationReport as Vr, validateChats as Kr } from "./hooks/validators/chats/chatValidator.js";
|
|
@@ -131,25 +131,26 @@ import { useMessageLinks as ia } from "./hooks/messages/useMessageLinks.js";
|
|
|
131
131
|
import { useChannelAccentColor as ca } from "./hooks/messages/useChannelAccentColor.js";
|
|
132
132
|
import { useSubtextTooltip as ga } from "./hooks/messages/useSubtextTooltip.js";
|
|
133
133
|
import { hideReplyPreview as Ca, showReplyPreview as ha, useStartReply as ya } from "./hooks/messages/useStartReply.js";
|
|
134
|
-
import { hideEditPreview as
|
|
135
|
-
import { canStartEditLastSent as va, isCursorOnFirstLine as Ea, isEditableLastSentCandidate as
|
|
134
|
+
import { hideEditPreview as Ra, showEditPreview as Ta, useStartEdit as Aa } from "./hooks/messages/useStartEdit.js";
|
|
135
|
+
import { canStartEditLastSent as va, isCursorOnFirstLine as Ea, isEditableLastSentCandidate as Pa } from "./hooks/messages/canStartEditLastSent.js";
|
|
136
136
|
import { buildReplyPayload as Ba } from "./hooks/messages/buildReplyPayload.js";
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
144
|
-
import {
|
|
145
|
-
import {
|
|
146
|
-
import {
|
|
147
|
-
import {
|
|
148
|
-
import {
|
|
149
|
-
import {
|
|
150
|
-
import {
|
|
137
|
+
import { getImageMessageItems as La, getPrimaryImageItem as ka } from "./hooks/messages/getImageMessageItems.js";
|
|
138
|
+
import { buildEditPayload as Va } from "./hooks/messages/buildEditPayload.js";
|
|
139
|
+
import { getEditTooltipLines as Na } from "./hooks/messages/getEditTooltipLines.js";
|
|
140
|
+
import { getDeletedOriginalText as Wa, getDeletedTooltipLines as ja } from "./hooks/messages/getDeletedOriginalText.js";
|
|
141
|
+
import { getStatus as _a, getStatusTitle as Oa, statuses as Qa } from "./functions/getStatusMessage.js";
|
|
142
|
+
import { formatTimestamp as Xa } from "./functions/formatTimestamp.js";
|
|
143
|
+
import { playNotificationAudio as qa } from "./functions/playNotificationAudio.js";
|
|
144
|
+
import { insertDaySeparators as Ja } from "./functions/insertDaySeparators.js";
|
|
145
|
+
import { sortByTimestamp as $a } from "./functions/sortByTimestamp.js";
|
|
146
|
+
import { getMessageClass as ts } from "./functions/getMessageClass.js";
|
|
147
|
+
import { createReactionHandlers as rs } from "./functions/createReactionHandlers.js";
|
|
148
|
+
import { getChannelAccentColor as ss } from "./functions/getChannelAccentColor.js";
|
|
149
|
+
import { isSmsChannel as ls, isSmsFeedMessage as ps } from "./functions/isSmsChannel.js";
|
|
150
|
+
import { parseMarkdown as ms } from "./functions/parseMarkdown.js";
|
|
151
|
+
import { safeMediaPlay as xs, safeMediaPlayVoid as is } from "./functions/safeMediaPlay.js";
|
|
151
152
|
export {
|
|
152
|
-
|
|
153
|
+
Ao as AdaptiveExtendedLayout,
|
|
153
154
|
Ye as AudioMessage,
|
|
154
155
|
be as AudioRecorder,
|
|
155
156
|
M as AvatarIcon,
|
|
@@ -164,20 +165,20 @@ export {
|
|
|
164
165
|
ae as ButtonWabaTemplateSelector,
|
|
165
166
|
ot as CallMessage,
|
|
166
167
|
ke as ChannelSelector,
|
|
167
|
-
|
|
168
|
+
Fe as ChatFilter,
|
|
168
169
|
Ve as ChatInfo,
|
|
169
170
|
uo as ChatInput,
|
|
170
171
|
Ee as ChatItem,
|
|
171
172
|
co as ChatList,
|
|
172
173
|
io as ChatListHeader,
|
|
173
174
|
Ne as ChatPanel,
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
De as ChatTabs,
|
|
176
|
+
Po as ChatWrapper,
|
|
176
177
|
S as CheckIcon,
|
|
177
178
|
h as CloseButtonIcon,
|
|
178
179
|
O as CommunicationPanel,
|
|
179
180
|
fo as ConfirmDeleteMessage,
|
|
180
|
-
|
|
181
|
+
I as ContactCRMIcon,
|
|
181
182
|
f as ContactContextMenu,
|
|
182
183
|
We as ContactInfo,
|
|
183
184
|
p as ContextMenu,
|
|
@@ -188,7 +189,7 @@ export {
|
|
|
188
189
|
nt as EditTextMessage,
|
|
189
190
|
m as EmbedPreview,
|
|
190
191
|
k as ErrorStatusIcon,
|
|
191
|
-
|
|
192
|
+
Ro as ExtendedLayout,
|
|
192
193
|
go as Feed,
|
|
193
194
|
G as FeedFoundItem,
|
|
194
195
|
Y as FeedFoundObjects,
|
|
@@ -204,10 +205,10 @@ export {
|
|
|
204
205
|
x as LinkPreview,
|
|
205
206
|
Jo as MAX_ATTACHED_FILES,
|
|
206
207
|
sa as MESSAGE_REACTIONS_PATCH_KEY,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
T as MenuIcon,
|
|
209
|
+
It as MessageKeyboard,
|
|
210
|
+
Tt as MessageReactions,
|
|
211
|
+
Ft as MessageStatusIndicator,
|
|
211
212
|
pt as MissedCallMessage,
|
|
212
213
|
eo as Modal,
|
|
213
214
|
oo as ModalFullscreen,
|
|
@@ -216,14 +217,14 @@ export {
|
|
|
216
217
|
me as PlaceholderComponent,
|
|
217
218
|
N as ReadStatusIcon,
|
|
218
219
|
W as ReceivedStatusIcon,
|
|
219
|
-
|
|
220
|
+
Dt as ReplyAudioMessage,
|
|
220
221
|
bt as ReplyCallMessage,
|
|
221
222
|
kt as ReplyFileMessage,
|
|
222
223
|
Vt as ReplyImageMessage,
|
|
223
224
|
Nt as ReplyStickerMessage,
|
|
224
225
|
Wt as ReplyTextMessage,
|
|
225
226
|
Ht as ReplyVideoMessage,
|
|
226
|
-
|
|
227
|
+
F as SearchIcon,
|
|
227
228
|
po as SelectUser,
|
|
228
229
|
H as SentStatusIcon,
|
|
229
230
|
E as SettingsIcon,
|
|
@@ -232,7 +233,7 @@ export {
|
|
|
232
233
|
Et as StickerMessage,
|
|
233
234
|
xe as StickerPicker,
|
|
234
235
|
Gt as SystemMessage,
|
|
235
|
-
|
|
236
|
+
D as TelegramIcon,
|
|
236
237
|
ne as TemplateSelector,
|
|
237
238
|
Me as TextFormatToolbar,
|
|
238
239
|
Yt as TextMessage,
|
|
@@ -244,10 +245,10 @@ export {
|
|
|
244
245
|
Ge as VideoRecorder,
|
|
245
246
|
Se as WABAAttachmentSection,
|
|
246
247
|
he as WABAQuickReplyButtons,
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
Ie as WABASeparatedQuickButtons,
|
|
249
|
+
Te as WABATemplateSelector,
|
|
249
250
|
b as WhatsAppIcon,
|
|
250
|
-
|
|
251
|
+
Va as buildEditPayload,
|
|
251
252
|
wo as buildFilePreview,
|
|
252
253
|
Ba as buildReplyPayload,
|
|
253
254
|
pa as calculateMessageMenuPosition,
|
|
@@ -256,56 +257,58 @@ export {
|
|
|
256
257
|
Zo as commitChatDraftToList,
|
|
257
258
|
gr as createEmojiNativeStore,
|
|
258
259
|
$o as createMessageDraftStore,
|
|
259
|
-
|
|
260
|
+
rs as createReactionHandlers,
|
|
260
261
|
lr as createSearchModelStore,
|
|
261
262
|
xr as createThemeStore,
|
|
262
263
|
Sr as emojiNativeStoreKey,
|
|
263
264
|
da as findAppBoundsRect,
|
|
264
|
-
|
|
265
|
+
Xa as formatTimestamp,
|
|
265
266
|
Vo as generatePreview,
|
|
266
|
-
|
|
267
|
+
ss as getChannelAccentColor,
|
|
267
268
|
er as getChatDraft,
|
|
268
|
-
|
|
269
|
-
|
|
269
|
+
Wa as getDeletedOriginalText,
|
|
270
|
+
ja as getDeletedTooltipLines,
|
|
270
271
|
tr as getDraftFiles,
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
Na as getEditTooltipLines,
|
|
273
|
+
La as getImageMessageItems,
|
|
274
|
+
ts as getMessageClass,
|
|
273
275
|
jr as getMessageValidationReport,
|
|
276
|
+
ka as getPrimaryImageItem,
|
|
274
277
|
Gr as getSidebarValidationReport,
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
_a as getStatus,
|
|
279
|
+
Oa as getStatusTitle,
|
|
277
280
|
No as getTypeFileByMime,
|
|
278
281
|
Vr as getValidationReport,
|
|
279
|
-
|
|
282
|
+
Ra as hideEditPreview,
|
|
280
283
|
Ca as hideReplyPreview,
|
|
281
|
-
|
|
284
|
+
Ja as insertDaySeparators,
|
|
282
285
|
Ea as isCursorOnFirstLine,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
+
Pa as isEditableLastSentCandidate,
|
|
287
|
+
ls as isSmsChannel,
|
|
288
|
+
ps as isSmsFeedMessage,
|
|
286
289
|
or as messageDraftStoreKey,
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
+
ms as parseMarkdown,
|
|
291
|
+
qa as playNotificationAudio,
|
|
292
|
+
Ir as provideChatAppStores,
|
|
290
293
|
Cr as provideEmojiNativeStore,
|
|
291
294
|
rr as provideMessageDraftStore,
|
|
292
295
|
pr as provideSearchModelStore,
|
|
293
296
|
ir as provideThemeStore,
|
|
294
297
|
ar as resolveMessageDraftStore,
|
|
295
298
|
Oo as runChottoUpload,
|
|
296
|
-
|
|
297
|
-
|
|
299
|
+
xs as safeMediaPlay,
|
|
300
|
+
is as safeMediaPlayVoid,
|
|
298
301
|
dr as searchModelStoreKey,
|
|
299
|
-
|
|
302
|
+
Ta as showEditPreview,
|
|
300
303
|
ha as showReplyPreview,
|
|
301
|
-
|
|
302
|
-
|
|
304
|
+
$a as sortByTimestamp,
|
|
305
|
+
Qa as statuses,
|
|
303
306
|
nr as themeStoreKey,
|
|
304
307
|
Ho as uploadFile,
|
|
305
308
|
ca as useChannelAccentColor,
|
|
306
309
|
Ur as useChatValidator,
|
|
307
310
|
Qo as useChottoUploader,
|
|
308
|
-
|
|
311
|
+
Dr as useConfirmDeleteMessage,
|
|
309
312
|
Xo as useDelayDebouncedRef,
|
|
310
313
|
hr as useEmojiNative,
|
|
311
314
|
qo as useImmediateDebouncedRef,
|
|
@@ -317,14 +320,14 @@ export {
|
|
|
317
320
|
fa as useMessageReactionsInFeed,
|
|
318
321
|
ra as useMessageReactionsMount,
|
|
319
322
|
Or as useMessageValidator,
|
|
320
|
-
|
|
321
|
-
|
|
323
|
+
Tr as useModalCreateChat,
|
|
324
|
+
Fr as useModalCreateChat2,
|
|
322
325
|
Er as useModalCreateDialog,
|
|
323
326
|
br as useModalSelectUser2,
|
|
324
327
|
kr as useModalVideoRecorder,
|
|
325
328
|
mr as useSearchModel,
|
|
326
329
|
qr as useSidebarValidator,
|
|
327
|
-
|
|
330
|
+
Aa as useStartEdit,
|
|
328
331
|
ya as useStartReply,
|
|
329
332
|
ga as useSubtextTooltip,
|
|
330
333
|
cr as useTheme,
|