@mobilon-dev/chotto 0.3.84 → 0.3.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +3 -2
  3. package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +3 -2
  4. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +38 -0
  5. package/dist/components/1_atoms/EmojiGlyph/EmojiGlyph.vue2.js +4 -0
  6. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +1 -1
  7. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +49 -36
  8. package/dist/components/1_icons/CloseIcon.vue.js +21 -0
  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 +10 -9
  14. package/dist/components/2_chatinput_elements/ButtonCommandsSelector/ButtonCommandsSelector.vue2.js +8 -7
  15. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +2 -2
  16. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +48 -37
  17. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +3 -2
  18. package/dist/components/2_chatinput_elements/ButtonWabaTemplateSelector/ButtonWabaTemplateSelector.vue.js +7 -6
  19. package/dist/components/2_chatinput_elements/FilePreview/FilePreview.vue2.js +3 -2
  20. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +3 -2
  21. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +3 -2
  22. package/dist/components/2_chatinput_elements/TemplateSelector/TemplateSelector.vue.js +27 -26
  23. package/dist/components/2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue2.js +3 -2
  24. package/dist/components/2_chatinput_elements/WABAAttachmentSection/WABAAttachmentSection.vue2.js +3 -2
  25. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +3 -2
  26. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +3 -2
  27. package/dist/components/2_elements/ChannelSelector/ChannelSelector.vue.js +6 -5
  28. package/dist/components/2_elements/ThemeMode/ThemeMode.vue.js +10 -9
  29. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +3 -2
  30. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
  31. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +169 -143
  32. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js +4 -4
  33. package/dist/components/2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue2.js +33 -32
  34. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +8 -2
  35. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +3 -3
  36. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +134 -108
  37. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +1 -1
  38. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +116 -97
  39. package/dist/components/2_feed_elements/MessageKeyboard/MessageKeyboard.vue2.js +3 -2
  40. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
  41. package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +232 -113
  42. package/dist/components/2_feed_elements/MessageReactions/composables/usePositioning.js +77 -62
  43. package/dist/components/2_feed_elements/MessageReactions/composables/useReactions.js +62 -20
  44. package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.js +91 -69
  45. package/dist/components/2_feed_elements/MessageReactions/composables/useReactionsState.js +46 -22
  46. package/dist/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.js +21 -0
  47. package/dist/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.js +21 -0
  48. package/dist/components/2_feed_elements/MessageReactions/utils/quickReactions.js +2 -8
  49. package/dist/components/2_feed_elements/MessageReactions/utils/reactionTooltip.js +39 -0
  50. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +26 -20
  51. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue.js +2 -2
  52. package/dist/components/2_feed_elements/ReplyAudioMessage/ReplyAudioMessage.vue2.js +27 -18
  53. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue.js +2 -2
  54. package/dist/components/2_feed_elements/ReplyCallMessage/ReplyCallMessage.vue2.js +16 -15
  55. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue.js +3 -3
  56. package/dist/components/2_feed_elements/ReplyFileMessage/ReplyFileMessage.vue2.js +27 -18
  57. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +1 -1
  58. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +16 -12
  59. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +4 -4
  60. package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +74 -65
  61. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue.js +1 -1
  62. package/dist/components/2_feed_elements/ReplyTextMessage/ReplyTextMessage.vue2.js +20 -11
  63. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +2 -2
  64. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +13 -9
  65. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue.js +4 -4
  66. package/dist/components/2_feed_elements/StickerMessage/StickerMessage.vue2.js +74 -55
  67. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +4 -4
  68. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +102 -76
  69. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +2 -2
  70. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +74 -55
  71. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
  72. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +99 -82
  73. package/dist/components/3_compounds/Feed/Feed.vue.js +3 -3
  74. package/dist/components/3_compounds/Feed/Feed.vue2.js +159 -139
  75. package/dist/components/3_compounds/Feed/composables/useFeedReply.js +22 -25
  76. package/dist/functions/renderAppleEmojis.js +92 -0
  77. package/dist/hooks/messages/buildReplyPayload.js +14 -0
  78. package/dist/hooks/messages/useMessageLinks.js +60 -50
  79. package/dist/hooks/messages/useStartReply.js +29 -0
  80. package/dist/hooks/useEmojiNative.js +19 -0
  81. package/dist/index.js +130 -122
  82. package/dist/themes/dark.css +1 -1
  83. package/dist/themes/default.css +1 -1
  84. package/dist/themes/glass.css +1 -1
  85. package/dist/themes/green.css +1 -1
  86. package/dist/themes/mobilon1.css +1 -1
  87. package/dist/types/apps/data/messages.d.ts +20 -18
  88. package/dist/types/components/1_atoms/EmojiGlyph/EmojiGlyph.vue.d.ts +12 -0
  89. package/dist/types/components/1_atoms/Tooltip/stories/Tooltip.stories.d.ts +3 -0
  90. package/dist/types/components/1_icons/CloseIcon.vue.d.ts +2 -0
  91. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -0
  92. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +3 -1
  93. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +3 -0
  94. package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +4 -2
  95. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +1 -0
  96. package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +9 -1
  97. package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +29 -0
  98. package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +24 -16
  99. package/dist/types/components/2_feed_elements/BaseReplyMessage/styles/types.d.ts +8 -4
  100. package/dist/types/components/2_feed_elements/FileMessage/FileMessage.vue.d.ts +29 -0
  101. package/dist/types/components/2_feed_elements/FileMessage/styles/types.d.ts +20 -0
  102. package/dist/types/components/2_feed_elements/ImageMessage/ImageMessage.vue.d.ts +29 -0
  103. package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +2 -0
  104. package/dist/types/components/2_feed_elements/MessageReactions/MessageReactions.vue.d.ts +64 -1
  105. package/dist/types/components/2_feed_elements/MessageReactions/composables/index.d.ts +2 -2
  106. package/dist/types/components/2_feed_elements/MessageReactions/composables/usePositioning.d.ts +11 -1
  107. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactions.d.ts +20 -12
  108. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsPanel.d.ts +3 -3
  109. package/dist/types/components/2_feed_elements/MessageReactions/composables/useReactionsState.d.ts +13 -22
  110. package/dist/types/components/2_feed_elements/MessageReactions/icons/ExpandReactionsIcon.vue.d.ts +2 -0
  111. package/dist/types/components/2_feed_elements/MessageReactions/icons/ReplyIcon.vue.d.ts +2 -0
  112. package/dist/types/components/2_feed_elements/MessageReactions/styles/types.d.ts +14 -74
  113. package/dist/types/components/2_feed_elements/MessageReactions/utils/quickReactions.d.ts +1 -1
  114. package/dist/types/components/2_feed_elements/MessageReactions/utils/reactionTooltip.d.ts +14 -0
  115. package/dist/types/components/2_feed_elements/ReplyAudioMessage/styles/types.d.ts +6 -0
  116. package/dist/types/components/2_feed_elements/ReplyCallMessage/styles/types.d.ts +6 -0
  117. package/dist/types/components/2_feed_elements/ReplyFileMessage/styles/types.d.ts +6 -0
  118. package/dist/types/components/2_feed_elements/ReplyImageMessage/styles/types.d.ts +6 -0
  119. package/dist/types/components/2_feed_elements/ReplyStickerMessage/styles/types.d.ts +6 -0
  120. package/dist/types/components/2_feed_elements/ReplyTextMessage/styles/types.d.ts +4 -0
  121. package/dist/types/components/2_feed_elements/ReplyVideoMessage/styles/types.d.ts +6 -0
  122. package/dist/types/components/2_feed_elements/StickerMessage/StickerMessage.vue.d.ts +29 -0
  123. package/dist/types/components/2_feed_elements/TextMessage/TextMessage.vue.d.ts +29 -0
  124. package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +22 -0
  125. package/dist/types/components/2_feed_elements/VideoMessage/VideoMessage.vue.d.ts +29 -0
  126. package/dist/types/components/2_feed_elements/types/messages.d.ts +11 -6
  127. package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
  128. package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +33 -0
  129. package/dist/types/functions/renderAppleEmojis.d.ts +16 -0
  130. package/dist/types/hooks/index.d.ts +1 -0
  131. package/dist/types/hooks/messages/buildReplyPayload.d.ts +11 -0
  132. package/dist/types/hooks/messages/index.d.ts +2 -0
  133. package/dist/types/hooks/messages/useStartReply.d.ts +6 -0
  134. package/dist/types/hooks/useEmojiNative.d.ts +9 -0
  135. 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
  };
@@ -4,12 +4,13 @@ import { useDelayDebouncedRef as b } from "../../../hooks/useDelayDebouncedRef.j
4
4
  import "../../../hooks/useMessageDraft.js";
5
5
  import { useSearchModel as A } from "../../../hooks/useSearchModel.js";
6
6
  import "../../../hooks/useTheme.js";
7
+ import "../../../hooks/useEmojiNative.js";
7
8
  /* empty css */
8
9
  /* empty css */
9
10
  import "../../../node_modules/linkifyjs/dist/linkify.js";
10
11
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
11
12
  import "../../../functions/parseMarkdown.js";
12
- const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"], O = /* @__PURE__ */ _({
13
+ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40px" } }, T = ["placeholder"], Q = /* @__PURE__ */ _({
13
14
  __name: "FeedSearch",
14
15
  props: {
15
16
  isFeedLocation: {
@@ -19,19 +20,19 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
19
20
  },
20
21
  emits: ["search", "cancel", "switch"],
21
22
  setup(a, { emit: u }) {
22
- const f = y("chatAppId"), { getModel: e } = A(f), c = u, l = a, i = v(), s = b("", 500), h = S(() => l.isFeedLocation ? "40px" : (l.isFeedLocation, "20px"));
23
+ const f = y("chatAppId"), { getModel: e } = A(f), i = u, l = a, c = v(), s = b("", 500), h = S(() => l.isFeedLocation ? "40px" : (l.isFeedLocation, "20px"));
23
24
  k(
24
25
  () => [e().text, s.value],
25
26
  () => {
26
- s.value == e().text ? c("search", e().text) : s.value = e().text;
27
+ s.value == e().text ? i("search", e().text) : s.value = e().text;
27
28
  }
28
29
  );
29
30
  const x = () => {
30
- const t = o(i);
31
- t && (t.value = ""), e().text = "", c("cancel");
31
+ const t = o(c);
32
+ t && (t.value = ""), e().text = "", i("cancel");
32
33
  };
33
34
  return F(() => {
34
- const t = o(i);
35
+ const t = o(c);
35
36
  t == null || t.focus();
36
37
  }), (t, n) => (m(), g(L, null, {
37
38
  default: w(() => [
@@ -39,7 +40,7 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
39
40
  r("span", N, D(o(d)("component.FeedSearch.SearchLabel")), 1),
40
41
  C(r("input", {
41
42
  ref_key: "refInput",
42
- ref: i,
43
+ ref: c,
43
44
  "onUpdate:modelValue": n[0] || (n[0] = (p) => o(e)().text = p),
44
45
  class: "feed-search__input",
45
46
  type: "text",
@@ -56,7 +57,7 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
56
57
  key: 0,
57
58
  class: "pi pi-refresh",
58
59
  style: { "margin-left": "5px", "margin-top": "10px", cursor: "pointer" },
59
- onClick: n[1] || (n[1] = (p) => c("switch"))
60
+ onClick: n[1] || (n[1] = (p) => i("switch"))
60
61
  })) : B("", !0)
61
62
  ])
62
63
  ]),
@@ -65,5 +66,5 @@ const E = { class: "feed-search__container" }, N = { style: { "line-height": "40
65
66
  }
66
67
  });
67
68
  export {
68
- O as default
69
+ Q as default
69
70
  };
@@ -1,14 +1,15 @@
1
- import { defineComponent as p, inject as g, useTemplateRef as C, watch as h, createBlock as n, openBlock as m, Transition as x, withCtx as i, createCommentVNode as y, unref as d, createElementVNode as B, normalizeClass as M } from "vue";
1
+ import { defineComponent as p, inject as g, useTemplateRef as C, watch as h, createBlock as n, openBlock as m, Transition as x, withCtx as i, createCommentVNode as y, unref as r, createElementVNode as B, normalizeClass as M } from "vue";
2
2
  import { useMessageDraft as b } from "../../../hooks/useMessageDraft.js";
3
3
  import "../../../hooks/useSearchModel.js";
4
4
  import "../../../hooks/useTheme.js";
5
+ import "../../../hooks/useEmojiNative.js";
5
6
  /* empty css */
6
7
  /* empty css */
7
8
  import "../../../node_modules/linkifyjs/dist/linkify.js";
8
9
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
9
10
  import "../../../functions/parseMarkdown.js";
10
11
  import k from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
11
- const T = /* @__PURE__ */ p({
12
+ const V = /* @__PURE__ */ p({
12
13
  __name: "ButtonCommandsSelector",
13
14
  props: {
14
15
  commands: {
@@ -27,8 +28,8 @@ const T = /* @__PURE__ */ p({
27
28
  }
28
29
  },
29
30
  emits: ["send"],
30
- setup(e, { emit: r }) {
31
- const c = e, l = r, u = g("chatAppId"), { getMessage: s } = b(u), a = C("refBCM"), f = (t) => {
31
+ setup(e, { emit: d }) {
32
+ const c = e, l = d, u = g("chatAppId"), { getMessage: s } = b(u), a = C("refBCM"), f = (t) => {
32
33
  console.log(t);
33
34
  const o = {
34
35
  type: "message.command",
@@ -50,13 +51,13 @@ const T = /* @__PURE__ */ p({
50
51
  ref: a,
51
52
  "menu-side": "top",
52
53
  mode: e.mode,
53
- disabled: d(s)().isRecording || e.state == "disabled",
54
+ disabled: r(s)().isRecording || e.state == "disabled",
54
55
  actions: e.commands,
55
56
  onClick: f
56
57
  }, {
57
58
  default: i(() => [
58
59
  B("span", {
59
- class: M(["commands__trigger", { commands__disabled: d(s)().isRecording || e.state == "disabled" }])
60
+ class: M(["commands__trigger", { commands__disabled: r(s)().isRecording || e.state == "disabled" }])
60
61
  }, " / ", 2)
61
62
  ]),
62
63
  _: 1
@@ -67,5 +68,5 @@ const T = /* @__PURE__ */ p({
67
68
  }
68
69
  });
69
70
  export {
70
- T as default
71
+ V as default
71
72
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ButtonEmojiPicker.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bce30537"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e67f8c2a"]]);
5
5
  export {
6
- e as default
6
+ c as default
7
7
  };
@@ -1,16 +1,17 @@
1
- import { defineComponent as A, ref as l, inject as D, computed as W, watchEffect as z, onMounted as R, onUnmounted as U, createElementBlock as j, openBlock as C, Fragment as $, createCommentVNode as q, createVNode as g, unref as b, normalizeClass as G, createElementVNode as B, Transition as J, withCtx as K, withDirectives as Q, vShow as X } from "vue";
2
- import Y from "../../../node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js";
1
+ import { defineComponent as D, ref as l, inject as W, watch as z, computed as R, watchEffect as U, onMounted as $, onUnmounted as q, createElementBlock as j, openBlock as C, Fragment as G, createCommentVNode as J, createVNode as g, unref as b, normalizeClass as K, createElementVNode as B, Transition as Q, withCtx as X, withDirectives as Y, vShow as Z } from "vue";
2
+ import ee from "../../../node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js";
3
3
  /* empty css */
4
- import { useMessageDraft as Z } from "../../../hooks/useMessageDraft.js";
4
+ import { useMessageDraft as te } from "../../../hooks/useMessageDraft.js";
5
5
  import "../../../hooks/useSearchModel.js";
6
6
  import "../../../hooks/useTheme.js";
7
+ import { useEmojiNative as oe } from "../../../hooks/useEmojiNative.js";
7
8
  /* empty css */
8
9
  /* empty css */
9
10
  import "../../../node_modules/linkifyjs/dist/linkify.js";
10
11
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
11
12
  import "../../../functions/parseMarkdown.js";
12
- import ee from "./icons/SmilesIcon.vue.js";
13
- const ve = /* @__PURE__ */ A({
13
+ import ne from "./icons/SmilesIcon.vue.js";
14
+ const ke = /* @__PURE__ */ D({
14
15
  __name: "ButtonEmojiPicker",
15
16
  props: {
16
17
  state: {
@@ -23,63 +24,73 @@ const ve = /* @__PURE__ */ A({
23
24
  // или 'hover'
24
25
  validator: (r) => ["click", "hover"].includes(r)
25
26
  },
27
+ /**
28
+ * true — системные эмодзи; false — 3D (Apple) в пикере, инпуте и ленте.
29
+ * Значение пишется в общий store чата (useEmojiNative).
30
+ */
26
31
  native: {
27
32
  type: Boolean,
28
33
  default: !0
29
34
  }
30
35
  },
31
36
  setup(r) {
32
- const t = r, v = l(null), f = l(null), o = l(!1), M = l("light"), i = D("chatAppId"), { setMessageText: P, getMessage: E } = Z(i), c = l("#5F5F5F"), u = l("#404040"), h = l(!1);
37
+ const t = r, v = l(null), f = l(null), o = l(!1), E = l("light"), i = W("chatAppId"), { setMessageText: P, getMessage: M } = te(i), { setNative: w } = oe(i);
38
+ z(
39
+ () => t.native,
40
+ (e) => w(e),
41
+ { immediate: !0 }
42
+ );
43
+ const c = l("#5F5F5F"), s = l("#404040"), h = l(!1);
33
44
  let a = null;
34
45
  const p = () => {
35
46
  if (!i) {
36
- c.value = "#5F5F5F", u.value = "#404040";
47
+ c.value = "#5F5F5F", s.value = "#404040";
37
48
  return;
38
49
  }
39
50
  const e = document.getElementById(i);
40
51
  if (!e) {
41
- c.value = "#5F5F5F", u.value = "#404040";
52
+ c.value = "#5F5F5F", s.value = "#404040";
42
53
  return;
43
54
  }
44
- const n = window.getComputedStyle(e), d = n.getPropertyValue("--chotto-buttonemojipicker-button-span-color").trim(), H = n.getPropertyValue("--chotto-buttonemojipicker-button-span-hover-color").trim();
45
- c.value = d || "#5F5F5F", u.value = H || "#404040";
46
- }, w = W(() => h.value ? u.value : c.value);
47
- z(() => {
55
+ const n = window.getComputedStyle(e), d = n.getPropertyValue("--chotto-buttonemojipicker-button-span-color").trim(), A = n.getPropertyValue("--chotto-buttonemojipicker-button-span-hover-color").trim();
56
+ c.value = d || "#5F5F5F", s.value = A || "#404040";
57
+ }, I = R(() => h.value ? s.value : c.value);
58
+ U(() => {
48
59
  p();
49
60
  });
50
- let s = !1, m = !1;
51
- const I = () => {
61
+ let u = !1, m = !1;
62
+ const N = () => {
52
63
  var n;
53
64
  const e = document.getElementById(i);
54
65
  return (n = e == null ? void 0 : e.getAttribute("data-theme")) != null && n.includes("dark") ? "dark" : "light";
55
66
  }, S = (e) => {
56
- P(E().text + e.i), t.mode === "click" && (o.value = !1);
67
+ P(M().text + e.i), t.mode === "click" && (o.value = !1);
57
68
  }, y = () => {
58
- t.state === "active" && (M.value = I(), o.value = !0);
69
+ t.state === "active" && (E.value = N(), o.value = !0);
59
70
  }, k = () => {
60
71
  o.value = !1;
61
72
  }, _ = () => {
62
73
  t.mode === "click" && (o.value = !o.value, o.value && y());
63
74
  }, T = () => {
64
- t.mode === "hover" && (s = !0, y());
75
+ t.mode === "hover" && (u = !0, y());
65
76
  }, V = () => {
66
- t.mode === "hover" && (s = !1, setTimeout(() => {
67
- !m && !s && k();
77
+ t.mode === "hover" && (u = !1, setTimeout(() => {
78
+ !m && !u && k();
68
79
  }, 150));
69
80
  }, x = () => {
70
81
  h.value = !0, T();
71
82
  }, L = () => {
72
83
  h.value = !1, V();
73
- }, N = () => {
74
- t.mode === "hover" && (m = !0);
75
84
  }, O = () => {
85
+ t.mode === "hover" && (m = !0);
86
+ }, H = () => {
76
87
  t.mode === "hover" && (m = !1, setTimeout(() => {
77
- !s && !m && k();
88
+ !u && !m && k();
78
89
  }, 150));
79
90
  }, F = (e) => {
80
91
  t.mode === "click" && o.value && f.value && v.value && e.target instanceof Node && !f.value.contains(e.target) && !v.value.contains(e.target) && k();
81
92
  };
82
- return R(() => {
93
+ return $(() => {
83
94
  if (document.addEventListener("click", F), p(), i) {
84
95
  const e = document.getElementById(i);
85
96
  e && (a = new MutationObserver((n) => {
@@ -91,39 +102,39 @@ const ve = /* @__PURE__ */ A({
91
102
  attributeFilter: ["data-theme"]
92
103
  }));
93
104
  }
94
- }), U(() => {
105
+ }), q(() => {
95
106
  document.removeEventListener("click", F), a && (a.disconnect(), a = null);
96
- }), (e, n) => (C(), j($, null, [
97
- b(E)().isRecording ? q("", !0) : (C(), j("button", {
107
+ }), (e, n) => (C(), j(G, null, [
108
+ b(M)().isRecording ? J("", !0) : (C(), j("button", {
98
109
  key: 0,
99
110
  ref_key: "emojiButton",
100
111
  ref: f,
101
- class: G(["button", { "button-disabled": r.state === "disabled" }]),
112
+ class: K(["button", { "button-disabled": r.state === "disabled" }]),
102
113
  onClick: _,
103
114
  onMouseenter: x,
104
115
  onMouseleave: L
105
116
  }, [
106
117
  B("span", null, [
107
- g(b(ee), { fill: w.value }, null, 8, ["fill"])
118
+ g(b(ne), { fill: I.value }, null, 8, ["fill"])
108
119
  ])
109
120
  ], 34)),
110
- g(J, null, {
111
- default: K(() => [
112
- Q(B("div", {
121
+ g(Q, null, {
122
+ default: X(() => [
123
+ Y(B("div", {
113
124
  ref_key: "emoji",
114
125
  ref: v,
115
126
  class: "emoji",
116
- onMouseenter: N,
117
- onMouseleave: O
127
+ onMouseenter: O,
128
+ onMouseleave: H
118
129
  }, [
119
- g(b(Y), {
130
+ g(b(ee), {
120
131
  native: r.native,
121
- theme: M.value,
132
+ theme: E.value,
122
133
  "picker-type": "",
123
134
  onSelect: S
124
135
  }, null, 8, ["native", "theme"])
125
136
  ], 544), [
126
- [X, o.value]
137
+ [Z, o.value]
127
138
  ])
128
139
  ]),
129
140
  _: 1
@@ -132,5 +143,5 @@ const ve = /* @__PURE__ */ A({
132
143
  }
133
144
  });
134
145
  export {
135
- ve as default
146
+ ke as default
136
147
  };
@@ -4,13 +4,14 @@ import P from "../../1_atoms/Tooltip/Tooltip.vue.js";
4
4
  import { useMessageDraft as j } from "../../../hooks/useMessageDraft.js";
5
5
  import "../../../hooks/useSearchModel.js";
6
6
  import "../../../hooks/useTheme.js";
7
+ import "../../../hooks/useEmojiNative.js";
7
8
  /* empty css */
8
9
  /* empty css */
9
10
  import "../../../node_modules/linkifyjs/dist/linkify.js";
10
11
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
11
12
  import "../../../functions/parseMarkdown.js";
12
13
  import z from "./icons/ChatTemplatesIcon.vue.js";
13
- const R = { class: "" }, oe = /* @__PURE__ */ T({
14
+ const R = { class: "" }, le = /* @__PURE__ */ T({
14
15
  __name: "ButtonTemplateSelector",
15
16
  props: {
16
17
  templates: {
@@ -132,5 +133,5 @@ const R = { class: "" }, oe = /* @__PURE__ */ T({
132
133
  }
133
134
  });
134
135
  export {
135
- oe as default
136
+ le as default
136
137
  };
@@ -1,8 +1,9 @@
1
- import { provide as h, inject as k, ref as r, onMounted as w, createElementBlock as i, openBlock as u, Fragment as B, createCommentVNode as W, createElementVNode as p, unref as S, normalizeClass as T, createVNode as M } from "vue";
1
+ import { provide as h, inject as k, ref as s, onMounted as w, createElementBlock as i, openBlock as u, Fragment as B, createCommentVNode as W, createElementVNode as p, unref as S, normalizeClass as T, createVNode as M } from "vue";
2
2
  import V from "../WABATemplateSelector/WABATemplateSelector.vue.js";
3
3
  import { useMessageDraft as A } from "../../../hooks/useMessageDraft.js";
4
4
  import "../../../hooks/useSearchModel.js";
5
5
  import "../../../hooks/useTheme.js";
6
+ import "../../../hooks/useEmojiNative.js";
6
7
  /* empty css */
7
8
  import q from "../../../_virtual/_plugin-vue_export-helper.js";
8
9
  /* empty css */
@@ -49,7 +50,7 @@ const C = {
49
50
  setup(a, { emit: d }) {
50
51
  const t = a;
51
52
  h("filebumpUrl", t.filebumpUrl);
52
- const m = k("chatAppId"), { getMessage: c } = A(m), f = r(null), e = r(null), y = d, v = () => {
53
+ const m = k("chatAppId"), { getMessage: c } = A(m), f = s(null), e = s(null), y = d, v = () => {
53
54
  t.mode == "click" && t.state == "active" && (e.value.style.display == "none" ? e.value.style.display = "inherit" : e.value.style.display == "inherit" && (e.value.style.display = "none"));
54
55
  }, o = () => {
55
56
  t.mode == "hover" && t.state == "active" && (e.value.style.display = "inherit");
@@ -64,7 +65,7 @@ const C = {
64
65
  const g = (n) => {
65
66
  y("sendWabaValues", n);
66
67
  };
67
- return (n, s) => (u(), i(B, null, [
68
+ return (n, r) => (u(), i(B, null, [
68
69
  S(c)().isRecording ? W("", !0) : (u(), i("button", {
69
70
  key: 0,
70
71
  ref_key: "templateButton",
@@ -73,7 +74,7 @@ const C = {
73
74
  onClick: v,
74
75
  onMouseover: o,
75
76
  onMouseout: l
76
- }, [...s[0] || (s[0] = [
77
+ }, [...r[0] || (r[0] = [
77
78
  p("span", { class: "pi pi-code" }, null, -1)
78
79
  ])], 34)),
79
80
  p("div", {
@@ -93,7 +94,7 @@ const C = {
93
94
  ], 544)
94
95
  ], 64));
95
96
  }
96
- }, J = /* @__PURE__ */ q(C, [["__scopeId", "data-v-e300d7b9"]]);
97
+ }, K = /* @__PURE__ */ q(C, [["__scopeId", "data-v-e300d7b9"]]);
97
98
  export {
98
- J as default
99
+ K as default
99
100
  };