@mobilon-dev/chotto 0.3.84 → 0.3.86
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/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 +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_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_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
|
+
};
|