@mobilon-dev/chotto 0.3.85 → 0.3.87
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 +15 -13
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +4 -2
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +43 -39
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +7 -5
- package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +19 -18
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +2 -2
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +83 -72
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +174 -165
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +21 -18
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +32 -27
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +44 -35
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +11 -10
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +4 -2
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +18 -16
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +16 -14
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +4 -2
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +4 -2
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +4 -2
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +4 -2
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +4 -2
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +4 -3
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +4 -2
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +3 -2
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +4 -2
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +3 -2
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +7 -5
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +4 -2
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +387 -340
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +34 -0
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +388 -352
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +7 -0
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +63 -0
- package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +35 -0
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +204 -157
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +273 -226
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +9 -7
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +141 -117
- package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -0
- package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -0
- package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +21 -0
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +102 -66
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +11 -9
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +14 -12
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +11 -9
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +13 -11
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +11 -9
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +4 -2
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +255 -210
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +241 -140
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +245 -200
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +7 -0
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +58 -0
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +5 -4
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +8 -8
- package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +12 -13
- package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
- package/dist/components/3_compounds/Feed/Feed.vue2.js +187 -163
- package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +41 -26
- package/dist/components/3_compounds/Feed/composables/useFeedReply.js +16 -11
- package/dist/components/3_compounds/Feed/utils/getDefaultMessageMenuActions.js +31 -0
- package/dist/hooks/messages/buildEditPayload.js +10 -0
- package/dist/hooks/messages/calculateMessageMenuPosition.js +70 -0
- package/dist/hooks/messages/getDeletedOriginalText.js +26 -0
- package/dist/hooks/messages/getEditTooltipLines.js +28 -0
- package/dist/hooks/messages/useMessageActions.js +94 -19
- package/dist/hooks/messages/useMessageMenuActions.js +18 -0
- package/dist/hooks/messages/useStartEdit.js +30 -0
- package/dist/hooks/messages/useStartReply.js +16 -14
- package/dist/hooks/modals/useConfirmDeleteMessage.js +24 -0
- package/dist/hooks/useMessageDraft.js +46 -66
- package/dist/hooks/validators/messages/messageValidator.js +29 -35
- package/dist/index.js +220 -194
- package/dist/locale/en.js +6 -1
- package/dist/locale/ru.js +6 -1
- 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 +0 -321
- package/dist/types/components/1_atoms/ContextMenu/ContextMenu.vue.d.ts +0 -2
- package/dist/types/components/1_atoms/ContextMenu/stories/ContextMenu.stories.d.ts +1 -0
- package/dist/types/components/1_atoms/ContextMenu/styles/types.d.ts +18 -0
- package/dist/types/components/1_atoms/LoadingIndicator/styles/types.d.ts +0 -2
- package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +12 -1
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +3 -1
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +3 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +4 -2
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +1 -0
- package/dist/types/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.d.ts +23 -0
- package/dist/types/components/2_feed_elements/BaseEditMessage/stories/BaseEditMessage.stories.d.ts +6 -0
- package/dist/types/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.d.ts +31 -0
- package/dist/types/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/DeletedMessageContent/styles/types.d.ts +35 -0
- package/dist/types/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.d.ts +13 -0
- package/dist/types/components/2_feed_elements/EditTextMessage/stories/EditTextMessage.stories.d.ts +7 -0
- package/dist/types/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +35 -0
- package/dist/types/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +11 -3
- package/dist/types/components/2_feed_elements/TextMessage/stories/TextMessage.stories.d.ts +1 -0
- package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +22 -0
- package/dist/types/components/2_feed_elements/VideoMessage/stories/VideoMessage.stories.d.ts +2 -2
- package/dist/types/components/2_feed_elements/types/components.d.ts +1 -2
- package/dist/types/components/2_feed_elements/types/messages.d.ts +116 -9
- package/dist/types/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.d.ts +22 -0
- package/dist/types/components/2_modals/ConfirmDeleteMessage/stories/ConfirmDeleteMessage.stories.d.ts +37 -0
- package/dist/types/components/2_modals/ConfirmDeleteMessage/styles/types.d.ts +97 -0
- package/dist/types/components/3_compounds/ChatInput/types/IInputMessage.d.ts +2 -1
- package/dist/types/components/3_compounds/ChatList/styles/types.d.ts +2 -2
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +20 -3
- package/dist/types/components/3_compounds/Feed/composables/useFeedComponents.d.ts +6 -2
- package/dist/types/components/3_compounds/Feed/composables/useFeedGrouping.d.ts +0 -1
- package/dist/types/components/3_compounds/Feed/composables/useFeedReply.d.ts +7 -1
- package/dist/types/components/3_compounds/Feed/utils/getDefaultMessageMenuActions.d.ts +3 -0
- package/dist/types/components/3_compounds/SideBar/SideBar.vue.d.ts +2 -2
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/hooks/messages/buildEditPayload.d.ts +7 -0
- package/dist/types/hooks/messages/calculateMessageMenuPosition.d.ts +16 -0
- package/dist/types/hooks/messages/getDeletedOriginalText.d.ts +28 -0
- package/dist/types/hooks/messages/getEditTooltipLines.d.ts +17 -0
- package/dist/types/hooks/messages/index.d.ts +6 -0
- package/dist/types/hooks/messages/useMessageActions.d.ts +33 -39
- package/dist/types/hooks/messages/useMessageMenuActions.d.ts +10 -0
- package/dist/types/hooks/messages/useStartEdit.d.ts +6 -0
- package/dist/types/hooks/modals/index.d.ts +1 -0
- package/dist/types/hooks/modals/useConfirmDeleteMessage.d.ts +2 -0
- package/dist/types/hooks/useMessageDraft.d.ts +10 -1
- package/dist/types/hooks/validators/messages/types.d.ts +0 -6
- package/dist/types/locale/en.d.ts +5 -0
- package/dist/types/locale/ru.d.ts +5 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, inject as I, useId as q, ref as
|
|
1
|
+
import { defineComponent as _, inject as I, useId as q, ref as m, onMounted as L, nextTick as y, onUnmounted as O, createElementBlock as T, openBlock as k, unref as c, createElementVNode as A, createBlock as N, renderSlot as R, Teleport as V, createVNode as j } from "vue";
|
|
2
2
|
import P from "../ContextMenu/ContextMenu.vue.js";
|
|
3
3
|
import "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
@@ -6,10 +6,12 @@ import { useTheme as U } from "../../../hooks/useTheme.js";
|
|
|
6
6
|
import "../../../hooks/useEmojiNative.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
+
import "../../../locale/useLocale.js";
|
|
10
|
+
/* empty css */
|
|
9
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
10
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
11
13
|
import "../../../functions/parseMarkdown.js";
|
|
12
|
-
const $ = ["id"],
|
|
14
|
+
const $ = ["id"], te = /* @__PURE__ */ _({
|
|
13
15
|
__name: "ButtonContextMenu",
|
|
14
16
|
props: {
|
|
15
17
|
actions: {
|
|
@@ -33,8 +35,8 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
33
35
|
}
|
|
34
36
|
},
|
|
35
37
|
emits: ["click", "buttonClick", "menuMouseEnter", "menuMouseLeave"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
38
|
+
setup(f, { expose: M, emit: C }) {
|
|
39
|
+
const s = I("chatAppId"), { getTheme: h } = U(s), i = f, p = q(), d = C, n = m(), r = m(), a = m(!1), b = (t) => {
|
|
38
40
|
l(), d("click", t);
|
|
39
41
|
}, x = () => {
|
|
40
42
|
i.disabled || (i.mode == "click" && !a.value ? u() : i.mode == "click" && a.value && l(), d("buttonClick"));
|
|
@@ -47,8 +49,8 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
47
49
|
}, E = () => {
|
|
48
50
|
d("menuMouseLeave"), i.disabled || i.mode == "hover" && l();
|
|
49
51
|
}, u = () => {
|
|
50
|
-
if (
|
|
51
|
-
const t = n.value, e =
|
|
52
|
+
if (r.value && n.value) {
|
|
53
|
+
const t = n.value, e = r.value.getBoundingClientRect();
|
|
52
54
|
t.style.display = "inherit";
|
|
53
55
|
const o = n.value.getBoundingClientRect();
|
|
54
56
|
t.style.display = "none", y(() => {
|
|
@@ -69,11 +71,11 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
69
71
|
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none", a.value = !1);
|
|
70
72
|
}
|
|
71
73
|
}, v = (t) => {
|
|
72
|
-
i.mode == "click" &&
|
|
74
|
+
i.mode == "click" && r.value && !r.value.contains(t.target) && l();
|
|
73
75
|
};
|
|
74
76
|
return L(() => {
|
|
75
77
|
y(() => {
|
|
76
|
-
n.value = document.getElementById("context-menu-" + p +
|
|
78
|
+
n.value = document.getElementById("context-menu-" + p + s), n.value && (l(), document.addEventListener("click", v));
|
|
77
79
|
});
|
|
78
80
|
}), O(() => {
|
|
79
81
|
document.removeEventListener("click", v);
|
|
@@ -81,9 +83,9 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
81
83
|
updatePosition: u,
|
|
82
84
|
hideMenu: l
|
|
83
85
|
}), (t, e) => (k(), T("button", {
|
|
84
|
-
id: "container-" + c(p) + c(
|
|
86
|
+
id: "container-" + c(p) + c(s),
|
|
85
87
|
ref_key: "actionScope",
|
|
86
|
-
ref:
|
|
88
|
+
ref: r,
|
|
87
89
|
style: { position: "relative", width: "fit-content", border: "none", background: "transparent", height: "fit-content" },
|
|
88
90
|
onMouseenter: w,
|
|
89
91
|
onMouseleave: B
|
|
@@ -93,8 +95,8 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
93
95
|
]),
|
|
94
96
|
(k(), N(V, { to: "body" }, [
|
|
95
97
|
j(P, {
|
|
96
|
-
id: "context-menu-" + c(p) + c(
|
|
97
|
-
actions:
|
|
98
|
+
id: "context-menu-" + c(p) + c(s),
|
|
99
|
+
actions: f.actions,
|
|
98
100
|
"data-theme": c(h)().theme ? c(h)().theme : "light",
|
|
99
101
|
onMouseenter: S,
|
|
100
102
|
onMouseleave: E,
|
|
@@ -105,5 +107,5 @@ const $ = ["id"], Z = /* @__PURE__ */ _({
|
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
te as default
|
|
109
111
|
};
|
|
@@ -6,11 +6,13 @@ import { useTheme as K } from "../../../hooks/useTheme.js";
|
|
|
6
6
|
import "../../../hooks/useEmojiNative.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
+
import "../../../locale/useLocale.js";
|
|
10
|
+
/* empty css */
|
|
9
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
10
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
11
13
|
import "../../../functions/parseMarkdown.js";
|
|
12
14
|
import Q from "../../1_icons/MenuIcon.vue.js";
|
|
13
|
-
const W = { class: "contact-context-menu__wrapper" }, X = ["id"],
|
|
15
|
+
const W = { class: "contact-context-menu__wrapper" }, X = ["id"], de = /* @__PURE__ */ V({
|
|
14
16
|
__name: "ContactContextMenu",
|
|
15
17
|
props: {
|
|
16
18
|
actions: {
|
|
@@ -128,5 +130,5 @@ const W = { class: "contact-context-menu__wrapper" }, X = ["id"], ue = /* @__PUR
|
|
|
128
130
|
}
|
|
129
131
|
});
|
|
130
132
|
export {
|
|
131
|
-
|
|
133
|
+
de as default
|
|
132
134
|
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { createElementBlock as n, openBlock as t, createElementVNode as
|
|
1
|
+
import { createElementBlock as n, openBlock as t, createElementVNode as k, Fragment as d, renderList as y, normalizeClass as u, createBlock as h, createCommentVNode as r, resolveDynamicComponent as g, toDisplayString as p } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import x from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = ["id"], v = { class: "context-menu__list" }, C = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "context-menu__separator",
|
|
7
|
+
role: "separator"
|
|
8
|
+
}, b = ["onClick"], w = ["src"], M = {
|
|
5
9
|
key: 3,
|
|
6
10
|
style: { "white-space": "nowrap" }
|
|
7
|
-
},
|
|
11
|
+
}, B = { key: 4 }, $ = {
|
|
8
12
|
__name: "ContextMenu",
|
|
9
13
|
props: {
|
|
10
14
|
actions: {
|
|
@@ -14,51 +18,51 @@ const v = ["id", "data-theme"], x = { class: "context-menu__list" }, C = ["onCli
|
|
|
14
18
|
id: {
|
|
15
19
|
type: String,
|
|
16
20
|
default: ""
|
|
17
|
-
},
|
|
18
|
-
dataTheme: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "light"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
24
|
-
setup(
|
|
25
|
-
const l =
|
|
24
|
+
setup(i, { emit: _ }) {
|
|
25
|
+
const l = i, o = _, a = (c) => {
|
|
26
26
|
const s = l.actions[c];
|
|
27
|
-
|
|
27
|
+
s != null && s.separator || o("click", s);
|
|
28
28
|
};
|
|
29
29
|
return (c, s) => (t(), n("div", {
|
|
30
|
-
id:
|
|
30
|
+
id: i.id,
|
|
31
31
|
class: "context-menu__container",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onMouseleave: s[1] || (s[1] = (e) => i("mouseleave"))
|
|
32
|
+
onMouseenter: s[0] || (s[0] = (e) => o("mouseenter")),
|
|
33
|
+
onMouseleave: s[1] || (s[1] = (e) => o("mouseleave"))
|
|
35
34
|
}, [
|
|
36
|
-
|
|
37
|
-
(t(!0), n(
|
|
38
|
-
|
|
39
|
-
class: d(["context-menu__item", { "context-menu__item--disabled": e.disabled }]),
|
|
40
|
-
onClick: (S) => !e.disabled && p(m)
|
|
41
|
-
}, [
|
|
42
|
-
e.icon && typeof e.icon == "string" ? (t(), n("img", {
|
|
43
|
-
key: 0,
|
|
44
|
-
src: e.icon,
|
|
45
|
-
width: "18",
|
|
46
|
-
height: "18"
|
|
47
|
-
}, null, 8, b)) : e.icon && typeof e.icon == "object" ? (t(), k(f(e.icon), {
|
|
35
|
+
k("ul", v, [
|
|
36
|
+
(t(!0), n(d, null, y(l.actions, (e, m) => (t(), n(d, { key: m }, [
|
|
37
|
+
e.separator ? (t(), n("li", C)) : (t(), n("li", {
|
|
48
38
|
key: 1,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
39
|
+
class: u(["context-menu__item", {
|
|
40
|
+
"context-menu__item--disabled": e.disabled,
|
|
41
|
+
"context-menu__item--danger": e.danger
|
|
42
|
+
}]),
|
|
43
|
+
onClick: (D) => !e.disabled && a(m)
|
|
44
|
+
}, [
|
|
45
|
+
e.icon && typeof e.icon == "string" ? (t(), n("img", {
|
|
46
|
+
key: 0,
|
|
47
|
+
src: e.icon,
|
|
48
|
+
width: "18",
|
|
49
|
+
height: "18"
|
|
50
|
+
}, null, 8, w)) : e.icon && typeof e.icon != "string" ? (t(), h(g(e.icon), {
|
|
51
|
+
key: 1,
|
|
52
|
+
width: "18",
|
|
53
|
+
height: "18"
|
|
54
|
+
})) : e.prime ? (t(), n("i", {
|
|
55
|
+
key: 2,
|
|
56
|
+
class: u("pi pi-" + e.prime)
|
|
57
|
+
}, null, 2)) : r("", !0),
|
|
58
|
+
e.title ? (t(), n("span", M, p(e.title), 1)) : r("", !0),
|
|
59
|
+
e.description ? (t(), n("span", B, p(e.description), 1)) : r("", !0)
|
|
60
|
+
], 10, b))
|
|
61
|
+
], 64))), 128))
|
|
58
62
|
])
|
|
59
|
-
], 40,
|
|
63
|
+
], 40, f));
|
|
60
64
|
}
|
|
61
|
-
},
|
|
65
|
+
}, V = /* @__PURE__ */ x($, [["__scopeId", "data-v-e191b2ad"]]);
|
|
62
66
|
export {
|
|
63
|
-
|
|
67
|
+
V as default
|
|
64
68
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent as f, inject as j, computed as
|
|
1
|
+
import { defineComponent as f, inject as j, computed as m, createElementBlock as c, unref as g, openBlock as p, toDisplayString as d } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
4
|
import "../../../hooks/useTheme.js";
|
|
5
5
|
import { useEmojiNative as h } from "../../../hooks/useEmojiNative.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
+
import "../../../locale/useLocale.js";
|
|
9
|
+
/* empty css */
|
|
8
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
12
|
import "../../../functions/parseMarkdown.js";
|
|
11
13
|
import { getAppleEmojiUrl as k, getAppleEmojiFallbackUrl as E } from "../../../functions/renderAppleEmojis.js";
|
|
12
|
-
const _ = ["src", "alt"], y = { key: 1 },
|
|
14
|
+
const _ = ["src", "alt"], y = { key: 1 }, G = /* @__PURE__ */ f({
|
|
13
15
|
__name: "EmojiGlyph",
|
|
14
16
|
props: {
|
|
15
17
|
emoji: {
|
|
@@ -18,12 +20,12 @@ const _ = ["src", "alt"], y = { key: 1 }, D = /* @__PURE__ */ f({
|
|
|
18
20
|
}
|
|
19
21
|
},
|
|
20
22
|
setup(t) {
|
|
21
|
-
const r = t,
|
|
23
|
+
const r = t, n = j("chatAppId", ""), { isNative: a } = h(n), s = m(() => k(r.emoji)), l = m(() => E(r.emoji));
|
|
22
24
|
function u(i) {
|
|
23
25
|
const o = i.target, e = l.value;
|
|
24
26
|
e && o.src !== e && (o.src = e);
|
|
25
27
|
}
|
|
26
|
-
return (i, o) => g(a) ? (
|
|
28
|
+
return (i, o) => g(a) ? (p(), c("span", y, d(t.emoji), 1)) : (p(), c("img", {
|
|
27
29
|
key: 0,
|
|
28
30
|
class: "chotto-emoji",
|
|
29
31
|
src: s.value,
|
|
@@ -34,5 +36,5 @@ const _ = ["src", "alt"], y = { key: 1 }, D = /* @__PURE__ */ f({
|
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
export {
|
|
37
|
-
|
|
39
|
+
G as default
|
|
38
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as o, createElementBlock as i, createCommentVNode as l, openBlock as r, normalizeClass as d, createStaticVNode as c } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import p from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const _ = ["width", "height"], v = {
|
|
5
5
|
__name: "LoadingIndicator",
|
|
6
6
|
props: {
|
|
7
7
|
isLoading: {
|
|
@@ -11,34 +11,35 @@ const m = ["width", "height"], x = {
|
|
|
11
11
|
size: {
|
|
12
12
|
type: String,
|
|
13
13
|
default: "normal",
|
|
14
|
-
validator: (
|
|
14
|
+
validator: (t) => ["normal", "small"].includes(t)
|
|
15
15
|
},
|
|
16
16
|
position: {
|
|
17
17
|
type: String,
|
|
18
18
|
default: "center",
|
|
19
|
-
validator: (
|
|
19
|
+
validator: (t) => ["center", "top"].includes(t)
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
return (
|
|
22
|
+
setup(t) {
|
|
23
|
+
const a = t, s = o(() => a.size === "small" ? "36px" : "120px"), n = o(() => a.size === "small" ? "35px" : "116px");
|
|
24
|
+
return (x, e) => t.isLoading ? (r(), i("div", {
|
|
25
25
|
key: 0,
|
|
26
|
-
class:
|
|
26
|
+
class: d([
|
|
27
27
|
"loading-indicator",
|
|
28
|
-
{ "loading-indicator--small":
|
|
28
|
+
{ "loading-indicator--small": t.size === "small" }
|
|
29
29
|
])
|
|
30
30
|
}, [
|
|
31
|
-
(
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
31
|
+
(r(), i("svg", {
|
|
32
|
+
width: s.value,
|
|
33
|
+
height: n.value,
|
|
34
34
|
viewBox: "-8 -8 120 116",
|
|
35
|
+
fill: "none",
|
|
35
36
|
xmlns: "http://www.w3.org/2000/svg"
|
|
36
|
-
}, [...
|
|
37
|
-
|
|
38
|
-
])], 8,
|
|
39
|
-
], 2)) :
|
|
37
|
+
}, [...e[0] || (e[0] = [
|
|
38
|
+
c('<circle class="dot dot-1" cx="84.71" cy="43.91" r="12.18" stroke="url(#paint0_linear_10781_5111)" data-v-53892888></circle><circle class="dot dot-2" cx="73.05" cy="82.12" r="12.18" stroke="url(#paint1_linear_10781_5111)" data-v-53892888></circle><circle class="dot dot-3" cx="32.24" cy="82.12" r="12.18" stroke="url(#paint2_linear_10781_5111)" data-v-53892888></circle><circle class="dot dot-4" cx="19.29" cy="43.91" r="12.18" stroke="url(#paint3_linear_10781_5111)" data-v-53892888></circle><circle class="dot dot-5" cx="52.76" cy="19.29" r="12.18" stroke="url(#paint4_linear_10781_5111)" data-v-53892888></circle><defs data-v-53892888><linearGradient id="paint0_linear_10781_5111" x1="18.12" y1="10.7" x2="85.37" y2="100" gradientUnits="userSpaceOnUse" data-v-53892888><stop stop-color="#426CFF" data-v-53892888></stop><stop offset="1" stop-color="#734AFD" data-v-53892888></stop></linearGradient><linearGradient id="paint1_linear_10781_5111" x1="18.12" y1="10.7" x2="85.37" y2="100" gradientUnits="userSpaceOnUse" data-v-53892888><stop stop-color="#426CFF" data-v-53892888></stop><stop offset="1" stop-color="#734AFD" data-v-53892888></stop></linearGradient><linearGradient id="paint2_linear_10781_5111" x1="18.12" y1="10.7" x2="85.37" y2="100" gradientUnits="userSpaceOnUse" data-v-53892888><stop stop-color="#426CFF" data-v-53892888></stop><stop offset="1" stop-color="#734AFD" data-v-53892888></stop></linearGradient><linearGradient id="paint3_linear_10781_5111" x1="18.12" y1="10.7" x2="85.37" y2="100" gradientUnits="userSpaceOnUse" data-v-53892888><stop stop-color="#426CFF" data-v-53892888></stop><stop offset="1" stop-color="#734AFD" data-v-53892888></stop></linearGradient><linearGradient id="paint4_linear_10781_5111" x1="18.12" y1="10.7" x2="85.37" y2="100" gradientUnits="userSpaceOnUse" data-v-53892888><stop stop-color="#426CFF" data-v-53892888></stop><stop offset="1" stop-color="#734AFD" data-v-53892888></stop></linearGradient></defs>', 6)
|
|
39
|
+
])], 8, _))
|
|
40
|
+
], 2)) : l("", !0);
|
|
40
41
|
}
|
|
41
|
-
},
|
|
42
|
+
}, m = /* @__PURE__ */ p(v, [["__scopeId", "data-v-53892888"]]);
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
m as default
|
|
44
45
|
};
|
|
@@ -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
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-11bc5009"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as nt, inject as ut, useSlots as ft, ref as u, computed as s, onMounted as st, onUnmounted as ct, createElementBlock as m, openBlock as c, Fragment as C, createElementVNode as mt, createBlock as ht, renderSlot as W, Teleport as pt, createVNode as vt, Transition as gt, withCtx as dt, createCommentVNode as Tt, renderList as yt, normalizeStyle as wt, normalizeClass as xt, unref as M, createTextVNode as _t, toDisplayString as St, nextTick as L } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as kt } from "../../../hooks/useTheme.js";
|
|
5
5
|
import "../../../hooks/useEmojiNative.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
+
import "../../../locale/useLocale.js";
|
|
9
|
+
/* empty css */
|
|
8
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
10
12
|
import "../../../functions/parseMarkdown.js";
|
|
11
|
-
const
|
|
13
|
+
const Ct = { key: 0 }, Mt = ["data-theme"], Lt = 6, At = 120, qt = /* @__PURE__ */ nt({
|
|
12
14
|
__name: "Tooltip",
|
|
13
15
|
props: {
|
|
14
16
|
text: {
|
|
@@ -48,18 +50,23 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Ot = /* @__PURE__
|
|
|
48
50
|
maxWidth: {
|
|
49
51
|
type: String,
|
|
50
52
|
default: ""
|
|
53
|
+
},
|
|
54
|
+
bubbleStyle: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => ({})
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
|
-
setup(
|
|
54
|
-
const
|
|
59
|
+
setup(R, { expose: V }) {
|
|
60
|
+
const y = ut("chatAppId"), { getTheme: A } = kt(y), H = ft(), w = u(), h = u([]), f = u(!1), p = u(null), n = u(null), r = u(null), v = u(!1), g = u(!1), e = R, x = s(() => typeof H.content == "function"), j = s(() => ({
|
|
55
61
|
tooltip__text: !0,
|
|
56
62
|
[`tooltip--${e.position}`]: !0
|
|
57
|
-
})),
|
|
58
|
-
maxWidth: e.maxWidth || void 0
|
|
59
|
-
|
|
63
|
+
})), q = s(() => ({
|
|
64
|
+
maxWidth: e.maxWidth || void 0,
|
|
65
|
+
...e.bubbleStyle
|
|
66
|
+
})), E = s(() => {
|
|
60
67
|
const t = Array.isArray(e.texts) ? e.texts.map((o) => String(o ?? "").trim()).filter(Boolean) : [];
|
|
61
68
|
return t.length > 0 ? t : e.text ? [e.text] : [];
|
|
62
|
-
}),
|
|
69
|
+
}), z = s(() => x.value ? ["__content__"] : E.value), F = s(() => x.value ? !0 : E.value.length > 0), G = (t, o) => {
|
|
63
70
|
const l = o.left < 0 ? o.left : 0, i = o.top < 0 ? o.top : 0;
|
|
64
71
|
return {
|
|
65
72
|
left: {
|
|
@@ -103,95 +110,99 @@ const yt = { key: 0 }, wt = ["data-theme"], xt = 6, _t = 120, Ot = /* @__PURE__
|
|
|
103
110
|
left: t.left - l
|
|
104
111
|
}
|
|
105
112
|
}[e.position];
|
|
106
|
-
},
|
|
107
|
-
if (!
|
|
108
|
-
const t =
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
113
|
+
}, D = () => {
|
|
114
|
+
if (!w.value || h.value.length === 0) return;
|
|
115
|
+
const t = w.value.getBoundingClientRect(), o = e.position.startsWith("top"), l = 8, i = y ? document.getElementById(y) : null, a = i == null ? void 0 : i.getBoundingClientRect(), Z = (a == null ? void 0 : a.top) ?? 0, b = (a == null ? void 0 : a.left) ?? 0, B = (a == null ? void 0 : a.right) ?? window.innerWidth, tt = (a == null ? void 0 : a.bottom) ?? window.innerHeight;
|
|
116
|
+
h.value.forEach((S, et) => {
|
|
117
|
+
const T = S.getBoundingClientRect(), k = G(t, T), O = et * (T.height + Lt), ot = o ? k.top - O : k.top + O, $ = Z + l, lt = tt - T.height - l, P = b + l, it = B - T.width - l, rt = Math.min(Math.max(ot, $), Math.max($, lt)), at = Math.min(Math.max(k.left, P), Math.max(P, it));
|
|
118
|
+
S.style.top = `${rt}px`, S.style.left = `${at}px`;
|
|
112
119
|
});
|
|
113
|
-
},
|
|
120
|
+
}, K = () => {
|
|
114
121
|
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null), r.value && (clearTimeout(r.value), r.value = null), n.value = setTimeout(() => {
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
f.value = !0, L(() => {
|
|
123
|
+
D();
|
|
117
124
|
}), n.value = null;
|
|
118
125
|
}, e.delay));
|
|
119
|
-
},
|
|
120
|
-
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null), r.value && (clearTimeout(r.value), r.value = null),
|
|
121
|
-
M(
|
|
126
|
+
}, _ = () => {
|
|
127
|
+
e.trigger !== "auto" && (n.value && (clearTimeout(n.value), n.value = null), r.value && (clearTimeout(r.value), r.value = null), f.value = !1, L(() => {
|
|
128
|
+
M(h).forEach((o) => {
|
|
122
129
|
o.style.top = "0", o.style.left = "0";
|
|
123
130
|
});
|
|
124
131
|
}));
|
|
125
|
-
},
|
|
132
|
+
}, I = () => {
|
|
126
133
|
e.trigger !== "auto" && (r.value && clearTimeout(r.value), r.value = setTimeout(() => {
|
|
127
|
-
!
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
134
|
+
!v.value && !g.value && _();
|
|
135
|
+
}, At));
|
|
136
|
+
}, U = () => {
|
|
137
|
+
v.value = !0, K();
|
|
138
|
+
}, X = () => {
|
|
139
|
+
v.value = !1, I();
|
|
140
|
+
}, Y = () => {
|
|
141
|
+
g.value = !0, r.value && (clearTimeout(r.value), r.value = null);
|
|
142
|
+
}, J = () => {
|
|
143
|
+
g.value = !1, I();
|
|
144
|
+
}, N = () => {
|
|
138
145
|
if (e.hideOnClick) {
|
|
139
|
-
if (
|
|
140
|
-
|
|
146
|
+
if (v.value = !1, g.value = !1, e.trigger === "auto") {
|
|
147
|
+
d(), f.value = !1;
|
|
141
148
|
return;
|
|
142
149
|
}
|
|
143
|
-
|
|
150
|
+
_();
|
|
144
151
|
}
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}), e.autoShowDuration > 0 && (
|
|
149
|
-
|
|
152
|
+
}, Q = () => {
|
|
153
|
+
d(), f.value = !0, L(() => {
|
|
154
|
+
D();
|
|
155
|
+
}), e.autoShowDuration > 0 && (p.value = setTimeout(() => {
|
|
156
|
+
f.value = !1;
|
|
150
157
|
}, e.autoShowDuration));
|
|
151
|
-
},
|
|
152
|
-
|
|
158
|
+
}, d = () => {
|
|
159
|
+
p.value && (clearTimeout(p.value), p.value = null);
|
|
153
160
|
};
|
|
154
|
-
return
|
|
155
|
-
e.hideOnClick && document.addEventListener("mousedown",
|
|
156
|
-
}),
|
|
157
|
-
e.hideOnClick && document.removeEventListener("mousedown",
|
|
158
|
-
}),
|
|
159
|
-
startAutoShow:
|
|
160
|
-
clearAutoTimer:
|
|
161
|
-
hide:
|
|
162
|
-
}), (t, o) => (c(),
|
|
163
|
-
|
|
161
|
+
return st(() => {
|
|
162
|
+
e.hideOnClick && document.addEventListener("mousedown", N, !0);
|
|
163
|
+
}), ct(() => {
|
|
164
|
+
e.hideOnClick && document.removeEventListener("mousedown", N, !0), n.value && clearTimeout(n.value), r.value && clearTimeout(r.value), d();
|
|
165
|
+
}), V({
|
|
166
|
+
startAutoShow: Q,
|
|
167
|
+
clearAutoTimer: d,
|
|
168
|
+
hide: _
|
|
169
|
+
}), (t, o) => (c(), m(C, null, [
|
|
170
|
+
mt("div", {
|
|
164
171
|
ref_key: "container",
|
|
165
|
-
ref:
|
|
172
|
+
ref: w,
|
|
166
173
|
class: "tooltip-wrapper",
|
|
167
|
-
onMouseenter:
|
|
168
|
-
onMouseleave:
|
|
174
|
+
onMouseenter: U,
|
|
175
|
+
onMouseleave: X
|
|
169
176
|
}, [
|
|
170
|
-
|
|
177
|
+
W(t.$slots, "default", {}, void 0, !0)
|
|
171
178
|
], 544),
|
|
172
|
-
(c(),
|
|
173
|
-
|
|
174
|
-
default:
|
|
175
|
-
|
|
176
|
-
(c(!0),
|
|
179
|
+
(c(), ht(pt, { to: "body" }, [
|
|
180
|
+
vt(gt, null, {
|
|
181
|
+
default: dt(() => [
|
|
182
|
+
f.value && F.value ? (c(), m("div", Ct, [
|
|
183
|
+
(c(!0), m(C, null, yt(z.value, (l, i) => (c(), m("span", {
|
|
177
184
|
key: `${l}-${i}`,
|
|
178
185
|
ref_for: !0,
|
|
179
186
|
ref_key: "tooltipItems",
|
|
180
|
-
ref:
|
|
181
|
-
"data-theme": M(
|
|
182
|
-
class:
|
|
183
|
-
style:
|
|
184
|
-
onMouseenter:
|
|
185
|
-
onMouseleave:
|
|
186
|
-
},
|
|
187
|
-
|
|
187
|
+
ref: h,
|
|
188
|
+
"data-theme": M(A)().theme ? M(A)().theme : "light",
|
|
189
|
+
class: xt(j.value),
|
|
190
|
+
style: wt(q.value),
|
|
191
|
+
onMouseenter: Y,
|
|
192
|
+
onMouseleave: J
|
|
193
|
+
}, [
|
|
194
|
+
x.value ? W(t.$slots, "content", { key: 0 }, void 0, !0) : (c(), m(C, { key: 1 }, [
|
|
195
|
+
_t(St(l), 1)
|
|
196
|
+
], 64))
|
|
197
|
+
], 46, Mt))), 128))
|
|
198
|
+
])) : Tt("", !0)
|
|
188
199
|
]),
|
|
189
|
-
_:
|
|
200
|
+
_: 3
|
|
190
201
|
})
|
|
191
202
|
]))
|
|
192
203
|
], 64));
|
|
193
204
|
}
|
|
194
205
|
});
|
|
195
206
|
export {
|
|
196
|
-
|
|
207
|
+
qt as default
|
|
197
208
|
};
|