@mobilon-dev/chotto 0.3.84 → 0.3.85
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/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +3 -2
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +3 -2
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +38 -0
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +4 -0
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +1 -1
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +49 -36
- package/dist/components/1_icons/CloseIcon.vue.js +21 -0
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +10 -9
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +8 -7
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +2 -2
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +48 -37
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +7 -6
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +27 -26
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +3 -2
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +3 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +3 -2
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +3 -2
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +6 -5
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +10 -9
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +3 -2
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +169 -143
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +33 -32
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +8 -2
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +134 -108
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +116 -97
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +3 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +232 -113
- package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +77 -62
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactions.js +62 -20
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.js +91 -69
- package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsState.js +46 -22
- package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/MessageReactions/utils/quickReactions.js +2 -8
- package/dist/components/2_feed_elements/MessageReactions/utils/reactionTooltip.js +39 -0
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +26 -20
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +27 -18
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +16 -15
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +27 -18
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +16 -12
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +74 -65
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +20 -11
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +13 -9
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +74 -55
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +102 -76
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +74 -55
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +99 -82
- package/dist/components/3_compounds/Feed/Feed.vue.js +3 -3
- package/dist/components/3_compounds/Feed/Feed.vue2.js +159 -139
- package/dist/components/3_compounds/Feed/composables/useFeedReply.js +22 -25
- package/dist/functions/renderAppleEmojis.js +92 -0
- package/dist/hooks/messages/buildReplyPayload.js +14 -0
- package/dist/hooks/messages/useMessageLinks.js +60 -50
- package/dist/hooks/messages/useStartReply.js +29 -0
- package/dist/hooks/useEmojiNative.js +19 -0
- package/dist/index.js +130 -122
- 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/apps/data/messages.d.ts +20 -18
- package/dist/types/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.d.ts +12 -0
- package/dist/types/components/1_atoms/Tooltip/stories/Tooltip.stories.d.ts +3 -0
- package/dist/types/components/1_icons/CloseIcon.vue.d.ts +2 -0
- package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +9 -1
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +24 -16
- package/dist/types/components/2_feed_elements/BaseReplyMessage/styles/types.d.ts +8 -4
- package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/FileMessage/styles/types.d.ts +20 -0
- package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +64 -1
- package/dist/types/components/2_feed_elements/MessageReactions/composables/index.d.ts +2 -2
- package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +11 -1
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactions.d.ts +20 -12
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.d.ts +3 -3
- package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsState.d.ts +13 -22
- package/dist/types/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/styles/types.d.ts +14 -74
- package/dist/types/components/2_feed_elements/MessageReactions/utils/quickReactions.d.ts +1 -1
- package/dist/types/components/2_feed_elements/MessageReactions/utils/reactionTooltip.d.ts +14 -0
- package/dist/types/components/2_feed_elements/ReplyAudioMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyCallMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyFileMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyImageMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyStickerMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/ReplyTextMessage/styles/types.d.ts +4 -0
- package/dist/types/components/2_feed_elements/ReplyVideoMessage/styles/types.d.ts +6 -0
- package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +22 -0
- package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +29 -0
- package/dist/types/components/2_feed_elements/types/messages.d.ts +11 -6
- package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +33 -0
- package/dist/types/functions/renderAppleEmojis.d.ts +16 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/messages/buildReplyPayload.d.ts +11 -0
- package/dist/types/hooks/messages/index.d.ts +2 -0
- package/dist/types/hooks/messages/useStartReply.d.ts +6 -0
- package/dist/types/hooks/useEmojiNative.d.ts +9 -0
- package/package.json +1 -1
|
@@ -3,12 +3,13 @@ import P from "../ContextMenu/ContextMenu.vue.js";
|
|
|
3
3
|
import "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import { useTheme as U } from "../../../hooks/useTheme.js";
|
|
6
|
+
import "../../../hooks/useEmojiNative.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
/* empty css */
|
|
8
9
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
10
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
11
|
import "../../../functions/parseMarkdown.js";
|
|
11
|
-
const $ = ["id"],
|
|
12
|
+
const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
12
13
|
__name: "ButtonContextMenu",
|
|
13
14
|
props: {
|
|
14
15
|
actions: {
|
|
@@ -104,5 +105,5 @@ const $ = ["id"], Y = /* @__PURE__ */ _({
|
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
export {
|
|
107
|
-
|
|
108
|
+
Z as default
|
|
108
109
|
};
|
|
@@ -3,13 +3,14 @@ import J from "../ContextMenu/ContextMenu.vue.js";
|
|
|
3
3
|
import "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import { useTheme as K } from "../../../hooks/useTheme.js";
|
|
6
|
+
import "../../../hooks/useEmojiNative.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
/* empty css */
|
|
8
9
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
10
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
11
|
import "../../../functions/parseMarkdown.js";
|
|
11
12
|
import Q from "../../1_icons/MenuIcon.vue.js";
|
|
12
|
-
const W = { class: "contact-context-menu__wrapper" }, X = ["id"],
|
|
13
|
+
const W = { class: "contact-context-menu__wrapper" }, X = ["id"], ue = /* @__PURE__ */ V({
|
|
13
14
|
__name: "ContactContextMenu",
|
|
14
15
|
props: {
|
|
15
16
|
actions: {
|
|
@@ -127,5 +128,5 @@ const W = { class: "contact-context-menu__wrapper" }, X = ["id"], se = /* @__PUR
|
|
|
127
128
|
}
|
|
128
129
|
});
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
+
ue as default
|
|
131
132
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as f, inject as j, computed as c, createElementBlock as m, unref as g, openBlock as n, toDisplayString as d } from "vue";
|
|
2
|
+
import "../../../hooks/useMessageDraft.js";
|
|
3
|
+
import "../../../hooks/useSearchModel.js";
|
|
4
|
+
import "../../../hooks/useTheme.js";
|
|
5
|
+
import { useEmojiNative as h } from "../../../hooks/useEmojiNative.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
|
+
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
|
+
import "../../../functions/parseMarkdown.js";
|
|
11
|
+
import { getAppleEmojiUrl as k, getAppleEmojiFallbackUrl as E } from "../../../functions/renderAppleEmojis.js";
|
|
12
|
+
const _ = ["src", "alt"], y = { key: 1 }, D = /* @__PURE__ */ f({
|
|
13
|
+
__name: "EmojiGlyph",
|
|
14
|
+
props: {
|
|
15
|
+
emoji: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: !0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(t) {
|
|
21
|
+
const r = t, p = j("chatAppId", ""), { isNative: a } = h(p), s = c(() => k(r.emoji)), l = c(() => E(r.emoji));
|
|
22
|
+
function u(i) {
|
|
23
|
+
const o = i.target, e = l.value;
|
|
24
|
+
e && o.src !== e && (o.src = e);
|
|
25
|
+
}
|
|
26
|
+
return (i, o) => g(a) ? (n(), m("span", y, d(t.emoji), 1)) : (n(), m("img", {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "chotto-emoji",
|
|
29
|
+
src: s.value,
|
|
30
|
+
alt: t.emoji,
|
|
31
|
+
draggable: "false",
|
|
32
|
+
onError: u
|
|
33
|
+
}, null, 40, _));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
D as default
|
|
38
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tooltip.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a4d689d1"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ot, inject as lt, ref as
|
|
1
|
+
import { defineComponent as ot, inject as lt, ref as f, computed as S, onMounted as it, onUnmounted as rt, createElementBlock as d, openBlock as c, Fragment as O, createElementVNode as at, createBlock as nt, renderSlot as ft, Teleport as ut, createVNode as ct, Transition as st, withCtx as mt, createCommentVNode as ht, renderList as pt, normalizeStyle as vt, normalizeClass as gt, unref as M, toDisplayString as dt, nextTick as k } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
4
|
import { useTheme as Tt } from "../../../hooks/useTheme.js";
|
|
5
|
+
import "../../../hooks/useEmojiNative.js";
|
|
5
6
|
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
8
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
8
9
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
9
10
|
import "../../../functions/parseMarkdown.js";
|
|
10
|
-
const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120,
|
|
11
|
+
const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Ot = /* @__PURE__ */ ot({
|
|
11
12
|
__name: "Tooltip",
|
|
12
13
|
props: {
|
|
13
14
|
text: {
|
|
@@ -50,7 +51,7 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
setup(P, { expose: $ }) {
|
|
53
|
-
const T = lt("chatAppId"), { getTheme: C } = Tt(T), y =
|
|
54
|
+
const T = lt("chatAppId"), { getTheme: C } = Tt(T), y = f(), s = f([]), u = f(!1), m = f(null), n = f(null), r = f(null), h = f(!1), p = f(!1), e = P, W = S(() => ({
|
|
54
55
|
tooltip__text: !0,
|
|
55
56
|
[`tooltip--${e.position}`]: !0
|
|
56
57
|
})), R = S(() => ({
|
|
@@ -59,58 +60,70 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
59
60
|
const t = Array.isArray(e.texts) ? e.texts.map((o) => String(o ?? "").trim()).filter(Boolean) : [];
|
|
60
61
|
return t.length > 0 ? t : e.text ? [e.text] : [];
|
|
61
62
|
}), V = (t, o) => {
|
|
62
|
-
const l = o.left < 0 ? o.left : 0,
|
|
63
|
+
const l = o.left < 0 ? o.left : 0, i = o.top < 0 ? o.top : 0;
|
|
63
64
|
return {
|
|
64
65
|
left: {
|
|
65
|
-
top: t.top - (o.height - t.height) / 2 -
|
|
66
|
+
top: t.top - (o.height - t.height) / 2 - i,
|
|
66
67
|
left: t.left - o.width - l - e.offset
|
|
67
68
|
},
|
|
68
69
|
right: {
|
|
69
|
-
top: t.top - (o.height - t.height) / 2 -
|
|
70
|
+
top: t.top - (o.height - t.height) / 2 - i,
|
|
70
71
|
left: t.left + t.width - l + e.offset
|
|
71
72
|
},
|
|
72
73
|
bottom: {
|
|
73
|
-
top: t.bottom -
|
|
74
|
+
top: t.bottom - i + e.offset,
|
|
74
75
|
left: t.left - l
|
|
75
76
|
},
|
|
76
77
|
"bottom-center": {
|
|
77
|
-
top: t.bottom -
|
|
78
|
+
top: t.bottom - i + e.offset,
|
|
78
79
|
left: t.left + t.width / 2 - o.width / 2 - l
|
|
79
80
|
},
|
|
80
81
|
top: {
|
|
81
|
-
top: t.top - o.height - e.offset -
|
|
82
|
+
top: t.top - o.height - e.offset - i,
|
|
82
83
|
left: t.left - l
|
|
83
84
|
},
|
|
84
85
|
"top-center": {
|
|
85
|
-
top: t.top - o.height - e.offset -
|
|
86
|
+
top: t.top - o.height - e.offset - i,
|
|
86
87
|
left: t.left + t.width / 2 - o.width / 2 - l
|
|
87
88
|
},
|
|
89
|
+
"top-left": {
|
|
90
|
+
top: t.top - o.height - e.offset - i,
|
|
91
|
+
left: t.left + t.width - o.width - l
|
|
92
|
+
},
|
|
93
|
+
"top-right": {
|
|
94
|
+
top: t.top - o.height - e.offset - i,
|
|
95
|
+
left: t.left - l
|
|
96
|
+
},
|
|
88
97
|
"bottom-left": {
|
|
89
|
-
top: t.bottom -
|
|
98
|
+
top: t.bottom - i + e.offset,
|
|
90
99
|
left: t.left + t.width - o.width - l
|
|
100
|
+
},
|
|
101
|
+
"bottom-right": {
|
|
102
|
+
top: t.bottom - i + e.offset,
|
|
103
|
+
left: t.left - l
|
|
91
104
|
}
|
|
92
105
|
}[e.position];
|
|
93
106
|
}, L = () => {
|
|
94
|
-
if (!y.value ||
|
|
95
|
-
const t = y.value.getBoundingClientRect(), o = e.position.startsWith("top"), l = 8,
|
|
96
|
-
|
|
97
|
-
const
|
|
107
|
+
if (!y.value || s.value.length === 0) return;
|
|
108
|
+
const t = y.value.getBoundingClientRect(), o = e.position.startsWith("top"), l = 8, i = T ? document.getElementById(T) : null, a = i == null ? void 0 : i.getBoundingClientRect(), U = (a == null ? void 0 : a.top) ?? 0, X = (a == null ? void 0 : a.left) ?? 0, Y = (a == null ? void 0 : a.right) ?? window.innerWidth, J = (a == null ? void 0 : a.bottom) ?? window.innerHeight;
|
|
109
|
+
s.value.forEach((x, Q) => {
|
|
110
|
+
const g = x.getBoundingClientRect(), _ = V(t, g), D = Q * (g.height + xt), Z = o ? _.top - D : _.top + D, I = U + l, b = J - g.height - l, N = X + l, B = Y - g.width - l, tt = Math.min(Math.max(Z, I), Math.max(I, b)), et = Math.min(Math.max(_.left, N), Math.max(N, B));
|
|
98
111
|
x.style.top = `${tt}px`, x.style.left = `${et}px`;
|
|
99
112
|
});
|
|
100
113
|
}, q = () => {
|
|
101
|
-
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null),
|
|
102
|
-
|
|
114
|
+
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null), r.value && (clearTimeout(r.value), r.value = null), n.value = setTimeout(() => {
|
|
115
|
+
u.value = !0, k(() => {
|
|
103
116
|
L();
|
|
104
117
|
}), n.value = null;
|
|
105
118
|
}, e.delay));
|
|
106
119
|
}, w = () => {
|
|
107
|
-
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null),
|
|
108
|
-
M(
|
|
120
|
+
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null), r.value && (clearTimeout(r.value), r.value = null), u.value = !1, k(() => {
|
|
121
|
+
M(s).forEach((o) => {
|
|
109
122
|
o.style.top = "0", o.style.left = "0";
|
|
110
123
|
});
|
|
111
124
|
}));
|
|
112
125
|
}, A = () => {
|
|
113
|
-
e.trigger !== "auto" && (
|
|
126
|
+
e.trigger !== "auto" && (r.value && clearTimeout(r.value), r.value = setTimeout(() => {
|
|
114
127
|
!h.value && !p.value && w();
|
|
115
128
|
}, _t));
|
|
116
129
|
}, z = () => {
|
|
@@ -118,22 +131,22 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
118
131
|
}, j = () => {
|
|
119
132
|
h.value = !1, A();
|
|
120
133
|
}, F = () => {
|
|
121
|
-
p.value = !0,
|
|
134
|
+
p.value = !0, r.value && (clearTimeout(r.value), r.value = null);
|
|
122
135
|
}, G = () => {
|
|
123
136
|
p.value = !1, A();
|
|
124
137
|
}, E = () => {
|
|
125
138
|
if (e.hideOnClick) {
|
|
126
139
|
if (h.value = !1, p.value = !1, e.trigger === "auto") {
|
|
127
|
-
v(),
|
|
140
|
+
v(), u.value = !1;
|
|
128
141
|
return;
|
|
129
142
|
}
|
|
130
143
|
w();
|
|
131
144
|
}
|
|
132
145
|
}, K = () => {
|
|
133
|
-
v(),
|
|
146
|
+
v(), u.value = !0, k(() => {
|
|
134
147
|
L();
|
|
135
148
|
}), e.autoShowDuration > 0 && (m.value = setTimeout(() => {
|
|
136
|
-
|
|
149
|
+
u.value = !1;
|
|
137
150
|
}, e.autoShowDuration));
|
|
138
151
|
}, v = () => {
|
|
139
152
|
m.value && (clearTimeout(m.value), m.value = null);
|
|
@@ -141,12 +154,12 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
141
154
|
return it(() => {
|
|
142
155
|
e.hideOnClick && document.addEventListener("mousedown", E, !0);
|
|
143
156
|
}), rt(() => {
|
|
144
|
-
e.hideOnClick && document.removeEventListener("mousedown", E, !0), n.value && clearTimeout(n.value),
|
|
157
|
+
e.hideOnClick && document.removeEventListener("mousedown", E, !0), n.value && clearTimeout(n.value), r.value && clearTimeout(r.value), v();
|
|
145
158
|
}), $({
|
|
146
159
|
startAutoShow: K,
|
|
147
160
|
clearAutoTimer: v,
|
|
148
161
|
hide: w
|
|
149
|
-
}), (t, o) => (c(),
|
|
162
|
+
}), (t, o) => (c(), d(O, null, [
|
|
150
163
|
at("div", {
|
|
151
164
|
ref_key: "container",
|
|
152
165
|
ref: y,
|
|
@@ -154,23 +167,23 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
154
167
|
onMouseenter: z,
|
|
155
168
|
onMouseleave: j
|
|
156
169
|
}, [
|
|
157
|
-
|
|
170
|
+
ft(t.$slots, "default", {}, void 0, !0)
|
|
158
171
|
], 544),
|
|
159
|
-
(c(), nt(
|
|
160
|
-
ct(
|
|
172
|
+
(c(), nt(ut, { to: "body" }, [
|
|
173
|
+
ct(st, null, {
|
|
161
174
|
default: mt(() => [
|
|
162
|
-
|
|
163
|
-
(c(!0),
|
|
164
|
-
key: `${l}-${
|
|
175
|
+
u.value ? (c(), d("div", yt, [
|
|
176
|
+
(c(!0), d(O, null, pt(H.value, (l, i) => (c(), d("span", {
|
|
177
|
+
key: `${l}-${i}`,
|
|
165
178
|
ref_for: !0,
|
|
166
179
|
ref_key: "tooltipItems",
|
|
167
|
-
ref:
|
|
180
|
+
ref: s,
|
|
168
181
|
"data-theme": M(C)().theme ? M(C)().theme : "light",
|
|
169
|
-
class:
|
|
182
|
+
class: gt(W.value),
|
|
170
183
|
style: vt(R.value),
|
|
171
184
|
onMouseenter: F,
|
|
172
185
|
onMouseleave: G
|
|
173
|
-
},
|
|
186
|
+
}, dt(l), 47, wt))), 128))
|
|
174
187
|
])) : ht("", !0)
|
|
175
188
|
]),
|
|
176
189
|
_: 1
|
|
@@ -180,5 +193,5 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Nt = /* @__PURE__
|
|
|
180
193
|
}
|
|
181
194
|
});
|
|
182
195
|
export {
|
|
183
|
-
|
|
196
|
+
Ot as default
|
|
184
197
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createElementBlock as e, openBlock as t, createElementVNode as o } from "vue";
|
|
2
|
+
import n from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, l = {
|
|
4
|
+
width: "18",
|
|
5
|
+
height: "18",
|
|
6
|
+
viewBox: "0 0 18 18",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function s(c, C) {
|
|
11
|
+
return t(), e("svg", l, [...C[0] || (C[0] = [
|
|
12
|
+
o("path", {
|
|
13
|
+
d: "M0.219947 1.28195C0.150215 1.21222 0.0949012 1.12943 0.0571625 1.03832C0.0194239 0.947213 7.34745e-10 0.849563 0 0.750947C-7.34745e-10 0.652332 0.0194239 0.554681 0.0571625 0.463572C0.0949012 0.372463 0.150215 0.289679 0.219947 0.219947C0.289679 0.150215 0.372463 0.0949012 0.463572 0.0571625C0.554681 0.0194239 0.652332 -7.34745e-10 0.750947 0C0.849563 7.34745e-10 0.947213 0.0194239 1.03832 0.0571625C1.12943 0.0949012 1.21222 0.150215 1.28195 0.219947L9.00095 7.94045L16.7199 0.219947C16.7897 0.150215 16.8725 0.0949012 16.9636 0.0571625C17.0547 0.0194239 17.1523 0 17.2509 0C17.3496 0 17.4472 0.0194239 17.5383 0.0571625C17.6294 0.0949012 17.7122 0.150215 17.7819 0.219947C17.8517 0.289679 17.907 0.372463 17.9447 0.463572C17.9825 0.554681 18.0019 0.652332 18.0019 0.750947C18.0019 0.849563 17.9825 0.947213 17.9447 1.03832C17.907 1.12943 17.8517 1.21222 17.7819 1.28195L10.0614 9.00095L17.7819 16.7199C17.8517 16.7897 17.907 16.8725 17.9447 16.9636C17.9825 17.0547 18.0019 17.1523 18.0019 17.2509C18.0019 17.3496 17.9825 17.4472 17.9447 17.5383C17.907 17.6294 17.8517 17.7122 17.7819 17.7819C17.7122 17.8517 17.6294 17.907 17.5383 17.9447C17.4472 17.9825 17.3496 18.0019 17.2509 18.0019C17.1523 18.0019 17.0547 17.9825 16.9636 17.9447C16.8725 17.907 16.7897 17.8517 16.7199 17.7819L9.00095 10.0614L1.28195 17.7819C1.21222 17.8517 1.12943 17.907 1.03832 17.9447C0.947213 17.9825 0.849563 18.0019 0.750947 18.0019C0.652332 18.0019 0.554681 17.9825 0.463572 17.9447C0.372463 17.907 0.289679 17.8517 0.219947 17.7819C0.150215 17.7122 0.0949012 17.6294 0.0571625 17.5383C0.0194239 17.4472 0 17.3496 0 17.2509C0 17.1523 0.0194239 17.0547 0.0571625 16.9636C0.0949012 16.8725 0.150215 16.7897 0.219947 16.7199L7.94045 9.00095L0.219947 1.28195Z",
|
|
14
|
+
fill: "#5F5F5F"
|
|
15
|
+
}, null, -1)
|
|
16
|
+
])]);
|
|
17
|
+
}
|
|
18
|
+
const m = /* @__PURE__ */ n(r, [["render", s]]);
|
|
19
|
+
export {
|
|
20
|
+
m as default
|
|
21
|
+
};
|
|
@@ -4,12 +4,13 @@ import { useDelayDebouncedRef as b } from "../../../hooks/useDelayDebouncedRef.j
|
|
|
4
4
|
import "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import { useSearchModel as A } from "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
7
|
+
import "../../../hooks/useEmojiNative.js";
|
|
7
8
|
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
10
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
11
12
|
import "../../../functions/parseMarkdown.js";
|
|
12
|
-
const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"],
|
|
13
|
+
const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"], Q = /* @__PURE__ */ _({
|
|
13
14
|
__name: "FeedSearch",
|
|
14
15
|
props: {
|
|
15
16
|
isFeedLocation: {
|
|
@@ -19,19 +20,19 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
|
|
|
19
20
|
},
|
|
20
21
|
emits: ["search", "cancel", "switch"],
|
|
21
22
|
setup(a, { emit: u }) {
|
|
22
|
-
const f = y("chatAppId"), { getModel: e } = A(f),
|
|
23
|
+
const f = y("chatAppId"), { getModel: e } = A(f), i = u, l = a, c = v(), s = b("", 500), h = S(() => l.isFeedLocation ? "40px" : (l.isFeedLocation, "20px"));
|
|
23
24
|
k(
|
|
24
25
|
() => [e().text, s.value],
|
|
25
26
|
() => {
|
|
26
|
-
s.value == e().text ?
|
|
27
|
+
s.value == e().text ? i("search", e().text) : s.value = e().text;
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
30
|
const x = () => {
|
|
30
|
-
const t = o(
|
|
31
|
-
t && (t.value = ""), e().text = "",
|
|
31
|
+
const t = o(c);
|
|
32
|
+
t && (t.value = ""), e().text = "", i("cancel");
|
|
32
33
|
};
|
|
33
34
|
return F(() => {
|
|
34
|
-
const t = o(
|
|
35
|
+
const t = o(c);
|
|
35
36
|
t == null || t.focus();
|
|
36
37
|
}), (t, n) => (m(), g(L, null, {
|
|
37
38
|
default: w(() => [
|
|
@@ -39,7 +40,7 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
|
|
|
39
40
|
r("span", N, D(o(d)("component.FeedSearch.SearchLabel")), 1),
|
|
40
41
|
C(r("input", {
|
|
41
42
|
ref_key: "refInput",
|
|
42
|
-
ref:
|
|
43
|
+
ref: c,
|
|
43
44
|
"onUpdate:modelValue": n[0] || (n[0] = (p) => o(e)().text = p),
|
|
44
45
|
class: "feed-search__input",
|
|
45
46
|
type: "text",
|
|
@@ -56,7 +57,7 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
|
|
|
56
57
|
key: 0,
|
|
57
58
|
class: "pi pi-refresh",
|
|
58
59
|
style: { "margin-left": "5px", "margin-top": "10px", cursor: "pointer" },
|
|
59
|
-
onClick: n[1] || (n[1] = (p) =>
|
|
60
|
+
onClick: n[1] || (n[1] = (p) => i("switch"))
|
|
60
61
|
})) : B("", !0)
|
|
61
62
|
])
|
|
62
63
|
]),
|
|
@@ -65,5 +66,5 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
|
|
|
65
66
|
}
|
|
66
67
|
});
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
Q as default
|
|
69
70
|
};
|
package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as p, inject as g, useTemplateRef as C, watch as h, createBlock as n, openBlock as m, Transition as x, withCtx as i, createCommentVNode as y, unref as
|
|
1
|
+
import { defineComponent as p, inject as g, useTemplateRef as C, watch as h, createBlock as n, openBlock as m, Transition as x, withCtx as i, createCommentVNode as y, unref as r, createElementVNode as B, normalizeClass as M } from "vue";
|
|
2
2
|
import { useMessageDraft as b } from "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
4
|
import "../../../hooks/useTheme.js";
|
|
5
|
+
import "../../../hooks/useEmojiNative.js";
|
|
5
6
|
/* empty css */
|
|
6
7
|
/* empty css */
|
|
7
8
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
8
9
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
9
10
|
import "../../../functions/parseMarkdown.js";
|
|
10
11
|
import k from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
11
|
-
const
|
|
12
|
+
const V = /* @__PURE__ */ p({
|
|
12
13
|
__name: "ButtonCommandsSelector",
|
|
13
14
|
props: {
|
|
14
15
|
commands: {
|
|
@@ -27,8 +28,8 @@ const T = /* @__PURE__ */ p({
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
emits: ["send"],
|
|
30
|
-
setup(e, { emit:
|
|
31
|
-
const c = e, l =
|
|
31
|
+
setup(e, { emit: d }) {
|
|
32
|
+
const c = e, l = d, u = g("chatAppId"), { getMessage: s } = b(u), a = C("refBCM"), f = (t) => {
|
|
32
33
|
console.log(t);
|
|
33
34
|
const o = {
|
|
34
35
|
type: "message.command",
|
|
@@ -50,13 +51,13 @@ const T = /* @__PURE__ */ p({
|
|
|
50
51
|
ref: a,
|
|
51
52
|
"menu-side": "top",
|
|
52
53
|
mode: e.mode,
|
|
53
|
-
disabled:
|
|
54
|
+
disabled: r(s)().isRecording || e.state == "disabled",
|
|
54
55
|
actions: e.commands,
|
|
55
56
|
onClick: f
|
|
56
57
|
}, {
|
|
57
58
|
default: i(() => [
|
|
58
59
|
B("span", {
|
|
59
|
-
class: M(["commands__trigger", { commands__disabled:
|
|
60
|
+
class: M(["commands__trigger", { commands__disabled: r(s)().isRecording || e.state == "disabled" }])
|
|
60
61
|
}, " / ", 2)
|
|
61
62
|
]),
|
|
62
63
|
_: 1
|
|
@@ -67,5 +68,5 @@ const T = /* @__PURE__ */ p({
|
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
V as default
|
|
71
72
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ButtonEmojiPicker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e67f8c2a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as D, ref as l, inject as W, watch as z, computed as R, watchEffect as U, onMounted as $, onUnmounted as q, createElementBlock as j, openBlock as C, Fragment as G, createCommentVNode as J, createVNode as g, unref as b, normalizeClass as K, createElementVNode as B, Transition as Q, withCtx as X, withDirectives as Y, vShow as Z } from "vue";
|
|
2
|
+
import ee from "../../../node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { useMessageDraft as
|
|
4
|
+
import { useMessageDraft as te } from "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
7
|
+
import { useEmojiNative as oe } from "../../../hooks/useEmojiNative.js";
|
|
7
8
|
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
10
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
11
12
|
import "../../../functions/parseMarkdown.js";
|
|
12
|
-
import
|
|
13
|
-
const
|
|
13
|
+
import ne from "./icons/SmilesIcon.vue.js";
|
|
14
|
+
const ke = /* @__PURE__ */ D({
|
|
14
15
|
__name: "ButtonEmojiPicker",
|
|
15
16
|
props: {
|
|
16
17
|
state: {
|
|
@@ -23,63 +24,73 @@ const ve = /* @__PURE__ */ A({
|
|
|
23
24
|
// или 'hover'
|
|
24
25
|
validator: (r) => ["click", "hover"].includes(r)
|
|
25
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* true — системные эмодзи; false — 3D (Apple) в пикере, инпуте и ленте.
|
|
29
|
+
* Значение пишется в общий store чата (useEmojiNative).
|
|
30
|
+
*/
|
|
26
31
|
native: {
|
|
27
32
|
type: Boolean,
|
|
28
33
|
default: !0
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
setup(r) {
|
|
32
|
-
const t = r, v = l(null), f = l(null), o = l(!1),
|
|
37
|
+
const t = r, v = l(null), f = l(null), o = l(!1), E = l("light"), i = W("chatAppId"), { setMessageText: P, getMessage: M } = te(i), { setNative: w } = oe(i);
|
|
38
|
+
z(
|
|
39
|
+
() => t.native,
|
|
40
|
+
(e) => w(e),
|
|
41
|
+
{ immediate: !0 }
|
|
42
|
+
);
|
|
43
|
+
const c = l("#5F5F5F"), s = l("#404040"), h = l(!1);
|
|
33
44
|
let a = null;
|
|
34
45
|
const p = () => {
|
|
35
46
|
if (!i) {
|
|
36
|
-
c.value = "#5F5F5F",
|
|
47
|
+
c.value = "#5F5F5F", s.value = "#404040";
|
|
37
48
|
return;
|
|
38
49
|
}
|
|
39
50
|
const e = document.getElementById(i);
|
|
40
51
|
if (!e) {
|
|
41
|
-
c.value = "#5F5F5F",
|
|
52
|
+
c.value = "#5F5F5F", s.value = "#404040";
|
|
42
53
|
return;
|
|
43
54
|
}
|
|
44
|
-
const n = window.getComputedStyle(e), d = n.getPropertyValue("--chotto-buttonemojipicker-button-span-color").trim(),
|
|
45
|
-
c.value = d || "#5F5F5F",
|
|
46
|
-
},
|
|
47
|
-
|
|
55
|
+
const n = window.getComputedStyle(e), d = n.getPropertyValue("--chotto-buttonemojipicker-button-span-color").trim(), A = n.getPropertyValue("--chotto-buttonemojipicker-button-span-hover-color").trim();
|
|
56
|
+
c.value = d || "#5F5F5F", s.value = A || "#404040";
|
|
57
|
+
}, I = R(() => h.value ? s.value : c.value);
|
|
58
|
+
U(() => {
|
|
48
59
|
p();
|
|
49
60
|
});
|
|
50
|
-
let
|
|
51
|
-
const
|
|
61
|
+
let u = !1, m = !1;
|
|
62
|
+
const N = () => {
|
|
52
63
|
var n;
|
|
53
64
|
const e = document.getElementById(i);
|
|
54
65
|
return (n = e == null ? void 0 : e.getAttribute("data-theme")) != null && n.includes("dark") ? "dark" : "light";
|
|
55
66
|
}, S = (e) => {
|
|
56
|
-
P(
|
|
67
|
+
P(M().text + e.i), t.mode === "click" && (o.value = !1);
|
|
57
68
|
}, y = () => {
|
|
58
|
-
t.state === "active" && (
|
|
69
|
+
t.state === "active" && (E.value = N(), o.value = !0);
|
|
59
70
|
}, k = () => {
|
|
60
71
|
o.value = !1;
|
|
61
72
|
}, _ = () => {
|
|
62
73
|
t.mode === "click" && (o.value = !o.value, o.value && y());
|
|
63
74
|
}, T = () => {
|
|
64
|
-
t.mode === "hover" && (
|
|
75
|
+
t.mode === "hover" && (u = !0, y());
|
|
65
76
|
}, V = () => {
|
|
66
|
-
t.mode === "hover" && (
|
|
67
|
-
!m && !
|
|
77
|
+
t.mode === "hover" && (u = !1, setTimeout(() => {
|
|
78
|
+
!m && !u && k();
|
|
68
79
|
}, 150));
|
|
69
80
|
}, x = () => {
|
|
70
81
|
h.value = !0, T();
|
|
71
82
|
}, L = () => {
|
|
72
83
|
h.value = !1, V();
|
|
73
|
-
}, N = () => {
|
|
74
|
-
t.mode === "hover" && (m = !0);
|
|
75
84
|
}, O = () => {
|
|
85
|
+
t.mode === "hover" && (m = !0);
|
|
86
|
+
}, H = () => {
|
|
76
87
|
t.mode === "hover" && (m = !1, setTimeout(() => {
|
|
77
|
-
!
|
|
88
|
+
!u && !m && k();
|
|
78
89
|
}, 150));
|
|
79
90
|
}, F = (e) => {
|
|
80
91
|
t.mode === "click" && o.value && f.value && v.value && e.target instanceof Node && !f.value.contains(e.target) && !v.value.contains(e.target) && k();
|
|
81
92
|
};
|
|
82
|
-
return
|
|
93
|
+
return $(() => {
|
|
83
94
|
if (document.addEventListener("click", F), p(), i) {
|
|
84
95
|
const e = document.getElementById(i);
|
|
85
96
|
e && (a = new MutationObserver((n) => {
|
|
@@ -91,39 +102,39 @@ const ve = /* @__PURE__ */ A({
|
|
|
91
102
|
attributeFilter: ["data-theme"]
|
|
92
103
|
}));
|
|
93
104
|
}
|
|
94
|
-
}),
|
|
105
|
+
}), q(() => {
|
|
95
106
|
document.removeEventListener("click", F), a && (a.disconnect(), a = null);
|
|
96
|
-
}), (e, n) => (C(), j(
|
|
97
|
-
b(
|
|
107
|
+
}), (e, n) => (C(), j(G, null, [
|
|
108
|
+
b(M)().isRecording ? J("", !0) : (C(), j("button", {
|
|
98
109
|
key: 0,
|
|
99
110
|
ref_key: "emojiButton",
|
|
100
111
|
ref: f,
|
|
101
|
-
class:
|
|
112
|
+
class: K(["button", { "button-disabled": r.state === "disabled" }]),
|
|
102
113
|
onClick: _,
|
|
103
114
|
onMouseenter: x,
|
|
104
115
|
onMouseleave: L
|
|
105
116
|
}, [
|
|
106
117
|
B("span", null, [
|
|
107
|
-
g(b(
|
|
118
|
+
g(b(ne), { fill: I.value }, null, 8, ["fill"])
|
|
108
119
|
])
|
|
109
120
|
], 34)),
|
|
110
|
-
g(
|
|
111
|
-
default:
|
|
112
|
-
|
|
121
|
+
g(Q, null, {
|
|
122
|
+
default: X(() => [
|
|
123
|
+
Y(B("div", {
|
|
113
124
|
ref_key: "emoji",
|
|
114
125
|
ref: v,
|
|
115
126
|
class: "emoji",
|
|
116
|
-
onMouseenter:
|
|
117
|
-
onMouseleave:
|
|
127
|
+
onMouseenter: O,
|
|
128
|
+
onMouseleave: H
|
|
118
129
|
}, [
|
|
119
|
-
g(b(
|
|
130
|
+
g(b(ee), {
|
|
120
131
|
native: r.native,
|
|
121
|
-
theme:
|
|
132
|
+
theme: E.value,
|
|
122
133
|
"picker-type": "",
|
|
123
134
|
onSelect: S
|
|
124
135
|
}, null, 8, ["native", "theme"])
|
|
125
136
|
], 544), [
|
|
126
|
-
[
|
|
137
|
+
[Z, o.value]
|
|
127
138
|
])
|
|
128
139
|
]),
|
|
129
140
|
_: 1
|
|
@@ -132,5 +143,5 @@ const ve = /* @__PURE__ */ A({
|
|
|
132
143
|
}
|
|
133
144
|
});
|
|
134
145
|
export {
|
|
135
|
-
|
|
146
|
+
ke as default
|
|
136
147
|
};
|
package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js
CHANGED
|
@@ -4,13 +4,14 @@ import P from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
|
4
4
|
import { useMessageDraft as j } from "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
7
|
+
import "../../../hooks/useEmojiNative.js";
|
|
7
8
|
/* empty css */
|
|
8
9
|
/* empty css */
|
|
9
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
10
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
11
12
|
import "../../../functions/parseMarkdown.js";
|
|
12
13
|
import z from "./icons/ChatTemplatesIcon.vue.js";
|
|
13
|
-
const R = { class: "" },
|
|
14
|
+
const R = { class: "" }, le = /* @__PURE__ */ T({
|
|
14
15
|
__name: "ButtonTemplateSelector",
|
|
15
16
|
props: {
|
|
16
17
|
templates: {
|
|
@@ -132,5 +133,5 @@ const R = { class: "" }, oe = /* @__PURE__ */ T({
|
|
|
132
133
|
}
|
|
133
134
|
});
|
|
134
135
|
export {
|
|
135
|
-
|
|
136
|
+
le as default
|
|
136
137
|
};
|