@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.
@@ -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 = ["phone", "whatsapp", "telegram", "max", "sms"], y = {
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 L, computed as I, createElementBlock as o, openBlock as a, renderSlot as v, createBlock as r, createCommentVNode as n, createElementVNode as i, createVNode as D, unref as e, toDisplayString as h, createTextVNode as Q, Fragment as u, renderList as g, Transition as N, withCtx as V } from "vue";
2
- import p from "../../2_chatlist_elements/ChatItem/ChatItem.vue.js";
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 { useChatListScroll as M } from "./composables/useChatListScroll.js";
6
- import { useChatListSelection as P } from "./composables/useChatListSelection.js";
7
- import { useChatListFilter as U } from "./composables/useChatListFilter.js";
8
- import { useChatListActions as W } from "./composables/useChatListActions.js";
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 j from "../../../_virtual/_plugin-vue_export-helper.js";
11
- const O = { class: "chat-list" }, R = {
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
- }, z = { class: "chat-list__search-content" }, G = { class: "chat-list__search-text" }, H = {
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
- }, J = {
18
+ }, K = {
18
19
  key: 1,
19
20
  class: "chat-list__search-query"
20
- }, K = {
21
+ }, X = {
21
22
  key: 0,
22
23
  class: "chat-list__search-stats"
23
- }, X = {
24
+ }, Y = {
24
25
  key: 0,
25
26
  class: "chat-list__no-data"
26
- }, Y = { class: "chat-list__fixed-items-top" }, Z = { class: "chat-list__scrollable-items" }, tt = { class: "chat-list__fixed-items-bottom" }, et = {
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 S = s, c = A, k = L(), _ = I(() => S.chats), {
74
- isShowButton: E,
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
- } = M({ refChatList: k, chats: _, emit: c }), {
80
- selectChat: m
81
- } = P({ chats: _, emit: c }), {
82
- getSortedAndFilteredChats: d,
83
- getFilter: F
84
- } = U({ props: S, emit: c }), {
85
- expandChat: f,
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: B
88
- } = W({ emit: c });
89
- return (w, l) => (a(), o("div", O, [
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(F)
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(B)
105
+ onTabClick: e(F)
101
106
  }, null, 8, ["tabs", "onTabClick"])) : n("", !0),
102
- s.isSearching || s.searchQuery ? (a(), o("div", R, [
103
- i("div", z, [
104
- i("div", G, [
105
- s.isSearching ? (a(), o("span", H, h(s.searchProgress || "Поиск..."), 1)) : (a(), o("span", J, [
106
- Q(' Поиск "' + h(s.searchQuery) + '" завершён ', 1),
107
- s.searchStats.loaded > 0 ? (a(), o("span", K, " (" + h(s.searchStats.loaded) + " " + h(s.searchStats.total !== "?" ? `из ${s.searchStats.total}` : "") + ") ", 1)) : n("", !0)
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: k,
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
- e(d)().length === 0 ? (a(), o("div", X, [...l[6] || (l[6] = [
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(u, { key: 1 }, [
134
- i("div", Y, [
135
- (a(!0), o(u, null, g(e(d)().filter((t) => t.isFixedTop), (t) => (a(), r(p, {
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(m),
141
- onExpand: e(f),
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", Z, [
146
- (a(!0), o(u, null, g(e(d)().filter((t) => !t.isFixedBottom && !t.isFixedTop), (t) => (a(), r(p, {
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(m),
152
- onExpand: e(f),
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", tt, [
157
- (a(!0), o(u, null, g(e(d)().filter((t) => t.isFixedBottom), (t) => (a(), r(p, {
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(m),
163
- onExpand: e(f),
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
- D(N, null, {
178
+ L(N, null, {
170
179
  default: V(() => [
171
- e(E) ? (a(), o("button", {
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
- }, ut = /* @__PURE__ */ j(et, [["__scopeId", "data-v-f4c84599"]]);
192
+ }, ft = /* @__PURE__ */ O(st, [["__scopeId", "data-v-98c65a4e"]]);
184
193
  export {
185
- ut as default
194
+ ft as default
186
195
  };