@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,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as N, inject as P, ref as u, computed as d, onMounted as S } from "vue";
|
|
2
|
+
import b from "../../2_modals/ModalFullscreen/ModalFullscreen.vue.js";
|
|
3
3
|
import "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
|
-
import { useTheme as
|
|
5
|
+
import { useTheme as E } from "../../../hooks/useTheme.js";
|
|
6
6
|
import "../../../hooks/useEmojiNative.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
@@ -11,20 +11,8 @@ import "../../../locale/useLocale.js";
|
|
|
11
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
12
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
13
13
|
import "../../../functions/parseMarkdown.js";
|
|
14
|
-
import { safeMediaPlay as
|
|
15
|
-
const
|
|
16
|
-
key: 2,
|
|
17
|
-
style: { display: "flex", gap: "5px" }
|
|
18
|
-
}, H = ["src"], J = { class: "pi pi-play" }, K = { class: "pi pi-pause" }, Q = { key: 3 }, R = { class: "preview__control-block" }, W = { class: "preview__information" }, X = { class: "preview__name" }, Y = {
|
|
19
|
-
key: 0,
|
|
20
|
-
class: "preview__size"
|
|
21
|
-
}, Z = {
|
|
22
|
-
key: 1,
|
|
23
|
-
class: "preview__audio-time"
|
|
24
|
-
}, ee = {
|
|
25
|
-
key: 2,
|
|
26
|
-
class: "preview__audio-time"
|
|
27
|
-
}, ie = { class: "preview__reset" }, te = ["src"], le = ["src"], ye = /* @__PURE__ */ V({
|
|
14
|
+
import { safeMediaPlay as I } from "../../../functions/safeMediaPlay.js";
|
|
15
|
+
const H = /* @__PURE__ */ N({
|
|
28
16
|
__name: "FilePreview",
|
|
29
17
|
props: {
|
|
30
18
|
fileInfo: {
|
|
@@ -33,131 +21,33 @@ const j = { class: "preview__container" }, F = { class: "preview__block" }, O =
|
|
|
33
21
|
}
|
|
34
22
|
},
|
|
35
23
|
emits: ["reset"],
|
|
36
|
-
setup(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
setup(L, { expose: m, emit: p }) {
|
|
25
|
+
m();
|
|
26
|
+
const o = P("chatAppId"), { getTheme: c } = E(o), f = p, e = u(), t = u(), r = u(!1), a = u(0), i = u(0), l = u(!1), _ = () => l.value = !1;
|
|
27
|
+
function T() {
|
|
28
|
+
e.value && (r.value ? e.value.pause() : I(e.value), r.value = !r.value);
|
|
40
29
|
}
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
return `${
|
|
44
|
-
},
|
|
45
|
-
|
|
30
|
+
const n = (s) => {
|
|
31
|
+
const g = Math.floor(s / 60), h = Math.floor(s % 60);
|
|
32
|
+
return `${g.toString().padStart(2, "0")}:${h.toString().padStart(2, "0")}`;
|
|
33
|
+
}, y = d(() => e.value ? n(i.value) : "0:00"), M = d(() => e.value || t.value ? n(a.value) : "0:00");
|
|
34
|
+
S(() => {
|
|
46
35
|
e.value != null && (e.value.addEventListener("loadedmetadata", () => {
|
|
47
36
|
e.value != null && (e.value.duration == 1 / 0 || Number.isNaN(e.value.duration)) && (e.value.currentTime = 1e101, e.value.addEventListener("timeupdate", () => {
|
|
48
|
-
e.value && (e.value.currentTime = 0,
|
|
49
|
-
}, { once: !0 })),
|
|
37
|
+
e.value && (e.value.currentTime = 0, a.value = e.value.duration);
|
|
38
|
+
}, { once: !0 })), a.value = e.value != null ? e.value.duration : 0;
|
|
50
39
|
}), e.value.addEventListener("timeupdate", () => {
|
|
51
|
-
|
|
52
|
-
})),
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
i.value = e.value != null ? e.value.currentTime : 0;
|
|
41
|
+
})), t.value && t.value.addEventListener("loadedmetadata", () => {
|
|
42
|
+
t.value && (a.value = t.value.duration, (t.value.duration == 1 / 0 || Number.isNaN(t.value.duration)) && (t.value.currentTime = 1e101, t.value.addEventListener("timeupdate", () => {
|
|
43
|
+
t.value && (t.value.currentTime = 0, a.value = t.value.duration);
|
|
55
44
|
}, { once: !0 })));
|
|
56
45
|
});
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
key: 0,
|
|
61
|
-
style: { position: "relative" },
|
|
62
|
-
onClick: l[0] || (l[0] = (f) => v.value = !0)
|
|
63
|
-
}, [
|
|
64
|
-
i("img", {
|
|
65
|
-
src: t.fileInfo.previewUrl,
|
|
66
|
-
alt: "Image Preview",
|
|
67
|
-
class: "preview__image"
|
|
68
|
-
}, null, 8, O),
|
|
69
|
-
l[3] || (l[3] = i("div", { class: "preview__shadow" }, [
|
|
70
|
-
i("span", { class: "pi pi-plus-circle" })
|
|
71
|
-
], -1))
|
|
72
|
-
])) : t.fileInfo.isVideo ? (o(), n("div", {
|
|
73
|
-
key: 1,
|
|
74
|
-
style: { position: "relative" },
|
|
75
|
-
onClick: l[1] || (l[1] = (f) => v.value = !0)
|
|
76
|
-
}, [
|
|
77
|
-
i("video", {
|
|
78
|
-
ref_key: "video",
|
|
79
|
-
ref: a,
|
|
80
|
-
src: t.fileInfo.previewUrl,
|
|
81
|
-
class: "preview__video"
|
|
82
|
-
}, null, 8, q),
|
|
83
|
-
l[4] || (l[4] = i("div", { class: "preview__shadow" }, [
|
|
84
|
-
i("span", { class: "pi pi-play" })
|
|
85
|
-
], -1))
|
|
86
|
-
])) : t.fileInfo.isAudio ? (o(), n("div", G, [
|
|
87
|
-
l[5] || (l[5] = i("span", {
|
|
88
|
-
class: "pi pi-headphones",
|
|
89
|
-
style: { "font-size": "1rem", margin: "auto" }
|
|
90
|
-
}, null, -1)),
|
|
91
|
-
i("audio", {
|
|
92
|
-
ref_key: "audio",
|
|
93
|
-
ref: e,
|
|
94
|
-
src: t.fileInfo.previewUrl
|
|
95
|
-
}, null, 8, H),
|
|
96
|
-
i("button", {
|
|
97
|
-
class: "preview__audio-control",
|
|
98
|
-
onClick: P
|
|
99
|
-
}, [
|
|
100
|
-
k(i("span", J, null, 512), [
|
|
101
|
-
[g, !u.value]
|
|
102
|
-
]),
|
|
103
|
-
k(i("span", K, null, 512), [
|
|
104
|
-
[g, u.value]
|
|
105
|
-
])
|
|
106
|
-
])
|
|
107
|
-
])) : (o(), n("div", Q, [...l[6] || (l[6] = [
|
|
108
|
-
i("span", {
|
|
109
|
-
class: "pi pi-file",
|
|
110
|
-
style: { "font-size": "2.5rem" }
|
|
111
|
-
}, null, -1)
|
|
112
|
-
])]))
|
|
113
|
-
]),
|
|
114
|
-
i("div", R, [
|
|
115
|
-
i("div", W, [
|
|
116
|
-
i("span", X, c(t.fileInfo.fileName), 1),
|
|
117
|
-
!t.fileInfo.isAudio && !t.fileInfo.isVideo ? (o(), n("span", Y, c(t.fileInfo.fileSize), 1)) : r("", !0),
|
|
118
|
-
t.fileInfo.isAudio ? (o(), n("span", Z, c(`${S.value} / ${y.value}`), 1)) : r("", !0),
|
|
119
|
-
t.fileInfo.isVideo ? (o(), n("span", ee, c(y.value), 1)) : r("", !0)
|
|
120
|
-
]),
|
|
121
|
-
i("div", ie, [
|
|
122
|
-
i("span", {
|
|
123
|
-
class: "pi pi-times",
|
|
124
|
-
onClick: l[2] || (l[2] = (f) => E("reset"))
|
|
125
|
-
})
|
|
126
|
-
])
|
|
127
|
-
]),
|
|
128
|
-
(o(), h(A, { to: "body" }, [
|
|
129
|
-
L(U, { name: "modal-fade" }, {
|
|
130
|
-
default: T(() => [
|
|
131
|
-
v.value ? (o(), h(z, {
|
|
132
|
-
key: 0,
|
|
133
|
-
theme: N(p)().theme ? N(p)().theme : "",
|
|
134
|
-
title: t.fileInfo.fileName,
|
|
135
|
-
onClose: M
|
|
136
|
-
}, {
|
|
137
|
-
default: T(() => [
|
|
138
|
-
t.fileInfo.isVideo ? (o(), n("video", {
|
|
139
|
-
key: 0,
|
|
140
|
-
class: "preview__modal-video",
|
|
141
|
-
src: t.fileInfo.previewUrl,
|
|
142
|
-
controls: "",
|
|
143
|
-
autoplay: ""
|
|
144
|
-
}, null, 8, te)) : r("", !0),
|
|
145
|
-
t.fileInfo.isImage ? (o(), n("img", {
|
|
146
|
-
key: 1,
|
|
147
|
-
class: "preview__modal-image",
|
|
148
|
-
src: t.fileInfo.previewUrl,
|
|
149
|
-
alt: "Image Preview"
|
|
150
|
-
}, null, 8, le)) : r("", !0)
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["theme", "title"])) : r("", !0)
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
})
|
|
157
|
-
]))
|
|
158
|
-
]));
|
|
46
|
+
});
|
|
47
|
+
const v = { chatAppId: o, getTheme: c, emit: f, audio: e, video: t, isPlaying: r, duration: a, currentTime: i, isOpenModal: l, closeModal: _, togglePlayPause: T, formatTime: n, formatCurrentTime: y, formatDuration: M, ModalFullscreen: b };
|
|
48
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
159
49
|
}
|
|
160
50
|
});
|
|
161
51
|
export {
|
|
162
|
-
|
|
52
|
+
H as default
|
|
163
53
|
};
|
|
@@ -1,7 +1,81 @@
|
|
|
1
|
-
import
|
|
1
|
+
import d from "./FileUploader.vue2.js";
|
|
2
|
+
import { createElementBlock as t, openBlock as a, Fragment as s, createCommentVNode as i, createElementVNode as o, normalizeClass as u, createVNode as p } from "vue";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
4
|
+
import c from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const f = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "file-uploader__status file-uploader__status--uploading"
|
|
8
|
+
}, _ = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "file-uploader__status file-uploader__status--error"
|
|
11
|
+
}, m = ["disabled"];
|
|
12
|
+
function g(v, l, n, e, F, U) {
|
|
13
|
+
return a(), t(
|
|
14
|
+
s,
|
|
15
|
+
null,
|
|
16
|
+
[
|
|
17
|
+
e.uploadStatus === "uploading" ? (a(), t("div", f, [...l[2] || (l[2] = [
|
|
18
|
+
o(
|
|
19
|
+
"span",
|
|
20
|
+
null,
|
|
21
|
+
"Загрузка",
|
|
22
|
+
-1
|
|
23
|
+
/* CACHED */
|
|
24
|
+
),
|
|
25
|
+
o(
|
|
26
|
+
"span",
|
|
27
|
+
null,
|
|
28
|
+
"файла...",
|
|
29
|
+
-1
|
|
30
|
+
/* CACHED */
|
|
31
|
+
)
|
|
32
|
+
])])) : e.uploadStatus === "error" ? (a(), t("div", _, [...l[3] || (l[3] = [
|
|
33
|
+
o(
|
|
34
|
+
"span",
|
|
35
|
+
null,
|
|
36
|
+
"Ошибка при загрузке файла.",
|
|
37
|
+
-1
|
|
38
|
+
/* CACHED */
|
|
39
|
+
)
|
|
40
|
+
])])) : i("v-if", !0),
|
|
41
|
+
i(` <ButtonContextMenu
|
|
42
|
+
v-else-if="!getMessage().isRecording"
|
|
43
|
+
:actions="actions"
|
|
44
|
+
:mode="'hover'"
|
|
45
|
+
:menu-side="'top'"
|
|
46
|
+
:disabled="!canUploadFile || state == 'disabled'"
|
|
47
|
+
@click="triggerFileUpload"
|
|
48
|
+
@button-click="triggerFileUploadDefault"
|
|
49
|
+
> `),
|
|
50
|
+
o("span", {
|
|
51
|
+
ref: "triggerElement",
|
|
52
|
+
class: u(["file-uploader__trigger", { "file-uploader__disabled": !e.canUploadFile || n.state == "disabled" }]),
|
|
53
|
+
disabled: !e.canUploadFile || n.state == "disabled",
|
|
54
|
+
onClick: e.triggerFileUploadDefault,
|
|
55
|
+
onMouseenter: l[0] || (l[0] = (r) => e.isHovered = !0),
|
|
56
|
+
onMouseleave: l[1] || (l[1] = (r) => e.isHovered = !1)
|
|
57
|
+
}, [
|
|
58
|
+
p(e.FileUploaderIcon, { fill: e.currentIconColor }, null, 8, ["fill"])
|
|
59
|
+
], 42, m),
|
|
60
|
+
i(" </ButtonContextMenu> "),
|
|
61
|
+
o(
|
|
62
|
+
"input",
|
|
63
|
+
{
|
|
64
|
+
ref: "fileInput",
|
|
65
|
+
style: { display: "none" },
|
|
66
|
+
type: "file",
|
|
67
|
+
onChange: e.onFileSelected
|
|
68
|
+
},
|
|
69
|
+
null,
|
|
70
|
+
544
|
|
71
|
+
/* NEED_HYDRATION, NEED_PATCH */
|
|
72
|
+
)
|
|
73
|
+
],
|
|
74
|
+
64
|
|
75
|
+
/* STABLE_FRAGMENT */
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
const y = /* @__PURE__ */ c(d, [["render", g], ["__scopeId", "data-v-b26588f6"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatinput_elements/FileUploader/FileUploader.vue"]]);
|
|
5
79
|
export {
|
|
6
|
-
|
|
80
|
+
y as default
|
|
7
81
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { buildFilePreview as
|
|
3
|
-
import { uploadFile as
|
|
4
|
-
import { useMessageDraft as
|
|
1
|
+
import { defineComponent as j, ref as n, inject as z, computed as C, watchEffect as B, watch as H, onMounted as L, onUnmounted as N } from "vue";
|
|
2
|
+
import { buildFilePreview as V } from "../../../hooks/uploadFile/generatePreview.js";
|
|
3
|
+
import { uploadFile as k } from "../../../hooks/uploadFile/uploadFile.js";
|
|
4
|
+
import { useMessageDraft as R } from "../../../hooks/useMessageDraft.js";
|
|
5
5
|
import "../../../hooks/useSearchModel.js";
|
|
6
6
|
import "../../../hooks/useTheme.js";
|
|
7
7
|
import "../../../hooks/useEmojiNative.js";
|
|
@@ -12,14 +12,8 @@ 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
|
-
import
|
|
16
|
-
const
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "file-uploader__status file-uploader__status--uploading"
|
|
19
|
-
}, T = {
|
|
20
|
-
key: 1,
|
|
21
|
-
class: "file-uploader__status file-uploader__status--error"
|
|
22
|
-
}, W = ["disabled"], de = /* @__PURE__ */ D({
|
|
15
|
+
import q from "./icons/FileUploaderIcon.vue.js";
|
|
16
|
+
const le = /* @__PURE__ */ j({
|
|
23
17
|
__name: "FileUploader",
|
|
24
18
|
props: {
|
|
25
19
|
filebumpUrl: {
|
|
@@ -32,108 +26,92 @@ const Q = {
|
|
|
32
26
|
}
|
|
33
27
|
},
|
|
34
28
|
emits: ["fileUploaded"],
|
|
35
|
-
setup(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
setup(E, { expose: M, emit: O }) {
|
|
30
|
+
M();
|
|
31
|
+
const p = E, s = n(""), i = n(), b = n();
|
|
32
|
+
b.value;
|
|
33
|
+
const l = z("chatAppId"), { setMessageFile: y, resetMessageFile: h, getMessage: d, setRecordingMessage: v } = R(l), a = n("#5F5F5F"), u = n("#404040"), w = n(!1);
|
|
34
|
+
let r = null;
|
|
35
|
+
const m = () => {
|
|
36
|
+
if (!l) {
|
|
37
|
+
a.value = "#5F5F5F", u.value = "#404040";
|
|
43
38
|
return;
|
|
44
39
|
}
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
47
|
-
|
|
40
|
+
const t = document.getElementById(l);
|
|
41
|
+
if (!t) {
|
|
42
|
+
a.value = "#5F5F5F", u.value = "#404040";
|
|
48
43
|
return;
|
|
49
44
|
}
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
const o = window.getComputedStyle(t), e = o.getPropertyValue("--chotto-fileuploader-trigger-color").trim(), f = o.getPropertyValue("--chotto-fileuploader-trigger-hover-color").trim();
|
|
46
|
+
a.value = e || "#5F5F5F", u.value = f || "#404040";
|
|
47
|
+
}, D = C(() => w.value ? u.value : a.value);
|
|
48
|
+
B(() => {
|
|
49
|
+
m();
|
|
55
50
|
});
|
|
56
|
-
const
|
|
51
|
+
const P = O, U = C(() => !d().file), c = () => {
|
|
57
52
|
i.value && (i.value.value = "");
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
i.value &&
|
|
66
|
-
},
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
for (let f of
|
|
53
|
+
}, I = () => {
|
|
54
|
+
h(), s.value = "", c();
|
|
55
|
+
}, x = async () => {
|
|
56
|
+
var o, e;
|
|
57
|
+
const t = (e = (o = i.value) == null ? void 0 : o.files) == null ? void 0 : e[0];
|
|
58
|
+
I(), t && await g(t), c();
|
|
59
|
+
}, A = () => {
|
|
60
|
+
i.value && U.value && p.state == "active" && (c(), i.value.click());
|
|
61
|
+
}, F = async (t) => {
|
|
62
|
+
var e;
|
|
63
|
+
const o = (e = t.clipboardData) == null ? void 0 : e.items;
|
|
64
|
+
if (o) {
|
|
65
|
+
for (let f of o)
|
|
71
66
|
if (f.type.indexOf("image") !== -1) {
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
67
|
+
t.preventDefault();
|
|
68
|
+
const S = f.getAsFile();
|
|
69
|
+
S && g(S);
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
await
|
|
81
|
-
|
|
82
|
-
url:
|
|
83
|
-
name:
|
|
84
|
-
size:
|
|
85
|
-
type:
|
|
86
|
-
preview:
|
|
72
|
+
}, g = async (t) => {
|
|
73
|
+
s.value = "uploading", v(!0);
|
|
74
|
+
const o = typeof p.filebumpUrl == "string" ? p.filebumpUrl : null;
|
|
75
|
+
await k(o, t).then((e) => {
|
|
76
|
+
v(!1), s.value = e.status, e.status == "success" && y({
|
|
77
|
+
url: e.url,
|
|
78
|
+
name: e.name,
|
|
79
|
+
size: e.size,
|
|
80
|
+
type: e.type,
|
|
81
|
+
preview: V(e.name, e.preview)
|
|
87
82
|
});
|
|
88
83
|
});
|
|
89
84
|
};
|
|
90
|
-
|
|
91
|
-
() =>
|
|
92
|
-
(
|
|
93
|
-
|
|
85
|
+
H(
|
|
86
|
+
() => d().file,
|
|
87
|
+
(t) => {
|
|
88
|
+
t || (s.value = "", c());
|
|
94
89
|
}
|
|
95
|
-
),
|
|
96
|
-
if (window.addEventListener("paste",
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
90
|
+
), L(() => {
|
|
91
|
+
if (window.addEventListener("paste", F), m(), l) {
|
|
92
|
+
const t = document.getElementById(l);
|
|
93
|
+
t && (r = new MutationObserver((o) => {
|
|
94
|
+
o.forEach((e) => {
|
|
95
|
+
e.type === "attributes" && e.attributeName === "data-theme" && m();
|
|
101
96
|
});
|
|
102
|
-
}),
|
|
97
|
+
}), r.observe(t, {
|
|
103
98
|
attributes: !0,
|
|
104
99
|
attributeFilter: ["data-theme"]
|
|
105
100
|
}));
|
|
106
101
|
}
|
|
107
|
-
}),
|
|
108
|
-
window.removeEventListener("paste",
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
ref: _,
|
|
119
|
-
class: L(["file-uploader__trigger", { "file-uploader__disabled": !F.value || d.state == "disabled" }]),
|
|
120
|
-
disabled: !F.value || d.state == "disabled",
|
|
121
|
-
onClick: B,
|
|
122
|
-
onMouseenter: e[0] || (e[0] = (t) => v.value = !0),
|
|
123
|
-
onMouseleave: e[1] || (e[1] = (t) => v.value = !1)
|
|
124
|
-
}, [
|
|
125
|
-
j(R(K), { fill: S.value }, null, 8, ["fill"])
|
|
126
|
-
], 42, W),
|
|
127
|
-
a("input", {
|
|
128
|
-
ref_key: "fileInput",
|
|
129
|
-
ref: i,
|
|
130
|
-
style: { display: "none" },
|
|
131
|
-
type: "file",
|
|
132
|
-
onChange: V
|
|
133
|
-
}, null, 544)
|
|
134
|
-
], 64));
|
|
102
|
+
}), N(() => {
|
|
103
|
+
window.removeEventListener("paste", F), r && (r.disconnect(), r = null);
|
|
104
|
+
});
|
|
105
|
+
const _ = { props: p, uploadStatus: s, fileInput: i, triggerElement: b, chatAppId: l, setMessageFile: y, resetMessageFile: h, getMessage: d, setRecordingMessage: v, iconFillColor: a, iconHoverColor: u, isHovered: w, get themeObserver() {
|
|
106
|
+
return r;
|
|
107
|
+
}, set themeObserver(t) {
|
|
108
|
+
r = t;
|
|
109
|
+
}, updateIconColor: m, currentIconColor: D, emit: P, canUploadFile: U, resetNativeFileInput: c, resetSelectedFile: I, onFileSelected: x, triggerFileUploadDefault: A, pasteFromClipboard: F, handleFileUpload: g, get FileUploaderIcon() {
|
|
110
|
+
return q;
|
|
111
|
+
} };
|
|
112
|
+
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
135
113
|
}
|
|
136
114
|
});
|
|
137
115
|
export {
|
|
138
|
-
|
|
116
|
+
le as default
|
|
139
117
|
};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import o from "./FileUploaderIcon.vue2.js";
|
|
2
|
+
import { createElementBlock as t, openBlock as C, createElementVNode as r } from "vue";
|
|
3
|
+
import c from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const l = {
|
|
3
5
|
width: "26",
|
|
4
6
|
height: "26",
|
|
5
7
|
viewBox: "0 0 26 26",
|
|
6
8
|
fill: "none",
|
|
7
9
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, null, 8, i)
|
|
19
|
-
]));
|
|
20
|
-
}
|
|
21
|
-
});
|
|
10
|
+
}, n = ["fill"];
|
|
11
|
+
function s(i, p, e, _, a, d) {
|
|
12
|
+
return C(), t("svg", l, [
|
|
13
|
+
r("path", {
|
|
14
|
+
d: "M7.3125 4.875C7.3125 3.79756 7.74051 2.76425 8.50238 2.00238C9.26425 1.24051 10.2976 0.8125 11.375 0.8125C12.4524 0.8125 13.4858 1.24051 14.2476 2.00238C15.0095 2.76425 15.4375 3.79756 15.4375 4.875V19.5C15.4375 20.1465 15.1807 20.7665 14.7236 21.2236C14.2665 21.6807 13.6465 21.9375 13 21.9375C12.3535 21.9375 11.7335 21.6807 11.2764 21.2236C10.8193 20.7665 10.5625 20.1465 10.5625 19.5V8.125C10.5625 7.90951 10.6481 7.70285 10.8005 7.55048C10.9528 7.3981 11.1595 7.3125 11.375 7.3125C11.5905 7.3125 11.7972 7.3981 11.9495 7.55048C12.1019 7.70285 12.1875 7.90951 12.1875 8.125V19.5C12.1875 19.7155 12.2731 19.9222 12.4255 20.0745C12.5778 20.2269 12.7845 20.3125 13 20.3125C13.2155 20.3125 13.4222 20.2269 13.5745 20.0745C13.7269 19.9222 13.8125 19.7155 13.8125 19.5V4.875C13.8125 4.5549 13.7495 4.23794 13.627 3.94221C13.5045 3.64648 13.3249 3.37777 13.0986 3.15143C12.8722 2.92508 12.6035 2.74554 12.3078 2.62304C12.0121 2.50055 11.6951 2.4375 11.375 2.4375C11.0549 2.4375 10.7379 2.50055 10.4422 2.62304C10.1465 2.74554 9.87777 2.92508 9.65143 3.15143C9.42508 3.37777 9.24554 3.64648 9.12304 3.94221C9.00055 4.23794 8.9375 4.5549 8.9375 4.875V19.5C8.9375 20.5774 9.36551 21.6108 10.1274 22.3726C10.8892 23.1345 11.9226 23.5625 13 23.5625C14.0774 23.5625 15.1108 23.1345 15.8726 22.3726C16.6345 21.6108 17.0625 20.5774 17.0625 19.5V8.125C17.0625 7.90951 17.1481 7.70285 17.3005 7.55048C17.4528 7.3981 17.6595 7.3125 17.875 7.3125C18.0905 7.3125 18.2972 7.3981 18.4495 7.55048C18.6019 7.70285 18.6875 7.90951 18.6875 8.125V19.5C18.6875 21.0084 18.0883 22.4551 17.0217 23.5217C15.9551 24.5883 14.5084 25.1875 13 25.1875C11.4916 25.1875 10.0449 24.5883 8.97833 23.5217C7.91172 22.4551 7.3125 21.0084 7.3125 19.5V4.875Z",
|
|
15
|
+
fill: e.fill
|
|
16
|
+
}, null, 8, n)
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
const V = /* @__PURE__ */ c(o, [["render", s], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue"]]);
|
|
22
20
|
export {
|
|
23
|
-
|
|
21
|
+
V as default
|
|
24
22
|
};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
const o = /* @__PURE__ */ t({
|
|
3
|
+
__name: "FileUploaderIcon",
|
|
4
|
+
props: {
|
|
5
|
+
fill: { type: String, required: !1, default: "#5F5F5F" }
|
|
6
|
+
},
|
|
7
|
+
setup(p, { expose: r }) {
|
|
8
|
+
r();
|
|
9
|
+
const e = {};
|
|
10
|
+
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
o as default
|
|
4
15
|
};
|
package/dist/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElementBlock as w, openBlock as b, withKeys as E, normalizeClass as F, toDisplayString as k, inject as f, ref as d, watch as h, onMounted as _, onUnmounted as v, nextTick as g } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import B from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const C = {
|
|
5
5
|
__name: "PlaceholderComponent",
|
|
6
6
|
props: {
|
|
7
7
|
index: {
|
|
@@ -18,49 +18,55 @@ const b = ["id"], I = {
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
emits: ["edit"],
|
|
21
|
-
setup(
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
setup(c, { expose: s, emit: l }) {
|
|
22
|
+
s();
|
|
23
|
+
const t = f("chatAppId"), e = c, r = l, o = d(e.value), u = d();
|
|
24
|
+
h(
|
|
24
25
|
() => e.isFilled,
|
|
25
26
|
() => {
|
|
26
|
-
e.isFilled || (
|
|
27
|
+
e.isFilled || (o.value = "Заполнить");
|
|
27
28
|
},
|
|
28
29
|
{ immediate: !0 }
|
|
29
30
|
);
|
|
30
|
-
const
|
|
31
|
+
const y = (n) => {
|
|
31
32
|
if (!e.isFilled) {
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
33
|
+
o.value = "";
|
|
34
|
+
const i = window.getSelection();
|
|
35
|
+
i.getRangeAt && i.rangeCount && i.getRangeAt(0).selectNodeContents(n.target);
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}) :
|
|
38
|
+
function p() {
|
|
39
|
+
o.value = u.value.innerText.trim(), e.value != o.value && (o.value != "" ? r("edit", [o.value, e.index]) : e.isFilled ? g(() => {
|
|
40
|
+
o.value = e.value;
|
|
41
|
+
}) : o.value = "Заполнить");
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
43
|
+
function x(n) {
|
|
44
|
+
n.target.blur(), p();
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
46
|
+
function a(n) {
|
|
47
|
+
n.target == document.getElementById("placeholder" + t + e.index) && (n.key === "Escape" && n.target.blur(), n.key == "Tab" && (n.target.blur(), document.getElementById("placeholder" + t + (e.index + 1)) && (n.preventDefault(), document.getElementById("placeholder" + t + (e.index + 1)).focus())));
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
window.addEventListener("keydown",
|
|
49
|
+
_(() => {
|
|
50
|
+
window.addEventListener("keydown", a);
|
|
50
51
|
}), v(() => {
|
|
51
|
-
window.removeEventListener("keydown",
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
ref: r,
|
|
56
|
-
contenteditable: "",
|
|
57
|
-
class: k([{ filled: l.isFilled, empty: !l.isFilled }, "placeholder"]),
|
|
58
|
-
onKeydown: x(m, ["enter"]),
|
|
59
|
-
onFocus: f,
|
|
60
|
-
onBlur: a
|
|
61
|
-
}, F(n.value), 43, b));
|
|
52
|
+
window.removeEventListener("keydown", a);
|
|
53
|
+
});
|
|
54
|
+
const m = { chatAppId: t, props: e, emit: r, v: o, refPlaceholder: u, prepare: y, validate: p, handleEnter: x, handleKey: a, onMounted: _, onUnmounted: v, ref: d, inject: f, nextTick: g, watch: h };
|
|
55
|
+
return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
|
|
62
56
|
}
|
|
63
|
-
},
|
|
57
|
+
}, I = ["id"];
|
|
58
|
+
function P(c, s, l, t, e, r) {
|
|
59
|
+
return b(), w("span", {
|
|
60
|
+
id: "placeholder" + t.chatAppId + l.index,
|
|
61
|
+
ref: "refPlaceholder",
|
|
62
|
+
contenteditable: "",
|
|
63
|
+
class: F([{ filled: l.isFilled, empty: !l.isFilled }, "placeholder"]),
|
|
64
|
+
onKeydown: E(t.handleEnter, ["enter"]),
|
|
65
|
+
onFocus: t.prepare,
|
|
66
|
+
onBlur: t.validate
|
|
67
|
+
}, k(t.v), 43, I);
|
|
68
|
+
}
|
|
69
|
+
const K = /* @__PURE__ */ B(C, [["render", P], ["__scopeId", "data-v-baf97a88"], ["__file", "/var/store/dev-space/repos-projects/chotto/chotto/src/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue"]]);
|
|
64
70
|
export {
|
|
65
71
|
K as default
|
|
66
72
|
};
|