@mobilon-dev/chotto 0.3.31 → 0.3.32
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 +23 -0
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.js +1 -1
- package/dist/components/3_compounds/ChatList/ChatList.vue.js +61 -52
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.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 +7 -0
- package/dist/types/components/1_atoms/LoadingIndicator/stories/LoadingIndicator.stories.d.ts +9 -0
- package/dist/types/components/1_atoms/LoadingIndicator/styles/types.d.ts +49 -0
- package/dist/types/components/2_blocks/CommunicationPanel/composables/useCommunicationChannels.d.ts +1 -1
- package/dist/types/components/3_compounds/ChatList/ChatList.vue.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createElementBlock as d, createCommentVNode as s, openBlock as o, createStaticVNode as a } from "vue";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import l from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const i = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "messages-loading-indicator"
|
|
7
|
+
}, c = {
|
|
8
|
+
__name: "LoadingIndicator",
|
|
9
|
+
props: {
|
|
10
|
+
isLoading: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(t) {
|
|
16
|
+
return (r, e) => t.isLoading ? (o(), d("div", i, [...e[0] || (e[0] = [
|
|
17
|
+
a('<svg width="120px" height="116px" viewBox="-8 -8 120 116" xmlns="http://www.w3.org/2000/svg" data-v-eed64d67><ellipse class="dot dot-1" cx="51.75" cy="18.82" rx="12.18" ry="12.14" data-v-eed64d67></ellipse><ellipse class="dot dot-2" cx="84.42" cy="42.24" rx="12.18" ry="12.14" data-v-eed64d67></ellipse><ellipse class="dot dot-3" cx="72.00" cy="80.35" rx="12.18" ry="12.14" data-v-eed64d67></ellipse><ellipse class="dot dot-4" cx="31.51" cy="80.35" rx="12.18" ry="12.14" data-v-eed64d67></ellipse><ellipse class="dot dot-5" cx="18.86" cy="42.24" rx="12.18" ry="12.14" data-v-eed64d67></ellipse></svg>', 1)
|
|
18
|
+
])])) : s("", !0);
|
|
19
|
+
}
|
|
20
|
+
}, m = /* @__PURE__ */ l(c, [["__scopeId", "data-v-eed64d67"]]);
|
|
21
|
+
export {
|
|
22
|
+
m as default
|
|
23
|
+
};
|
|
@@ -9,7 +9,7 @@ import v from "../icons/CommunicationPanelSubmenuWhatsAppIcon.vue.js";
|
|
|
9
9
|
import x from "../icons/CommunicationPanelSubmenuTelegramIcon.vue.js";
|
|
10
10
|
import w from "../icons/CommunicationPanelSubmenuMaxIcon.vue.js";
|
|
11
11
|
import A from "../icons/CommunicationPanelSubmenuSMSIcon.vue.js";
|
|
12
|
-
const F = ["
|
|
12
|
+
const F = ["whatsapp", "telegram", "max", "sms", "phone"], y = {
|
|
13
13
|
phone: P,
|
|
14
14
|
whatsapp: S,
|
|
15
15
|
telegram: M,
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import
|
|
1
|
+
import { ref as I, computed as D, createElementBlock as o, openBlock as a, renderSlot as v, createBlock as r, createCommentVNode as n, createElementVNode as i, createVNode as L, unref as e, toDisplayString as u, createTextVNode as Q, Fragment as m, renderList as p, Transition as N, withCtx as V } from "vue";
|
|
2
|
+
import S from "../../2_chatlist_elements/ChatItem/ChatItem.vue.js";
|
|
3
3
|
import $ from "../../2_chatlist_elements/ChatFilter/ChatFilter.vue.js";
|
|
4
4
|
import q from "../../2_chatlist_elements/ChatTabs/ChatTabs.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import M from "../../1_atoms/LoadingIndicator/LoadingIndicator.vue.js";
|
|
6
|
+
import { useChatListScroll as P } from "./composables/useChatListScroll.js";
|
|
7
|
+
import { useChatListSelection as U } from "./composables/useChatListSelection.js";
|
|
8
|
+
import { useChatListFilter as W } from "./composables/useChatListFilter.js";
|
|
9
|
+
import { useChatListActions as j } from "./composables/useChatListActions.js";
|
|
9
10
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
const
|
|
11
|
+
import O from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
12
|
+
const R = { class: "chat-list" }, z = {
|
|
12
13
|
key: 2,
|
|
13
14
|
class: "chat-list__search-indicator"
|
|
14
|
-
},
|
|
15
|
+
}, G = { class: "chat-list__search-content" }, H = { class: "chat-list__search-text" }, J = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "chat-list__search-progress"
|
|
17
|
-
},
|
|
18
|
+
}, K = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "chat-list__search-query"
|
|
20
|
-
},
|
|
21
|
+
}, X = {
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "chat-list__search-stats"
|
|
23
|
-
},
|
|
24
|
+
}, Y = {
|
|
24
25
|
key: 0,
|
|
25
26
|
class: "chat-list__no-data"
|
|
26
|
-
},
|
|
27
|
+
}, Z = { class: "chat-list__fixed-items-top" }, tt = { class: "chat-list__scrollable-items" }, et = { class: "chat-list__fixed-items-bottom" }, st = {
|
|
27
28
|
__name: "ChatList",
|
|
28
29
|
props: {
|
|
29
30
|
chats: {
|
|
@@ -66,45 +67,49 @@ const O = { class: "chat-list" }, R = {
|
|
|
66
67
|
showDialogs: {
|
|
67
68
|
type: Boolean,
|
|
68
69
|
default: !0
|
|
70
|
+
},
|
|
71
|
+
isLoading: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: !1
|
|
69
74
|
}
|
|
70
75
|
},
|
|
71
76
|
emits: ["select", "action", "loadMoreChats", "expand", "tab-click", "search", "clear-search"],
|
|
72
77
|
setup(s, { emit: A }) {
|
|
73
|
-
const
|
|
74
|
-
isShowButton:
|
|
78
|
+
const d = s, c = A, _ = I(), k = D(() => d.chats), {
|
|
79
|
+
isShowButton: B,
|
|
75
80
|
scrollToTopForce: C,
|
|
76
81
|
scrollCheck: b,
|
|
77
82
|
startScrollWatch: x,
|
|
78
83
|
stopScrollWatch: T
|
|
79
|
-
} =
|
|
80
|
-
selectChat:
|
|
81
|
-
} =
|
|
82
|
-
getSortedAndFilteredChats:
|
|
83
|
-
getFilter:
|
|
84
|
-
} =
|
|
85
|
-
expandChat:
|
|
84
|
+
} = P({ refChatList: _, chats: k, emit: c }), {
|
|
85
|
+
selectChat: f
|
|
86
|
+
} = U({ chats: k, emit: c }), {
|
|
87
|
+
getSortedAndFilteredChats: h,
|
|
88
|
+
getFilter: E
|
|
89
|
+
} = W({ props: d, emit: c }), {
|
|
90
|
+
expandChat: g,
|
|
86
91
|
action: y,
|
|
87
|
-
handleTabClick:
|
|
88
|
-
} =
|
|
89
|
-
return (w, l) => (a(), o("div",
|
|
92
|
+
handleTabClick: F
|
|
93
|
+
} = j({ emit: c });
|
|
94
|
+
return (w, l) => (a(), o("div", R, [
|
|
90
95
|
v(w.$slots, "header", {}, void 0, !0),
|
|
91
96
|
v(w.$slots, "sidebar", {}, void 0, !0),
|
|
92
97
|
s.filterEnabled ? (a(), r($, {
|
|
93
98
|
key: 0,
|
|
94
99
|
class: "chat-list__filter",
|
|
95
|
-
onUpdate: e(
|
|
100
|
+
onUpdate: e(E)
|
|
96
101
|
}, null, 8, ["onUpdate"])) : n("", !0),
|
|
97
102
|
s.dialogTabs && s.dialogTabs.length > 0 ? (a(), r(q, {
|
|
98
103
|
key: 1,
|
|
99
104
|
tabs: s.dialogTabs,
|
|
100
|
-
onTabClick: e(
|
|
105
|
+
onTabClick: e(F)
|
|
101
106
|
}, null, 8, ["tabs", "onTabClick"])) : n("", !0),
|
|
102
|
-
s.isSearching || s.searchQuery ? (a(), o("div",
|
|
103
|
-
i("div",
|
|
104
|
-
i("div",
|
|
105
|
-
s.isSearching ? (a(), o("span",
|
|
106
|
-
Q(' Поиск "' +
|
|
107
|
-
s.searchStats.loaded > 0 ? (a(), o("span",
|
|
107
|
+
s.isSearching || s.searchQuery ? (a(), o("div", z, [
|
|
108
|
+
i("div", G, [
|
|
109
|
+
i("div", H, [
|
|
110
|
+
s.isSearching ? (a(), o("span", J, u(s.searchProgress || "Поиск..."), 1)) : (a(), o("span", K, [
|
|
111
|
+
Q(' Поиск "' + u(s.searchQuery) + '" завершён ', 1),
|
|
112
|
+
s.searchStats.loaded > 0 ? (a(), o("span", X, " (" + u(s.searchStats.loaded) + " " + u(s.searchStats.total !== "?" ? `из ${s.searchStats.total}` : "") + ") ", 1)) : n("", !0)
|
|
108
113
|
]))
|
|
109
114
|
]),
|
|
110
115
|
s.searchQuery ? (a(), o("button", {
|
|
@@ -119,56 +124,60 @@ const O = { class: "chat-list" }, R = {
|
|
|
119
124
|
])) : n("", !0),
|
|
120
125
|
i("div", {
|
|
121
126
|
ref_key: "refChatList",
|
|
122
|
-
ref:
|
|
127
|
+
ref: _,
|
|
123
128
|
class: "chat-list__items",
|
|
124
129
|
onScroll: l[1] || (l[1] = (...t) => e(b) && e(b)(...t)),
|
|
125
130
|
onMousedown: l[2] || (l[2] = (...t) => e(x) && e(x)(...t)),
|
|
126
131
|
onMouseup: l[3] || (l[3] = (...t) => e(T) && e(T)(...t))
|
|
127
132
|
}, [
|
|
128
|
-
|
|
133
|
+
L(M, {
|
|
134
|
+
class: "chat-list__loading-indicator",
|
|
135
|
+
"is-loading": d.isLoading
|
|
136
|
+
}, null, 8, ["is-loading"]),
|
|
137
|
+
!d.isLoading && e(h)().length === 0 ? (a(), o("div", Y, [...l[6] || (l[6] = [
|
|
129
138
|
i("div", { class: "chat-list__placeholder" }, [
|
|
130
139
|
i("p", { class: "chat-list__placeholder-title" }, " Нет контактных данных, чтобы начать чат "),
|
|
131
140
|
i("p", { class: "chat-list__placeholder-hint" }, " Добавьте номер телефона или имя Telegram в карточку контакта ")
|
|
132
141
|
], -1)
|
|
133
|
-
])])) : (a(), o(
|
|
134
|
-
i("div",
|
|
135
|
-
(a(!0), o(
|
|
142
|
+
])])) : (a(), o(m, { key: 1 }, [
|
|
143
|
+
i("div", Z, [
|
|
144
|
+
(a(!0), o(m, null, p(e(h)().filter((t) => t.isFixedTop), (t) => (a(), r(S, {
|
|
136
145
|
key: t.chatId,
|
|
137
146
|
class: "chat-list__item",
|
|
138
147
|
chat: t,
|
|
139
148
|
"show-dialogs": s.showDialogs,
|
|
140
|
-
onSelect: e(
|
|
141
|
-
onExpand: e(
|
|
149
|
+
onSelect: e(f),
|
|
150
|
+
onExpand: e(g),
|
|
142
151
|
onAction: e(y)
|
|
143
152
|
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
144
153
|
]),
|
|
145
|
-
i("div",
|
|
146
|
-
(a(!0), o(
|
|
154
|
+
i("div", tt, [
|
|
155
|
+
(a(!0), o(m, null, p(e(h)().filter((t) => !t.isFixedBottom && !t.isFixedTop), (t) => (a(), r(S, {
|
|
147
156
|
key: t.chatId,
|
|
148
157
|
class: "chat-list__item",
|
|
149
158
|
chat: t,
|
|
150
159
|
"show-dialogs": s.showDialogs,
|
|
151
|
-
onSelect: e(
|
|
152
|
-
onExpand: e(
|
|
160
|
+
onSelect: e(f),
|
|
161
|
+
onExpand: e(g),
|
|
153
162
|
onAction: e(y)
|
|
154
163
|
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
155
164
|
]),
|
|
156
|
-
i("div",
|
|
157
|
-
(a(!0), o(
|
|
165
|
+
i("div", et, [
|
|
166
|
+
(a(!0), o(m, null, p(e(h)().filter((t) => t.isFixedBottom), (t) => (a(), r(S, {
|
|
158
167
|
key: t.chatId,
|
|
159
168
|
class: "chat-list__item",
|
|
160
169
|
chat: t,
|
|
161
170
|
"show-dialogs": s.showDialogs,
|
|
162
|
-
onSelect: e(
|
|
163
|
-
onExpand: e(
|
|
171
|
+
onSelect: e(f),
|
|
172
|
+
onExpand: e(g),
|
|
164
173
|
onAction: e(y)
|
|
165
174
|
}, null, 8, ["chat", "show-dialogs", "onSelect", "onExpand", "onAction"]))), 128))
|
|
166
175
|
])
|
|
167
176
|
], 64))
|
|
168
177
|
], 544),
|
|
169
|
-
|
|
178
|
+
L(N, null, {
|
|
170
179
|
default: V(() => [
|
|
171
|
-
e(
|
|
180
|
+
e(B) ? (a(), o("button", {
|
|
172
181
|
key: 0,
|
|
173
182
|
class: "chat-list__button-up",
|
|
174
183
|
onClick: l[4] || (l[4] = (...t) => e(C) && e(C)(...t))
|
|
@@ -180,7 +189,7 @@ const O = { class: "chat-list" }, R = {
|
|
|
180
189
|
})
|
|
181
190
|
]));
|
|
182
191
|
}
|
|
183
|
-
},
|
|
192
|
+
}, ft = /* @__PURE__ */ O(st, [["__scopeId", "data-v-98c65a4e"]]);
|
|
184
193
|
export {
|
|
185
|
-
|
|
194
|
+
ft as default
|
|
186
195
|
};
|