@mobilon-dev/chotto 0.3.33 → 0.3.34

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 (68) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js +2 -2
  3. package/dist/components/1_atoms/ButtonContextMenu/ButtonContextMenu.vue2.js +28 -27
  4. package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +36 -22
  5. package/dist/components/1_icons/SettingsIcon.vue.js +6 -6
  6. package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +164 -156
  7. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +4 -103
  8. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +135 -0
  9. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.js +33 -11
  10. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue2.js +4 -0
  11. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.js +4 -102
  12. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue2.js +135 -0
  13. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.js +21 -18
  14. package/dist/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue2.js +4 -0
  15. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +2 -2
  16. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +89 -55
  17. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.js +17 -14
  18. package/dist/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue2.js +4 -0
  19. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +4 -337
  20. package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +360 -0
  21. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.js +56 -11
  22. package/dist/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue2.js +4 -0
  23. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +2 -2
  24. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +164 -100
  25. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +1 -1
  26. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +184 -134
  27. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
  28. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +1 -1
  29. package/dist/components/3_compounds/ChatList/ChatList.vue.js +101 -91
  30. package/dist/components/3_compounds/SideBar/SideBar.vue.js +68 -67
  31. package/dist/hooks/messages/useChannelAccentColor.js +35 -19
  32. package/dist/themes/dark.css +1 -1
  33. package/dist/themes/default.css +1 -1
  34. package/dist/themes/glass.css +1 -0
  35. package/dist/themes/green.css +1 -1
  36. package/dist/themes/mobilon1.css +1 -1
  37. package/dist/types/apps/data/messages.d.ts +117 -86
  38. package/dist/types/components/1_atoms/ContextMenu/ContextMenu.vue.d.ts +5 -1
  39. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -0
  40. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +2 -0
  41. package/dist/types/components/2_blocks/CommunicationPanel/styles/types.d.ts +4 -0
  42. package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +31 -7
  43. package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/icons/SmilesIcon.vue.d.ts +6 -1
  44. package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/styles/types.d.ts +6 -0
  45. package/dist/types/components/2_chatinput_elements/ButtonTemplateSelector/ButtonTemplateSelector.vue.d.ts +59 -11
  46. package/dist/types/components/2_chatinput_elements/ButtonTemplateSelector/icons/ChatTemplatesIcon.vue.d.ts +6 -1
  47. package/dist/types/components/2_chatinput_elements/FileUploader/icons/FileUploaderIcon.vue.d.ts +6 -1
  48. package/dist/types/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.d.ts +22 -10
  49. package/dist/types/components/2_chatinput_elements/StickerPicker/icons/StickerIcon.vue.d.ts +6 -1
  50. package/dist/types/components/2_chatlist_elements/ChatItem/ChatItem.vue.d.ts +2 -0
  51. package/dist/types/components/2_chatlist_elements/ChatItem/styles/types.d.ts +2 -0
  52. package/dist/types/components/2_elements/ChatInfo/styles/types.d.ts +2 -0
  53. package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +18 -0
  54. package/dist/types/components/2_feed_elements/CallMessage/styles/types.d.ts +24 -0
  55. package/dist/types/components/2_feed_elements/DateMessage/styles/types.d.ts +6 -0
  56. package/dist/types/components/2_feed_elements/DateMessageSticky/styles/types.d.ts +4 -0
  57. package/dist/types/components/2_feed_elements/FeedKeyboard/styles/types.d.ts +2 -0
  58. package/dist/types/components/2_feed_elements/FileMessage/styles/types.d.ts +12 -0
  59. package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +126 -0
  60. package/dist/types/components/2_feed_elements/MessageReactions/styles/types.d.ts +8 -0
  61. package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +16 -0
  62. package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
  63. package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +2 -0
  64. package/dist/types/components/3_compounds/ChatList/styles/types.d.ts +8 -0
  65. package/dist/types/components/3_compounds/SideBar/styles/types.d.ts +6 -16
  66. package/dist/types/components/4_layouts/ChatWrapper/styles/types.d.ts +4 -0
  67. package/dist/types/components/4_layouts/ExtendedLayout/styles/types.d.ts +8 -0
  68. package/package.json +2 -1
@@ -1,14 +1,14 @@
1
- import { ref as d, computed as m, watch as Ee, onMounted as we, onUnmounted as xe, createElementBlock as u, openBlock as o, createElementVNode as l, createCommentVNode as R, Fragment as E, renderList as $, unref as e, normalizeClass as r, createBlock as c, createVNode as Ie, withCtx as H, resolveDynamicComponent as p, normalizeStyle as ee, toDisplayString as h } from "vue";
2
- import q from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
- import { useCommunicationChannels as Se } from "./composables/useCommunicationChannels.js";
4
- import { useCommunicationMenu as ze } from "./composables/useCommunicationMenu.js";
1
+ import { ref as m, computed as p, watch as Re, onMounted as Ee, onUnmounted as xe, createElementBlock as l, openBlock as o, createElementVNode as a, createCommentVNode as r, Fragment as E, renderList as q, unref as e, normalizeClass as c, createBlock as d, createVNode as Se, withCtx as H, resolveDynamicComponent as v, normalizeStyle as te, toDisplayString as f } from "vue";
2
+ import F from "../../1_atoms/Tooltip/Tooltip.vue.js";
3
+ import { useCommunicationChannels as ze } from "./composables/useCommunicationChannels.js";
4
+ import { useCommunicationMenu as _e } from "./composables/useCommunicationMenu.js";
5
5
  import { useCommunicationAttributes as Le } from "./composables/useCommunicationAttributes.js";
6
6
  import { useCommunicationActions as De } from "./composables/useCommunicationActions.js";
7
7
  import { useCommunicationSubMenu as $e } from "./composables/useCommunicationSubMenu.js";
8
- import { useCommunicationDialogSync as He } from "./composables/useCommunicationDialogSync.js";
8
+ import { useCommunicationDialogSync as qe } from "./composables/useCommunicationDialogSync.js";
9
9
  /* empty css */
10
- import qe from "../../../_virtual/_plugin-vue_export-helper.js";
11
- const Fe = ["onClick", "onMouseenter"], Oe = { class: "channel-icon" }, Pe = { class: "channel-icon" }, je = { class: "menu-header" }, Be = { class: "attribute-info" }, Ne = { class: "attribute-value" }, Ve = { class: "attribute-info" }, We = { class: "attribute-value" }, Ue = {
10
+ import He from "../../../_virtual/_plugin-vue_export-helper.js";
11
+ const Fe = ["onClick", "onMouseenter"], Oe = { class: "channel-icon" }, Be = { class: "channel-icon" }, Pe = { class: "menu-header" }, je = { class: "attribute-info" }, Ne = { class: "attribute-value" }, Ve = { class: "attribute-info" }, We = { class: "attribute-value" }, Ue = {
12
12
  key: 2,
13
13
  class: "menu-divider"
14
14
  }, Ge = ["onMouseenter", "onClick"], Je = { class: "attribute-info" }, Ke = { class: "attribute-value" }, Qe = { class: "menu-icon" }, Xe = {
@@ -41,157 +41,162 @@ const Fe = ["onClick", "onMouseenter"], Oe = { class: "channel-icon" }, Pe = { c
41
41
  type: Object,
42
42
  required: !1,
43
43
  default: () => ({})
44
+ },
45
+ showChannelIcons: {
46
+ type: Boolean,
47
+ required: !1,
48
+ default: !1
44
49
  }
45
50
  },
46
51
  emits: ["select-attribute-channel", "phone-call"],
47
- setup(te, { emit: ne }) {
48
- const a = te, oe = ne, f = d(null), F = d(null), w = d(null), x = d(null), v = d(!1), C = d(null), I = d({}), S = m(() => a.channels ?? []), se = m(() => a.channelTooltips ?? {}), {
52
+ setup(h, { emit: ne }) {
53
+ const u = h, oe = ne, y = m(null), O = m(null), x = m(null), S = m(null), b = m(!1), M = m(null), z = m({}), _ = p(() => u.channels ?? []), se = p(() => u.channelTooltips ?? {}), {
49
54
  channelsTypes: le,
50
55
  getTooltipText: ie,
51
- getChannelTypeFromId: ue,
52
- hasMultipleChannels: y,
53
- isChannelActive: M,
54
- getSingleChannelForType: ae,
55
- getMenuChannelIconComponent: O,
56
+ getChannelTypeFromId: ae,
57
+ hasMultipleChannels: A,
58
+ isChannelActive: k,
59
+ getSingleChannelForType: ue,
60
+ getMenuChannelIconComponent: B,
56
61
  getMenuChannelIconComponentForChannelId: re,
57
62
  getSingleMenuChannelIconComponent: ce,
58
63
  getAvailableChannels: de
59
- } = Se({
60
- channels: S,
64
+ } = ze({
65
+ channels: _,
61
66
  channelTooltips: se,
62
- selectedChannelType: C
67
+ selectedChannelType: M
63
68
  }), {
64
69
  activeChannelType: s,
65
- hoveredChannel: A,
70
+ hoveredChannel: g,
66
71
  showMenu: me,
67
- showSubMenu: z,
72
+ showSubMenu: L,
68
73
  menuWidth: pe,
69
- updateMenuWidth: L,
74
+ updateMenuWidth: D,
70
75
  handleChannelClick: ve,
71
- closeMenu: be,
76
+ closeMenu: he,
72
77
  handleClickOutside: P
73
- } = ze({
74
- panelRef: f,
75
- channelsPanelRef: F,
76
- selectedChannelType: C,
77
- frozenAttribute: x,
78
- isRecentAttributeHovered: v
79
- }), he = m(() => a.contactAttributes ?? []), j = m(() => a.recentAttributeChannels ?? {}), {
80
- organizedContactAttributes: B,
81
- organizeContactAttributes: fe,
82
- recentAttribute: k,
83
- showRecentAttribute: D,
84
- isAttributeFrozen: Ce
78
+ } = _e({
79
+ panelRef: y,
80
+ channelsPanelRef: O,
81
+ selectedChannelType: M,
82
+ frozenAttribute: S,
83
+ isRecentAttributeHovered: b
84
+ }), be = p(() => u.contactAttributes ?? []), j = p(() => u.recentAttributeChannels ?? {}), {
85
+ organizedContactAttributes: N,
86
+ organizeContactAttributes: Ce,
87
+ recentAttribute: T,
88
+ showRecentAttribute: $,
89
+ isAttributeFrozen: fe
85
90
  } = Le({
86
- contactAttributes: he,
91
+ contactAttributes: be,
87
92
  recentAttributeChannels: j,
88
93
  activeChannelType: s,
89
- frozenAttribute: x
94
+ frozenAttribute: S
90
95
  }), {
91
- handleRecentAttributeClick: N,
96
+ handleRecentAttributeClick: V,
92
97
  handleAttributeClick: ye,
93
98
  selectChannel: Me,
94
99
  availableChannels: Ae
95
100
  } = De({
96
101
  activeChannelType: s,
97
- channels: S,
102
+ channels: _,
98
103
  recentAttributeChannels: j,
99
- selectedChannel: I,
100
- selectedChannelType: C,
101
- isRecentAttributeHovered: v,
102
- hoveredAttribute: w,
103
- closeMenu: be,
104
- hasMultipleChannels: y,
105
- getSingleChannelForType: ae,
104
+ selectedChannel: z,
105
+ selectedChannelType: M,
106
+ isRecentAttributeHovered: b,
107
+ hoveredAttribute: x,
108
+ closeMenu: he,
109
+ hasMultipleChannels: A,
110
+ getSingleChannelForType: ue,
106
111
  getAvailableChannels: de,
107
112
  emit: oe
108
113
  }), {
109
114
  subMenuTop: ke,
110
- resetRegularAttributeHover: g,
115
+ resetRegularAttributeHover: w,
111
116
  handleRecentAttributeMouseEnter: ge,
112
- handleRecentAttributeMouseLeave: _,
113
- handleAttributeMouseEnter: _e,
114
- handleAttributeMouseLeave: V,
115
- keepSubMenuOpen: W,
116
- closeSubMenu: U,
117
- alignSubMenuWithTarget: G
117
+ handleRecentAttributeMouseLeave: I,
118
+ handleAttributeMouseEnter: Te,
119
+ handleAttributeMouseLeave: W,
120
+ keepSubMenuOpen: U,
121
+ closeSubMenu: G,
122
+ alignSubMenuWithTarget: J
118
123
  } = $e({
119
124
  activeChannelType: s,
120
- showSubMenu: z,
121
- frozenAttribute: x,
122
- hoveredAttribute: w,
123
- isRecentAttributeHovered: v,
124
- hasMultipleChannels: y
125
+ showSubMenu: L,
126
+ frozenAttribute: S,
127
+ hoveredAttribute: x,
128
+ isRecentAttributeHovered: b,
129
+ hasMultipleChannels: A
125
130
  });
126
- He({
127
- selectedChannelType: C,
128
- selectedChannel: I,
129
- channels: S,
130
- selectedDialog: m(() => a.selectedDialog ?? null)
131
+ qe({
132
+ selectedChannelType: M,
133
+ selectedChannel: z,
134
+ channels: _,
135
+ selectedDialog: p(() => u.selectedDialog ?? null)
131
136
  });
132
- const J = m(
137
+ const K = p(
133
138
  () => Ae()
134
- ), Te = m(
135
- () => z.value && w.value && J.value.length > 0 && s.value !== "phone" && y(s.value)
136
- ), K = (T) => {
137
- const n = ge(T.currentTarget);
138
- n instanceof HTMLElement && G(f, n);
139
- }, Re = (T, n) => {
140
- const b = _e(T, n.currentTarget);
141
- b instanceof HTMLElement && G(f, b);
139
+ ), we = p(
140
+ () => L.value && x.value && K.value.length > 0 && s.value !== "phone" && A(s.value)
141
+ ), Q = (R) => {
142
+ const n = ge(R.currentTarget);
143
+ n instanceof HTMLElement && J(y, n);
144
+ }, Ie = (R, n) => {
145
+ const C = Te(R, n.currentTarget);
146
+ C instanceof HTMLElement && J(y, C);
142
147
  };
143
- return Ee(() => a.selectedDialog, () => {
144
- }, { deep: !0 }), we(() => {
145
- L(), window.addEventListener("resize", L), document.addEventListener("click", P), fe();
148
+ return Re(() => u.selectedDialog, () => {
149
+ }, { deep: !0 }), Ee(() => {
150
+ D(), window.addEventListener("resize", D), document.addEventListener("click", P), Ce();
146
151
  }), xe(() => {
147
- window.removeEventListener("resize", L), document.removeEventListener("click", P);
148
- }), (T, n) => {
149
- var b, Q, X, Y;
150
- return o(), u("div", {
152
+ window.removeEventListener("resize", D), document.removeEventListener("click", P);
153
+ }), (R, n) => {
154
+ var C, X, Y, Z;
155
+ return o(), l("div", {
151
156
  ref_key: "panelRef",
152
- ref: f,
157
+ ref: y,
153
158
  class: "communication-panel"
154
159
  }, [
155
- l("div", {
160
+ a("div", {
156
161
  ref_key: "channelsPanelRef",
157
- ref: F,
162
+ ref: O,
158
163
  class: "channels-panel"
159
164
  }, [
160
- (o(!0), u(E, null, $(e(le), (t) => {
165
+ (o(!0), l(E, null, q(e(le), (t) => {
161
166
  var i;
162
- return o(), u("button", {
167
+ return o(), l("button", {
163
168
  key: t.type,
164
- class: r(["channel-btn", {
165
- active: e(M)(t.type),
166
- hover: e(A) === t.type && !e(M)(t.type) || e(A) === t.type && e(M)(t.type)
169
+ class: c(["channel-btn", {
170
+ active: e(k)(t.type),
171
+ hover: e(g) === t.type && !e(k)(t.type) || e(g) === t.type && e(k)(t.type)
167
172
  }]),
168
- onClick: (Z) => e(ve)(t.type),
169
- onMouseenter: (Z) => A.value = t.type,
170
- onMouseleave: n[0] || (n[0] = (Z) => A.value = null)
173
+ onClick: (ee) => e(ve)(t.type),
174
+ onMouseenter: (ee) => g.value = t.type,
175
+ onMouseleave: n[0] || (n[0] = (ee) => g.value = null)
171
176
  }, [
172
- e(M)(t.type) ? (o(), u(E, { key: 0 }, [
173
- Ie(q, {
174
- text: (i = I.value) == null ? void 0 : i.title,
177
+ e(k)(t.type) ? (o(), l(E, { key: 0 }, [
178
+ Se(F, {
179
+ text: (i = z.value) == null ? void 0 : i.title,
175
180
  position: "bottom",
176
181
  offset: 8
177
182
  }, {
178
183
  default: H(() => [
179
- l("span", Oe, [
180
- (o(), c(p(t.component)))
184
+ a("span", Oe, [
185
+ (o(), d(v(t.component)))
181
186
  ])
182
187
  ]),
183
188
  _: 2
184
189
  }, 1032, ["text"]),
185
- n[12] || (n[12] = l("span", { class: "active-indicator" }, null, -1))
186
- ], 64)) : (o(), c(q, {
190
+ n[12] || (n[12] = a("span", { class: "active-indicator" }, null, -1))
191
+ ], 64)) : (o(), d(F, {
187
192
  key: 1,
188
193
  text: e(ie)(t.type),
189
194
  position: "bottom",
190
195
  offset: 8
191
196
  }, {
192
197
  default: H(() => [
193
- l("span", Pe, [
194
- (o(), c(p(t.component)))
198
+ a("span", Be, [
199
+ (o(), d(v(t.component)))
195
200
  ])
196
201
  ]),
197
202
  _: 2
@@ -199,109 +204,112 @@ const Fe = ["onClick", "onMouseenter"], Oe = { class: "channel-icon" }, Pe = { c
199
204
  ], 42, Fe);
200
205
  }), 128))
201
206
  ], 512),
202
- e(me) && e(s) ? (o(), u("div", {
207
+ e(me) && e(s) ? (o(), l("div", {
203
208
  key: 0,
204
209
  class: "attributes-menu",
205
- style: ee({ width: e(pe) })
210
+ style: te({ width: e(pe) })
206
211
  }, [
207
- l("div", je, h(e(s) === "phone" ? "Телефон" : "Недавний"), 1),
208
- e(D) && ((b = a.recentAttributeChannels[e(s)]) != null && b.tooltip) ? (o(), c(q, {
212
+ a("div", Pe, f(e(s) === "phone" ? "Телефон" : "Недавний"), 1),
213
+ e($) && ((C = u.recentAttributeChannels[e(s)]) != null && C.tooltip) ? (o(), d(F, {
209
214
  key: 0,
210
- text: (Q = a.recentAttributeChannels[e(s)]) == null ? void 0 : Q.tooltip,
215
+ text: (X = u.recentAttributeChannels[e(s)]) == null ? void 0 : X.tooltip,
211
216
  position: "bottom",
212
217
  offset: 8
213
218
  }, {
214
219
  default: H(() => {
215
220
  var t;
216
221
  return [
217
- l("div", {
218
- class: r(["recent-attribute", {
219
- "frozen-hover": v.value
222
+ a("div", {
223
+ class: c(["recent-attribute", {
224
+ "frozen-hover": b.value
220
225
  }]),
221
- onMouseenter: n[1] || (n[1] = (i) => K(i)),
222
- onMouseleave: n[2] || (n[2] = (...i) => e(_) && e(_)(...i)),
223
- onMouseover: n[3] || (n[3] = (...i) => e(g) && e(g)(...i)),
224
- onClick: n[4] || (n[4] = (i) => e(N)(e(k)))
226
+ onMouseenter: n[1] || (n[1] = (i) => Q(i)),
227
+ onMouseleave: n[2] || (n[2] = (...i) => e(I) && e(I)(...i)),
228
+ onMouseover: n[3] || (n[3] = (...i) => e(w) && e(w)(...i)),
229
+ onClick: n[4] || (n[4] = (i) => e(V)(e(T)))
225
230
  }, [
226
- l("div", Be, [
227
- l("span", Ne, h((t = e(k)) == null ? void 0 : t.value), 1)
231
+ a("div", je, [
232
+ a("span", Ne, f((t = e(T)) == null ? void 0 : t.value), 1)
228
233
  ]),
229
- l("span", {
230
- class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
234
+ h.showChannelIcons ? (o(), l("span", {
235
+ key: 0,
236
+ class: c(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
231
237
  }, [
232
- (o(), c(p(e(O)(e(s)))))
233
- ], 2)
238
+ (o(), d(v(e(B)(e(s)))))
239
+ ], 2)) : r("", !0)
234
240
  ], 34)
235
241
  ];
236
242
  }),
237
243
  _: 1
238
- }, 8, ["text"])) : e(D) ? (o(), u("div", {
244
+ }, 8, ["text"])) : e($) ? (o(), l("div", {
239
245
  key: 1,
240
- class: r(["recent-attribute", {
241
- "frozen-hover": v.value
246
+ class: c(["recent-attribute", {
247
+ "frozen-hover": b.value
242
248
  }]),
243
- onMouseenter: n[5] || (n[5] = (t) => K(t)),
244
- onMouseleave: n[6] || (n[6] = (...t) => e(_) && e(_)(...t)),
245
- onMouseover: n[7] || (n[7] = (...t) => e(g) && e(g)(...t)),
246
- onClick: n[8] || (n[8] = (t) => e(N)(e(k)))
249
+ onMouseenter: n[5] || (n[5] = (t) => Q(t)),
250
+ onMouseleave: n[6] || (n[6] = (...t) => e(I) && e(I)(...t)),
251
+ onMouseover: n[7] || (n[7] = (...t) => e(w) && e(w)(...t)),
252
+ onClick: n[8] || (n[8] = (t) => e(V)(e(T)))
247
253
  }, [
248
- l("div", Ve, [
249
- l("span", We, h((X = e(k)) == null ? void 0 : X.value), 1)
254
+ a("div", Ve, [
255
+ a("span", We, f((Y = e(T)) == null ? void 0 : Y.value), 1)
250
256
  ]),
251
- l("span", {
252
- class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
257
+ h.showChannelIcons ? (o(), l("span", {
258
+ key: 0,
259
+ class: c(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
253
260
  }, [
254
- (o(), c(p(e(O)(e(s)))))
255
- ], 2)
256
- ], 34)) : R("", !0),
257
- e(D) && ((Y = e(B)[e(s)]) != null && Y.length) && e(s) !== "phone" ? (o(), u("div", Ue)) : R("", !0),
258
- (o(!0), u(E, null, $(e(B)[e(s)], (t) => (o(), u("div", {
261
+ (o(), d(v(e(B)(e(s)))))
262
+ ], 2)) : r("", !0)
263
+ ], 34)) : r("", !0),
264
+ e($) && ((Z = e(N)[e(s)]) != null && Z.length) && e(s) !== "phone" ? (o(), l("div", Ue)) : r("", !0),
265
+ (o(!0), l(E, null, q(e(N)[e(s)], (t) => (o(), l("div", {
259
266
  key: t.attributeId,
260
- class: r(["attribute-item", {
261
- "frozen-hover": e(Ce)(t)
267
+ class: c(["attribute-item", {
268
+ "frozen-hover": e(fe)(t)
262
269
  }]),
263
- onMouseenter: (i) => Re(t, i),
264
- onMouseleave: n[9] || (n[9] = (...i) => e(V) && e(V)(...i)),
270
+ onMouseenter: (i) => Ie(t, i),
271
+ onMouseleave: n[9] || (n[9] = (...i) => e(W) && e(W)(...i)),
265
272
  onClick: (i) => e(ye)(t)
266
273
  }, [
267
- l("div", Je, [
268
- l("span", Ke, h(t.value), 1)
274
+ a("div", Je, [
275
+ a("span", Ke, f(t.value), 1)
269
276
  ]),
270
- l("span", Qe, [
271
- e(y)(e(s)) ? (o(), u("span", Xe)) : (o(), u("span", {
277
+ a("span", Qe, [
278
+ e(A)(e(s)) ? (o(), l("span", Xe)) : h.showChannelIcons ? (o(), l("span", {
272
279
  key: 1,
273
- class: r(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
280
+ class: c(["channel-icon-small", { "menu-icon-grey": e(s) !== "sms" }])
274
281
  }, [
275
- (o(), c(p(e(ce)(e(s)))))
276
- ], 2))
282
+ (o(), d(v(e(ce)(e(s)))))
283
+ ], 2)) : r("", !0)
277
284
  ])
278
285
  ], 42, Ge))), 128)),
279
- e(z) && Te.value ? (o(), u("div", {
286
+ e(L) && we.value ? (o(), l("div", {
280
287
  key: 3,
281
288
  class: "sub-menu left",
282
- style: ee({ top: e(ke) + "px" }),
283
- onMouseenter: n[10] || (n[10] = (...t) => e(W) && e(W)(...t)),
284
- onMouseleave: n[11] || (n[11] = (...t) => e(U) && e(U)(...t))
289
+ style: te({ top: e(ke) + "px" }),
290
+ onMouseenter: n[10] || (n[10] = (...t) => e(U) && e(U)(...t)),
291
+ onMouseleave: n[11] || (n[11] = (...t) => e(G) && e(G)(...t))
285
292
  }, [
286
- n[13] || (n[13] = l("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
287
- (o(!0), u(E, null, $(J.value, (t) => (o(), u("div", {
293
+ n[13] || (n[13] = a("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
294
+ (o(!0), l(E, null, q(K.value, (t) => (o(), l("div", {
288
295
  key: t.channelId,
289
296
  class: "sub-menu-item",
290
297
  onClick: (i) => e(Me)(t.channelId)
291
298
  }, [
292
- l("span", Ze, h(t.title || t.channelId), 1),
293
- l("span", {
294
- class: r(["sub-menu-icon", { "menu-icon-grey": e(ue)(t.channelId) !== "sms" }])
299
+ a("span", Ze, f(t.title || t.channelId), 1),
300
+ h.showChannelIcons ? (o(), l("span", {
301
+ key: 0,
302
+ class: c(["sub-menu-icon", { "menu-icon-grey": e(ae)(t.channelId) !== "sms" }])
295
303
  }, [
296
- (o(), c(p(e(re)(t.channelId))))
297
- ], 2)
304
+ (o(), d(v(e(re)(t.channelId))))
305
+ ], 2)) : r("", !0)
298
306
  ], 8, Ye))), 128))
299
- ], 36)) : R("", !0)
300
- ], 4)) : R("", !0)
307
+ ], 36)) : r("", !0)
308
+ ], 4)) : r("", !0)
301
309
  ], 512);
302
310
  };
303
311
  }
304
- }, dt = /* @__PURE__ */ qe(et, [["__scopeId", "data-v-074734c8"]]);
312
+ }, dt = /* @__PURE__ */ He(et, [["__scopeId", "data-v-06f38e2d"]]);
305
313
  export {
306
314
  dt as default
307
315
  };
@@ -1,106 +1,7 @@
1
- import { ref as r, inject as S, onMounted as T, onUnmounted as I, createElementBlock as g, openBlock as M, Fragment as L, createCommentVNode as V, createVNode as m, unref as d, normalizeClass as w, createElementVNode as j, Transition as A, withCtx as D, withDirectives as N, vShow as O } from "vue";
2
- import z from "../../../node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js";
3
- /* empty css */
4
- import { useMessageDraft as F } from "../../../hooks/useMessageDraft.js";
5
- import "../../../hooks/useSearchModel.js";
6
- import "../../../hooks/useTheme.js";
7
- /* empty css */
8
- import R from "../../../_virtual/_plugin-vue_export-helper.js";
9
- /* empty css */
10
- import "../../../node_modules/linkifyjs/dist/linkify.js";
11
- import "../../../functions/parseMarkdown.js";
12
- import U from "./icons/SmilesIcon.vue.js";
1
+ import o from "./ButtonEmojiPicker.vue2.js";
13
2
  /* empty css */
14
- const q = {
15
- __name: "ButtonEmojiPicker",
16
- props: {
17
- state: {
18
- type: String,
19
- default: "active"
20
- },
21
- mode: {
22
- type: String,
23
- default: "click",
24
- // или 'hover'
25
- validator: (i) => ["click", "hover"].includes(i)
26
- },
27
- native: {
28
- type: Boolean,
29
- default: !0
30
- }
31
- },
32
- setup(i) {
33
- const t = i, c = r(null), l = r(null), o = r(!1), v = r("light"), f = S("chatAppId"), { setMessageText: E, getMessage: p } = F(f);
34
- let n = !1, a = !1;
35
- const b = () => {
36
- var u;
37
- const e = document.getElementById(f);
38
- return (u = e == null ? void 0 : e.getAttribute("data-theme")) != null && u.includes("dark") ? "dark" : "light";
39
- }, B = (e) => {
40
- E(p().text + e.i), t.mode === "click" && (o.value = !1);
41
- }, k = () => {
42
- t.state === "active" && (v.value = b(), o.value = !0);
43
- }, s = () => {
44
- o.value = !1;
45
- }, P = () => {
46
- t.mode === "click" && (o.value = !o.value, o.value && k());
47
- }, _ = () => {
48
- t.mode === "hover" && (n = !0, k());
49
- }, y = () => {
50
- t.mode === "hover" && (n = !1, setTimeout(() => {
51
- !a && !n && s();
52
- }, 150));
53
- }, x = () => {
54
- t.mode === "hover" && (a = !0);
55
- }, C = () => {
56
- t.mode === "hover" && (a = !1, setTimeout(() => {
57
- !n && !a && s();
58
- }, 150));
59
- }, h = (e) => {
60
- t.mode === "click" && o.value && l.value && c.value && !l.value.contains(e.target) && !c.value.contains(e.target) && s();
61
- };
62
- return T(() => {
63
- document.addEventListener("click", h);
64
- }), I(() => {
65
- document.removeEventListener("click", h);
66
- }), (e, u) => (M(), g(L, null, [
67
- d(p)().isRecording ? V("", !0) : (M(), g("button", {
68
- key: 0,
69
- ref_key: "emojiButton",
70
- ref: l,
71
- class: w(["button", { "button-disabled": i.state === "disabled" }]),
72
- onClick: P,
73
- onMouseenter: _,
74
- onMouseleave: y
75
- }, [
76
- j("span", null, [
77
- m(d(U))
78
- ])
79
- ], 34)),
80
- m(A, null, {
81
- default: D(() => [
82
- N(j("div", {
83
- ref_key: "emoji",
84
- ref: c,
85
- class: "emoji",
86
- onMouseenter: x,
87
- onMouseleave: C
88
- }, [
89
- m(d(z), {
90
- native: i.native,
91
- theme: v.value,
92
- "picker-type": "",
93
- onSelect: B
94
- }, null, 8, ["native", "theme"])
95
- ], 544), [
96
- [O, o.value]
97
- ])
98
- ]),
99
- _: 1
100
- })
101
- ], 64));
102
- }
103
- }, ie = /* @__PURE__ */ R(q, [["__scopeId", "data-v-5bb0871b"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bce30537"]]);
104
5
  export {
105
- ie as default
6
+ e as default
106
7
  };