@mobilon-dev/chotto 0.3.35 → 0.3.37
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/1_atoms/ContactContextMenu/ContactContextMenu.vue.js +7 -0
- package/dist/components/1_atoms/ContactContextMenu/ContactContextMenu.vue2.js +114 -0
- package/dist/components/1_atoms/ContextMenu/ContextMenu.vue.js +23 -19
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +2 -2
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +62 -34
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +262 -203
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +56 -52
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +20 -17
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js +27 -23
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue.js +1 -1
- package/dist/components/2_chatinput_elements/StickerPicker/StickerPicker.vue2.js +176 -203
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue2.js +18 -0
- package/dist/components/2_feed_elements/MessageStatusIndicator/MessageStatusIndicator.vue.js +1 -1
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +71 -65
- package/dist/components/3_compounds/ChatList/composables/useChatListFilter.js +14 -17
- package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +13 -11
- package/dist/index.js +239 -235
- package/dist/locale/en.js +4 -0
- package/dist/locale/ru.js +6 -2
- 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/components/1_atoms/ContactContextMenu/ContactContextMenu.vue.d.ts +59 -0
- package/dist/types/components/1_atoms/ContactContextMenu/stories/ContactContextMenu.stories.d.ts +10 -0
- package/dist/types/components/1_atoms/ContactContextMenu/styles/types.d.ts +67 -0
- package/dist/types/components/1_atoms/ContextMenu/styles/types.d.ts +6 -0
- package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +22 -1
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +6 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +6 -2
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.d.ts +10 -2
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +6 -0
- package/dist/types/components/2_chatlist_elements/ChatItem/styles/types.d.ts +8 -0
- package/dist/types/components/2_feed_elements/DelimiterMessage/DelimiterMessage.vue.d.ts +13 -0
- package/dist/types/components/2_feed_elements/DelimiterMessage/stories/DelimiterMessage.stories.d.ts +6 -0
- package/dist/types/components/2_feed_elements/DelimiterMessage/styles/types.d.ts +27 -0
- package/dist/types/components/2_feed_elements/types/messages.d.ts +4 -0
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +1 -1
- package/dist/types/components/3_compounds/ChatList/composables/useChatListFilter.d.ts +3 -3
- package/dist/types/components/4_layouts/BaseLayout/styles/types.d.ts +6 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/locale/en.d.ts +4 -0
- package/dist/types/locale/ru.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,83 +1,87 @@
|
|
|
1
|
-
function
|
|
2
|
-
activeChannelType:
|
|
3
|
-
channels:
|
|
4
|
-
recentAttributeChannels:
|
|
5
|
-
selectedChannel:
|
|
6
|
-
selectedChannelType:
|
|
7
|
-
isRecentAttributeHovered:
|
|
8
|
-
hoveredAttribute:
|
|
9
|
-
closeMenu:
|
|
10
|
-
hasMultipleChannels:
|
|
11
|
-
getSingleChannelForType:
|
|
12
|
-
getAvailableChannels:
|
|
13
|
-
|
|
1
|
+
function K({
|
|
2
|
+
activeChannelType: a,
|
|
3
|
+
channels: c,
|
|
4
|
+
recentAttributeChannels: q,
|
|
5
|
+
selectedChannel: i,
|
|
6
|
+
selectedChannelType: e,
|
|
7
|
+
isRecentAttributeHovered: z,
|
|
8
|
+
hoveredAttribute: r,
|
|
9
|
+
closeMenu: v,
|
|
10
|
+
hasMultipleChannels: R,
|
|
11
|
+
getSingleChannelForType: x,
|
|
12
|
+
getAvailableChannels: B,
|
|
13
|
+
isChannelEmpty: t,
|
|
14
|
+
isNewDialog: s,
|
|
15
|
+
showDefaultChannelTooltipWithTimer: d,
|
|
16
|
+
clearDefaultChannelTooltip: o,
|
|
17
|
+
emit: f
|
|
14
18
|
}) {
|
|
15
|
-
const
|
|
16
|
-
n && (
|
|
19
|
+
const b = (n) => {
|
|
20
|
+
n && (f("phone-call", {
|
|
17
21
|
attributeId: n.id,
|
|
18
22
|
phoneNumber: n.data
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
|
|
23
|
+
}), v());
|
|
24
|
+
}, k = (n, u) => {
|
|
25
|
+
f("select-attribute-channel", {
|
|
22
26
|
attributeId: n.id,
|
|
23
|
-
channelId:
|
|
24
|
-
}),
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
attributeId:
|
|
27
|
+
channelId: u
|
|
28
|
+
}), e.value = a.value, i.value = c.value.find((l) => l.channelId === u) ?? {}, t(u) && s.value ? d() : o(), v();
|
|
29
|
+
}, I = (n, u) => {
|
|
30
|
+
u && f("select-attribute-channel", {
|
|
31
|
+
attributeId: u.id,
|
|
28
32
|
channelId: n
|
|
29
|
-
}),
|
|
33
|
+
}), e.value = a.value, i.value = c.value.find((l) => l.channelId === n) ?? {}, t(n) && s.value ? d() : o(), v();
|
|
30
34
|
};
|
|
31
35
|
return {
|
|
32
|
-
handlePhoneCall:
|
|
36
|
+
handlePhoneCall: b,
|
|
33
37
|
handleRecentAttributeClick: (n) => {
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
38
|
+
var P;
|
|
39
|
+
const u = a.value;
|
|
40
|
+
if (!u)
|
|
37
41
|
return;
|
|
38
|
-
if (
|
|
39
|
-
|
|
42
|
+
if (u === "phone") {
|
|
43
|
+
b(n);
|
|
40
44
|
return;
|
|
41
45
|
}
|
|
42
|
-
if (!
|
|
43
|
-
const
|
|
44
|
-
n &&
|
|
46
|
+
if (!R(u)) {
|
|
47
|
+
const j = x(u);
|
|
48
|
+
n && j && k(n, j.channelId);
|
|
45
49
|
return;
|
|
46
50
|
}
|
|
47
|
-
const
|
|
48
|
-
n &&
|
|
51
|
+
const l = (P = q.value[u]) == null ? void 0 : P.channelId;
|
|
52
|
+
n && l && I(l, n);
|
|
49
53
|
},
|
|
50
54
|
handleAttributeClick: (n) => {
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
+
const u = a.value;
|
|
56
|
+
if (u) {
|
|
57
|
+
if (u === "phone") {
|
|
58
|
+
b(n);
|
|
55
59
|
return;
|
|
56
60
|
}
|
|
57
|
-
if (!
|
|
58
|
-
const
|
|
59
|
-
|
|
61
|
+
if (!R(u)) {
|
|
62
|
+
const l = x(u);
|
|
63
|
+
l && k(n, l.channelId);
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
66
|
},
|
|
63
|
-
selectSingleChannel:
|
|
64
|
-
selectChannelForRecentAttribute:
|
|
67
|
+
selectSingleChannel: k,
|
|
68
|
+
selectChannelForRecentAttribute: I,
|
|
65
69
|
selectChannel: (n) => {
|
|
66
|
-
if (
|
|
67
|
-
|
|
70
|
+
if (z.value) {
|
|
71
|
+
I(n, r.value ?? null);
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
70
|
-
|
|
71
|
-
attributeId:
|
|
74
|
+
r.value && (f("select-attribute-channel", {
|
|
75
|
+
attributeId: r.value.id,
|
|
72
76
|
channelId: n
|
|
73
|
-
}),
|
|
77
|
+
}), e.value = a.value, i.value = c.value.find((u) => u.channelId === n) ?? {}, t(n) && s.value ? d() : o()), v();
|
|
74
78
|
},
|
|
75
79
|
availableChannels: () => {
|
|
76
|
-
const n =
|
|
77
|
-
return n ?
|
|
80
|
+
const n = a.value;
|
|
81
|
+
return n ? B(n) : [];
|
|
78
82
|
}
|
|
79
83
|
};
|
|
80
84
|
}
|
|
81
85
|
export {
|
|
82
|
-
|
|
86
|
+
K as useCommunicationActions
|
|
83
87
|
};
|
package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { computed as r, unref as
|
|
2
|
-
import { CHANNEL_TYPES as
|
|
3
|
-
function
|
|
4
|
-
contactAttributes:
|
|
1
|
+
import { computed as r, unref as f, ref as y, watch as g } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as m } from "./useCommunicationChannels.js";
|
|
3
|
+
function w({
|
|
4
|
+
contactAttributes: d,
|
|
5
5
|
recentAttributeChannels: b,
|
|
6
6
|
activeChannelType: o,
|
|
7
|
-
frozenAttribute:
|
|
7
|
+
frozenAttribute: h
|
|
8
8
|
}) {
|
|
9
|
-
const u = r(() =>
|
|
10
|
-
Object.fromEntries(
|
|
9
|
+
const u = r(() => f(d) ?? []), i = r(() => f(b) ?? {}), s = y(
|
|
10
|
+
Object.fromEntries(m.map((t) => [t, []]))
|
|
11
11
|
), c = () => {
|
|
12
12
|
const t = Object.fromEntries(
|
|
13
|
-
|
|
13
|
+
m.map((e) => [e, []])
|
|
14
14
|
);
|
|
15
15
|
u.value.forEach((e) => {
|
|
16
16
|
if (!(!e || !e.type)) {
|
|
@@ -28,33 +28,36 @@ function C({
|
|
|
28
28
|
}
|
|
29
29
|
}), s.value = t;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
g(u, c, { deep: !0, immediate: !0 });
|
|
32
32
|
const a = (t) => {
|
|
33
33
|
var n;
|
|
34
34
|
const e = (n = i.value[t]) == null ? void 0 : n.attributeId;
|
|
35
|
-
return e ? u.value.find((
|
|
36
|
-
|
|
35
|
+
return e ? u.value.find((v) => {
|
|
36
|
+
var p;
|
|
37
|
+
return (p = v.id) == null ? void 0 : p.includes(e);
|
|
38
|
+
}) ?? null : null;
|
|
39
|
+
}, l = r(() => {
|
|
37
40
|
const t = o.value;
|
|
38
41
|
return t ? a(t) : null;
|
|
39
|
-
}),
|
|
42
|
+
}), A = r(() => {
|
|
40
43
|
const t = o.value;
|
|
41
44
|
if (!t || t === "phone")
|
|
42
45
|
return !1;
|
|
43
|
-
const e =
|
|
46
|
+
const e = l.value, n = i.value[t];
|
|
44
47
|
return !!(e && (n != null && n.channelId));
|
|
45
48
|
});
|
|
46
49
|
return {
|
|
47
50
|
organizedContactAttributes: s,
|
|
48
51
|
organizeContactAttributes: c,
|
|
49
|
-
recentAttribute:
|
|
52
|
+
recentAttribute: l,
|
|
50
53
|
getRecentAttributeByType: a,
|
|
51
|
-
showRecentAttribute:
|
|
54
|
+
showRecentAttribute: A,
|
|
52
55
|
isAttributeFrozen: (t) => {
|
|
53
|
-
const e =
|
|
56
|
+
const e = h.value;
|
|
54
57
|
return !t || !(e != null && e.id) ? !1 : t.id === e.id;
|
|
55
58
|
}
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
export {
|
|
59
|
-
|
|
62
|
+
w as useCommunicationAttributes
|
|
60
63
|
};
|
package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationDialogSync.js
CHANGED
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
import { watch as
|
|
2
|
-
import { CHANNEL_TYPES as
|
|
3
|
-
function
|
|
4
|
-
selectedChannelType:
|
|
5
|
-
selectedChannel:
|
|
6
|
-
channels:
|
|
7
|
-
selectedDialog:
|
|
1
|
+
import { watch as d, unref as p } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as v } from "./useCommunicationChannels.js";
|
|
3
|
+
function b({
|
|
4
|
+
selectedChannelType: e,
|
|
5
|
+
selectedChannel: u,
|
|
6
|
+
channels: c,
|
|
7
|
+
selectedDialog: i,
|
|
8
|
+
isChannelEmpty: m,
|
|
9
|
+
isNewDialog: o,
|
|
10
|
+
showDefaultChannelTooltipWithTimer: f,
|
|
11
|
+
clearDefaultChannelTooltip: l
|
|
8
12
|
}) {
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
11
|
-
|
|
13
|
+
const r = (n) => {
|
|
14
|
+
if (!n || !n.channelId) {
|
|
15
|
+
e.value = null, u.value = {}, l();
|
|
12
16
|
return;
|
|
13
17
|
}
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
18
|
+
const a = n.channelId ? n.channelId.split(".")[0] : null, t = a ? I(a) : null;
|
|
19
|
+
if (t) {
|
|
20
|
+
e.value = t;
|
|
21
|
+
const h = c.value.find((s) => s.channelId === n.channelId);
|
|
22
|
+
u.value = h ?? {}, m(n.channelId) && o.value ? f() : l();
|
|
19
23
|
}
|
|
20
24
|
};
|
|
21
|
-
return
|
|
22
|
-
() =>
|
|
23
|
-
(
|
|
24
|
-
|
|
25
|
+
return d(
|
|
26
|
+
() => p(i),
|
|
27
|
+
(n) => {
|
|
28
|
+
r(n ?? null);
|
|
25
29
|
},
|
|
26
30
|
{ immediate: !0, deep: !0 }
|
|
27
31
|
), {
|
|
28
|
-
updateSelectedChannelFromDialog:
|
|
32
|
+
updateSelectedChannelFromDialog: r
|
|
29
33
|
};
|
|
30
34
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
35
|
+
function I(e) {
|
|
36
|
+
return e.includes("waba") ? "whatsapp" : e.includes("telegrambot") ? "telegram" : v.includes(e) ? e : null;
|
|
33
37
|
}
|
|
34
38
|
export {
|
|
35
|
-
|
|
39
|
+
b as useCommunicationDialogSync
|
|
36
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./StickerPicker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-524cf7a2"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|