@mobilon-dev/chotto 0.3.118 → 0.3.120
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 +89 -83
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +20 -20
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js +18 -18
- package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
- package/dist/components/3_compounds/Feed/Feed.vue2.js +14 -14
- 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/apps/data/channels.d.ts +10 -0
- package/dist/types/src/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +1 -0
- package/dist/types/src/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts +2 -0
- package/dist/types/src/components/2_blocks/CommunicationPanel/composables/useCommunicationRecentSelection.d.ts +1 -0
- package/dist/types/src/components/2_blocks/CommunicationPanel/styles/types.d.ts +2 -0
- package/dist/types/src/components/2_feed_elements/types/components.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,31 +1,34 @@
|
|
|
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
|
|
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 h, 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 ht, getAttributeStatusClass as Re, isAttributeConfirming as
|
|
5
|
+
import { useCommunicationAttributes as vt, isAttributeBlocked as ht, getAttributeStatusClass as Re, isAttributeConfirming as xe, getSubMenuChannelIndicatorType as yt, getSubMenuChannelIndicatorClass as Ct } from "./composables/useCommunicationAttributes.js";
|
|
6
6
|
import { useCommunicationActions as bt } 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";
|
|
10
|
-
import
|
|
10
|
+
import qe from "./CommunicationPanelAttributeIndicator.vue.js";
|
|
11
11
|
import At from "./icons/CommunicationPanelCheckIcon.vue.js";
|
|
12
12
|
import Tt from "./icons/CommunicationPanelUnconfirmedIcon.vue.js";
|
|
13
13
|
import Mt from "./icons/CommunicationPanelConfirmSpinner.vue.js";
|
|
14
14
|
import St from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
const
|
|
16
|
+
const _t = ["data-channel-type", "onClick", "onMouseenter"], wt = { class: "channel-icon" }, Dt = { class: "channel-icon" }, Rt = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "attributes-menu"
|
|
19
|
-
},
|
|
19
|
+
}, xt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "empty-channels-placeholder"
|
|
22
|
-
},
|
|
22
|
+
}, qt = ["data-attribute-status", "onMouseenter", "onClick"], Ot = { class: "attribute-info" }, Pt = { class: "attribute-value" }, Bt = { class: "menu-icon" }, Nt = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "menu-icon-arrow"
|
|
25
25
|
}, Et = ["data-attribute-status", "onMouseenter", "onClick"], $t = { class: "attribute-info" }, jt = { class: "attribute-value" }, zt = { class: "menu-icon" }, Ft = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "menu-icon-arrow"
|
|
28
|
-
}, Lt = ["onClick"], Ut = { class: "sub-menu-indicator-slot" }, Vt = { class: "sub-menu-title" }, Wt = {
|
|
28
|
+
}, Lt = ["onClick"], Ut = { class: "sub-menu-indicator-slot" }, Vt = { class: "sub-menu-title" }, Wt = { class: "sub-menu-title-text" }, Ht = {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: "sub-menu-title-bot"
|
|
31
|
+
}, Gt = {
|
|
29
32
|
__name: "CommunicationPanel",
|
|
30
33
|
props: {
|
|
31
34
|
contactAttributes: {
|
|
@@ -136,9 +139,9 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
136
139
|
"phone-call",
|
|
137
140
|
"reset-blocked-attributes"
|
|
138
141
|
],
|
|
139
|
-
setup(
|
|
140
|
-
const i =
|
|
141
|
-
() => i.confirmingAttributeId ??
|
|
142
|
+
setup(y, { expose: Oe, emit: Pe }) {
|
|
143
|
+
const i = y, 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), C = m(null), q = m(null), b = a(
|
|
144
|
+
() => i.confirmingAttributeId ?? q.value
|
|
142
145
|
), W = a(() => i.blockedAttributeIds ?? []), M = (e) => ht(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(() => {
|
|
143
146
|
var e;
|
|
144
147
|
return ((e = i.selectedDialog) == null ? void 0 : e.channelId) ?? null;
|
|
@@ -200,13 +203,13 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
200
203
|
const e = V.value;
|
|
201
204
|
return e && e.channelType === r.value ? e : null;
|
|
202
205
|
}), K = (e) => {
|
|
203
|
-
var
|
|
204
|
-
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)),
|
|
205
|
-
if (
|
|
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 = ye.value;
|
|
208
|
+
if (d != null && d.channelId && s(d.channelId, o))
|
|
206
209
|
return !0;
|
|
207
210
|
const f = r.value, I = Q.value;
|
|
208
211
|
if (g.value && f && I) {
|
|
209
|
-
const p = (
|
|
212
|
+
const p = (De = ue.value) == null ? void 0 : De[f];
|
|
210
213
|
if (p != null && p.channelId && (p != null && p.attributeId) && O(I, p.attributeId) && s(p.channelId, o))
|
|
211
214
|
return !0;
|
|
212
215
|
}
|
|
@@ -214,7 +217,7 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
214
217
|
}, E = (e) => {
|
|
215
218
|
const o = ye.value;
|
|
216
219
|
return o != null && o.attributeId ? O(e, o.attributeId) : O(e, J.value);
|
|
217
|
-
}, Q = a(() =>
|
|
220
|
+
}, Q = a(() => D.value ?? R.value ?? null), Ce = (e) => {
|
|
218
221
|
const o = e == null ? void 0 : e.backendChannelId;
|
|
219
222
|
return o ? [o] : [];
|
|
220
223
|
}, X = (e) => yt(
|
|
@@ -230,9 +233,9 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
230
233
|
b.value,
|
|
231
234
|
Ce(e)
|
|
232
235
|
) ?? "", Y = a(() => i.contactAttributes ?? []), be = (e) => {
|
|
233
|
-
var
|
|
236
|
+
var d;
|
|
234
237
|
if (!e || !re.value) return !0;
|
|
235
|
-
const o = (
|
|
238
|
+
const o = (d = ze.value) == null ? void 0 : d.chatId;
|
|
236
239
|
return o ? !re.value.filter(
|
|
237
240
|
(f) => {
|
|
238
241
|
var I;
|
|
@@ -245,11 +248,11 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
245
248
|
$(), A.value = !0, le(() => {
|
|
246
249
|
const e = Array.isArray(C.value) ? C.value[0] : C.value;
|
|
247
250
|
e && typeof e.startAutoShow == "function" ? e.startAutoShow() : console.log("startAutoShow method not found on tooltipRef");
|
|
248
|
-
}),
|
|
251
|
+
}), x.value = setTimeout(() => {
|
|
249
252
|
A.value = !1;
|
|
250
253
|
}, 5e3);
|
|
251
254
|
}, $ = () => {
|
|
252
|
-
if (
|
|
255
|
+
if (x.value && (clearTimeout(x.value), x.value = null), C.value) {
|
|
253
256
|
const e = Array.isArray(C.value) ? C.value[0] : C.value;
|
|
254
257
|
e && typeof e.clearAutoTimer == "function" && e.clearAutoTimer();
|
|
255
258
|
}
|
|
@@ -273,8 +276,8 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
273
276
|
channels: H,
|
|
274
277
|
selectedChannel: U,
|
|
275
278
|
selectedChannelType: T,
|
|
276
|
-
hoveredAttribute:
|
|
277
|
-
confirmingAttributeId:
|
|
279
|
+
hoveredAttribute: D,
|
|
280
|
+
confirmingAttributeId: q,
|
|
278
281
|
isAttributeBlocked: M,
|
|
279
282
|
closeMenu: N,
|
|
280
283
|
pinMenuOpen: Qe,
|
|
@@ -298,7 +301,7 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
298
301
|
activeChannelType: r,
|
|
299
302
|
showSubMenu: G,
|
|
300
303
|
frozenAttribute: R,
|
|
301
|
-
hoveredAttribute:
|
|
304
|
+
hoveredAttribute: D,
|
|
302
305
|
confirmingAttributeId: b,
|
|
303
306
|
retainOpenUntilDismiss: Ge,
|
|
304
307
|
hasMultipleChannels: S,
|
|
@@ -341,22 +344,22 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
341
344
|
emptyChannelsPlaceholder: a(() => i.emptyChannelsPlaceholder ?? {}),
|
|
342
345
|
getAvailableChannels: ve,
|
|
343
346
|
organizedContactAttributes: Z
|
|
344
|
-
}),
|
|
347
|
+
}), _e = a(
|
|
345
348
|
() => nt()
|
|
346
349
|
), rt = a(
|
|
347
|
-
() => G.value &&
|
|
348
|
-
),
|
|
350
|
+
() => G.value && D.value && _e.value.length > 0 && r.value !== "phone" && S(r.value)
|
|
351
|
+
), we = async (e, o) => {
|
|
349
352
|
const t = st(e, o.currentTarget);
|
|
350
353
|
await le(), t instanceof HTMLElement && at(L, t);
|
|
351
354
|
};
|
|
352
355
|
return z(() => i.confirmingAttributeId, (e, o) => {
|
|
353
|
-
e || (
|
|
356
|
+
e || (q.value = null, o && Xe());
|
|
354
357
|
}), z(Y, () => {
|
|
355
358
|
const e = b.value;
|
|
356
359
|
if (!e)
|
|
357
360
|
return;
|
|
358
361
|
const o = Y.value.find((t) => t.id === e);
|
|
359
|
-
(o == null ? void 0 : o.status) === "confirmed" && (
|
|
362
|
+
(o == null ? void 0 : o.status) === "confirmed" && (q.value = null, N());
|
|
360
363
|
}, { deep: !0 }), z(() => i.selectedDialog, () => {
|
|
361
364
|
Ie();
|
|
362
365
|
}, { deep: !0 }), ct(() => {
|
|
@@ -377,7 +380,7 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
377
380
|
ref: Be,
|
|
378
381
|
class: "channels-panel"
|
|
379
382
|
}, [
|
|
380
|
-
(l(!0), u(
|
|
383
|
+
(l(!0), u(_, null, te(n(pe), (t) => {
|
|
381
384
|
var s;
|
|
382
385
|
return l(), u("button", {
|
|
383
386
|
key: t.type,
|
|
@@ -387,96 +390,96 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
387
390
|
hover: n(B) === t.type && !n(P)(t.type) || n(B) === t.type && n(P)(t.type),
|
|
388
391
|
menuOpen: n(g) && n(r) === t.type
|
|
389
392
|
}]),
|
|
390
|
-
onClick: (
|
|
391
|
-
onMouseenter: (
|
|
392
|
-
onMouseleave: o[0] || (o[0] = (
|
|
393
|
+
onClick: (d) => it(t.type),
|
|
394
|
+
onMouseenter: (d) => B.value = t.type,
|
|
395
|
+
onMouseleave: o[0] || (o[0] = (d) => B.value = null)
|
|
393
396
|
}, [
|
|
394
|
-
n(P)(t.type) ? (l(), u(
|
|
397
|
+
n(P)(t.type) ? (l(), u(_, { key: 0 }, [
|
|
395
398
|
ne(se, {
|
|
396
399
|
ref_for: !0,
|
|
397
|
-
ref: (
|
|
398
|
-
|
|
400
|
+
ref: (d) => {
|
|
401
|
+
d && (C.value = d);
|
|
399
402
|
},
|
|
400
403
|
text: A.value ? "Выбран канал по умолчанию, можно изменить в настройках профиля" : (s = U.value) == null ? void 0 : s.title,
|
|
401
404
|
position: "bottom-left",
|
|
402
405
|
offset: 8,
|
|
403
|
-
delay:
|
|
406
|
+
delay: y.tooltipDelay,
|
|
404
407
|
"hide-on-click": "",
|
|
405
408
|
trigger: A.value ? "auto" : "hover",
|
|
406
409
|
"auto-show-duration": A.value ? 5e3 : 0
|
|
407
410
|
}, {
|
|
408
411
|
default: oe(() => [
|
|
409
|
-
|
|
410
|
-
(l(),
|
|
412
|
+
c("span", wt, [
|
|
413
|
+
(l(), h(w(t.component)))
|
|
411
414
|
])
|
|
412
415
|
]),
|
|
413
416
|
_: 2
|
|
414
417
|
}, 1032, ["text", "delay", "trigger", "auto-show-duration"]),
|
|
415
|
-
o[5] || (o[5] =
|
|
416
|
-
], 64)) : (l(),
|
|
418
|
+
o[5] || (o[5] = c("span", { class: "active-indicator" }, null, -1))
|
|
419
|
+
], 64)) : (l(), h(se, {
|
|
417
420
|
key: 1,
|
|
418
421
|
text: n(Ue)(t.type),
|
|
419
422
|
position: "bottom-left",
|
|
420
423
|
offset: 8,
|
|
421
|
-
delay:
|
|
424
|
+
delay: y.tooltipDelay,
|
|
422
425
|
"hide-on-click": ""
|
|
423
426
|
}, {
|
|
424
427
|
default: oe(() => [
|
|
425
|
-
|
|
426
|
-
(l(),
|
|
428
|
+
c("span", Dt, [
|
|
429
|
+
(l(), h(w(t.component)))
|
|
427
430
|
])
|
|
428
431
|
]),
|
|
429
432
|
_: 2
|
|
430
433
|
}, 1032, ["text", "delay"]))
|
|
431
|
-
], 42,
|
|
434
|
+
], 42, _t);
|
|
432
435
|
}), 128))
|
|
433
|
-
], 512)) :
|
|
436
|
+
], 512)) : v("", !0),
|
|
434
437
|
n(g) && n(r) ? (l(), u("div", Rt, [
|
|
435
|
-
n(Se) ? (l(), u("div",
|
|
436
|
-
n(Se) ?
|
|
438
|
+
n(Se) ? (l(), u("div", xt, F(n(ut)), 1)) : v("", !0),
|
|
439
|
+
n(Se) ? v("", !0) : (l(!0), u(_, { key: 1 }, te(n(Z)[n(r)], (t) => (l(), u(_, {
|
|
437
440
|
key: t.attributeId
|
|
438
441
|
}, [
|
|
439
|
-
Fe(t) ? (l(),
|
|
442
|
+
Fe(t) ? (l(), h(se, {
|
|
440
443
|
key: 0,
|
|
441
444
|
text: fe(t),
|
|
442
445
|
position: "bottom-left",
|
|
443
446
|
offset: 8,
|
|
444
|
-
delay:
|
|
447
|
+
delay: y.tooltipDelay,
|
|
445
448
|
"hide-on-click": ""
|
|
446
449
|
}, {
|
|
447
450
|
default: oe(() => [
|
|
448
|
-
|
|
451
|
+
c("div", {
|
|
449
452
|
class: k(["attribute-item", n(Re)(t), {
|
|
450
453
|
"frozen-hover": n(ke)(t),
|
|
451
454
|
selected: E(t),
|
|
452
|
-
confirming: n(
|
|
455
|
+
confirming: n(xe)(t, b.value),
|
|
453
456
|
blocked: M(t)
|
|
454
457
|
}]),
|
|
455
458
|
"data-attribute-status": t.status,
|
|
456
|
-
onMouseenter: (s) =>
|
|
459
|
+
onMouseenter: (s) => we(t, s),
|
|
457
460
|
onMouseleave: o[1] || (o[1] = (...s) => n(j) && n(j)(...s)),
|
|
458
461
|
onClick: (s) => Me(t)
|
|
459
462
|
}, [
|
|
460
|
-
|
|
461
|
-
ne(
|
|
463
|
+
c("div", Ot, [
|
|
464
|
+
ne(qe, {
|
|
462
465
|
attribute: t,
|
|
463
466
|
"is-selected": E(t),
|
|
464
467
|
"confirming-attribute-id": b.value,
|
|
465
468
|
"blocked-attribute-ids": W.value,
|
|
466
469
|
"indicator-tooltips": ie.value,
|
|
467
|
-
"tooltip-delay":
|
|
470
|
+
"tooltip-delay": y.tooltipDelay
|
|
468
471
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
469
|
-
|
|
472
|
+
c("span", Pt, F(t.value), 1)
|
|
470
473
|
]),
|
|
471
|
-
|
|
472
|
-
n(S)(n(r)) ? (l(), u("span", Nt)) :
|
|
474
|
+
c("span", Bt, [
|
|
475
|
+
n(S)(n(r)) ? (l(), u("span", Nt)) : y.showChannelIcons ? (l(), u("span", {
|
|
473
476
|
key: 1,
|
|
474
477
|
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
475
478
|
}, [
|
|
476
|
-
(l(),
|
|
477
|
-
], 2)) :
|
|
479
|
+
(l(), h(w(n(me)(n(r)))))
|
|
480
|
+
], 2)) : v("", !0)
|
|
478
481
|
])
|
|
479
|
-
], 42,
|
|
482
|
+
], 42, qt)
|
|
480
483
|
]),
|
|
481
484
|
_: 2
|
|
482
485
|
}, 1032, ["text", "delay"])) : (l(), u("div", {
|
|
@@ -484,32 +487,32 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
484
487
|
class: k(["attribute-item", n(Re)(t), {
|
|
485
488
|
"frozen-hover": n(ke)(t),
|
|
486
489
|
selected: E(t),
|
|
487
|
-
confirming: n(
|
|
490
|
+
confirming: n(xe)(t, b.value),
|
|
488
491
|
blocked: M(t)
|
|
489
492
|
}]),
|
|
490
493
|
"data-attribute-status": t.status,
|
|
491
|
-
onMouseenter: (s) =>
|
|
494
|
+
onMouseenter: (s) => we(t, s),
|
|
492
495
|
onMouseleave: o[2] || (o[2] = (...s) => n(j) && n(j)(...s)),
|
|
493
496
|
onClick: (s) => Me(t)
|
|
494
497
|
}, [
|
|
495
|
-
|
|
496
|
-
ne(
|
|
498
|
+
c("div", $t, [
|
|
499
|
+
ne(qe, {
|
|
497
500
|
attribute: t,
|
|
498
501
|
"is-selected": E(t),
|
|
499
502
|
"confirming-attribute-id": b.value,
|
|
500
503
|
"blocked-attribute-ids": W.value,
|
|
501
504
|
"indicator-tooltips": ie.value,
|
|
502
|
-
"tooltip-delay":
|
|
505
|
+
"tooltip-delay": y.tooltipDelay
|
|
503
506
|
}, null, 8, ["attribute", "is-selected", "confirming-attribute-id", "blocked-attribute-ids", "indicator-tooltips", "tooltip-delay"]),
|
|
504
|
-
|
|
507
|
+
c("span", jt, F(t.value), 1)
|
|
505
508
|
]),
|
|
506
|
-
|
|
507
|
-
n(S)(n(r)) ? (l(), u("span", Ft)) :
|
|
509
|
+
c("span", zt, [
|
|
510
|
+
n(S)(n(r)) ? (l(), u("span", Ft)) : y.showChannelIcons ? (l(), u("span", {
|
|
508
511
|
key: 1,
|
|
509
512
|
class: k(["channel-icon-small", { "menu-icon-grey": n(r) !== "sms" }])
|
|
510
513
|
}, [
|
|
511
|
-
(l(),
|
|
512
|
-
], 2)) :
|
|
514
|
+
(l(), h(w(n(me)(n(r)))))
|
|
515
|
+
], 2)) : v("", !0)
|
|
513
516
|
])
|
|
514
517
|
], 42, Et))
|
|
515
518
|
], 64))), 128)),
|
|
@@ -520,33 +523,36 @@ const wt = ["data-channel-type", "onClick", "onMouseenter"], Dt = { class: "chan
|
|
|
520
523
|
onMouseenter: o[3] || (o[3] = (...t) => n(Ae) && n(Ae)(...t)),
|
|
521
524
|
onMouseleave: o[4] || (o[4] = (...t) => n(Te) && n(Te)(...t))
|
|
522
525
|
}, [
|
|
523
|
-
o[6] || (o[6] =
|
|
524
|
-
(l(!0), u(
|
|
526
|
+
o[6] || (o[6] = c("div", { class: "sub-menu-header" }, " Канал связи ", -1)),
|
|
527
|
+
(l(!0), u(_, null, te(_e.value, (t) => (l(), u("div", {
|
|
525
528
|
key: t.channelId,
|
|
526
529
|
class: k(["sub-menu-item", { selected: K(t) }]),
|
|
527
530
|
onClick: (s) => n(tt)(t.channelId)
|
|
528
531
|
}, [
|
|
529
|
-
|
|
532
|
+
c("span", Ut, [
|
|
530
533
|
X(t) ? (l(), u("span", {
|
|
531
534
|
key: 0,
|
|
532
535
|
class: k(Ye(t))
|
|
533
536
|
}, [
|
|
534
|
-
X(t) === "spinner" ? (l(),
|
|
535
|
-
], 2)) :
|
|
537
|
+
X(t) === "spinner" ? (l(), h(n(Mt), { key: 0 })) : X(t) === "unconfirmed" ? (l(), h(n(Tt), { key: 1 })) : (l(), h(n(At), { key: 2 }))
|
|
538
|
+
], 2)) : v("", !0)
|
|
539
|
+
]),
|
|
540
|
+
c("span", Vt, [
|
|
541
|
+
c("span", Wt, F(t.title || t.channelId), 1),
|
|
542
|
+
t.isBot ? (l(), u("span", Ht, "бот")) : v("", !0)
|
|
536
543
|
]),
|
|
537
|
-
|
|
538
|
-
h.showChannelIcons ? (l(), u("span", {
|
|
544
|
+
y.showChannelIcons ? (l(), u("span", {
|
|
539
545
|
key: 0,
|
|
540
546
|
class: k(["sub-menu-icon", { "menu-icon-grey": n(Ve)(t.channelId) !== "sms" }])
|
|
541
547
|
}, [
|
|
542
|
-
(l(),
|
|
543
|
-
], 2)) :
|
|
548
|
+
(l(), h(w(n(He)(t.channelId))))
|
|
549
|
+
], 2)) : v("", !0)
|
|
544
550
|
], 10, Lt))), 128))
|
|
545
|
-
], 36)) :
|
|
546
|
-
])) :
|
|
551
|
+
], 36)) : v("", !0)
|
|
552
|
+
])) : v("", !0)
|
|
547
553
|
], 512));
|
|
548
554
|
}
|
|
549
|
-
},
|
|
555
|
+
}, cn = /* @__PURE__ */ St(Gt, [["__scopeId", "data-v-38881acf"]]);
|
|
550
556
|
export {
|
|
551
|
-
|
|
557
|
+
cn as default
|
|
552
558
|
};
|
|
@@ -2,8 +2,8 @@ import { computed as c, unref as i } from "vue";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import M from "../icons/CommunicationPanelPhoneIcon.vue.js";
|
|
4
4
|
import b from "../icons/CommunicationPanelWhatsAppIcon.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import x from "../icons/CommunicationPanelTelegramIcon.vue.js";
|
|
6
|
+
import w from "../icons/CommunicationPanelMaxIcon.vue.js";
|
|
7
7
|
import A from "../icons/CommunicationPanelSMSIcon.vue.js";
|
|
8
8
|
import y from "../icons/CommunicationPanelSubmenuPhoneIcon.vue.js";
|
|
9
9
|
import E from "../icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js";
|
|
@@ -14,8 +14,8 @@ const I = ["whatsapp", "telegram", "max", "sms", "phone"], _ = ["max", "telegram
|
|
|
14
14
|
function g(a) {
|
|
15
15
|
return I.includes(a);
|
|
16
16
|
}
|
|
17
|
-
function D(a,
|
|
18
|
-
const u = (a ?? _).filter(g), m =
|
|
17
|
+
function D(a, s) {
|
|
18
|
+
const u = (a ?? _).filter(g), m = s === void 0 ? [...I] : s.filter(g), p = new Set(m), t = /* @__PURE__ */ new Set(), l = [];
|
|
19
19
|
for (const o of u)
|
|
20
20
|
p.has(o) && !t.has(o) && (t.add(o), l.push(o));
|
|
21
21
|
for (const o of m)
|
|
@@ -25,8 +25,8 @@ function D(a, r) {
|
|
|
25
25
|
const H = {
|
|
26
26
|
phone: M,
|
|
27
27
|
whatsapp: b,
|
|
28
|
-
telegram:
|
|
29
|
-
max:
|
|
28
|
+
telegram: x,
|
|
29
|
+
max: w,
|
|
30
30
|
sms: A
|
|
31
31
|
}, R = {
|
|
32
32
|
phone: y,
|
|
@@ -43,12 +43,12 @@ const H = {
|
|
|
43
43
|
};
|
|
44
44
|
function Z({
|
|
45
45
|
channels: a,
|
|
46
|
-
channelTooltips:
|
|
46
|
+
channelTooltips: s,
|
|
47
47
|
channelOrder: u,
|
|
48
48
|
visibleChannelTypes: m,
|
|
49
49
|
selectedChannelType: p
|
|
50
50
|
}) {
|
|
51
|
-
const t = c(() => i(a) ?? []), l = c(() => i(
|
|
51
|
+
const t = c(() => i(a) ?? []), l = c(() => i(s) ?? {}), o = c(
|
|
52
52
|
() => D(i(u), i(m))
|
|
53
53
|
), d = c(
|
|
54
54
|
() => o.value.map((n) => ({
|
|
@@ -58,32 +58,32 @@ function Z({
|
|
|
58
58
|
), S = (n) => {
|
|
59
59
|
const e = l.value[n];
|
|
60
60
|
return e || (W[n] ?? "");
|
|
61
|
-
},
|
|
61
|
+
}, r = (n) => {
|
|
62
62
|
if (!n) return null;
|
|
63
63
|
const [e] = n.split(".");
|
|
64
|
-
return e.includes("waba") ? "whatsapp" : e.includes("telegrambot") ? "telegram" : e;
|
|
65
|
-
}, P = (n) => t.value.filter((e) =>
|
|
66
|
-
const e = t.value.filter((v) =>
|
|
64
|
+
return e.includes("waba") ? "whatsapp" : e.includes("telegrambot") ? "telegram" : e.includes("maxbot") ? "max" : e;
|
|
65
|
+
}, P = (n) => t.value.filter((e) => r(e.channelId) === n).length > 1, T = (n) => p.value === n, f = (n) => {
|
|
66
|
+
const e = t.value.filter((v) => r(v.channelId) === n);
|
|
67
67
|
return e.length === 1 ? e[0] : null;
|
|
68
|
-
}, h = (n) => R[n] ?? null,
|
|
69
|
-
const e =
|
|
68
|
+
}, h = (n) => R[n] ?? null, C = (n) => {
|
|
69
|
+
const e = r(n);
|
|
70
70
|
return e ? h(e) : null;
|
|
71
71
|
};
|
|
72
72
|
return {
|
|
73
73
|
panelChannelTypes: o,
|
|
74
74
|
channelsTypes: d,
|
|
75
75
|
getTooltipText: S,
|
|
76
|
-
getChannelTypeFromId:
|
|
76
|
+
getChannelTypeFromId: r,
|
|
77
77
|
hasMultipleChannels: P,
|
|
78
78
|
isChannelActive: T,
|
|
79
|
-
getSingleChannelForType:
|
|
79
|
+
getSingleChannelForType: f,
|
|
80
80
|
getMenuChannelIconComponent: h,
|
|
81
|
-
getMenuChannelIconComponentForChannelId:
|
|
81
|
+
getMenuChannelIconComponentForChannelId: C,
|
|
82
82
|
getSingleMenuChannelIconComponent: (n) => {
|
|
83
|
-
const e =
|
|
84
|
-
return e ?
|
|
83
|
+
const e = f(n);
|
|
84
|
+
return e ? C(e.channelId) : h(n);
|
|
85
85
|
},
|
|
86
|
-
getAvailableChannels: (n) => t.value.filter((e) =>
|
|
86
|
+
getAvailableChannels: (n) => t.value.filter((e) => r(e.channelId) === n)
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
export {
|
package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { watch as
|
|
2
|
-
import { CHANNEL_TYPES as
|
|
3
|
-
function
|
|
4
|
-
selectedChannelType:
|
|
1
|
+
import { watch as h, unref as v } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as I } from "./useCommunicationChannels.js";
|
|
3
|
+
function x({
|
|
4
|
+
selectedChannelType: n,
|
|
5
5
|
selectedChannel: u,
|
|
6
6
|
channels: c,
|
|
7
7
|
selectedDialog: i,
|
|
@@ -10,31 +10,31 @@ function b({
|
|
|
10
10
|
showDefaultChannelTooltipWithTimer: f,
|
|
11
11
|
clearDefaultChannelTooltip: l
|
|
12
12
|
}) {
|
|
13
|
-
const r = (
|
|
14
|
-
if (!
|
|
15
|
-
|
|
13
|
+
const r = (e) => {
|
|
14
|
+
if (!e || !e.channelId) {
|
|
15
|
+
n.value = null, u.value = {}, l();
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
const a =
|
|
18
|
+
const a = e.channelId ? e.channelId.split(".")[0] : null, t = a ? p(a) : null;
|
|
19
19
|
if (t) {
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
u.value =
|
|
20
|
+
n.value = t;
|
|
21
|
+
const s = c.value.find((d) => d.channelId === e.channelId);
|
|
22
|
+
u.value = s ?? {}, m(e.channelId) && o.value ? f() : l();
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
() =>
|
|
27
|
-
(
|
|
28
|
-
r(
|
|
25
|
+
return h(
|
|
26
|
+
() => v(i),
|
|
27
|
+
(e) => {
|
|
28
|
+
r(e ?? null);
|
|
29
29
|
},
|
|
30
30
|
{ immediate: !0, deep: !0 }
|
|
31
31
|
), {
|
|
32
32
|
updateSelectedChannelFromDialog: r
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function p(n) {
|
|
36
|
+
return n.includes("waba") ? "whatsapp" : n.includes("telegrambot") ? "telegram" : n.includes("maxbot") ? "max" : I.includes(n) ? n : null;
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
x as useCommunicationDialogSync
|
|
40
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Feed.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-db0a32f8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Te, ref as S, computed as l, provide as A, inject as G, unref as o, watch as B, nextTick as F, onMounted as De, createElementBlock as y, openBlock as i, createVNode as p, createBlock as f, createCommentVNode as c, normalizeStyle as H, renderSlot as J, withDirectives as we, createElementVNode as C, vShow as Ke, Transition as T, withCtx as D, Fragment as xe, renderList as Oe, isMemoSame as $e, resolveDynamicComponent as Ne, mergeProps as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Te, ref as S, computed as l, provide as A, inject as G, unref as o, watch as B, nextTick as F, onMounted as De, createElementBlock as y, openBlock as i, createVNode as p, createBlock as f, createCommentVNode as c, normalizeStyle as H, renderSlot as J, withDirectives as we, createElementVNode as C, vShow as Ke, Transition as T, withCtx as D, Fragment as xe, renderList as Oe, isMemoSame as $e, resolveDynamicComponent as Ne, mergeProps as Le, toDisplayString as Ue, Teleport as Q } from "vue";
|
|
2
|
+
import je from "../../2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
|
|
3
3
|
import qe from "../../2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js";
|
|
4
4
|
import Ee from "../../2_feed_elements/BaseEditMessage/BaseEditMessage.vue.js";
|
|
5
5
|
import Pe from "../../2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
|
|
@@ -169,7 +169,7 @@ const dt = {
|
|
|
169
169
|
} = _e({
|
|
170
170
|
objectsRef: l(() => n.objects),
|
|
171
171
|
feedRef: u
|
|
172
|
-
}), b = G("chatAppId"), N = G("selectedChat", void 0),
|
|
172
|
+
}), b = G("chatAppId"), N = G("selectedChat", void 0), L = l(() => {
|
|
173
173
|
if (N)
|
|
174
174
|
return o(N);
|
|
175
175
|
});
|
|
@@ -184,13 +184,13 @@ const dt = {
|
|
|
184
184
|
const s = (e = t.reactions) == null ? void 0 : e.items;
|
|
185
185
|
return s != null && s.length ? s.map((r) => `${r.key}:${r.userId}`).join(",") : "";
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function U(t) {
|
|
188
188
|
var m, d, k;
|
|
189
189
|
const s = t, e = s.channelId || ((m = s.channel) == null ? void 0 : m.channelId) || ((d = s.meta) == null ? void 0 : d.channelId);
|
|
190
190
|
if (e) return String(e);
|
|
191
|
-
if (!s.dialogId || !((k =
|
|
191
|
+
if (!s.dialogId || !((k = L.value) != null && k.dialogs))
|
|
192
192
|
return;
|
|
193
|
-
const r =
|
|
193
|
+
const r = L.value.dialogs.find((I) => I.dialogId === s.dialogId);
|
|
194
194
|
return r == null ? void 0 : r.channelId;
|
|
195
195
|
}
|
|
196
196
|
function le(t) {
|
|
@@ -198,7 +198,7 @@ const dt = {
|
|
|
198
198
|
}
|
|
199
199
|
const g = X, {
|
|
200
200
|
checkScrollPosition: de,
|
|
201
|
-
startScrollWatch:
|
|
201
|
+
startScrollWatch: j,
|
|
202
202
|
stopScrollWatch: q,
|
|
203
203
|
resetAllowFlags: ce
|
|
204
204
|
} = Ye({
|
|
@@ -215,7 +215,7 @@ const dt = {
|
|
|
215
215
|
} = tt({
|
|
216
216
|
enableDoubleClickReply: n.enableDoubleClickReply,
|
|
217
217
|
emit: g,
|
|
218
|
-
isReplyAllowed: (t) => !it(t,
|
|
218
|
+
isReplyAllowed: (t) => !it(t, U(t))
|
|
219
219
|
});
|
|
220
220
|
function pe(t) {
|
|
221
221
|
g("smsInvite", t);
|
|
@@ -313,7 +313,7 @@ const dt = {
|
|
|
313
313
|
style: H({ backgroundImage: `url(${P.value})` }),
|
|
314
314
|
onScroll: s[2] || (s[2] = (e) => o(Be)()),
|
|
315
315
|
onMousedown: s[3] || (s[3] = //@ts-ignore
|
|
316
|
-
(...e) => o(
|
|
316
|
+
(...e) => o(j) && o(j)(...e)),
|
|
317
317
|
onMouseup: s[4] || (s[4] = //@ts-ignore
|
|
318
318
|
(...e) => o(q) && o(q)(...e))
|
|
319
319
|
}, [
|
|
@@ -329,7 +329,7 @@ const dt = {
|
|
|
329
329
|
]),
|
|
330
330
|
p(T, null, {
|
|
331
331
|
default: D(() => [
|
|
332
|
-
o(Me) && !a.isLoadingMore ? (i(), f(
|
|
332
|
+
o(Me) && !a.isLoadingMore ? (i(), f(je, {
|
|
333
333
|
key: 0,
|
|
334
334
|
class: "message-feed__sticky-date",
|
|
335
335
|
text: o(Re)
|
|
@@ -338,7 +338,7 @@ const dt = {
|
|
|
338
338
|
_: 1
|
|
339
339
|
}),
|
|
340
340
|
(i(!0), y(xe, null, Oe(o(se), (e, r, m, d) => {
|
|
341
|
-
const k = [e.messageId, e.text, e.status, e.reply, o($)[o(h) + r], ie(e)];
|
|
341
|
+
const k = [e.messageId, e.text, e.status, e.reply, e.deleted, o($)[o(h) + r], ie(e)];
|
|
342
342
|
if (d && d.key === M(e, r) && $e(d, k)) return d;
|
|
343
343
|
const I = (i(), y("div", {
|
|
344
344
|
id: "msg-" + M(e, r),
|
|
@@ -349,7 +349,7 @@ const dt = {
|
|
|
349
349
|
class: "tracking-message",
|
|
350
350
|
onDblclick: (z) => o(fe)(z, e)
|
|
351
351
|
}, [
|
|
352
|
-
(i(), f(Ne(o(ee)(e)),
|
|
352
|
+
(i(), f(Ne(o(ee)(e)), Le({
|
|
353
353
|
key: M(e, r),
|
|
354
354
|
class: "message-feed__message",
|
|
355
355
|
message: e,
|
|
@@ -360,7 +360,7 @@ const dt = {
|
|
|
360
360
|
"current-user-id": x.value,
|
|
361
361
|
"reaction-user-names": O.value,
|
|
362
362
|
"subtext-tooltip-data": a.subtextTooltipData,
|
|
363
|
-
channel:
|
|
363
|
+
channel: U(e)
|
|
364
364
|
}, { ref_for: !0 }, le(e), {
|
|
365
365
|
onAction: o(ue),
|
|
366
366
|
onReply: o(me),
|
|
@@ -416,7 +416,7 @@ const dt = {
|
|
|
416
416
|
class: "message-feed__button-down",
|
|
417
417
|
onClick: Fe
|
|
418
418
|
}, [
|
|
419
|
-
a.buttonParams ? (i(), y("div", ft,
|
|
419
|
+
a.buttonParams ? (i(), y("div", ft, Ue(a.buttonParams.unreadAmount), 1)) : c("", !0),
|
|
420
420
|
s[5] || (s[5] = C("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
|
|
421
421
|
])) : c("", !0)
|
|
422
422
|
]),
|