@mobilon-dev/chotto 0.3.51 → 0.3.53
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/LoadingIndicator/LoadingIndicator.vue.js +33 -12
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +246 -315
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +32 -61
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js +18 -41
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.js +21 -22
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationPlaceholder.js +13 -22
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.js +34 -46
- package/dist/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.js +19 -0
- package/dist/components/3_compounds/Feed/Feed.vue.js +1 -1
- package/dist/components/3_compounds/Feed/Feed.vue2.js +128 -118
- 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/LoadingIndicator/LoadingIndicator.vue.d.ts +4 -0
- package/dist/types/components/1_atoms/LoadingIndicator/styles/types.d.ts +6 -0
- package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +0 -2
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.d.ts +2 -12
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.d.ts +2 -17
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationMenu.d.ts +1 -3
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationPlaceholder.d.ts +1 -7
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationSubMenu.d.ts +1 -5
- package/dist/types/components/2_blocks/CommunicationPanel/icons/CommunicationPanelCheckIcon.vue.d.ts +2 -0
- package/dist/types/components/2_blocks/CommunicationPanel/icons/index.d.ts +1 -0
- package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +0 -2
- package/dist/types/components/2_blocks/CommunicationPanel/styles/types.d.ts +30 -0
- package/dist/types/components/3_compounds/Feed/Feed.vue.d.ts +2 -2
- package/dist/types/components/3_compounds/Feed/styles/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,87 +1,58 @@
|
|
|
1
|
-
function
|
|
2
|
-
activeChannelType:
|
|
3
|
-
channels:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isChannelEmpty: t,
|
|
14
|
-
isNewDialog: s,
|
|
1
|
+
function P({
|
|
2
|
+
activeChannelType: l,
|
|
3
|
+
channels: i,
|
|
4
|
+
selectedChannel: r,
|
|
5
|
+
selectedChannelType: c,
|
|
6
|
+
hoveredAttribute: s,
|
|
7
|
+
closeMenu: u,
|
|
8
|
+
hasMultipleChannels: k,
|
|
9
|
+
getSingleChannelForType: A,
|
|
10
|
+
getAvailableChannels: C,
|
|
11
|
+
isChannelEmpty: v,
|
|
12
|
+
isNewDialog: f,
|
|
15
13
|
showDefaultChannelTooltipWithTimer: d,
|
|
16
14
|
clearDefaultChannelTooltip: o,
|
|
17
|
-
emit:
|
|
15
|
+
emit: t
|
|
18
16
|
}) {
|
|
19
17
|
const b = (n) => {
|
|
20
|
-
n && (
|
|
18
|
+
n && (t("phone-call", {
|
|
21
19
|
attributeId: n.id,
|
|
22
20
|
phoneNumber: n.data
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
|
|
21
|
+
}), u());
|
|
22
|
+
}, h = (n, e) => {
|
|
23
|
+
t("select-attribute-channel", {
|
|
26
24
|
attributeId: n.id,
|
|
27
|
-
channelId:
|
|
28
|
-
}),
|
|
29
|
-
}, I = (n, u) => {
|
|
30
|
-
u && f("select-attribute-channel", {
|
|
31
|
-
attributeId: u.id,
|
|
32
|
-
channelId: n
|
|
33
|
-
}), e.value = a.value, i.value = c.value.find((l) => l.channelId === n) ?? {}, t(n) && s.value ? d() : o(), v();
|
|
25
|
+
channelId: e
|
|
26
|
+
}), c.value = l.value, r.value = i.value.find((a) => a.channelId === e) ?? {}, v(e) && f.value ? d() : o(), u();
|
|
34
27
|
};
|
|
35
28
|
return {
|
|
36
29
|
handlePhoneCall: b,
|
|
37
|
-
handleRecentAttributeClick: (n) => {
|
|
38
|
-
var P;
|
|
39
|
-
const u = a.value;
|
|
40
|
-
if (!u)
|
|
41
|
-
return;
|
|
42
|
-
if (u === "phone") {
|
|
43
|
-
b(n);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
if (!R(u)) {
|
|
47
|
-
const j = x(u);
|
|
48
|
-
n && j && k(n, j.channelId);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const l = (P = q.value[u]) == null ? void 0 : P.channelId;
|
|
52
|
-
n && l && I(l, n);
|
|
53
|
-
},
|
|
54
30
|
handleAttributeClick: (n) => {
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
if (
|
|
31
|
+
const e = l.value;
|
|
32
|
+
if (e) {
|
|
33
|
+
if (e === "phone") {
|
|
58
34
|
b(n);
|
|
59
35
|
return;
|
|
60
36
|
}
|
|
61
|
-
if (!
|
|
62
|
-
const
|
|
63
|
-
|
|
37
|
+
if (!k(e)) {
|
|
38
|
+
const a = A(e);
|
|
39
|
+
a && h(n, a.channelId);
|
|
64
40
|
}
|
|
65
41
|
}
|
|
66
42
|
},
|
|
67
|
-
selectSingleChannel:
|
|
68
|
-
selectChannelForRecentAttribute: I,
|
|
43
|
+
selectSingleChannel: h,
|
|
69
44
|
selectChannel: (n) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
r.value && (f("select-attribute-channel", {
|
|
75
|
-
attributeId: r.value.id,
|
|
45
|
+
s.value && (t("select-attribute-channel", {
|
|
46
|
+
attributeId: s.value.id,
|
|
76
47
|
channelId: n
|
|
77
|
-
}),
|
|
48
|
+
}), c.value = l.value, r.value = i.value.find((e) => e.channelId === n) ?? {}, v(n) && f.value ? d() : o()), u();
|
|
78
49
|
},
|
|
79
50
|
availableChannels: () => {
|
|
80
|
-
const n =
|
|
81
|
-
return n ?
|
|
51
|
+
const n = l.value;
|
|
52
|
+
return n ? C(n) : [];
|
|
82
53
|
}
|
|
83
54
|
};
|
|
84
55
|
}
|
|
85
56
|
export {
|
|
86
|
-
|
|
57
|
+
P as useCommunicationActions
|
|
87
58
|
};
|
package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationAttributes.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { CHANNEL_TYPES as
|
|
3
|
-
function
|
|
4
|
-
contactAttributes:
|
|
5
|
-
|
|
6
|
-
activeChannelType: i,
|
|
7
|
-
frozenAttribute: b
|
|
1
|
+
import { computed as c, unref as m, ref as f, watch as a } from "vue";
|
|
2
|
+
import { CHANNEL_TYPES as o } from "./useCommunicationChannels.js";
|
|
3
|
+
function A({
|
|
4
|
+
contactAttributes: u,
|
|
5
|
+
frozenAttribute: s
|
|
8
6
|
}) {
|
|
9
|
-
const
|
|
10
|
-
Object.fromEntries(
|
|
11
|
-
),
|
|
7
|
+
const r = c(() => m(u) ?? []), i = f(
|
|
8
|
+
Object.fromEntries(o.map((t) => [t, []]))
|
|
9
|
+
), n = () => {
|
|
12
10
|
const t = Object.fromEntries(
|
|
13
|
-
|
|
11
|
+
o.map((e) => [e, []])
|
|
14
12
|
);
|
|
15
|
-
|
|
13
|
+
r.value.forEach((e) => {
|
|
16
14
|
if (!(!e || !e.type)) {
|
|
17
15
|
if (e.type === "telegram") {
|
|
18
16
|
t.telegram.push(e);
|
|
@@ -23,45 +21,24 @@ function w({
|
|
|
23
21
|
return;
|
|
24
22
|
}
|
|
25
23
|
if (e.type === "phone") {
|
|
26
|
-
["whatsapp", "sms", "phone"].forEach((
|
|
27
|
-
t[
|
|
24
|
+
["whatsapp", "sms", "phone"].forEach((p) => {
|
|
25
|
+
t[p].push(e);
|
|
28
26
|
});
|
|
29
27
|
return;
|
|
30
28
|
}
|
|
31
29
|
t[e.type] && t[e.type].push(e);
|
|
32
30
|
}
|
|
33
|
-
}),
|
|
31
|
+
}), i.value = t;
|
|
34
32
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const e = (n = o.value[t]) == null ? void 0 : n.attributeId;
|
|
39
|
-
return e ? u.value.find((y) => {
|
|
40
|
-
var l;
|
|
41
|
-
return (l = y.id) == null ? void 0 : l.includes(e);
|
|
42
|
-
}) ?? null : null;
|
|
43
|
-
}, a = r(() => {
|
|
44
|
-
const t = i.value;
|
|
45
|
-
return t ? p(t) : null;
|
|
46
|
-
}), A = r(() => {
|
|
47
|
-
const t = i.value;
|
|
48
|
-
if (!t || t === "phone")
|
|
49
|
-
return !1;
|
|
50
|
-
const e = a.value, n = o.value[t];
|
|
51
|
-
return !!(e && (n != null && n.channelId));
|
|
52
|
-
});
|
|
53
|
-
return {
|
|
54
|
-
organizedContactAttributes: s,
|
|
55
|
-
organizeContactAttributes: c,
|
|
56
|
-
recentAttribute: a,
|
|
57
|
-
getRecentAttributeByType: p,
|
|
58
|
-
showRecentAttribute: A,
|
|
33
|
+
return a(r, n, { deep: !0, immediate: !0 }), {
|
|
34
|
+
organizedContactAttributes: i,
|
|
35
|
+
organizeContactAttributes: n,
|
|
59
36
|
isAttributeFrozen: (t) => {
|
|
60
|
-
const e =
|
|
37
|
+
const e = s.value;
|
|
61
38
|
return !t || !(e != null && e.id) ? !1 : t.id === e.id;
|
|
62
39
|
}
|
|
63
40
|
};
|
|
64
41
|
}
|
|
65
42
|
export {
|
|
66
|
-
|
|
43
|
+
A as useCommunicationAttributes
|
|
67
44
|
};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
panelRef:
|
|
4
|
-
channelsPanelRef:
|
|
1
|
+
import { ref as l } from "vue";
|
|
2
|
+
function M({
|
|
3
|
+
panelRef: f,
|
|
4
|
+
channelsPanelRef: s,
|
|
5
5
|
selectedChannelType: d,
|
|
6
|
-
frozenAttribute: o
|
|
7
|
-
isRecentAttributeHovered: v
|
|
6
|
+
frozenAttribute: o
|
|
8
7
|
}) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
8
|
+
const n = l(null), h = l(null), u = l(!1), a = l(!1), i = l("0px"), c = () => {
|
|
9
|
+
s.value && (i.value = `${s.value.offsetWidth}px`);
|
|
10
|
+
}, t = () => {
|
|
11
|
+
u.value = !1, n.value = null, o.value = null, a.value = !1;
|
|
13
12
|
};
|
|
14
13
|
return {
|
|
15
|
-
activeChannelType:
|
|
16
|
-
hoveredChannel:
|
|
17
|
-
showMenu:
|
|
14
|
+
activeChannelType: n,
|
|
15
|
+
hoveredChannel: h,
|
|
16
|
+
showMenu: u,
|
|
18
17
|
showSubMenu: a,
|
|
19
18
|
menuWidth: i,
|
|
20
19
|
updateMenuWidth: c,
|
|
21
|
-
handleChannelClick: (
|
|
22
|
-
if (d.value ===
|
|
23
|
-
|
|
20
|
+
handleChannelClick: (e) => {
|
|
21
|
+
if (d.value === e && n.value === e) {
|
|
22
|
+
t();
|
|
24
23
|
return;
|
|
25
24
|
}
|
|
26
|
-
|
|
25
|
+
n.value = e, u.value = !0, a.value = !1, o.value = null, c();
|
|
27
26
|
},
|
|
28
|
-
closeMenu:
|
|
29
|
-
handleClickOutside: (
|
|
30
|
-
const
|
|
31
|
-
|
|
27
|
+
closeMenu: t,
|
|
28
|
+
handleClickOutside: (e) => {
|
|
29
|
+
const v = f.value;
|
|
30
|
+
v && !v.contains(e.target) && t();
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
M as useCommunicationMenu
|
|
37
36
|
};
|
package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationPlaceholder.js
CHANGED
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function
|
|
3
|
-
showMenu:
|
|
1
|
+
import { computed as l, unref as m } from "vue";
|
|
2
|
+
function p({
|
|
3
|
+
showMenu: u,
|
|
4
4
|
activeChannelType: e,
|
|
5
|
-
emptyChannelsPlaceholder:
|
|
6
|
-
getAvailableChannels:
|
|
7
|
-
|
|
8
|
-
channels: d,
|
|
9
|
-
recentAttributeChannels: v,
|
|
10
|
-
organizedContactAttributes: m,
|
|
11
|
-
showRecentAttribute: p
|
|
5
|
+
emptyChannelsPlaceholder: a,
|
|
6
|
+
getAvailableChannels: o,
|
|
7
|
+
organizedContactAttributes: s
|
|
12
8
|
}) {
|
|
13
|
-
const r =
|
|
14
|
-
|
|
15
|
-
if (!c.value || !e.value || !a.value)
|
|
9
|
+
const r = l(() => m(a) ?? {}), t = l(() => !e.value || !r.value ? null : r.value[e.value] || null), h = l(() => {
|
|
10
|
+
if (!u.value || !e.value || !t.value)
|
|
16
11
|
return !1;
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const t = (o = b.value[e.value]) == null ? void 0 : o.channelId;
|
|
20
|
-
return !(t && C.value.find((s) => s.channelId === t) && i(t) === e.value);
|
|
21
|
-
}
|
|
22
|
-
return !!(A && F);
|
|
12
|
+
const f = o(e.value).length === 0, n = s.value[e.value], i = !n || n.length === 0;
|
|
13
|
+
return !!(f || i);
|
|
23
14
|
});
|
|
24
15
|
return {
|
|
25
|
-
emptyChannelsPlaceholderText:
|
|
26
|
-
shouldShowEmptyChannelsPlaceholder:
|
|
16
|
+
emptyChannelsPlaceholderText: t,
|
|
17
|
+
shouldShowEmptyChannelsPlaceholder: h
|
|
27
18
|
};
|
|
28
19
|
}
|
|
29
20
|
export {
|
|
30
|
-
|
|
21
|
+
p as useCommunicationPlaceholder
|
|
31
22
|
};
|
|
@@ -1,69 +1,57 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
activeChannelType:
|
|
4
|
-
showSubMenu:
|
|
5
|
-
frozenAttribute:
|
|
6
|
-
hoveredAttribute:
|
|
7
|
-
|
|
8
|
-
hasMultipleChannels: i
|
|
1
|
+
import { ref as f } from "vue";
|
|
2
|
+
function q({
|
|
3
|
+
activeChannelType: g,
|
|
4
|
+
showSubMenu: n,
|
|
5
|
+
frozenAttribute: o,
|
|
6
|
+
hoveredAttribute: b,
|
|
7
|
+
hasMultipleChannels: h
|
|
9
8
|
}) {
|
|
10
|
-
const
|
|
11
|
-
t.value = !1, a.value = null, v.value = null;
|
|
12
|
-
};
|
|
9
|
+
const t = f(0);
|
|
13
10
|
return {
|
|
14
|
-
subMenuTop:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (!(!u || !i(u)))
|
|
19
|
-
return m(), o.value = !0, t.value = !0, e;
|
|
20
|
-
},
|
|
21
|
-
handleRecentAttributeMouseLeave: () => {
|
|
22
|
-
t.value || (o.value = !1);
|
|
23
|
-
},
|
|
24
|
-
handleAttributeMouseEnter: (e, u) => {
|
|
25
|
-
const l = s.value;
|
|
26
|
-
return !l || !i(l) ? null : (o.value = !1, v.value = e, t.value = !0, a.value = e, u);
|
|
11
|
+
subMenuTop: t,
|
|
12
|
+
handleAttributeMouseEnter: (e, l) => {
|
|
13
|
+
const u = g.value;
|
|
14
|
+
return !u || !h(u) ? null : (b.value = e, n.value = !0, o.value = e, l);
|
|
27
15
|
},
|
|
28
16
|
handleAttributeMouseLeave: () => {
|
|
29
|
-
|
|
17
|
+
n.value || (o.value = null);
|
|
30
18
|
},
|
|
31
19
|
keepSubMenuOpen: () => {
|
|
32
|
-
|
|
20
|
+
n.value = !0;
|
|
33
21
|
},
|
|
34
22
|
closeSubMenu: () => {
|
|
35
|
-
|
|
23
|
+
n.value = !1, o.value = null;
|
|
36
24
|
},
|
|
37
|
-
alignSubMenuWithTarget: (e,
|
|
38
|
-
var
|
|
39
|
-
if (!
|
|
40
|
-
|
|
25
|
+
alignSubMenuWithTarget: (e, l) => {
|
|
26
|
+
var u, r, s;
|
|
27
|
+
if (!l) {
|
|
28
|
+
t.value = 0;
|
|
41
29
|
return;
|
|
42
30
|
}
|
|
43
31
|
try {
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
46
|
-
|
|
32
|
+
const i = (u = e.value) == null ? void 0 : u.querySelector(".attributes-menu"), a = (r = e.value) == null ? void 0 : r.querySelector(".sub-menu-header"), v = (s = e.value) == null ? void 0 : s.querySelector(".sub-menu");
|
|
33
|
+
if (!i) {
|
|
34
|
+
t.value = 0;
|
|
47
35
|
return;
|
|
48
36
|
}
|
|
49
|
-
const
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
|
|
37
|
+
const M = i.getBoundingClientRect(), S = l.getBoundingClientRect();
|
|
38
|
+
let m = 0;
|
|
39
|
+
if (a) {
|
|
40
|
+
const c = a.getBoundingClientRect(), y = getComputedStyle(a), p = parseFloat(y.marginBottom || "0");
|
|
41
|
+
m = c.height + (Number.isNaN(p) ? 0 : p);
|
|
54
42
|
}
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
|
|
43
|
+
let d = 0;
|
|
44
|
+
if (v) {
|
|
45
|
+
const c = getComputedStyle(v);
|
|
46
|
+
d = parseFloat(c.paddingTop || "0") || 0;
|
|
59
47
|
}
|
|
60
|
-
|
|
48
|
+
t.value = S.top - M.top - m - d - 2;
|
|
61
49
|
} catch {
|
|
62
|
-
|
|
50
|
+
t.value = 0;
|
|
63
51
|
}
|
|
64
52
|
}
|
|
65
53
|
};
|
|
66
54
|
}
|
|
67
55
|
export {
|
|
68
|
-
|
|
56
|
+
q as useCommunicationSubMenu
|
|
69
57
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createElementBlock as t, openBlock as o, createElementVNode as n } from "vue";
|
|
2
|
+
import c from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const r = {}, l = {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: "16",
|
|
6
|
+
height: "16",
|
|
7
|
+
fill: "#007CFF",
|
|
8
|
+
class: "bi bi-check-lg",
|
|
9
|
+
viewBox: "0 0 16 16"
|
|
10
|
+
};
|
|
11
|
+
function i(s, e) {
|
|
12
|
+
return o(), t("svg", l, [...e[0] || (e[0] = [
|
|
13
|
+
n("path", { d: "M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z" }, null, -1)
|
|
14
|
+
])]);
|
|
15
|
+
}
|
|
16
|
+
const f = /* @__PURE__ */ c(r, [["render", i]]);
|
|
17
|
+
export {
|
|
18
|
+
f as default
|
|
19
|
+
};
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-595f91e2"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|