@mobilon-dev/chotto 0.3.96 → 0.3.98
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.vue.js +29 -4
- package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +42 -61
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +47 -4
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +55 -82
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +86 -51
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue.js +32 -4
- package/dist/components/1_atoms/EmbedPreview/EmbedPreview.vue2.js +7 -28
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +22 -38
- package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +33 -2
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue.js +37 -4
- package/dist/components/1_atoms/LinkPreview/LinkPreview.vue2.js +7 -21
- package/dist/components/1_atoms/LoadingIndicator/LoadingIndicator.vue.js +30 -19
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +70 -4
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +76 -108
- package/dist/components/1_icons/AvatarIcon.vue.js +8 -8
- package/dist/components/1_icons/CheckIcon.vue.js +26 -13
- package/dist/components/1_icons/CloseButtonIcon.vue.js +16 -10
- package/dist/components/1_icons/CloseIcon.vue.js +16 -10
- package/dist/components/1_icons/ContactCRMIcon.vue.js +16 -10
- package/dist/components/1_icons/MenuIcon.vue.js +16 -10
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ErrorStatusIcon.vue2.js +12 -21
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue.js +36 -4
- package/dist/components/1_icons/MessageStatus/PendingStatusIcon.vue2.js +11 -26
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ReadStatusIcon.vue2.js +12 -21
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue.js +23 -3
- package/dist/components/1_icons/MessageStatus/ReceivedStatusIcon.vue2.js +11 -20
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue.js +33 -4
- package/dist/components/1_icons/MessageStatus/SentStatusIcon.vue2.js +11 -23
- package/dist/components/1_icons/SearchIcon.vue.js +29 -17
- package/dist/components/1_icons/SettingsIcon.vue.js +8 -8
- package/dist/components/1_icons/TelegramIcon.vue.js +32 -20
- package/dist/components/1_icons/WhatsAppIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +546 -396
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanelAttributeIndicator.vue.js +101 -58
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +14 -8
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelConfirmSpinner.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelMaxIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelPhoneIcon.vue.js +19 -13
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSMSIcon.vue.js +16 -10
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuMaxIcon.vue.js +35 -23
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuPhoneIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuSMSIcon.vue.js +17 -11
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuTelegramIcon.vue.js +8 -8
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js +32 -20
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelTelegramIcon.vue.js +33 -21
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelUnconfirmedIcon.vue.js +7 -7
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelWhatsAppIcon.vue.js +8 -8
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +74 -4
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +8 -42
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue.js +62 -4
- package/dist/components/2_blocks/FeedFoundObjects/FeedFoundObjects.vue2.js +15 -36
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue.js +49 -4
- package/dist/components/2_blocks/FeedSearch/FeedSearch.vue2.js +22 -45
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue.js +36 -4
- package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +19 -37
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +61 -4
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -96
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +31 -27
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +72 -4
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +47 -83
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +19 -21
- package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +80 -51
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue.js +182 -4
- package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +25 -135
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +78 -4
- package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +73 -95
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +15 -17
- package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js +39 -33
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +220 -4
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +146 -256
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +39 -41
- package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +13 -2
- package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +233 -163
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js +164 -4
- package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +87 -175
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js +73 -4
- package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +34 -60
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js +47 -4
- package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js +10 -23
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue.js +52 -4
- package/dist/components/2_chatinput_elements/WABASeparatedQuickButtons/WABASeparatedQuickButtons.vue2.js +8 -26
- package/dist/components/2_chatinput_elements/WABATemplateSelector/WABATemplateSelector.vue.js +299 -220
- package/dist/components/2_chatlist_elements/ChatFilter/ChatFilter.vue.js +39 -33
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +306 -4
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +134 -311
- package/dist/components/2_chatlist_elements/ChatItem/icons/AudioIcon.vue.js +18 -12
- package/dist/components/2_chatlist_elements/ChatItem/icons/FileIcon.vue.js +23 -11
- package/dist/components/2_chatlist_elements/ChatItem/icons/ImageIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatItem/icons/MissedCallIcon.vue.js +34 -22
- package/dist/components/2_chatlist_elements/ChatItem/icons/StickerIcon.vue.js +15 -9
- package/dist/components/2_chatlist_elements/ChatItem/icons/VideoIcon.vue.js +26 -14
- package/dist/components/2_chatlist_elements/ChatItem/icons/VoiceIcon.vue.js +7 -7
- package/dist/components/2_chatlist_elements/ChatTabs/ChatTabs.vue.js +52 -24
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +84 -4
- package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +35 -67
- package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +72 -38
- package/dist/components/2_elements/ChatInfo/ChatInfo.vue.js +76 -57
- package/dist/components/2_elements/ChatPanel/ChatPanel.vue.js +41 -29
- package/dist/components/2_elements/ContactInfo/ContactInfo.vue.js +176 -115
- package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +48 -27
- package/dist/components/2_elements/UserProfile/UserProfile.vue.js +58 -28
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +54 -4
- package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +19 -39
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +458 -4
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +160 -471
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js +19 -4
- package/dist/components/2_feed_elements/BaseEditMessage/BaseEditMessage.vue2.js +12 -22
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +26 -4
- package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +26 -39
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +482 -4
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +148 -448
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue.js +17 -19
- package/dist/components/2_feed_elements/CallMessage/icons/IncomingCallIcon.vue2.js +13 -2
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue.js +17 -19
- package/dist/components/2_feed_elements/CallMessage/icons/OutgoingCallIcon.vue2.js +13 -2
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue.js +17 -4
- package/dist/components/2_feed_elements/DateMessage/DateMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js +16 -3
- package/dist/components/2_feed_elements/DateMessageSticky/DateMessageSticky.vue2.js +7 -7
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue.js +67 -4
- package/dist/components/2_feed_elements/DeletedMessageContent/DeletedMessageContent.vue2.js +11 -43
- package/dist/components/2_feed_elements/DeletedMessageContent/icons/DeletedMessageIcon.vue.js +16 -10
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +60 -4
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +36 -53
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue.js +22 -4
- package/dist/components/2_feed_elements/EditTextMessage/EditTextMessage.vue2.js +8 -15
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue.js +43 -4
- package/dist/components/2_feed_elements/FeedKeyboard/FeedKeyboard.vue2.js +10 -25
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +250 -4
- package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +67 -233
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +315 -4
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +98 -319
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js +39 -4
- package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +12 -22
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +155 -4
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +110 -212
- package/dist/components/2_feed_elements/MessageReactions/icons/DeleteIcon.vue.js +32 -20
- package/dist/components/2_feed_elements/MessageReactions/icons/EditIcon.vue.js +32 -20
- package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +17 -11
- package/dist/components/2_feed_elements/MessageReactions/icons/MessageActionsIcon.vue.js +16 -10
- package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +17 -11
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue.js +22 -4
- package/dist/components/2_feed_elements/MessageSmsInvite/MessageSmsInvite.vue2.js +17 -23
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +28 -4
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue2.js +27 -29
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +142 -4
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +33 -121
- package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -22
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +55 -4
- package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +8 -30
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +47 -4
- package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +9 -25
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +56 -4
- package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +8 -37
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +72 -4
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +10 -59
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +142 -4
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +36 -120
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +49 -4
- package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +15 -53
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +75 -4
- package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +10 -63
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue.js +18 -4
- package/dist/components/2_feed_elements/SplashScreen/SplashScreen.vue2.js +9 -17
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +346 -4
- package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +73 -307
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue.js +17 -4
- package/dist/components/2_feed_elements/SystemMessage/SystemMessage.vue2.js +7 -7
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +307 -4
- package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +65 -269
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue.js +37 -4
- package/dist/components/2_feed_elements/TypingMessage/TypingMessage.vue2.js +7 -21
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +307 -4
- package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +76 -298
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue.js +64 -4
- package/dist/components/2_modals/ConfirmDeleteMessage/ConfirmDeleteMessage.vue3.js +10 -45
- package/dist/components/2_modals/CreateChat/CreateChat.vue.js +35 -18
- package/dist/components/2_modals/CreateChat2/CreateChat2.vue.js +140 -92
- package/dist/components/2_modals/CreateDialog/CreateDialog.vue.js +96 -49
- package/dist/components/2_modals/Modal/Modal.vue.js +59 -50
- package/dist/components/2_modals/ModalFullscreen/ModalFullscreen.vue.js +51 -38
- package/dist/components/2_modals/ModalNoFooter/ModalNoFooter.vue.js +39 -30
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue.js +155 -4
- package/dist/components/2_modals/ModalVideoRecorder/ModalVideoRecorder.vue2.js +49 -121
- package/dist/components/2_modals/SelectUser/SelectUser.vue.js +60 -43
- package/dist/components/2_modals/SelectUser2/SelectUser2.vue.js +41 -24
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +85 -4
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +149 -210
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue.js +25 -21
- package/dist/components/3_compounds/ChatInput/icons/SendIcon.vue2.js +13 -2
- package/dist/components/3_compounds/ChatList/ChatList.vue.js +253 -163
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +50 -32
- package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +6 -6
- package/dist/components/3_compounds/Feed/Feed.vue.js +172 -4
- package/dist/components/3_compounds/Feed/Feed.vue2.js +126 -257
- package/dist/components/3_compounds/SideBar/SideBar.vue.js +279 -202
- package/dist/components/4_layouts/AdaptiveExtendedLayout/AdaptiveExtendedLayout.vue.js +43 -36
- package/dist/components/4_layouts/BaseLayout/BaseLayout.vue.js +5 -5
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue.js +32 -4
- package/dist/components/4_layouts/ChatWrapper/ChatWrapper.vue2.js +7 -29
- package/dist/components/4_layouts/ExtendedLayout/ExtendedLayout.vue.js +7 -7
- package/dist/components/4_layouts/FeedLayout/FeedLayout.vue.js +8 -8
- package/dist/components/5_containers/BaseContainer/BaseContainer.vue.js +31 -18
- package/dist/components/5_containers/FloatContainer/FloatContainer.vue.js +85 -56
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, inject as P, ref as a, watch as W, onMounted as B, onUnmounted as U, nextTick as V } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as z } from "../../../hooks/useTheme.js";
|
|
5
5
|
import "../../../hooks/useEmojiNative.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { t as
|
|
8
|
+
import { t as D } from "../../../locale/useLocale.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
11
11
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
12
12
|
import "../../../functions/parseMarkdown.js";
|
|
13
|
-
const
|
|
13
|
+
const le = /* @__PURE__ */ I({
|
|
14
14
|
__name: "TextFormatToolbar",
|
|
15
15
|
props: {
|
|
16
16
|
textarea: {
|
|
@@ -19,195 +19,107 @@ const ne = ["data-theme"], ie = ["title"], se = ["title"], re = ["title"], le =
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
emits: ["format-applied"],
|
|
22
|
-
setup(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
setup(X, { expose: Y, emit: R }) {
|
|
23
|
+
Y();
|
|
24
|
+
const l = X, $ = R, y = P("chatAppId"), { getTheme: q } = z(y), g = a(), T = a(!1), S = a({ top: "0px", left: "0px" }), k = a(""), b = a(0), E = a(0);
|
|
25
|
+
let c = !1, i = null, t = null, f = 0, m = 0;
|
|
26
|
+
const O = {
|
|
26
27
|
bold: { prefix: "**", suffix: "**" },
|
|
27
28
|
italic: { prefix: "*", suffix: "*" },
|
|
28
29
|
underline: { prefix: "<u>", suffix: "</u>" },
|
|
29
30
|
strikethrough: { prefix: "~~", suffix: "~~" },
|
|
30
31
|
code: { prefix: "`", suffix: "`" },
|
|
31
32
|
quote: { prefix: "> ", suffix: "" }
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
33
|
+
}, p = (e) => {
|
|
34
|
+
f = e.clientX, m = e.clientY;
|
|
35
|
+
}, o = () => {
|
|
36
|
+
const e = t || l.textarea;
|
|
37
|
+
if (!e)
|
|
37
38
|
return;
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
40
|
-
|
|
39
|
+
const r = e.selectionStart, s = e.selectionEnd;
|
|
40
|
+
if (r === s) {
|
|
41
|
+
v();
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
const
|
|
47
|
-
!
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
top: `${
|
|
57
|
-
left: `${
|
|
44
|
+
const n = e.value.substring(r, s);
|
|
45
|
+
n.trim().length > 0 ? (k.value = n, b.value = r, E.value = s, j(), T.value = !0, i && (clearTimeout(i), i = null)) : v();
|
|
46
|
+
}, d = () => {
|
|
47
|
+
const e = t || l.textarea;
|
|
48
|
+
!e || document.activeElement !== e || o();
|
|
49
|
+
}, L = (e) => {
|
|
50
|
+
t && (t.removeEventListener("mouseup", o), t.removeEventListener("keyup", o), t.removeEventListener("select", o), t.removeEventListener("mousemove", p)), document.removeEventListener("selectionchange", d), e ? (t = e, e.addEventListener("mouseup", o), e.addEventListener("keyup", o), e.addEventListener("select", o), e.addEventListener("mousemove", p), document.addEventListener("selectionchange", d)) : t = null;
|
|
51
|
+
}, j = () => {
|
|
52
|
+
V(() => {
|
|
53
|
+
if (!g.value) return;
|
|
54
|
+
const e = g.value.getBoundingClientRect(), r = window.innerWidth, s = window.innerHeight;
|
|
55
|
+
let n = f - e.width / 2, u = m - e.height - 10;
|
|
56
|
+
n < 10 ? n = 10 : n + e.width > r - 10 && (n = r - e.width - 10), u < 10 ? u = m + 20 : u + e.height > s - 10 && (u = s - e.height - 10), S.value = {
|
|
57
|
+
top: `${u}px`,
|
|
58
|
+
left: `${n}px`
|
|
58
59
|
};
|
|
59
60
|
});
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
if (!
|
|
63
|
-
const
|
|
64
|
-
if (!
|
|
65
|
-
const
|
|
66
|
-
let
|
|
67
|
-
|
|
61
|
+
}, A = (e) => {
|
|
62
|
+
const r = l.textarea;
|
|
63
|
+
if (!r) return;
|
|
64
|
+
const s = O[e];
|
|
65
|
+
if (!s) return;
|
|
66
|
+
const n = r.value, u = b.value, x = E.value, w = n.substring(u, x);
|
|
67
|
+
let h, _;
|
|
68
|
+
e === "quote" ? (h = w.split(`
|
|
68
69
|
`).map(
|
|
69
|
-
(
|
|
70
|
+
(M) => M.trim() ? `${s.prefix}${M}${s.suffix}` : M
|
|
70
71
|
).join(`
|
|
71
|
-
`),
|
|
72
|
-
format:
|
|
73
|
-
selectedText:
|
|
74
|
-
start:
|
|
75
|
-
end:
|
|
76
|
-
newText:
|
|
72
|
+
`), _ = n.substring(0, u) + h + n.substring(x)) : (h = `${s.prefix}${w}${s.suffix}`, _ = n.substring(0, u) + h + n.substring(x)), $("format-applied", {
|
|
73
|
+
format: e,
|
|
74
|
+
selectedText: w,
|
|
75
|
+
start: u,
|
|
76
|
+
end: x,
|
|
77
|
+
newText: _
|
|
77
78
|
}), setTimeout(() => {
|
|
78
|
-
|
|
79
|
+
o();
|
|
79
80
|
}, 10);
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
}, v = () => {
|
|
82
|
+
c || (T.value = !1);
|
|
83
|
+
}, F = () => {
|
|
84
|
+
c = !0, i && (clearTimeout(i), i = null);
|
|
85
|
+
}, H = () => {
|
|
86
|
+
c = !1, i = setTimeout(() => {
|
|
87
|
+
v();
|
|
87
88
|
}, 200);
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, { immediate: !0 }),
|
|
92
|
-
|
|
93
|
-
}),
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
o("path", { d: "M6.8 19V5h5.525q1.624 0 3 1T16.7 8.775q0 1.275-.575 1.963-.575.687-1.075.987.626.275 1.387 1.025.763.75.763 2.25 0 2.224-1.625 3.113-1.625.887-3.05.887zm3.025-2.8h2.6q1.2 0 1.462-.612.263-.614.263-.888 0-.275-.263-.887-.262-.613-1.537-.613H9.825zm0-5.7h2.325q.825 0 1.2-.425a1.4 1.4 0 0 0 .375-.95q0-.6-.425-.975t-1.1-.375H9.825z" })
|
|
121
|
-
], -1)
|
|
122
|
-
])], 8, ie),
|
|
123
|
-
o("button", {
|
|
124
|
-
class: "text-format-toolbar__button",
|
|
125
|
-
title: u(f)("component.TextFormatToolbar.Italic"),
|
|
126
|
-
onClick: e[1] || (e[1] = (n) => d("italic"))
|
|
127
|
-
}, [...e[7] || (e[7] = [
|
|
128
|
-
o("svg", {
|
|
129
|
-
viewBox: "0 0 24 24",
|
|
130
|
-
width: "20",
|
|
131
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
132
|
-
class: "",
|
|
133
|
-
fill: "currentColor"
|
|
134
|
-
}, [
|
|
135
|
-
o("path", { d: "M5 19v-2.5h4l3-9H8V5h10v2.5h-3.5l-3 9H15V19z" })
|
|
136
|
-
], -1)
|
|
137
|
-
])], 8, se),
|
|
138
|
-
o("button", {
|
|
139
|
-
class: "text-format-toolbar__button",
|
|
140
|
-
title: u(f)("component.TextFormatToolbar.Underline"),
|
|
141
|
-
onClick: e[2] || (e[2] = (n) => d("underline"))
|
|
142
|
-
}, [...e[8] || (e[8] = [
|
|
143
|
-
o("svg", {
|
|
144
|
-
viewBox: "0 0 512 512",
|
|
145
|
-
width: "13",
|
|
146
|
-
height: "13",
|
|
147
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
148
|
-
class: "",
|
|
149
|
-
fill: "currentColor"
|
|
150
|
-
}, [
|
|
151
|
-
o("rect", {
|
|
152
|
-
x: "16.65",
|
|
153
|
-
y: "443.317",
|
|
154
|
-
width: "478.699",
|
|
155
|
-
height: "68.683"
|
|
156
|
-
}),
|
|
157
|
-
o("path", { d: `M303.383,0h-94L87.689,376.715h88.041l21.225-72.846H315.81l21.496,72.846h88.043L303.383,0z M216.38,235.187
|
|
158
|
-
l39.103-133.203h1.544l39.362,133.203H216.38z` })
|
|
159
|
-
], -1)
|
|
160
|
-
])], 8, re),
|
|
161
|
-
o("button", {
|
|
162
|
-
class: "text-format-toolbar__button",
|
|
163
|
-
title: u(f)("component.TextFormatToolbar.Strikethrough"),
|
|
164
|
-
onClick: e[3] || (e[3] = (n) => d("strikethrough"))
|
|
165
|
-
}, [...e[9] || (e[9] = [
|
|
166
|
-
o("svg", {
|
|
167
|
-
viewBox: "0 0 24 24",
|
|
168
|
-
width: "20",
|
|
169
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
170
|
-
class: "",
|
|
171
|
-
fill: "currentColor"
|
|
172
|
-
}, [
|
|
173
|
-
o("path", { d: "M13.99 15.27q0-.83-.586-1.27-.585-.45-2.11-.937L11.107 13H4v-2h16v2h-3.76q.69.96.69 2.25 0 1.845-1.397 2.9-1.396 1.045-3.76 1.045-1.64 0-2.988-.595-1.347-.606-2.06-1.65a4 4 0 0 1-.472-.951l2.451-.98c.145.303.363.651.667.962l.014.019h.004a2.87 2.87 0 0 0 1.971.867q.199.014.413.014 1.045 0 1.631-.42.586-.43.586-1.191M10.548 10h-3.79a3.5 3.5 0 0 1-.297-1.44q0-1.152.644-2.05.655-.909 1.866-1.416 1.22-.508 2.734-.508 1.523 0 2.715.557 1.191.546 1.846 1.552.26.394.418.831l-2.492.997C13.85 7.823 13 7 11.656 6.92q-1.074 0-1.67.459a1.42 1.42 0 0 0-.595 1.191q0 .694.693 1.162.204.136.464.268" })
|
|
174
|
-
], -1)
|
|
175
|
-
])], 8, le),
|
|
176
|
-
o("button", {
|
|
177
|
-
class: "text-format-toolbar__button",
|
|
178
|
-
title: u(f)("component.TextFormatToolbar.Code"),
|
|
179
|
-
onClick: e[4] || (e[4] = (n) => d("code"))
|
|
180
|
-
}, [...e[10] || (e[10] = [
|
|
181
|
-
o("span", { class: "pi pi-code" }, null, -1)
|
|
182
|
-
])], 8, ae),
|
|
183
|
-
o("button", {
|
|
184
|
-
class: "text-format-toolbar__button",
|
|
185
|
-
title: u(f)("component.TextFormatToolbar.Quote"),
|
|
186
|
-
onClick: e[5] || (e[5] = (n) => d("quote"))
|
|
187
|
-
}, [...e[11] || (e[11] = [
|
|
188
|
-
o("svg", {
|
|
189
|
-
viewBox: "0 0 512 512",
|
|
190
|
-
width: "13",
|
|
191
|
-
height: "13",
|
|
192
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
193
|
-
class: "",
|
|
194
|
-
fill: "currentColor"
|
|
195
|
-
}, [
|
|
196
|
-
o("path", { d: `M119.472,66.59C53.489,66.59,0,120.094,0,186.1c0,65.983,53.489,119.487,119.472,119.487
|
|
197
|
-
c0,0-0.578,44.392-36.642,108.284c-4.006,12.802,3.135,26.435,15.945,30.418c9.089,2.859,18.653,0.08,24.829-6.389
|
|
198
|
-
c82.925-90.7,115.385-197.448,115.385-251.8C238.989,120.094,185.501,66.59,119.472,66.59z` }),
|
|
199
|
-
o("path", { d: `M392.482,66.59c-65.983,0-119.472,53.505-119.472,119.51c0,65.983,53.489,119.487,119.472,119.487
|
|
200
|
-
c0,0-0.578,44.392-36.642,108.284c-4.006,12.802,3.136,26.435,15.945,30.418c9.089,2.859,18.653,0.08,24.828-6.389
|
|
201
|
-
C479.539,347.2,512,240.452,512,186.1C512,120.094,458.511,66.59,392.482,66.59z` })
|
|
202
|
-
], -1)
|
|
203
|
-
])], 8, ue)
|
|
204
|
-
], 44, ne)) : Z("", !0)
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
})
|
|
208
|
-
]));
|
|
90
|
+
W(() => l.textarea, (e, r) => {
|
|
91
|
+
e !== r && L(e);
|
|
92
|
+
}, { immediate: !0 }), B(() => {
|
|
93
|
+
l.textarea && L(l.textarea);
|
|
94
|
+
}), U(() => {
|
|
95
|
+
t && (t.removeEventListener("mouseup", o), t.removeEventListener("keyup", o), t.removeEventListener("select", o), t.removeEventListener("mousemove", p)), document.removeEventListener("selectionchange", d), i && clearTimeout(i);
|
|
96
|
+
});
|
|
97
|
+
const C = { props: l, emit: $, chatAppId: y, getTheme: q, toolbarRef: g, isVisible: T, toolbarStyle: S, selectedText: k, selectionStart: b, selectionEnd: E, get isMouseOverToolbar() {
|
|
98
|
+
return c;
|
|
99
|
+
}, set isMouseOverToolbar(e) {
|
|
100
|
+
c = e;
|
|
101
|
+
}, get hideTimeout() {
|
|
102
|
+
return i;
|
|
103
|
+
}, set hideTimeout(e) {
|
|
104
|
+
i = e;
|
|
105
|
+
}, get currentTextarea() {
|
|
106
|
+
return t;
|
|
107
|
+
}, set currentTextarea(e) {
|
|
108
|
+
t = e;
|
|
109
|
+
}, get mouseX() {
|
|
110
|
+
return f;
|
|
111
|
+
}, set mouseX(e) {
|
|
112
|
+
f = e;
|
|
113
|
+
}, get mouseY() {
|
|
114
|
+
return m;
|
|
115
|
+
}, set mouseY(e) {
|
|
116
|
+
m = e;
|
|
117
|
+
}, formatMap: O, handleMouseMove: p, handleSelection: o, handleSelectionChange: d, setupTextareaListeners: L, updateToolbarPosition: j, applyFormat: A, hideToolbar: v, handleMouseEnter: F, handleMouseLeave: H, get t() {
|
|
118
|
+
return D;
|
|
119
|
+
} };
|
|
120
|
+
return Object.defineProperty(C, "__isScriptSetup", { enumerable: !1, value: !0 }), C;
|
|
209
121
|
}
|
|
210
122
|
});
|
|
211
123
|
export {
|
|
212
|
-
|
|
124
|
+
le as default
|
|
213
125
|
};
|
package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue.js
CHANGED
|
@@ -1,7 +1,76 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from "./WABAAttachmentSection.vue2.js";
|
|
2
|
+
import { createElementBlock as i, openBlock as n, Fragment as s, createBlock as _, createCommentVNode as a, normalizeClass as m, createElementVNode as t, toDisplayString as r } from "vue";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
4
|
+
import d from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const f = ["accept"], p = { class: "attachment-section__info" }, h = {
|
|
6
|
+
key: 2,
|
|
7
|
+
class: "attachment-section__error-text"
|
|
8
|
+
};
|
|
9
|
+
function v(u, o, c, e, y, A) {
|
|
10
|
+
return n(), i(
|
|
11
|
+
s,
|
|
12
|
+
null,
|
|
13
|
+
[
|
|
14
|
+
e.uploadStatus !== "success" ? (n(), i(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
key: 0,
|
|
18
|
+
class: m(["attachment-section", { "attachment-section__error": e.error }]),
|
|
19
|
+
onClick: e.triggerFileUpload
|
|
20
|
+
},
|
|
21
|
+
[
|
|
22
|
+
t("input", {
|
|
23
|
+
id: "file-upload",
|
|
24
|
+
ref: "fileInput",
|
|
25
|
+
type: "file",
|
|
26
|
+
style: { display: "none" },
|
|
27
|
+
accept: e.fileInfo[c.type].accept,
|
|
28
|
+
onChange: e.handleFileChange
|
|
29
|
+
}, null, 40, f),
|
|
30
|
+
o[1] || (o[1] = t(
|
|
31
|
+
"span",
|
|
32
|
+
{ class: "pi pi-paperclip attachment-section__icon" },
|
|
33
|
+
null,
|
|
34
|
+
-1
|
|
35
|
+
/* CACHED */
|
|
36
|
+
)),
|
|
37
|
+
t("div", null, [
|
|
38
|
+
o[0] || (o[0] = t(
|
|
39
|
+
"p",
|
|
40
|
+
{ class: "attachment-section__title" },
|
|
41
|
+
" Прикрепить файл ",
|
|
42
|
+
-1
|
|
43
|
+
/* CACHED */
|
|
44
|
+
)),
|
|
45
|
+
t(
|
|
46
|
+
"p",
|
|
47
|
+
p,
|
|
48
|
+
r(e.fileInfo[c.type].text),
|
|
49
|
+
1
|
|
50
|
+
/* TEXT */
|
|
51
|
+
)
|
|
52
|
+
])
|
|
53
|
+
],
|
|
54
|
+
2
|
|
55
|
+
/* CLASS */
|
|
56
|
+
)) : e.uploadStatus === "success" && e.preview ? (n(), _(e.FilePreview, {
|
|
57
|
+
key: 1,
|
|
58
|
+
"file-info": e.preview,
|
|
59
|
+
onReset: e.handleFileDecline
|
|
60
|
+
}, null, 8, ["file-info"])) : a("v-if", !0),
|
|
61
|
+
e.error ? (n(), i(
|
|
62
|
+
"div",
|
|
63
|
+
h,
|
|
64
|
+
r(e.error),
|
|
65
|
+
1
|
|
66
|
+
/* TEXT */
|
|
67
|
+
)) : a("v-if", !0)
|
|
68
|
+
],
|
|
69
|
+
64
|
|
70
|
+
/* STABLE_FRAGMENT */
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
const x = /* @__PURE__ */ d(l, [["render", v], ["__scopeId", "data-v-cdbee945"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue"]]);
|
|
5
74
|
export {
|
|
6
|
-
|
|
75
|
+
x as default
|
|
7
76
|
};
|
package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { uploadFile as
|
|
1
|
+
import { defineComponent as I, ref as t, inject as F, watch as d, unref as P } from "vue";
|
|
2
|
+
import A from "../FilePreview/FilePreview.vue.js";
|
|
3
|
+
import { uploadFile as E } from "../../../hooks/uploadFile/uploadFile.js";
|
|
4
4
|
import "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
@@ -12,10 +12,7 @@ import "../../../locale/useLocale.js";
|
|
|
12
12
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
13
13
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
14
14
|
import "../../../functions/parseMarkdown.js";
|
|
15
|
-
const
|
|
16
|
-
key: 2,
|
|
17
|
-
class: "attachment-section__error-text"
|
|
18
|
-
}, $ = /* @__PURE__ */ E({
|
|
15
|
+
const T = /* @__PURE__ */ I({
|
|
19
16
|
__name: "WABAAttachmentSection",
|
|
20
17
|
props: {
|
|
21
18
|
type: {
|
|
@@ -28,9 +25,10 @@ const O = ["accept"], B = { class: "attachment-section__info" }, G = {
|
|
|
28
25
|
}
|
|
29
26
|
},
|
|
30
27
|
emits: ["fileSelected"],
|
|
31
|
-
setup(
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
setup(g, { expose: w, emit: y }) {
|
|
29
|
+
w();
|
|
30
|
+
const l = g, m = t(F("filebumpUrl")), r = t(null), p = t(), o = t(""), i = t(""), f = t(), u = y, _ = () => {
|
|
31
|
+
p.value && i.value != "success" && p.value.click();
|
|
34
32
|
}, s = {
|
|
35
33
|
DOCUMENT: {
|
|
36
34
|
text: "Документ до 100 МБ",
|
|
@@ -53,21 +51,21 @@ const O = ["accept"], B = { class: "attachment-section__info" }, G = {
|
|
|
53
51
|
error: "Некорректный тип файла, выберите MP4 или MOV",
|
|
54
52
|
icon: "pi pi-video"
|
|
55
53
|
}
|
|
56
|
-
},
|
|
57
|
-
var
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
if (s[
|
|
63
|
-
|
|
64
|
-
else if (
|
|
65
|
-
|
|
66
|
-
else if (!
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
i.value = e.status, e.status == "success" && (
|
|
54
|
+
}, h = (c) => {
|
|
55
|
+
var v;
|
|
56
|
+
const n = (v = c.target.files) == null ? void 0 : v[0];
|
|
57
|
+
if (n) {
|
|
58
|
+
o.value = "";
|
|
59
|
+
const x = n.name.split(".");
|
|
60
|
+
if (s[l.type].accept.indexOf(x[x.length - 1]) == -1)
|
|
61
|
+
o.value = s[l.type].error;
|
|
62
|
+
else if (n.size > s[l.type].maxSize)
|
|
63
|
+
o.value = "Файл слишком большого размера";
|
|
64
|
+
else if (!o.value) {
|
|
65
|
+
r.value = n, i.value = "uploading";
|
|
66
|
+
const S = P(m.value);
|
|
67
|
+
E(typeof S == "string" ? S : null, n).then((e) => {
|
|
68
|
+
i.value = e.status, e.status == "success" && (u("fileSelected", {
|
|
71
69
|
url: e.url,
|
|
72
70
|
filename: e.name,
|
|
73
71
|
filesize: e.size,
|
|
@@ -83,48 +81,24 @@ const O = ["accept"], B = { class: "attachment-section__info" }, G = {
|
|
|
83
81
|
});
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
|
-
},
|
|
87
|
-
|
|
84
|
+
}, z = () => {
|
|
85
|
+
r.value && (r.value = null, i.value = "");
|
|
88
86
|
};
|
|
89
|
-
|
|
87
|
+
d(
|
|
90
88
|
() => i.value,
|
|
91
|
-
(
|
|
92
|
-
|
|
89
|
+
(c) => {
|
|
90
|
+
c === "" && (p.value && (p.value.value = ""), r.value = null, u("fileSelected", null));
|
|
93
91
|
}
|
|
94
|
-
),
|
|
95
|
-
() =>
|
|
92
|
+
), d(
|
|
93
|
+
() => l.templateId,
|
|
96
94
|
() => {
|
|
97
95
|
i.value = "";
|
|
98
96
|
}
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class: P(["attachment-section", { "attachment-section__error": l.value }]),
|
|
103
|
-
onClick: k
|
|
104
|
-
}, [
|
|
105
|
-
r("input", {
|
|
106
|
-
id: "file-upload",
|
|
107
|
-
ref_key: "fileInput",
|
|
108
|
-
ref: o,
|
|
109
|
-
type: "file",
|
|
110
|
-
style: { display: "none" },
|
|
111
|
-
accept: s[m.type].accept,
|
|
112
|
-
onChange: I
|
|
113
|
-
}, null, 40, O),
|
|
114
|
-
t[1] || (t[1] = r("span", { class: "pi pi-paperclip attachment-section__icon" }, null, -1)),
|
|
115
|
-
r("div", null, [
|
|
116
|
-
t[0] || (t[0] = r("p", { class: "attachment-section__title" }, " Прикрепить файл ", -1)),
|
|
117
|
-
r("p", B, _(s[m.type].text), 1)
|
|
118
|
-
])
|
|
119
|
-
], 2)) : i.value === "success" && f.value ? (u(), D(V, {
|
|
120
|
-
key: 1,
|
|
121
|
-
"file-info": f.value,
|
|
122
|
-
onReset: C
|
|
123
|
-
}, null, 8, ["file-info"])) : S("", !0),
|
|
124
|
-
l.value ? (u(), v("div", G, _(l.value), 1)) : S("", !0)
|
|
125
|
-
], 64));
|
|
97
|
+
);
|
|
98
|
+
const a = { props: l, filebumpUrl: m, selectedFile: r, fileInput: p, error: o, uploadStatus: i, preview: f, emit: u, triggerFileUpload: _, fileInfo: s, handleFileChange: h, handleFileDecline: z, FilePreview: A };
|
|
99
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
126
100
|
}
|
|
127
101
|
});
|
|
128
102
|
export {
|
|
129
|
-
|
|
103
|
+
T as default
|
|
130
104
|
};
|
package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue.js
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./WABAQuickReplyButtons.vue2.js";
|
|
2
|
+
import { createElementBlock as s, openBlock as n, Fragment as u, renderList as p, createElementVNode as e, normalizeClass as a, toDisplayString as _ } from "vue";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
4
|
+
import d from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const k = { class: "quick-reply-buttons" }, m = ["onClick"], y = { class: "quick-reply-buttons__line" };
|
|
6
|
+
function f(h, l, o, c, v, B) {
|
|
7
|
+
return n(), s("div", k, [
|
|
8
|
+
(n(!0), s(
|
|
9
|
+
u,
|
|
10
|
+
null,
|
|
11
|
+
p(o.buttons.slice(0, 3), (r, t) => (n(), s("div", {
|
|
12
|
+
key: t,
|
|
13
|
+
class: "quick-reply-buttons__preview-action",
|
|
14
|
+
onClick: (b) => c.handleQuickReplyClick(t)
|
|
15
|
+
}, [
|
|
16
|
+
l[0] || (l[0] = e(
|
|
17
|
+
"hr",
|
|
18
|
+
{ class: "quick-reply-buttons__separator" },
|
|
19
|
+
null,
|
|
20
|
+
-1
|
|
21
|
+
/* CACHED */
|
|
22
|
+
)),
|
|
23
|
+
e("div", y, [
|
|
24
|
+
e(
|
|
25
|
+
"span",
|
|
26
|
+
{
|
|
27
|
+
class: a(["quick-reply-buttons__icon pi pi-arrow-up-left", t == 2 && o.buttons.length > 3 ? "pi-list" : c.icons[r.type]])
|
|
28
|
+
},
|
|
29
|
+
null,
|
|
30
|
+
2
|
|
31
|
+
/* CLASS */
|
|
32
|
+
),
|
|
33
|
+
e(
|
|
34
|
+
"p",
|
|
35
|
+
null,
|
|
36
|
+
_(t == 2 && o.buttons.length > 3 ? "Смотреть все варианты" : r.text),
|
|
37
|
+
1
|
|
38
|
+
/* TEXT */
|
|
39
|
+
)
|
|
40
|
+
])
|
|
41
|
+
], 8, m))),
|
|
42
|
+
128
|
|
43
|
+
/* KEYED_FRAGMENT */
|
|
44
|
+
))
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
const Q = /* @__PURE__ */ d(i, [["render", f], ["__scopeId", "data-v-c7dd3663"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue"]]);
|
|
5
48
|
export {
|
|
6
|
-
|
|
49
|
+
Q as default
|
|
7
50
|
};
|
package/dist/components/2_chatinput_elements/WABAQuickReplyButtons/WABAQuickReplyButtons.vue2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as p } from "vue";
|
|
2
|
+
const u = /* @__PURE__ */ p({
|
|
3
3
|
__name: "WABAQuickReplyButtons",
|
|
4
4
|
props: {
|
|
5
5
|
buttons: {
|
|
@@ -8,31 +8,18 @@ const h = { class: "quick-reply-buttons" }, f = ["onClick"], g = { class: "quick
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
emits: ["selectAllVariants"],
|
|
11
|
-
setup(
|
|
12
|
-
|
|
11
|
+
setup(s, { expose: i, emit: o }) {
|
|
12
|
+
i();
|
|
13
|
+
const e = o, t = s, n = { emit: e, props: t, icons: {
|
|
13
14
|
URL: "pi-arrow-up-right",
|
|
14
15
|
PHONE_NUMBER: "pi-phone",
|
|
15
16
|
QUICK_REPLY: "pi-arrow-up-left"
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
return (
|
|
20
|
-
(l(!0), s(m, null, y(t.buttons.slice(0, 3), (r, e) => (l(), s("div", {
|
|
21
|
-
key: e,
|
|
22
|
-
class: "quick-reply-buttons__preview-action",
|
|
23
|
-
onClick: (C) => _(e)
|
|
24
|
-
}, [
|
|
25
|
-
i[0] || (i[0] = n("hr", { class: "quick-reply-buttons__separator" }, null, -1)),
|
|
26
|
-
n("div", g, [
|
|
27
|
-
n("span", {
|
|
28
|
-
class: b(["quick-reply-buttons__icon pi pi-arrow-up-left", e == 2 && t.buttons.length > 3 ? "pi-list" : p[r.type]])
|
|
29
|
-
}, null, 2),
|
|
30
|
-
n("p", null, d(e == 2 && t.buttons.length > 3 ? "Смотреть все варианты" : r.text), 1)
|
|
31
|
-
])
|
|
32
|
-
], 8, f))), 128))
|
|
33
|
-
]));
|
|
17
|
+
}, handleQuickReplyClick: (r) => {
|
|
18
|
+
r == 2 && t.buttons.length > 3 && e("selectAllVariants");
|
|
19
|
+
} };
|
|
20
|
+
return Object.defineProperty(n, "__isScriptSetup", { enumerable: !1, value: !0 }), n;
|
|
34
21
|
}
|
|
35
22
|
});
|
|
36
23
|
export {
|
|
37
|
-
|
|
24
|
+
u as default
|
|
38
25
|
};
|