@mobilon-dev/chotto 0.3.85 → 0.3.87

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