@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,6 +1,6 @@
1
1
  import { needsAttributeConfirmation as m } from "./useCommunicationAttributes.js";
2
- import { resolveRecentChannelSelection as J } from "./useCommunicationRecentSelection.js";
3
- function Y({
2
+ import { resolveRecentChannelSelection as K } from "./useCommunicationRecentSelection.js";
3
+ function Z({
4
4
  activeChannelType: l,
5
5
  channels: v,
6
6
  selectedChannel: i,
@@ -9,7 +9,8 @@ function Y({
9
9
  confirmingAttributeId: q,
10
10
  isAttributeBlocked: u,
11
11
  closeMenu: a,
12
- hasMultipleChannels: A,
12
+ pinMenuOpen: A,
13
+ hasMultipleChannels: G,
13
14
  getSingleChannelForType: x,
14
15
  getAvailableChannels: C,
15
16
  isChannelEmpty: d,
@@ -20,13 +21,13 @@ function Y({
20
21
  panelPendingSelection: f
21
22
  }) {
22
23
  const b = (n, e, r) => {
23
- u(n) || (q.value = n.id, t("confirm-attribute", {
24
+ u(n) || (A(), q.value = n.id, t("confirm-attribute", {
24
25
  attributeId: n.id,
25
26
  channelId: e,
26
27
  channelType: r,
27
28
  attribute: n
28
29
  }));
29
- }, G = (n, e, r) => {
30
+ }, H = (n, e, r) => {
30
31
  if (m(n)) {
31
32
  b(n, e, r);
32
33
  return;
@@ -60,34 +61,36 @@ function Y({
60
61
  h(n);
61
62
  return;
62
63
  }
63
- if (!A(e)) {
64
+ if (!G(e)) {
64
65
  const r = x(e);
65
- r && G(n, r.channelId, e);
66
+ r && H(n, r.channelId, e);
66
67
  }
67
68
  }
68
69
  },
69
70
  selectSingleChannel: j,
70
71
  selectChannel: (n) => {
71
72
  const e = z.value, r = l.value;
72
- if (!e || !r || u(e)) {
73
+ if (!e || !r) {
73
74
  a();
74
75
  return;
75
76
  }
76
- if (m(e)) {
77
- b(e, n, r);
78
- return;
77
+ if (!u(e)) {
78
+ if (m(e)) {
79
+ b(e, n, r);
80
+ return;
81
+ }
82
+ t("select-attribute-channel", {
83
+ attributeId: e.id,
84
+ channelId: n
85
+ }), s.value = r, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), a();
79
86
  }
80
- t("select-attribute-channel", {
81
- attributeId: e.id,
82
- channelId: n
83
- }), s.value = r, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), a();
84
87
  },
85
88
  availableChannels: () => {
86
89
  const n = l.value;
87
90
  return n ? C(n) : [];
88
91
  },
89
92
  applyRecentChannelButtonSelection: (n, e, r) => {
90
- const c = J(
93
+ const c = K(
91
94
  n,
92
95
  e,
93
96
  r,
@@ -104,7 +107,7 @@ function Y({
104
107
  }), t("select-attribute-channel", {
105
108
  attributeId: P.id,
106
109
  channelId: o
107
- }), s.value = n, i.value = v.value.find((H) => H.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
110
+ }), s.value = n, i.value = v.value.find((J) => J.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
108
111
  },
109
112
  clearPanelPendingSelection: () => {
110
113
  f && (f.value = null);
@@ -112,5 +115,5 @@ function Y({
112
115
  };
113
116
  }
114
117
  export {
115
- Y as useCommunicationActions
118
+ Z as useCommunicationActions
116
119
  };
@@ -1,45 +1,50 @@
1
- import { ref as l, nextTick as f } from "vue";
2
- function M({
3
- panelRef: v,
4
- selectedChannelType: d,
5
- frozenAttribute: c
1
+ import { ref as n, nextTick as p } from "vue";
2
+ function w({
3
+ panelRef: d,
4
+ selectedChannelType: h,
5
+ frozenAttribute: r
6
6
  }) {
7
- const n = l(null), h = l(null), u = l(!1), a = l(!1), s = l(!1), t = () => {
8
- u.value = !1, n.value = null, c.value = null, a.value = !1;
9
- }, C = () => {
10
- s.value = !0, f(() => {
11
- f(() => {
12
- s.value = !1;
7
+ const u = n(null), C = n(null), a = n(!1), s = n(!1), t = n(!1), l = n(!1), i = () => {
8
+ l.value = !1, a.value = !1, u.value = null, r.value = null, s.value = !1;
9
+ }, m = () => {
10
+ l.value = !0;
11
+ }, c = () => {
12
+ t.value = !0, p(() => {
13
+ p(() => {
14
+ t.value = !1;
13
15
  });
14
16
  });
15
- }, i = (e) => {
16
- n.value = e, u.value = !0, a.value = !1, c.value = null, C();
17
+ }, f = (e) => {
18
+ l.value = !1, u.value = e, a.value = !0, s.value = !1, r.value = null, c();
17
19
  };
18
20
  return {
19
- activeChannelType: n,
20
- hoveredChannel: h,
21
- showMenu: u,
22
- showSubMenu: a,
21
+ activeChannelType: u,
22
+ hoveredChannel: C,
23
+ showMenu: a,
24
+ showSubMenu: s,
25
+ retainOpenUntilDismiss: l,
23
26
  handleChannelClick: (e) => {
24
- if (d.value === e && n.value === e) {
25
- t();
27
+ if (h.value === e && u.value === e) {
28
+ i();
26
29
  return;
27
30
  }
28
- i(e);
31
+ f(e);
29
32
  },
30
- openMenu: i,
31
- closeMenu: t,
33
+ openMenu: f,
34
+ closeMenu: i,
35
+ pinMenuOpen: m,
36
+ armOutsideClickSuppression: c,
32
37
  handleClickOutside: (e) => {
33
- if (s.value)
38
+ if (t.value || l.value)
34
39
  return;
35
- const o = v.value;
40
+ const o = d.value;
36
41
  if (!o)
37
42
  return;
38
- const r = typeof e.composedPath == "function" ? e.composedPath() : [];
39
- Array.isArray(r) && r.includes(o) || o.contains(e.target) || t();
43
+ const v = typeof e.composedPath == "function" ? e.composedPath() : [];
44
+ Array.isArray(v) && v.includes(o) || o.contains(e.target) || i();
40
45
  }
41
46
  };
42
47
  }
43
48
  export {
44
- M as useCommunicationMenu
49
+ w as useCommunicationMenu
45
50
  };
@@ -1,58 +1,67 @@
1
- import { ref as C } from "vue";
2
- function N({
3
- activeChannelType: g,
4
- showSubMenu: n,
5
- frozenAttribute: o,
6
- hoveredAttribute: b,
7
- hasMultipleChannels: h,
8
- isAttributeBlocked: M
1
+ import { ref as E } from "vue";
2
+ function O({
3
+ activeChannelType: S,
4
+ showSubMenu: u,
5
+ frozenAttribute: n,
6
+ hoveredAttribute: c,
7
+ confirmingAttributeId: v,
8
+ retainOpenUntilDismiss: i,
9
+ hasMultipleChannels: b,
10
+ isAttributeBlocked: f
9
11
  }) {
10
- const t = C(0);
12
+ const l = E(0), y = () => i.value || !!v.value || f(c.value ?? n.value);
11
13
  return {
12
- subMenuTop: t,
13
- handleAttributeMouseEnter: (e, l) => {
14
- const u = g.value;
15
- return !u || !h(u) || M(e) ? null : (b.value = e, n.value = !0, o.value = e, l);
14
+ subMenuTop: l,
15
+ handleAttributeMouseEnter: (e, o) => {
16
+ const t = S.value;
17
+ if (!t || !b(t))
18
+ return null;
19
+ if (i.value || v.value) {
20
+ const a = n.value ?? c.value;
21
+ if (u.value || a && a.id !== e.id)
22
+ return null;
23
+ }
24
+ return c.value = e, u.value = !0, n.value = e, o;
16
25
  },
17
26
  handleAttributeMouseLeave: () => {
18
- n.value || (o.value = null);
27
+ u.value || (n.value = null);
19
28
  },
20
29
  keepSubMenuOpen: () => {
21
- n.value = !0;
30
+ u.value = !0;
22
31
  },
23
32
  closeSubMenu: () => {
24
- n.value = !1, o.value = null;
33
+ y() || (u.value = !1, n.value = null);
25
34
  },
26
- alignSubMenuWithTarget: (e, l) => {
27
- var u, r, s;
28
- if (!l) {
29
- t.value = 0;
35
+ alignSubMenuWithTarget: (e, o) => {
36
+ var t, a, d;
37
+ if (!o) {
38
+ l.value = 0;
30
39
  return;
31
40
  }
32
41
  try {
33
- const i = (u = e.value) == null ? void 0 : u.querySelector(".attributes-menu"), a = (r = e.value) == null ? void 0 : r.querySelector(".sub-menu-header"), v = (s = e.value) == null ? void 0 : s.querySelector(".sub-menu");
34
- if (!i) {
35
- t.value = 0;
42
+ const p = (t = e.value) == null ? void 0 : t.querySelector(".attributes-menu"), s = (a = e.value) == null ? void 0 : a.querySelector(".sub-menu-header"), m = (d = e.value) == null ? void 0 : d.querySelector(".sub-menu");
43
+ if (!p) {
44
+ l.value = 0;
36
45
  return;
37
46
  }
38
- const S = i.getBoundingClientRect(), y = l.getBoundingClientRect();
39
- let m = 0;
40
- if (a) {
41
- const c = a.getBoundingClientRect(), f = getComputedStyle(a), p = parseFloat(f.marginBottom || "0");
42
- m = c.height + (Number.isNaN(p) ? 0 : p);
47
+ const B = p.getBoundingClientRect(), C = o.getBoundingClientRect();
48
+ let g = 0;
49
+ if (s) {
50
+ const r = s.getBoundingClientRect(), T = getComputedStyle(s), h = parseFloat(T.marginBottom || "0");
51
+ g = r.height + (Number.isNaN(h) ? 0 : h);
43
52
  }
44
- let d = 0;
45
- if (v) {
46
- const c = getComputedStyle(v);
47
- d = parseFloat(c.paddingTop || "0") || 0;
53
+ let M = 0;
54
+ if (m) {
55
+ const r = getComputedStyle(m);
56
+ M = parseFloat(r.paddingTop || "0") || 0;
48
57
  }
49
- t.value = y.top - S.top - m - d - 2;
58
+ l.value = C.top - B.top - g - M - 2;
50
59
  } catch {
51
- t.value = 0;
60
+ l.value = 0;
52
61
  }
53
62
  }
54
63
  };
55
64
  }
56
65
  export {
57
- N as useCommunicationSubMenu
66
+ O as useCommunicationSubMenu
58
67
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, inject as y, ref as v, computed as S, watch as k, onMounted as F, unref as o, createBlock as g, openBlock as m, Transition as L, withCtx as w, createElementVNode as r, withDirectives as C, createElementBlock as I, createCommentVNode as B, toDisplayString as D, vModelText as M, normalizeStyle as V } from "vue";
1
+ import { defineComponent as _, inject as y, ref as v, computed as S, watch as k, onMounted as F, unref as o, createBlock as g, openBlock as m, Transition as L, withCtx as w, createElementVNode as n, withDirectives as C, createElementBlock as I, createCommentVNode as B, toDisplayString as D, vModelText as M, normalizeStyle as V } from "vue";
2
2
  import { t as d } from "../../../locale/useLocale.js";
3
3
  import { useDelayDebouncedRef as b } from "../../../hooks/useDelayDebouncedRef.js";
4
4
  import "../../../hooks/useMessageDraft.js";
@@ -7,10 +7,11 @@ import "../../../hooks/useTheme.js";
7
7
  import "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
+ /* empty css */
10
11
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
12
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
12
13
  import "../../../functions/parseMarkdown.js";
13
- const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"], Q = /* @__PURE__ */ _({
14
+ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"], W = /* @__PURE__ */ _({
14
15
  __name: "FeedSearch",
15
16
  props: {
16
17
  isFeedLocation: {
@@ -34,21 +35,21 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
34
35
  return F(() => {
35
36
  const t = o(c);
36
37
  t == null || t.focus();
37
- }), (t, n) => (m(), g(L, null, {
38
+ }), (t, r) => (m(), g(L, null, {
38
39
  default: w(() => [
39
- r("div", E, [
40
- r("span", N, D(o(d)("component.FeedSearch.SearchLabel")), 1),
41
- C(r("input", {
40
+ n("div", E, [
41
+ n("span", N, D(o(d)("component.FeedSearch.SearchLabel")), 1),
42
+ C(n("input", {
42
43
  ref_key: "refInput",
43
44
  ref: c,
44
- "onUpdate:modelValue": n[0] || (n[0] = (p) => o(e)().text = p),
45
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => o(e)().text = p),
45
46
  class: "feed-search__input",
46
47
  type: "text",
47
48
  placeholder: o(d)("component.FeedSearch.SearchPlaceholder")
48
49
  }, null, 8, T), [
49
50
  [M, o(e)().text]
50
51
  ]),
51
- r("i", {
52
+ n("i", {
52
53
  class: "pi pi-times",
53
54
  style: V({ right: h.value }),
54
55
  onClick: x
@@ -57,7 +58,7 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
57
58
  key: 0,
58
59
  class: "pi pi-refresh",
59
60
  style: { "margin-left": "5px", "margin-top": "10px", cursor: "pointer" },
60
- onClick: n[1] || (n[1] = (p) => i("switch"))
61
+ onClick: r[1] || (r[1] = (p) => i("switch"))
61
62
  })) : B("", !0)
62
63
  ])
63
64
  ]),
@@ -66,5 +67,5 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
66
67
  }
67
68
  });
68
69
  export {
69
- Q as default
70
+ W as default
70
71
  };
@@ -5,11 +5,13 @@ import "../../../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
13
  import k from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
12
- const V = /* @__PURE__ */ p({
14
+ const D = /* @__PURE__ */ p({
13
15
  __name: "ButtonCommandsSelector",
14
16
  props: {
15
17
  commands: {
@@ -68,5 +70,5 @@ const V = /* @__PURE__ */ p({
68
70
  }
69
71
  });
70
72
  export {
71
- V as default
73
+ D as default
72
74
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, ref as l, inject as W, watch as z, computed as R, watchEffect as U, onMounted as $, onUnmounted as q, createElementBlock as j, openBlock as C, Fragment as G, createCommentVNode as J, createVNode as g, unref as b, normalizeClass as K, createElementVNode as B, Transition as Q, withCtx as X, withDirectives as Y, vShow as Z } from "vue";
1
+ import { defineComponent as D, ref as r, inject as W, watch as z, computed as R, watchEffect as U, onMounted as $, onUnmounted as q, createElementBlock as j, openBlock as C, Fragment as G, createCommentVNode as J, createVNode as g, unref as b, normalizeClass as K, createElementVNode as B, Transition as Q, withCtx as X, withDirectives as Y, vShow as Z } from "vue";
2
2
  import ee from "../../../node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js";
3
3
  /* empty css */
4
4
  import { useMessageDraft as te } from "../../../hooks/useMessageDraft.js";
@@ -7,11 +7,13 @@ import "../../../hooks/useTheme.js";
7
7
  import { useEmojiNative as oe } from "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
+ import "../../../locale/useLocale.js";
11
+ /* empty css */
10
12
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
13
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
12
14
  import "../../../functions/parseMarkdown.js";
13
15
  import ne from "./icons/SmilesIcon.vue.js";
14
- const ke = /* @__PURE__ */ D({
16
+ const be = /* @__PURE__ */ D({
15
17
  __name: "ButtonEmojiPicker",
16
18
  props: {
17
19
  state: {
@@ -22,7 +24,7 @@ const ke = /* @__PURE__ */ D({
22
24
  type: String,
23
25
  default: "click",
24
26
  // или 'hover'
25
- validator: (r) => ["click", "hover"].includes(r)
27
+ validator: (l) => ["click", "hover"].includes(l)
26
28
  },
27
29
  /**
28
30
  * true — системные эмодзи; false — 3D (Apple) в пикере, инпуте и ленте.
@@ -33,16 +35,16 @@ const ke = /* @__PURE__ */ D({
33
35
  default: !0
34
36
  }
35
37
  },
36
- setup(r) {
37
- const t = r, v = l(null), f = l(null), o = l(!1), E = l("light"), i = W("chatAppId"), { setMessageText: P, getMessage: M } = te(i), { setNative: w } = oe(i);
38
+ setup(l) {
39
+ const t = l, v = r(null), f = r(null), o = r(!1), E = r("light"), i = W("chatAppId"), { setMessageText: P, getMessage: M } = te(i), { setNative: w } = oe(i);
38
40
  z(
39
41
  () => t.native,
40
42
  (e) => w(e),
41
43
  { immediate: !0 }
42
44
  );
43
- const c = l("#5F5F5F"), s = l("#404040"), h = l(!1);
45
+ const c = r("#5F5F5F"), s = r("#404040"), p = r(!1);
44
46
  let a = null;
45
- const p = () => {
47
+ const h = () => {
46
48
  if (!i) {
47
49
  c.value = "#5F5F5F", s.value = "#404040";
48
50
  return;
@@ -54,9 +56,9 @@ const ke = /* @__PURE__ */ D({
54
56
  }
55
57
  const n = window.getComputedStyle(e), d = n.getPropertyValue("--chotto-buttonemojipicker-button-span-color").trim(), A = n.getPropertyValue("--chotto-buttonemojipicker-button-span-hover-color").trim();
56
58
  c.value = d || "#5F5F5F", s.value = A || "#404040";
57
- }, I = R(() => h.value ? s.value : c.value);
59
+ }, I = R(() => p.value ? s.value : c.value);
58
60
  U(() => {
59
- p();
61
+ h();
60
62
  });
61
63
  let u = !1, m = !1;
62
64
  const N = () => {
@@ -78,9 +80,9 @@ const ke = /* @__PURE__ */ D({
78
80
  !m && !u && k();
79
81
  }, 150));
80
82
  }, x = () => {
81
- h.value = !0, T();
83
+ p.value = !0, T();
82
84
  }, L = () => {
83
- h.value = !1, V();
85
+ p.value = !1, V();
84
86
  }, O = () => {
85
87
  t.mode === "hover" && (m = !0);
86
88
  }, H = () => {
@@ -91,11 +93,11 @@ const ke = /* @__PURE__ */ D({
91
93
  t.mode === "click" && o.value && f.value && v.value && e.target instanceof Node && !f.value.contains(e.target) && !v.value.contains(e.target) && k();
92
94
  };
93
95
  return $(() => {
94
- if (document.addEventListener("click", F), p(), i) {
96
+ if (document.addEventListener("click", F), h(), i) {
95
97
  const e = document.getElementById(i);
96
98
  e && (a = new MutationObserver((n) => {
97
99
  n.forEach((d) => {
98
- d.type === "attributes" && d.attributeName === "data-theme" && p();
100
+ d.type === "attributes" && d.attributeName === "data-theme" && h();
99
101
  });
100
102
  }), a.observe(e, {
101
103
  attributes: !0,
@@ -109,7 +111,7 @@ const ke = /* @__PURE__ */ D({
109
111
  key: 0,
110
112
  ref_key: "emojiButton",
111
113
  ref: f,
112
- class: K(["button", { "button-disabled": r.state === "disabled" }]),
114
+ class: K(["button", { "button-disabled": l.state === "disabled" }]),
113
115
  onClick: _,
114
116
  onMouseenter: x,
115
117
  onMouseleave: L
@@ -128,7 +130,7 @@ const ke = /* @__PURE__ */ D({
128
130
  onMouseleave: H
129
131
  }, [
130
132
  g(b(ee), {
131
- native: r.native,
133
+ native: l.native,
132
134
  theme: E.value,
133
135
  "picker-type": "",
134
136
  onSelect: S
@@ -143,5 +145,5 @@ const ke = /* @__PURE__ */ D({
143
145
  }
144
146
  });
145
147
  export {
146
- ke as default
148
+ be as default
147
149
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as T, inject as E, ref as s, computed as I, watchEffect as V, onMounted as q, onUnmounted as x, createElementBlock as y, openBlock as g, Fragment as A, createVNode as d, withCtx as h, createCommentVNode as N, unref as b, normalizeClass as W, createElementVNode as F, Transition as $, withDirectives as D, vShow as H } from "vue";
1
+ import { defineComponent as T, inject as E, ref as i, computed as I, watchEffect as V, onMounted as q, onUnmounted as x, createElementBlock as y, openBlock as g, Fragment as A, createVNode as m, withCtx as h, createCommentVNode as N, unref as b, normalizeClass as W, createElementVNode as F, Transition as $, withDirectives as D, vShow as H } from "vue";
2
2
  import O from "../TemplateSelector/TemplateSelector.vue.js";
3
3
  import P from "../../1_atoms/Tooltip/Tooltip.vue.js";
4
4
  import { useMessageDraft as j } from "../../../hooks/useMessageDraft.js";
@@ -7,11 +7,13 @@ import "../../../hooks/useTheme.js";
7
7
  import "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
+ import "../../../locale/useLocale.js";
11
+ /* empty css */
10
12
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
13
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
12
14
  import "../../../functions/parseMarkdown.js";
13
15
  import z from "./icons/ChatTemplatesIcon.vue.js";
14
- const R = { class: "" }, le = /* @__PURE__ */ T({
16
+ const R = { class: "" }, ne = /* @__PURE__ */ T({
15
17
  __name: "ButtonTemplateSelector",
16
18
  props: {
17
19
  templates: {
@@ -43,21 +45,21 @@ const R = { class: "" }, le = /* @__PURE__ */ T({
43
45
  }
44
46
  },
45
47
  setup(l) {
46
- const o = l, r = E("chatAppId"), { getMessage: w } = j(r || ""), k = s(null), e = s(null), i = s("#5F5F5F"), c = s("#404040"), m = s(!1);
48
+ const o = l, r = E("chatAppId"), { getMessage: w } = j(r || ""), k = i(null), e = i(null), s = i("#5F5F5F"), c = i("#404040"), d = i(!1);
47
49
  let u = null;
48
50
  const p = () => {
49
51
  if (!r) {
50
- i.value = "#5F5F5F", c.value = "#404040";
52
+ s.value = "#5F5F5F", c.value = "#404040";
51
53
  return;
52
54
  }
53
55
  const a = document.getElementById(r);
54
56
  if (!a) {
55
- i.value = "#5F5F5F", c.value = "#404040";
57
+ s.value = "#5F5F5F", c.value = "#404040";
56
58
  return;
57
59
  }
58
60
  const t = window.getComputedStyle(a), n = t.getPropertyValue("--chotto-buttontemplateselector-button-span-color").trim(), S = t.getPropertyValue("--chotto-buttontemplateselector-button-span-hover-color").trim();
59
- i.value = n || "#5F5F5F", c.value = S || "#404040";
60
- }, C = I(() => m.value ? c.value : i.value);
61
+ s.value = n || "#5F5F5F", c.value = S || "#404040";
62
+ }, C = I(() => d.value ? c.value : s.value);
61
63
  V(() => {
62
64
  p();
63
65
  });
@@ -85,7 +87,7 @@ const R = { class: "" }, le = /* @__PURE__ */ T({
85
87
  }), x(() => {
86
88
  u && (u.disconnect(), u = null);
87
89
  }), (a, t) => (g(), y(A, null, [
88
- d(P, {
90
+ m(P, {
89
91
  text: "Шаблоны сообщений",
90
92
  position: "left"
91
93
  }, {
@@ -98,17 +100,17 @@ const R = { class: "" }, le = /* @__PURE__ */ T({
98
100
  onClick: B,
99
101
  onMouseover: v,
100
102
  onMouseout: f,
101
- onMouseenter: t[0] || (t[0] = (n) => m.value = !0),
102
- onMouseleave: t[1] || (t[1] = (n) => m.value = !1)
103
+ onMouseenter: t[0] || (t[0] = (n) => d.value = !0),
104
+ onMouseleave: t[1] || (t[1] = (n) => d.value = !1)
103
105
  }, [
104
106
  F("span", R, [
105
- d(b(z), { fill: C.value }, null, 8, ["fill"])
107
+ m(b(z), { fill: C.value }, null, 8, ["fill"])
106
108
  ])
107
109
  ], 34))
108
110
  ]),
109
111
  _: 1
110
112
  }),
111
- d($, null, {
113
+ m($, null, {
112
114
  default: h(() => [
113
115
  D(F("div", {
114
116
  ref_key: "template",
@@ -116,7 +118,7 @@ const R = { class: "" }, le = /* @__PURE__ */ T({
116
118
  onMouseover: v,
117
119
  onMouseout: f
118
120
  }, [
119
- d(O, {
121
+ m(O, {
120
122
  templates: l.templates,
121
123
  "group-templates": l.groupTemplates,
122
124
  "elevated-window": l.elevatedWindow,
@@ -133,5 +135,5 @@ const R = { class: "" }, le = /* @__PURE__ */ T({
133
135
  }
134
136
  });
135
137
  export {
136
- le as default
138
+ ne as default
137
139
  };
@@ -7,6 +7,8 @@ import "../../../hooks/useEmojiNative.js";
7
7
  /* empty css */
8
8
  import q from "../../../_virtual/_plugin-vue_export-helper.js";
9
9
  /* empty css */
10
+ import "../../../locale/useLocale.js";
11
+ /* empty css */
10
12
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
13
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
12
14
  import "../../../functions/parseMarkdown.js";
@@ -94,7 +96,7 @@ const C = {
94
96
  ], 544)
95
97
  ], 64));
96
98
  }
97
- }, K = /* @__PURE__ */ q(C, [["__scopeId", "data-v-e300d7b9"]]);
99
+ }, O = /* @__PURE__ */ q(C, [["__scopeId", "data-v-e300d7b9"]]);
98
100
  export {
99
- K as default
101
+ O as default
100
102
  };
@@ -6,6 +6,8 @@ import { useTheme as B } 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";
@@ -22,7 +24,7 @@ const j = { class: "preview__container" }, F = { class: "preview__block" }, O =
22
24
  }, ee = {
23
25
  key: 2,
24
26
  class: "preview__audio-time"
25
- }, ie = { class: "preview__reset" }, te = ["src"], le = ["src"], _e = /* @__PURE__ */ V({
27
+ }, ie = { class: "preview__reset" }, te = ["src"], le = ["src"], ye = /* @__PURE__ */ V({
26
28
  __name: "FilePreview",
27
29
  props: {
28
30
  fileInfo: {
@@ -157,5 +159,5 @@ const j = { class: "preview__container" }, F = { class: "preview__block" }, O =
157
159
  }
158
160
  });
159
161
  export {
160
- _e as default
162
+ ye as default
161
163
  };
@@ -7,6 +7,8 @@ import "../../../hooks/useTheme.js";
7
7
  import "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
+ import "../../../locale/useLocale.js";
11
+ /* empty css */
10
12
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
13
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
12
14
  import "../../../functions/parseMarkdown.js";
@@ -17,7 +19,7 @@ const W = {
17
19
  }, X = {
18
20
  key: 1,
19
21
  class: "file-uploader__status file-uploader__status--error"
20
- }, Y = ["disabled"], de = /* @__PURE__ */ O({
22
+ }, Y = ["disabled"], ve = /* @__PURE__ */ O({
21
23
  __name: "FileUploader",
22
24
  props: {
23
25
  filebumpUrl: {
@@ -149,5 +151,5 @@ const W = {
149
151
  }
150
152
  });
151
153
  export {
152
- de as default
154
+ ve as default
153
155
  };