@mobilon-dev/chotto 0.3.125 → 0.3.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chotto.css +1 -1
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +51 -51
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +52 -50
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +2 -2
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +41 -31
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +2 -2
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +51 -30
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +286 -270
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +40 -34
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +1 -1
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +282 -259
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +79 -59
- package/dist/functions/parseMarkdown.js +7 -6
- package/dist/hooks/messages/useImageFeedSrc.js +50 -0
- package/dist/index.js +118 -113
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/src/components/2_feed_elements/ImageMessage/stories/ImageMessage.stories.d.ts +2 -0
- package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +3 -0
- package/dist/types/src/components/4_layouts/ChatWrapper/styles/types.d.ts +4 -0
- package/dist/types/src/hooks/messages/index.d.ts +1 -0
- package/dist/types/src/hooks/messages/useImageFeedSrc.d.ts +29 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as v, unref as n, Fragment as _, renderList as te, normalizeClass as k, createBlock as
|
|
1
|
+
import { ref as m, computed as a, watch as z, onMounted as ct, onUnmounted as dt, createElementBlock as u, openBlock as l, createCommentVNode as v, unref as n, Fragment as _, renderList as te, normalizeClass as k, createBlock as y, createVNode as ne, createElementVNode as c, withCtx as oe, resolveDynamicComponent as w, toDisplayString as F, normalizeStyle as ft, nextTick as le } from "vue";
|
|
2
2
|
import se from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
3
3
|
import { useCommunicationChannels as pt } from "./composables/useCommunicationChannels.js";
|
|
4
4
|
import { useCommunicationMenu as mt } from "./composables/useCommunicationMenu.js";
|
|
5
|
-
import { useCommunicationAttributes as vt, isAttributeBlocked as
|
|
6
|
-
import { useCommunicationActions as
|
|
5
|
+
import { useCommunicationAttributes as vt, isAttributeBlocked as yt, getAttributeStatusClass as Re, isAttributeConfirming as xe, getSubMenuChannelIndicatorType as ht, getSubMenuChannelIndicatorClass as bt } from "./composables/useCommunicationAttributes.js";
|
|
6
|
+
import { useCommunicationActions as Ct } from "./composables/useCommunicationActions.js";
|
|
7
7
|
import { useCommunicationSubMenu as gt } from "./composables/useCommunicationSubMenu.js";
|
|
8
8
|
import { useCommunicationDialogSync as kt } from "./composables/useCommunicationDialogSync.js";
|
|
9
9
|
import { useCommunicationPlaceholder as It } from "./composables/useCommunicationPlaceholder.js";
|
|
@@ -139,10 +139,10 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
139
139
|
"phone-call",
|
|
140
140
|
"reset-blocked-attributes"
|
|
141
141
|
],
|
|
142
|
-
setup(
|
|
143
|
-
const i =
|
|
142
|
+
setup(h, { expose: Oe, emit: Pe }) {
|
|
143
|
+
const i = h, ae = Pe, L = m(null), Be = m(null), D = m(null), R = m(null), T = m(null), U = m({}), V = m(null), A = m(!1), x = m(null), b = m(null), q = m(null), C = a(
|
|
144
144
|
() => i.confirmingAttributeId ?? q.value
|
|
145
|
-
), W = a(() => i.blockedAttributeIds ?? []), M = (e) =>
|
|
145
|
+
), W = a(() => i.blockedAttributeIds ?? []), M = (e) => yt(e, W.value), H = a(() => i.channels ?? []), Ne = a(() => i.channelOrder), Ee = a(() => i.visibleChannelTypes), $e = a(() => i.channelTooltips ?? {}), je = a(() => i.attributeTooltips ?? {}), ie = a(() => i.attributeIndicatorTooltips ?? {}), ue = a(() => i.recentAttributeChannels ?? {}), re = a(() => i.messages ?? []), ze = a(() => i.selectedChat ?? null), ce = a(() => i.isNewDialog ?? !1), de = a(() => {
|
|
146
146
|
var e;
|
|
147
147
|
return ((e = i.selectedDialog) == null ? void 0 : e.channelId) ?? null;
|
|
148
148
|
}), O = (e, o) => {
|
|
@@ -189,7 +189,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
189
189
|
closeMenu: N,
|
|
190
190
|
pinMenuOpen: Qe,
|
|
191
191
|
armOutsideClickSuppression: Xe,
|
|
192
|
-
handleClickOutside:
|
|
192
|
+
handleClickOutside: ye
|
|
193
193
|
} = mt({
|
|
194
194
|
panelRef: L,
|
|
195
195
|
selectedChannelType: T,
|
|
@@ -197,14 +197,14 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
197
197
|
}), J = a(() => {
|
|
198
198
|
var e;
|
|
199
199
|
return ((e = i.selectedDialog) == null ? void 0 : e.attributeId) ?? null;
|
|
200
|
-
}),
|
|
200
|
+
}), he = a(() => {
|
|
201
201
|
if (!g.value || !r.value)
|
|
202
202
|
return null;
|
|
203
203
|
const e = V.value;
|
|
204
204
|
return e && e.channelType === r.value ? e : null;
|
|
205
205
|
}), K = (e) => {
|
|
206
206
|
var De;
|
|
207
|
-
const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), d =
|
|
207
|
+
const o = typeof e == "string" ? e : e == null ? void 0 : e.channelId, t = typeof e == "object" && e != null ? e.backendChannelId : void 0, s = (p, ee) => !p || !ee ? !1 : !!(p === ee || t && (p === t || ee === t)), d = he.value;
|
|
208
208
|
if (d != null && d.channelId && s(d.channelId, o))
|
|
209
209
|
return !0;
|
|
210
210
|
const f = r.value, I = Q.value;
|
|
@@ -215,24 +215,24 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
215
215
|
}
|
|
216
216
|
return g.value && f && I && J.value && O(I, J.value) && s(de.value, o) ? !0 : s(de.value, o);
|
|
217
217
|
}, E = (e) => {
|
|
218
|
-
const o =
|
|
218
|
+
const o = he.value;
|
|
219
219
|
return o != null && o.attributeId ? O(e, o.attributeId) : O(e, J.value);
|
|
220
|
-
}, Q = a(() => D.value ?? R.value ?? null),
|
|
220
|
+
}, Q = a(() => D.value ?? R.value ?? null), be = (e) => {
|
|
221
221
|
const o = e == null ? void 0 : e.backendChannelId;
|
|
222
222
|
return o ? [o] : [];
|
|
223
|
-
}, X = (e) =>
|
|
223
|
+
}, X = (e) => ht(
|
|
224
224
|
Q.value,
|
|
225
225
|
e.channelId,
|
|
226
226
|
K(e),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
), Ye = (e) =>
|
|
227
|
+
C.value,
|
|
228
|
+
be(e)
|
|
229
|
+
), Ye = (e) => bt(
|
|
230
230
|
Q.value,
|
|
231
231
|
e.channelId,
|
|
232
232
|
K(e),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
) ?? "", Y = a(() => i.contactAttributes ?? []),
|
|
233
|
+
C.value,
|
|
234
|
+
be(e)
|
|
235
|
+
) ?? "", Y = a(() => i.contactAttributes ?? []), Ce = (e) => {
|
|
236
236
|
var d;
|
|
237
237
|
if (!e || !re.value) return !0;
|
|
238
238
|
const o = (d = ze.value) == null ? void 0 : d.chatId;
|
|
@@ -246,14 +246,14 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
246
246
|
) : !0;
|
|
247
247
|
}, ge = () => {
|
|
248
248
|
$(), A.value = !0, le(() => {
|
|
249
|
-
const e = Array.isArray(
|
|
249
|
+
const e = Array.isArray(b.value) ? b.value[0] : b.value;
|
|
250
250
|
e && typeof e.startAutoShow == "function" ? e.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
|
|
251
251
|
}), x.value = setTimeout(() => {
|
|
252
252
|
A.value = !1;
|
|
253
253
|
}, 5e3);
|
|
254
254
|
}, $ = () => {
|
|
255
|
-
if (x.value && (clearTimeout(x.value), x.value = null),
|
|
256
|
-
const e = Array.isArray(
|
|
255
|
+
if (x.value && (clearTimeout(x.value), x.value = null), b.value) {
|
|
256
|
+
const e = Array.isArray(b.value) ? b.value[0] : b.value;
|
|
257
257
|
e && typeof e.clearAutoTimer == "function" && e.clearAutoTimer();
|
|
258
258
|
}
|
|
259
259
|
A.value = !1;
|
|
@@ -271,7 +271,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
271
271
|
availableChannels: nt,
|
|
272
272
|
applyRecentChannelButtonSelection: ot,
|
|
273
273
|
clearPanelPendingSelection: Ie
|
|
274
|
-
} =
|
|
274
|
+
} = Ct({
|
|
275
275
|
activeChannelType: r,
|
|
276
276
|
channels: H,
|
|
277
277
|
selectedChannel: U,
|
|
@@ -284,7 +284,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
284
284
|
hasMultipleChannels: S,
|
|
285
285
|
getSingleChannelForType: We,
|
|
286
286
|
getAvailableChannels: ve,
|
|
287
|
-
isChannelEmpty:
|
|
287
|
+
isChannelEmpty: Ce,
|
|
288
288
|
isNewDialog: ce,
|
|
289
289
|
showDefaultChannelTooltipWithTimer: ge,
|
|
290
290
|
clearDefaultChannelTooltip: $,
|
|
@@ -302,7 +302,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
302
302
|
showSubMenu: G,
|
|
303
303
|
frozenAttribute: R,
|
|
304
304
|
hoveredAttribute: D,
|
|
305
|
-
confirmingAttributeId:
|
|
305
|
+
confirmingAttributeId: C,
|
|
306
306
|
retainOpenUntilDismiss: Ge,
|
|
307
307
|
hasMultipleChannels: S,
|
|
308
308
|
isAttributeBlocked: M
|
|
@@ -330,7 +330,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
330
330
|
selectedChannel: U,
|
|
331
331
|
channels: H,
|
|
332
332
|
selectedDialog: a(() => i.selectedDialog ?? null),
|
|
333
|
-
isChannelEmpty:
|
|
333
|
+
isChannelEmpty: Ce,
|
|
334
334
|
isNewDialog: ce,
|
|
335
335
|
showDefaultChannelTooltipWithTimer: ge,
|
|
336
336
|
clearDefaultChannelTooltip: $
|
|
@@ -347,7 +347,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
347
347
|
}), _e = a(
|
|
348
348
|
() => nt()
|
|
349
349
|
), rt = a(
|
|
350
|
-
() => G.value && D.value && _e.value.length > 0 &&
|
|
350
|
+
() => G.value && D.value && _e.value.length > 0 && S(r.value)
|
|
351
351
|
), we = async (e, o) => {
|
|
352
352
|
const t = st(e, o.currentTarget);
|
|
353
353
|
await le(), t instanceof HTMLElement && at(L, t);
|
|
@@ -355,7 +355,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
355
355
|
return z(() => i.confirmingAttributeId, (e, o) => {
|
|
356
356
|
e || (q.value = null, o && Xe());
|
|
357
357
|
}), z(Y, () => {
|
|
358
|
-
const e =
|
|
358
|
+
const e = C.value;
|
|
359
359
|
if (!e)
|
|
360
360
|
return;
|
|
361
361
|
const o = Y.value.find((t) => t.id === e);
|
|
@@ -363,9 +363,9 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
363
363
|
}, { deep: !0 }), z(() => i.selectedDialog, () => {
|
|
364
364
|
Ie();
|
|
365
365
|
}, { deep: !0 }), ct(() => {
|
|
366
|
-
document.addEventListener("click",
|
|
366
|
+
document.addEventListener("click", ye), Ze();
|
|
367
367
|
}), dt(() => {
|
|
368
|
-
document.removeEventListener("click",
|
|
368
|
+
document.removeEventListener("click", ye), $();
|
|
369
369
|
}), Oe({
|
|
370
370
|
/** Снять pin и закрыть оба меню (вызывать с host при ОК на splash). */
|
|
371
371
|
closeMenu: N
|
|
@@ -398,35 +398,35 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
398
398
|
ne(se, {
|
|
399
399
|
ref_for: !0,
|
|
400
400
|
ref: (d) => {
|
|
401
|
-
d && (
|
|
401
|
+
d && (b.value = d);
|
|
402
402
|
},
|
|
403
403
|
text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = U.value) == null ? void 0 : s.title,
|
|
404
404
|
position: "bottom-left",
|
|
405
405
|
offset: 8,
|
|
406
|
-
delay:
|
|
406
|
+
delay: h.tooltipDelay,
|
|
407
407
|
"hide-on-click": "",
|
|
408
408
|
trigger: A.value ? "auto" : "hover",
|
|
409
409
|
"auto-show-duration": A.value ? 5e3 : 0
|
|
410
410
|
}, {
|
|
411
411
|
default: oe(() => [
|
|
412
412
|
c("span", wt, [
|
|
413
|
-
(l(),
|
|
413
|
+
(l(), y(w(t.component)))
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
416
|
_: 2
|
|
417
417
|
}, 1032, ["text", "delay", "trigger", "auto-show-duration"]),
|
|
418
418
|
o[5] || (o[5] = c("span", { class: "active-indicator" }, null, -1))
|
|
419
|
-
], 64)) : (l(),
|
|
419
|
+
], 64)) : (l(), y(se, {
|
|
420
420
|
key: 1,
|
|
421
421
|
text: n(Ue)(t.type),
|
|
422
422
|
position: "bottom-left",
|
|
423
423
|
offset: 8,
|
|
424
|
-
delay:
|
|
424
|
+
delay: h.tooltipDelay,
|
|
425
425
|
"hide-on-click": ""
|
|
426
426
|
}, {
|
|
427
427
|
default: oe(() => [
|
|
428
428
|
c("span", Dt, [
|
|
429
|
-
(l(),
|
|
429
|
+
(l(), y(w(t.component)))
|
|
430
430
|
])
|
|
431
431
|
]),
|
|
432
432
|
_: 2
|
|
@@ -439,12 +439,12 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
439
439
|
n(Se) ? v("", !0) : (l(!0), u(_, { key: 1 }, te(n(Z)[n(r)], (t) => (l(), u(_, {
|
|
440
440
|
key: t.attributeId
|
|
441
441
|
}, [
|
|
442
|
-
Fe(t) ? (l(),
|
|
442
|
+
Fe(t) ? (l(), y(se, {
|
|
443
443
|
key: 0,
|
|
444
444
|
text: fe(t),
|
|
445
445
|
position: "bottom-left",
|
|
446
446
|
offset: 8,
|
|
447
|
-
delay:
|
|
447
|
+
delay: h.tooltipDelay,
|
|
448
448
|
"hide-on-click": ""
|
|
449
449
|
}, {
|
|
450
450
|
default: oe(() => [
|
|
@@ -452,7 +452,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
452
452
|
class: k(["attribute-item", n(Re)(t), {
|
|
453
453
|
"frozen-hover": n(ke)(t),
|
|
454
454
|
selected: E(t),
|
|
455
|
-
confirming: n(xe)(t,
|
|
455
|
+
confirming: n(xe)(t, C.value),
|
|
456
456
|
blocked: M(t)
|
|
457
457
|
}]),
|
|
458
458
|
"data-attribute-status": t.status,
|
|
@@ -464,19 +464,19 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
464
464
|
ne(qe, {
|
|
465
465
|
attribute: t,
|
|
466
466
|
"is-selected": E(t),
|
|
467
|
-
"confirming-attribute-id":
|
|
467
|
+
"confirming-attribute-id": C.value,
|
|
468
468
|
"blocked-attribute-ids": W.value,
|
|
469
469
|
"indicator-tooltips": ie.value,
|
|
470
|
-
"tooltip-delay":
|
|
470
|
+
"tooltip-delay": h.tooltipDelay
|
|
471
471
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
472
472
|
c("span", Pt, F(t.value), 1)
|
|
473
473
|
]),
|
|
474
474
|
c("span", Bt, [
|
|
475
|
-
n(S)(n(r)) ? (l(), u("span", Nt)) :
|
|
475
|
+
n(S)(n(r)) ? (l(), u("span", Nt)) : h.showChannelIcons ? (l(), u("span", {
|
|
476
476
|
key: 1,
|
|
477
477
|
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
478
478
|
}, [
|
|
479
|
-
(l(),
|
|
479
|
+
(l(), y(w(n(me)(n(r)))))
|
|
480
480
|
], 2)) : v("", !0)
|
|
481
481
|
])
|
|
482
482
|
], 42, qt)
|
|
@@ -487,7 +487,7 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
487
487
|
class: k(["attribute-item", n(Re)(t), {
|
|
488
488
|
"frozen-hover": n(ke)(t),
|
|
489
489
|
selected: E(t),
|
|
490
|
-
confirming: n(xe)(t,
|
|
490
|
+
confirming: n(xe)(t, C.value),
|
|
491
491
|
blocked: M(t)
|
|
492
492
|
}]),
|
|
493
493
|
"data-attribute-status": t.status,
|
|
@@ -499,19 +499,19 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
499
499
|
ne(qe, {
|
|
500
500
|
attribute: t,
|
|
501
501
|
"is-selected": E(t),
|
|
502
|
-
"confirming-attribute-id":
|
|
502
|
+
"confirming-attribute-id": C.value,
|
|
503
503
|
"blocked-attribute-ids": W.value,
|
|
504
504
|
"indicator-tooltips": ie.value,
|
|
505
|
-
"tooltip-delay":
|
|
505
|
+
"tooltip-delay": h.tooltipDelay
|
|
506
506
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
507
507
|
c("span", jt, F(t.value), 1)
|
|
508
508
|
]),
|
|
509
509
|
c("span", zt, [
|
|
510
|
-
n(S)(n(r)) ? (l(), u("span", Ft)) :
|
|
510
|
+
n(S)(n(r)) ? (l(), u("span", Ft)) : h.showChannelIcons ? (l(), u("span", {
|
|
511
511
|
key: 1,
|
|
512
512
|
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
513
513
|
}, [
|
|
514
|
-
(l(),
|
|
514
|
+
(l(), y(w(n(me)(n(r)))))
|
|
515
515
|
], 2)) : v("", !0)
|
|
516
516
|
])
|
|
517
517
|
], 42, Et))
|
|
@@ -534,25 +534,25 @@ const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "chan
|
|
|
534
534
|
key: 0,
|
|
535
535
|
class: k(Ye(t))
|
|
536
536
|
}, [
|
|
537
|
-
X(t) === "spinner" ? (l(),
|
|
537
|
+
X(t) === "spinner" ? (l(), y(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), y(n(Tt), { key: 1 })) : (l(), y(n(At), { key: 2 }))
|
|
538
538
|
], 2)) : v("", !0)
|
|
539
539
|
]),
|
|
540
540
|
c("span", Vt, [
|
|
541
541
|
c("span", Wt, F(t.title || t.channelId), 1),
|
|
542
542
|
t.isBot ? (l(), u("span", Ht, "бот")) : v("", !0)
|
|
543
543
|
]),
|
|
544
|
-
|
|
544
|
+
h.showChannelIcons ? (l(), u("span", {
|
|
545
545
|
key: 0,
|
|
546
546
|
class: k(["sub-menu-icon", { "menu-icon-grey": n(Ve)(t.channelId) !== "sms" }])
|
|
547
547
|
}, [
|
|
548
|
-
(l(),
|
|
548
|
+
(l(), y(w(n(He)(t.channelId))))
|
|
549
549
|
], 2)) : v("", !0)
|
|
550
550
|
], 10, Lt))), 128))
|
|
551
551
|
], 36)) : v("", !0)
|
|
552
552
|
])) : v("", !0)
|
|
553
553
|
], 512));
|
|
554
554
|
}
|
|
555
|
-
}, cn = /* @__PURE__ */ St(Gt, [["__scopeId", "data-v-
|
|
555
|
+
}, cn = /* @__PURE__ */ St(Gt, [["__scopeId", "data-v-50d20b1d"]]);
|
|
556
556
|
export {
|
|
557
557
|
cn as default
|
|
558
558
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { needsAttributeConfirmation as m } from "./useCommunicationAttributes.js";
|
|
2
|
-
import { resolveRecentChannelSelection as
|
|
3
|
-
function
|
|
4
|
-
activeChannelType:
|
|
2
|
+
import { resolveRecentChannelSelection as L } from "./useCommunicationRecentSelection.js";
|
|
3
|
+
function _({
|
|
4
|
+
activeChannelType: f,
|
|
5
5
|
channels: v,
|
|
6
6
|
selectedChannel: i,
|
|
7
7
|
selectedChannelType: s,
|
|
8
|
-
hoveredAttribute:
|
|
8
|
+
hoveredAttribute: G,
|
|
9
9
|
confirmingAttributeId: q,
|
|
10
10
|
isAttributeBlocked: u,
|
|
11
|
-
closeMenu:
|
|
12
|
-
pinMenuOpen:
|
|
13
|
-
hasMultipleChannels:
|
|
14
|
-
getSingleChannelForType:
|
|
15
|
-
getAvailableChannels:
|
|
11
|
+
closeMenu: l,
|
|
12
|
+
pinMenuOpen: H,
|
|
13
|
+
hasMultipleChannels: x,
|
|
14
|
+
getSingleChannelForType: j,
|
|
15
|
+
getAvailableChannels: z,
|
|
16
16
|
isChannelEmpty: d,
|
|
17
17
|
isNewDialog: I,
|
|
18
18
|
showDefaultChannelTooltipWithTimer: R,
|
|
19
19
|
clearDefaultChannelTooltip: S,
|
|
20
20
|
emit: t,
|
|
21
|
-
panelPendingSelection:
|
|
21
|
+
panelPendingSelection: a
|
|
22
22
|
}) {
|
|
23
|
-
const b = (n,
|
|
24
|
-
u(n) || (
|
|
23
|
+
const b = (n, r, e) => {
|
|
24
|
+
u(n) || (H(), q.value = n.id, t("confirm-attribute", {
|
|
25
25
|
attributeId: n.id,
|
|
26
|
-
channelId:
|
|
27
|
-
channelType:
|
|
26
|
+
channelId: r,
|
|
27
|
+
channelType: e,
|
|
28
28
|
attribute: n
|
|
29
29
|
}));
|
|
30
|
-
},
|
|
30
|
+
}, J = (n, r, e) => {
|
|
31
31
|
if (m(n)) {
|
|
32
|
-
b(n,
|
|
32
|
+
b(n, r, e);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
},
|
|
35
|
+
C(n, r);
|
|
36
|
+
}, A = (n) => {
|
|
37
37
|
if (!(!n || u(n))) {
|
|
38
38
|
if (m(n)) {
|
|
39
39
|
b(n, "", "phone");
|
|
@@ -42,78 +42,80 @@ function Z({
|
|
|
42
42
|
t("phone-call", {
|
|
43
43
|
attributeId: n.id,
|
|
44
44
|
phoneNumber: n.data
|
|
45
|
-
}),
|
|
45
|
+
}), l();
|
|
46
46
|
}
|
|
47
|
-
},
|
|
47
|
+
}, C = (n, r) => {
|
|
48
48
|
t("select-attribute-channel", {
|
|
49
49
|
attributeId: n.id,
|
|
50
|
-
channelId:
|
|
51
|
-
}), s.value =
|
|
50
|
+
channelId: r
|
|
51
|
+
}), s.value = f.value, i.value = v.value.find((e) => e.channelId === r) ?? {}, d(r) && I.value ? R() : S(), l();
|
|
52
52
|
};
|
|
53
53
|
return {
|
|
54
|
-
handlePhoneCall:
|
|
54
|
+
handlePhoneCall: A,
|
|
55
55
|
handleAttributeClick: (n) => {
|
|
56
56
|
if (q.value || u(n))
|
|
57
57
|
return;
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
if (
|
|
61
|
-
|
|
58
|
+
const r = f.value;
|
|
59
|
+
if (r) {
|
|
60
|
+
if (r === "phone") {
|
|
61
|
+
if (x(r))
|
|
62
|
+
return;
|
|
63
|
+
A(n);
|
|
62
64
|
return;
|
|
63
65
|
}
|
|
64
|
-
if (!
|
|
65
|
-
const
|
|
66
|
-
|
|
66
|
+
if (!x(r)) {
|
|
67
|
+
const e = j(r);
|
|
68
|
+
e && J(n, e.channelId, r);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
|
-
selectSingleChannel:
|
|
72
|
+
selectSingleChannel: C,
|
|
71
73
|
selectChannel: (n) => {
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
|
|
74
|
+
const r = G.value, e = f.value;
|
|
75
|
+
if (!r || !e) {
|
|
76
|
+
l();
|
|
75
77
|
return;
|
|
76
78
|
}
|
|
77
|
-
if (!u(
|
|
78
|
-
if (m(
|
|
79
|
-
b(
|
|
79
|
+
if (!u(r)) {
|
|
80
|
+
if (m(r)) {
|
|
81
|
+
b(r, n, e);
|
|
80
82
|
return;
|
|
81
83
|
}
|
|
82
84
|
t("select-attribute-channel", {
|
|
83
|
-
attributeId:
|
|
85
|
+
attributeId: r.id,
|
|
84
86
|
channelId: n
|
|
85
|
-
}), s.value =
|
|
87
|
+
}), s.value = e, i.value = v.value.find((c) => c.channelId === n) ?? {}, d(n) && I.value ? R() : S(), l();
|
|
86
88
|
}
|
|
87
89
|
},
|
|
88
90
|
availableChannels: () => {
|
|
89
|
-
const n =
|
|
90
|
-
return n ?
|
|
91
|
+
const n = f.value;
|
|
92
|
+
return n ? z(n) : [];
|
|
91
93
|
},
|
|
92
|
-
applyRecentChannelButtonSelection: (n,
|
|
93
|
-
const c =
|
|
94
|
+
applyRecentChannelButtonSelection: (n, r, e) => {
|
|
95
|
+
const c = L(
|
|
94
96
|
n,
|
|
95
|
-
e,
|
|
96
97
|
r,
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
e,
|
|
99
|
+
j,
|
|
100
|
+
z
|
|
99
101
|
);
|
|
100
102
|
if (!c)
|
|
101
103
|
return !1;
|
|
102
104
|
const { attribute: P, channelId: o } = c;
|
|
103
|
-
return u(P) ? !1 : (
|
|
105
|
+
return u(P) ? !1 : (a && (a.value = {
|
|
104
106
|
channelType: n,
|
|
105
107
|
attributeId: P.id,
|
|
106
108
|
channelId: o
|
|
107
109
|
}), t("select-attribute-channel", {
|
|
108
110
|
attributeId: P.id,
|
|
109
111
|
channelId: o
|
|
110
|
-
}), s.value = n, i.value = v.value.find((
|
|
112
|
+
}), s.value = n, i.value = v.value.find((K) => K.channelId === o) ?? {}, d(o) && I.value ? R() : S(), !0);
|
|
111
113
|
},
|
|
112
114
|
clearPanelPendingSelection: () => {
|
|
113
|
-
|
|
115
|
+
a && (a.value = null);
|
|
114
116
|
}
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
export {
|
|
118
|
-
|
|
120
|
+
_ as useCommunicationActions
|
|
119
121
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FeedFoundItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b8456345"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, computed as l, createElementBlock as r, openBlock as s, normalizeClass as u, createElementVNode as i, toDisplayString as n, createCommentVNode as p, unref as f } from "vue";
|
|
2
2
|
import "../../../locale/useLocale.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
@@ -6,11 +6,12 @@ import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
|
6
6
|
import "../../../functions/parseMarkdown.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { getPrimaryImageItem as
|
|
10
|
-
|
|
9
|
+
import { getPrimaryImageItem as g } from "../../../hooks/messages/getImageMessageItems.js";
|
|
10
|
+
import { useImageFeedSrc as y } from "../../../hooks/messages/useImageFeedSrc.js";
|
|
11
|
+
const b = { class: "feed-found-item__avatar-container" }, j = ["src"], x = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "pi pi-user"
|
|
13
|
-
},
|
|
14
|
+
}, k = { class: "feed-found-item__info" }, w = { class: "feed-found-item__first-line" }, I = { class: "feed-found-item__name" }, E = { class: "feed-found-item__time" }, P = { class: "feed-found-item__second-line" }, S = ["src"], A = /* @__PURE__ */ h({
|
|
14
15
|
__name: "FeedFoundItem",
|
|
15
16
|
props: {
|
|
16
17
|
object: {
|
|
@@ -22,52 +23,61 @@ const p = { class: "feed-found-item__avatar-container" }, _ = ["src"], g = {
|
|
|
22
23
|
default: !1
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
setup(e) {
|
|
27
|
+
const o = e, { displaySrc: _, onImageError: a } = y(
|
|
28
|
+
() => {
|
|
29
|
+
var t;
|
|
30
|
+
if (o.object.type === "message.image")
|
|
31
|
+
return (t = g(o.object)) == null ? void 0 : t.imagePreviewUrl;
|
|
32
|
+
},
|
|
33
|
+
() => {
|
|
34
|
+
var t;
|
|
35
|
+
if (o.object.type === "message.image")
|
|
36
|
+
return (t = g(o.object)) == null ? void 0 : t.url;
|
|
37
|
+
}
|
|
38
|
+
), c = l(() => o.object.type !== "message.image" ? "" : _.value), m = l(() => ({
|
|
31
39
|
"message.file": "pi pi-file",
|
|
32
40
|
"message.audio": "pi pi-volume-up",
|
|
33
41
|
"message.video": "pi pi-video",
|
|
34
42
|
"message.call": "pi pi-phone"
|
|
35
|
-
})[
|
|
36
|
-
return (
|
|
37
|
-
class:
|
|
43
|
+
})[o.object.type] || null);
|
|
44
|
+
return (t, d) => (s(), r("div", {
|
|
45
|
+
class: u(["feed-found-item__container", { "feed-found-item__selected-container": e.selected }])
|
|
38
46
|
}, [
|
|
39
|
-
i("div",
|
|
40
|
-
|
|
47
|
+
i("div", b, [
|
|
48
|
+
e.object.avatar ? (s(), r("img", {
|
|
41
49
|
key: 0,
|
|
42
|
-
src:
|
|
50
|
+
src: e.object.avatar,
|
|
43
51
|
width: "48",
|
|
44
52
|
height: "48"
|
|
45
|
-
}, null, 8,
|
|
53
|
+
}, null, 8, j)) : (s(), r("span", x))
|
|
46
54
|
]),
|
|
47
|
-
i("div",
|
|
48
|
-
i("div",
|
|
49
|
-
i("p",
|
|
50
|
-
i("p",
|
|
55
|
+
i("div", k, [
|
|
56
|
+
i("div", w, [
|
|
57
|
+
i("p", I, n(e.object.subtext), 1),
|
|
58
|
+
i("p", E, n(e.object.time), 1)
|
|
51
59
|
]),
|
|
52
|
-
i("div",
|
|
53
|
-
|
|
60
|
+
i("div", P, [
|
|
61
|
+
c.value ? (s(), r("img", {
|
|
54
62
|
key: 0,
|
|
55
|
-
src:
|
|
63
|
+
src: c.value,
|
|
56
64
|
style: { "margin-right": "3px" },
|
|
57
65
|
width: "24",
|
|
58
|
-
height: "24"
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
height: "24",
|
|
67
|
+
onError: d[0] || (d[0] = //@ts-ignore
|
|
68
|
+
(...v) => f(a) && f(a)(...v))
|
|
69
|
+
}, null, 40, S)) : p("", !0),
|
|
70
|
+
m.value ? (s(), r("span", {
|
|
61
71
|
key: 1,
|
|
62
|
-
class:
|
|
72
|
+
class: u(m.value),
|
|
63
73
|
style: { "margin-right": "3px", "font-size": "20px" }
|
|
64
|
-
}, null, 2)) :
|
|
65
|
-
i("p", null,
|
|
74
|
+
}, null, 2)) : p("", !0),
|
|
75
|
+
i("p", null, n(e.object.text), 1)
|
|
66
76
|
])
|
|
67
77
|
])
|
|
68
78
|
], 2));
|
|
69
79
|
}
|
|
70
80
|
});
|
|
71
81
|
export {
|
|
72
|
-
|
|
82
|
+
A as default
|
|
73
83
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FeedReplyQuote.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-70906f41"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|