@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { needsAttributeConfirmation as m } from "./useCommunicationAttributes.js";
|
|
2
|
-
import { resolveRecentChannelSelection as
|
|
3
|
-
function
|
|
2
|
+
import { resolveRecentChannelSelection as K } from "./useCommunicationRecentSelection.js";
|
|
3
|
+
function Z({
|
|
4
4
|
activeChannelType: l,
|
|
5
5
|
channels: v,
|
|
6
6
|
selectedChannel: i,
|
|
@@ -9,7 +9,8 @@ function Y({
|
|
|
9
9
|
confirmingAttributeId: q,
|
|
10
10
|
isAttributeBlocked: u,
|
|
11
11
|
closeMenu: a,
|
|
12
|
-
|
|
12
|
+
pinMenuOpen: A,
|
|
13
|
+
hasMultipleChannels: G,
|
|
13
14
|
getSingleChannelForType: x,
|
|
14
15
|
getAvailableChannels: C,
|
|
15
16
|
isChannelEmpty: d,
|
|
@@ -20,13 +21,13 @@ function Y({
|
|
|
20
21
|
panelPendingSelection: f
|
|
21
22
|
}) {
|
|
22
23
|
const b = (n, e, r) => {
|
|
23
|
-
u(n) || (q.value = n.id, t("confirm-attribute", {
|
|
24
|
+
u(n) || (A(), q.value = n.id, t("confirm-attribute", {
|
|
24
25
|
attributeId: n.id,
|
|
25
26
|
channelId: e,
|
|
26
27
|
channelType: r,
|
|
27
28
|
attribute: n
|
|
28
29
|
}));
|
|
29
|
-
},
|
|
30
|
+
}, H = (n, e, r) => {
|
|
30
31
|
if (m(n)) {
|
|
31
32
|
b(n, e, r);
|
|
32
33
|
return;
|
|
@@ -60,34 +61,36 @@ function Y({
|
|
|
60
61
|
h(n);
|
|
61
62
|
return;
|
|
62
63
|
}
|
|
63
|
-
if (!
|
|
64
|
+
if (!G(e)) {
|
|
64
65
|
const r = x(e);
|
|
65
|
-
r &&
|
|
66
|
+
r && H(n, r.channelId, e);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
70
|
selectSingleChannel: j,
|
|
70
71
|
selectChannel: (n) => {
|
|
71
72
|
const e = z.value, r = l.value;
|
|
72
|
-
if (!e || !r
|
|
73
|
+
if (!e || !r) {
|
|
73
74
|
a();
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
if (!u(e)) {
|
|
78
|
+
if (m(e)) {
|
|
79
|
+
b(e, n, r);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
t("select-attribute-channel", {
|
|
83
|
+
attributeId: e.id,
|
|
84
|
+
channelId: n
|
|
85
|
+
}), s.value = r, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), a();
|
|
79
86
|
}
|
|
80
|
-
t("select-attribute-channel", {
|
|
81
|
-
attributeId: e.id,
|
|
82
|
-
channelId: n
|
|
83
|
-
}), s.value = r, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), a();
|
|
84
87
|
},
|
|
85
88
|
availableChannels: () => {
|
|
86
89
|
const n = l.value;
|
|
87
90
|
return n ? C(n) : [];
|
|
88
91
|
},
|
|
89
92
|
applyRecentChannelButtonSelection: (n, e, r) => {
|
|
90
|
-
const c =
|
|
93
|
+
const c = K(
|
|
91
94
|
n,
|
|
92
95
|
e,
|
|
93
96
|
r,
|
|
@@ -104,7 +107,7 @@ function Y({
|
|
|
104
107
|
}), t("select-attribute-channel", {
|
|
105
108
|
attributeId: P.id,
|
|
106
109
|
channelId: o
|
|
107
|
-
}), s.value = n, i.value = v.value.find((
|
|
110
|
+
}), s.value = n, i.value = v.value.find((J) => J.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
|
|
108
111
|
},
|
|
109
112
|
clearPanelPendingSelection: () => {
|
|
110
113
|
f && (f.value = null);
|
|
@@ -112,5 +115,5 @@ function Y({
|
|
|
112
115
|
};
|
|
113
116
|
}
|
|
114
117
|
export {
|
|
115
|
-
|
|
118
|
+
Z as useCommunicationActions
|
|
116
119
|
};
|
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
panelRef:
|
|
4
|
-
selectedChannelType:
|
|
5
|
-
frozenAttribute:
|
|
1
|
+
import { ref as n, nextTick as p } from "vue";
|
|
2
|
+
function w({
|
|
3
|
+
panelRef: d,
|
|
4
|
+
selectedChannelType: h,
|
|
5
|
+
frozenAttribute: r
|
|
6
6
|
}) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
const u = n(null), C = n(null), a = n(!1), s = n(!1), t = n(!1), l = n(!1), i = () => {
|
|
8
|
+
l.value = !1, a.value = !1, u.value = null, r.value = null, s.value = !1;
|
|
9
|
+
}, m = () => {
|
|
10
|
+
l.value = !0;
|
|
11
|
+
}, c = () => {
|
|
12
|
+
t.value = !0, p(() => {
|
|
13
|
+
p(() => {
|
|
14
|
+
t.value = !1;
|
|
13
15
|
});
|
|
14
16
|
});
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
+
}, f = (e) => {
|
|
18
|
+
l.value = !1, u.value = e, a.value = !0, s.value = !1, r.value = null, c();
|
|
17
19
|
};
|
|
18
20
|
return {
|
|
19
|
-
activeChannelType:
|
|
20
|
-
hoveredChannel:
|
|
21
|
-
showMenu:
|
|
22
|
-
showSubMenu:
|
|
21
|
+
activeChannelType: u,
|
|
22
|
+
hoveredChannel: C,
|
|
23
|
+
showMenu: a,
|
|
24
|
+
showSubMenu: s,
|
|
25
|
+
retainOpenUntilDismiss: l,
|
|
23
26
|
handleChannelClick: (e) => {
|
|
24
|
-
if (
|
|
25
|
-
|
|
27
|
+
if (h.value === e && u.value === e) {
|
|
28
|
+
i();
|
|
26
29
|
return;
|
|
27
30
|
}
|
|
28
|
-
|
|
31
|
+
f(e);
|
|
29
32
|
},
|
|
30
|
-
openMenu:
|
|
31
|
-
closeMenu:
|
|
33
|
+
openMenu: f,
|
|
34
|
+
closeMenu: i,
|
|
35
|
+
pinMenuOpen: m,
|
|
36
|
+
armOutsideClickSuppression: c,
|
|
32
37
|
handleClickOutside: (e) => {
|
|
33
|
-
if (
|
|
38
|
+
if (t.value || l.value)
|
|
34
39
|
return;
|
|
35
|
-
const o =
|
|
40
|
+
const o = d.value;
|
|
36
41
|
if (!o)
|
|
37
42
|
return;
|
|
38
|
-
const
|
|
39
|
-
Array.isArray(
|
|
43
|
+
const v = typeof e.composedPath == "function" ? e.composedPath() : [];
|
|
44
|
+
Array.isArray(v) && v.includes(o) || o.contains(e.target) || i();
|
|
40
45
|
}
|
|
41
46
|
};
|
|
42
47
|
}
|
|
43
48
|
export {
|
|
44
|
-
|
|
49
|
+
w as useCommunicationMenu
|
|
45
50
|
};
|
|
@@ -1,58 +1,67 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
activeChannelType:
|
|
4
|
-
showSubMenu:
|
|
5
|
-
frozenAttribute:
|
|
6
|
-
hoveredAttribute:
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ref as E } from "vue";
|
|
2
|
+
function O({
|
|
3
|
+
activeChannelType: S,
|
|
4
|
+
showSubMenu: u,
|
|
5
|
+
frozenAttribute: n,
|
|
6
|
+
hoveredAttribute: c,
|
|
7
|
+
confirmingAttributeId: v,
|
|
8
|
+
retainOpenUntilDismiss: i,
|
|
9
|
+
hasMultipleChannels: b,
|
|
10
|
+
isAttributeBlocked: f
|
|
9
11
|
}) {
|
|
10
|
-
const
|
|
12
|
+
const l = E(0), y = () => i.value || !!v.value || f(c.value ?? n.value);
|
|
11
13
|
return {
|
|
12
|
-
subMenuTop:
|
|
13
|
-
handleAttributeMouseEnter: (e,
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
subMenuTop: l,
|
|
15
|
+
handleAttributeMouseEnter: (e, o) => {
|
|
16
|
+
const t = S.value;
|
|
17
|
+
if (!t || !b(t))
|
|
18
|
+
return null;
|
|
19
|
+
if (i.value || v.value) {
|
|
20
|
+
const a = n.value ?? c.value;
|
|
21
|
+
if (u.value || a && a.id !== e.id)
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return c.value = e, u.value = !0, n.value = e, o;
|
|
16
25
|
},
|
|
17
26
|
handleAttributeMouseLeave: () => {
|
|
18
|
-
|
|
27
|
+
u.value || (n.value = null);
|
|
19
28
|
},
|
|
20
29
|
keepSubMenuOpen: () => {
|
|
21
|
-
|
|
30
|
+
u.value = !0;
|
|
22
31
|
},
|
|
23
32
|
closeSubMenu: () => {
|
|
24
|
-
|
|
33
|
+
y() || (u.value = !1, n.value = null);
|
|
25
34
|
},
|
|
26
|
-
alignSubMenuWithTarget: (e,
|
|
27
|
-
var
|
|
28
|
-
if (!
|
|
29
|
-
|
|
35
|
+
alignSubMenuWithTarget: (e, o) => {
|
|
36
|
+
var t, a, d;
|
|
37
|
+
if (!o) {
|
|
38
|
+
l.value = 0;
|
|
30
39
|
return;
|
|
31
40
|
}
|
|
32
41
|
try {
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
35
|
-
|
|
42
|
+
const p = (t = e.value) == null ? void 0 : t.querySelector(".attributes-menu"), s = (a = e.value) == null ? void 0 : a.querySelector(".sub-menu-header"), m = (d = e.value) == null ? void 0 : d.querySelector(".sub-menu");
|
|
43
|
+
if (!p) {
|
|
44
|
+
l.value = 0;
|
|
36
45
|
return;
|
|
37
46
|
}
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
|
|
47
|
+
const B = p.getBoundingClientRect(), C = o.getBoundingClientRect();
|
|
48
|
+
let g = 0;
|
|
49
|
+
if (s) {
|
|
50
|
+
const r = s.getBoundingClientRect(), T = getComputedStyle(s), h = parseFloat(T.marginBottom || "0");
|
|
51
|
+
g = r.height + (Number.isNaN(h) ? 0 : h);
|
|
43
52
|
}
|
|
44
|
-
let
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
|
|
53
|
+
let M = 0;
|
|
54
|
+
if (m) {
|
|
55
|
+
const r = getComputedStyle(m);
|
|
56
|
+
M = parseFloat(r.paddingTop || "0") || 0;
|
|
48
57
|
}
|
|
49
|
-
|
|
58
|
+
l.value = C.top - B.top - g - M - 2;
|
|
50
59
|
} catch {
|
|
51
|
-
|
|
60
|
+
l.value = 0;
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
export {
|
|
57
|
-
|
|
66
|
+
O as useCommunicationSubMenu
|
|
58
67
|
};
|
|
@@ -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
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { provide as h, inject as k, ref as
|
|
1
|
+
import { provide as h, inject as k, ref as s, onMounted as w, createElementBlock as i, openBlock as u, Fragment as B, createCommentVNode as W, createElementVNode as p, unref as S, normalizeClass as T, createVNode as M } from "vue";
|
|
2
2
|
import V from "../WABATemplateSelector/WABATemplateSelector.vue.js";
|
|
3
3
|
import { useMessageDraft as A } from "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import "../../../hooks/useTheme.js";
|
|
6
|
+
import "../../../hooks/useEmojiNative.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import q from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
9
|
/* empty css */
|
|
@@ -49,7 +50,7 @@ const C = {
|
|
|
49
50
|
setup(a, { emit: d }) {
|
|
50
51
|
const t = a;
|
|
51
52
|
h("filebumpUrl", t.filebumpUrl);
|
|
52
|
-
const m = k("chatAppId"), { getMessage: c } = A(m), f =
|
|
53
|
+
const m = k("chatAppId"), { getMessage: c } = A(m), f = s(null), e = s(null), y = d, v = () => {
|
|
53
54
|
t.mode == "click" && t.state == "active" && (e.value.style.display == "none" ? e.value.style.display = "inherit" : e.value.style.display == "inherit" && (e.value.style.display = "none"));
|
|
54
55
|
}, o = () => {
|
|
55
56
|
t.mode == "hover" && t.state == "active" && (e.value.style.display = "inherit");
|
|
@@ -64,7 +65,7 @@ const C = {
|
|
|
64
65
|
const g = (n) => {
|
|
65
66
|
y("sendWabaValues", n);
|
|
66
67
|
};
|
|
67
|
-
return (n,
|
|
68
|
+
return (n, r) => (u(), i(B, null, [
|
|
68
69
|
S(c)().isRecording ? W("", !0) : (u(), i("button", {
|
|
69
70
|
key: 0,
|
|
70
71
|
ref_key: "templateButton",
|
|
@@ -73,7 +74,7 @@ const C = {
|
|
|
73
74
|
onClick: v,
|
|
74
75
|
onMouseover: o,
|
|
75
76
|
onMouseout: l
|
|
76
|
-
}, [...
|
|
77
|
+
}, [...r[0] || (r[0] = [
|
|
77
78
|
p("span", { class: "pi pi-code" }, null, -1)
|
|
78
79
|
])], 34)),
|
|
79
80
|
p("div", {
|
|
@@ -93,7 +94,7 @@ const C = {
|
|
|
93
94
|
], 544)
|
|
94
95
|
], 64));
|
|
95
96
|
}
|
|
96
|
-
},
|
|
97
|
+
}, K = /* @__PURE__ */ q(C, [["__scopeId", "data-v-e300d7b9"]]);
|
|
97
98
|
export {
|
|
98
|
-
|
|
99
|
+
K as default
|
|
99
100
|
};
|