@mobilon-dev/chotto 0.3.41 → 0.3.42
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/Tooltip/Tooltip.vue.js +2 -2
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +60 -52
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +7 -0
- package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +109 -0
- package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -0
- package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +43 -10
- package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +19 -0
- package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
- package/dist/components/3_compounds/Feed/Feed.vue2.js +82 -81
- package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +10 -8
- package/dist/index.js +147 -145
- 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/apps/data/messages.d.ts +31 -0
- package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +9 -0
- package/dist/types/components/1_atoms/Tooltip/styles/types.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.d.ts +40 -0
- package/dist/types/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.d.ts +2 -0
- package/dist/types/components/2_feed_elements/MissedCallMessage/stories/MissedCallMessage.stories.d.ts +12 -0
- package/dist/types/components/2_feed_elements/types/messages.d.ts +10 -0
- package/dist/types/components/3_compounds/ChatList/ChatListHeader.vue.d.ts +6 -0
- package/dist/types/components/3_compounds/ChatList/icons/LogoIcon.vue.d.ts +2 -0
- package/dist/types/components/3_compounds/ChatList/styles/types.d.ts +44 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/main.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-86785e9c"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as le, ref as b, computed as r, inject as ae, watch as ne, nextTick as M, onMounted as re, createElementBlock as d, openBlock as o, Fragment as C, createBlock as u, createCommentVNode as c, unref as t, normalizeStyle as D, createVNode as y, Transition as p, withCtx as k, renderList as ie, resolveDynamicComponent as de, createElementVNode as w, toDisplayString as ce, renderSlot as ue, Teleport as fe } from "vue";
|
|
2
2
|
import me from "../../2_feed_elements/DateMessageSticky/DateMessageSticky.vue.js";
|
|
3
3
|
import ye from "../../2_feed_elements/BaseReplyMessage/BaseReplyMessage.vue.js";
|
|
4
4
|
import ge from "../../2_feed_elements/MessageKeyboard/MessageKeyboard.vue.js";
|
|
@@ -7,8 +7,8 @@ import pe from "../../2_feed_elements/TypingMessage/TypingMessage.vue.js";
|
|
|
7
7
|
import { useFeedButton as ke } from "./composables/useFeedButton.js";
|
|
8
8
|
import { useFeedComponents as he } from "./composables/useFeedComponents.js";
|
|
9
9
|
import { useFeedGrouping as Se } from "./composables/useFeedGrouping.js";
|
|
10
|
-
import { useFeedKeyboard as
|
|
11
|
-
import { useFeedLoadMore as
|
|
10
|
+
import { useFeedKeyboard as ve } from "./composables/useFeedKeyboard.js";
|
|
11
|
+
import { useFeedLoadMore as Re } from "./composables/useFeedLoadMore.js";
|
|
12
12
|
import { useFeedMessageVisibility as Be } from "./composables/useFeedMessageVisibility.js";
|
|
13
13
|
import { useFeedReply as Te } from "./composables/useFeedReply.js";
|
|
14
14
|
import { useFeedScroll as Ae } from "./composables/useFeedScroll.js";
|
|
@@ -19,7 +19,7 @@ import De from "./assets/chat-background.svg.js";
|
|
|
19
19
|
const we = ["id"], je = ["id", "onDblclick"], Ke = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "message-feed__unread-amount"
|
|
22
|
-
}, xe = { style: { margin: "auto" } }, Ze = /* @__PURE__ */
|
|
22
|
+
}, xe = { style: { margin: "auto" } }, Ze = /* @__PURE__ */ le({
|
|
23
23
|
__name: "Feed",
|
|
24
24
|
props: {
|
|
25
25
|
objects: {
|
|
@@ -95,69 +95,69 @@ const we = ["id"], je = ["id", "onDblclick"], Ke = {
|
|
|
95
95
|
"keyboardAction",
|
|
96
96
|
"feedAction"
|
|
97
97
|
],
|
|
98
|
-
setup(e, { emit:
|
|
99
|
-
const s = e, g = b(),
|
|
100
|
-
isShowButton:
|
|
101
|
-
isKeyboardPlace:
|
|
102
|
-
checkButtonVisibility:
|
|
98
|
+
setup(e, { emit: j }) {
|
|
99
|
+
const s = e, g = b(), a = b(), h = b(), {
|
|
100
|
+
isShowButton: K,
|
|
101
|
+
isKeyboardPlace: x,
|
|
102
|
+
checkButtonVisibility: I
|
|
103
103
|
} = ke({
|
|
104
|
-
feedRef:
|
|
104
|
+
feedRef: a,
|
|
105
105
|
keyboardRef: h
|
|
106
|
-
}), { componentsMap:
|
|
106
|
+
}), { componentsMap: O } = he(), $ = r(() => s.reactionsEnabled), { groupedObjects: V } = Se({
|
|
107
107
|
objects: r(() => s.objects)
|
|
108
|
-
}), m =
|
|
109
|
-
checkScrollPosition:
|
|
108
|
+
}), m = ae("chatAppId"), f = j, {
|
|
109
|
+
checkScrollPosition: q,
|
|
110
110
|
startScrollWatch: S,
|
|
111
|
-
stopScrollWatch:
|
|
112
|
-
resetAllowFlags:
|
|
113
|
-
} =
|
|
114
|
-
feedRef:
|
|
111
|
+
stopScrollWatch: v,
|
|
112
|
+
resetAllowFlags: z
|
|
113
|
+
} = Re({
|
|
114
|
+
feedRef: a,
|
|
115
115
|
emit: f,
|
|
116
116
|
isLoadingMoreRef: r(() => s.isLoadingMore)
|
|
117
117
|
}), {
|
|
118
|
-
getMessage:
|
|
119
|
-
messageAction:
|
|
120
|
-
handleClickReplied:
|
|
121
|
-
feedObjectDoubleClick:
|
|
122
|
-
handleResetReply:
|
|
118
|
+
getMessage: R,
|
|
119
|
+
messageAction: E,
|
|
120
|
+
handleClickReplied: L,
|
|
121
|
+
feedObjectDoubleClick: P,
|
|
122
|
+
handleResetReply: N
|
|
123
123
|
} = Te({
|
|
124
124
|
enableDoubleClickReply: s.enableDoubleClickReply,
|
|
125
125
|
emit: f
|
|
126
126
|
}), {
|
|
127
|
-
showKeyboard:
|
|
128
|
-
keyboardAction:
|
|
129
|
-
feedKeyboardAction:
|
|
130
|
-
} =
|
|
131
|
-
isKeyboardPlace:
|
|
127
|
+
showKeyboard: W,
|
|
128
|
+
keyboardAction: G,
|
|
129
|
+
feedKeyboardAction: J
|
|
130
|
+
} = ve({
|
|
131
|
+
isKeyboardPlace: x,
|
|
132
132
|
objects: r(() => s.objects),
|
|
133
133
|
emit: f
|
|
134
134
|
}), {
|
|
135
|
-
showStickyDate:
|
|
136
|
-
stickyDateText:
|
|
137
|
-
show:
|
|
135
|
+
showStickyDate: U,
|
|
136
|
+
stickyDateText: H,
|
|
137
|
+
show: Q
|
|
138
138
|
} = Me({
|
|
139
|
-
feedRef:
|
|
139
|
+
feedRef: a,
|
|
140
140
|
trackingObjects: g
|
|
141
141
|
}), {
|
|
142
|
-
isInitialized:
|
|
143
|
-
performScrollToBottom:
|
|
142
|
+
isInitialized: X,
|
|
143
|
+
performScrollToBottom: Y,
|
|
144
144
|
ensureScrollToBottom: B,
|
|
145
|
-
initializeScroll:
|
|
146
|
-
smoothScrollToBottom:
|
|
145
|
+
initializeScroll: Z,
|
|
146
|
+
smoothScrollToBottom: _
|
|
147
147
|
} = Ae({
|
|
148
|
-
feedRef:
|
|
148
|
+
feedRef: a,
|
|
149
149
|
objectsRef: r(() => s.objects),
|
|
150
150
|
scrollToBottomRef: r(() => s.scrollToBottom)
|
|
151
|
-
}),
|
|
152
|
-
function
|
|
153
|
-
|
|
151
|
+
}), T = r(() => s.chatBackground ?? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(De)}`);
|
|
152
|
+
function A(i = !0) {
|
|
153
|
+
I(), q(i), Q();
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
function
|
|
157
|
-
f("forceScrollToBottom"),
|
|
155
|
+
const ee = Ce(() => A(), 250);
|
|
156
|
+
function te() {
|
|
157
|
+
f("forceScrollToBottom"), _();
|
|
158
158
|
}
|
|
159
|
-
const { restartObserving:
|
|
160
|
-
feedRef:
|
|
159
|
+
const { restartObserving: oe } = Be({
|
|
160
|
+
feedRef: a,
|
|
161
161
|
trackingObjects: g,
|
|
162
162
|
chatAppId: m,
|
|
163
163
|
onMessageVisible: (i) => f("messageVisible", i)
|
|
@@ -165,66 +165,66 @@ const we = ["id"], je = ["id", "onDblclick"], Ke = {
|
|
|
165
165
|
return ne(
|
|
166
166
|
() => s.objects,
|
|
167
167
|
() => {
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
M(() => {
|
|
169
|
+
z(), A(!1), g.value = document.querySelectorAll(".tracking-message"), oe();
|
|
170
170
|
});
|
|
171
171
|
},
|
|
172
172
|
{ immediate: !0 }
|
|
173
173
|
), Fe({
|
|
174
174
|
targetIdRef: r(() => s.scrollTo),
|
|
175
175
|
feedContainerId: `feed-container-${m}`
|
|
176
|
-
}),
|
|
177
|
-
|
|
178
|
-
s.objects.length > 0 && !
|
|
176
|
+
}), re(() => {
|
|
177
|
+
M(() => {
|
|
178
|
+
s.objects.length > 0 && !X.value && Z();
|
|
179
179
|
const i = new ResizeObserver(() => {
|
|
180
|
-
s.scrollToBottom && (
|
|
180
|
+
s.scrollToBottom && (Y(), setTimeout(() => {
|
|
181
181
|
B();
|
|
182
182
|
}, 200), setTimeout(() => {
|
|
183
183
|
B();
|
|
184
184
|
}, 800));
|
|
185
185
|
});
|
|
186
|
-
|
|
186
|
+
a.value && i.observe(a.value);
|
|
187
187
|
});
|
|
188
|
-
}), (i,
|
|
188
|
+
}), (i, n) => (o(), d(C, null, [
|
|
189
189
|
e.objects.length > 0 || e.typing ? (o(), d("div", {
|
|
190
190
|
key: 0,
|
|
191
191
|
id: "feed-container-" + t(m),
|
|
192
192
|
ref_key: "refFeed",
|
|
193
|
-
ref:
|
|
193
|
+
ref: a,
|
|
194
194
|
class: "message-feed",
|
|
195
|
-
style:
|
|
196
|
-
onScroll:
|
|
197
|
-
onMousedown:
|
|
195
|
+
style: D({ backgroundImage: `url(${T.value})` }),
|
|
196
|
+
onScroll: n[0] || (n[0] = (l) => t(ee)()),
|
|
197
|
+
onMousedown: n[1] || (n[1] = //@ts-ignore
|
|
198
198
|
(...l) => t(S) && t(S)(...l)),
|
|
199
|
-
onMouseup:
|
|
200
|
-
(...l) => t(
|
|
199
|
+
onMouseup: n[2] || (n[2] = //@ts-ignore
|
|
200
|
+
(...l) => t(v) && t(v)(...l))
|
|
201
201
|
}, [
|
|
202
202
|
y(p, null, {
|
|
203
203
|
default: k(() => [
|
|
204
|
-
t(
|
|
204
|
+
t(U) ? (o(), u(me, {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "message-feed__sticky-date",
|
|
207
|
-
text: t(
|
|
207
|
+
text: t(H)
|
|
208
208
|
}, null, 8, ["text"])) : c("", !0)
|
|
209
209
|
]),
|
|
210
210
|
_: 1
|
|
211
211
|
}),
|
|
212
|
-
(o(!0), d(
|
|
212
|
+
(o(!0), d(C, null, ie(t(V), (l, F) => (o(), d("div", {
|
|
213
213
|
id: JSON.stringify(l),
|
|
214
|
-
key: `${l.messageId ?? "mid"}-${
|
|
214
|
+
key: `${l.messageId ?? "mid"}-${F}`,
|
|
215
215
|
class: "tracking-message",
|
|
216
|
-
onDblclick: (
|
|
216
|
+
onDblclick: (se) => t(P)(se, l)
|
|
217
217
|
}, [
|
|
218
|
-
(o(), u(de(t(
|
|
219
|
-
key: `${l.messageId ?? "mid"}-${
|
|
218
|
+
(o(), u(de(t(O)(l.type)), {
|
|
219
|
+
key: `${l.messageId ?? "mid"}-${F}`,
|
|
220
220
|
class: "message-feed__message",
|
|
221
221
|
message: l,
|
|
222
222
|
"apply-style": e.applyStyle,
|
|
223
223
|
"is-first-in-series": l.isFirstInSeries,
|
|
224
|
-
"reactions-enabled":
|
|
224
|
+
"reactions-enabled": $.value,
|
|
225
225
|
"subtext-tooltip-data": e.subtextTooltipData,
|
|
226
|
-
onAction: t(
|
|
227
|
-
onReply: t(
|
|
226
|
+
onAction: t(E),
|
|
227
|
+
onReply: t(L)
|
|
228
228
|
}, null, 40, ["message", "apply-style", "is-first-in-series", "reactions-enabled", "subtext-tooltip-data", "onAction", "onReply"]))
|
|
229
229
|
], 40, je))), 128)),
|
|
230
230
|
e.typing ? (o(), u(pe, {
|
|
@@ -236,27 +236,27 @@ const we = ["id"], je = ["id", "onDblclick"], Ke = {
|
|
|
236
236
|
}, null, 8, ["message"])) : c("", !0),
|
|
237
237
|
y(p, null, {
|
|
238
238
|
default: k(() => [
|
|
239
|
-
t(
|
|
239
|
+
t(W) ? (o(), u(ge, {
|
|
240
240
|
key: 0,
|
|
241
241
|
ref_key: "keyboardRef",
|
|
242
242
|
ref: h,
|
|
243
243
|
class: "message-feed__keyboard",
|
|
244
244
|
keyboard: e.objects[e.objects.length - 1].keyboard,
|
|
245
245
|
align: e.keyboardAlign,
|
|
246
|
-
onAction: t(
|
|
246
|
+
onAction: t(G)
|
|
247
247
|
}, null, 8, ["keyboard", "align", "onAction"])) : c("", !0)
|
|
248
248
|
]),
|
|
249
249
|
_: 1
|
|
250
250
|
}),
|
|
251
251
|
y(p, null, {
|
|
252
252
|
default: k(() => [
|
|
253
|
-
t(
|
|
253
|
+
t(K) ? (o(), d("button", {
|
|
254
254
|
key: 0,
|
|
255
255
|
class: "message-feed__button-down",
|
|
256
|
-
onClick:
|
|
256
|
+
onClick: te
|
|
257
257
|
}, [
|
|
258
258
|
e.buttonParams ? (o(), d("div", Ke, ce(e.buttonParams.unreadAmount), 1)) : c("", !0),
|
|
259
|
-
|
|
259
|
+
n[3] || (n[3] = w("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
|
|
260
260
|
])) : c("", !0)
|
|
261
261
|
]),
|
|
262
262
|
_: 1
|
|
@@ -265,26 +265,27 @@ const we = ["id"], je = ["id", "onDblclick"], Ke = {
|
|
|
265
265
|
key: 1,
|
|
266
266
|
buttons: e.feedKeyboards,
|
|
267
267
|
align: e.feedKeyboardAlign,
|
|
268
|
-
onAction: t(
|
|
268
|
+
onAction: t(J)
|
|
269
269
|
}, null, 8, ["buttons", "align", "onAction"])) : c("", !0)
|
|
270
270
|
], 44, we)) : (o(), d("div", {
|
|
271
271
|
key: 1,
|
|
272
272
|
ref_key: "refFeed",
|
|
273
|
-
ref:
|
|
274
|
-
class: "message-feed"
|
|
273
|
+
ref: a,
|
|
274
|
+
class: "message-feed",
|
|
275
|
+
style: D({ backgroundImage: `url(${T.value})` })
|
|
275
276
|
}, [
|
|
276
|
-
|
|
277
|
+
w("div", xe, [
|
|
277
278
|
ue(i.$slots, "empty-feed", {}, void 0, !0)
|
|
278
279
|
])
|
|
279
|
-
],
|
|
280
|
-
t(
|
|
280
|
+
], 4)),
|
|
281
|
+
t(R)().reply ? (o(), u(fe, {
|
|
281
282
|
key: 2,
|
|
282
283
|
to: "#chat-input-reply-line-" + t(m)
|
|
283
284
|
}, [
|
|
284
285
|
y(ye, {
|
|
285
286
|
class: "chat-input-reply",
|
|
286
|
-
message: t(
|
|
287
|
-
onReset: t(
|
|
287
|
+
message: t(R)().reply,
|
|
288
|
+
onReset: t(N)
|
|
288
289
|
}, null, 8, ["message", "onReset"])
|
|
289
290
|
], 8, ["to"])) : c("", !0)
|
|
290
291
|
], 64));
|
|
@@ -2,23 +2,25 @@ import s from "../../../2_feed_elements/AudioMessage/AudioMessage.vue.js";
|
|
|
2
2
|
import m from "../../../2_feed_elements/CallMessage/CallMessage.vue.js";
|
|
3
3
|
import o from "../../../2_feed_elements/FileMessage/FileMessage.vue.js";
|
|
4
4
|
import r from "../../../2_feed_elements/ImageMessage/ImageMessage.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import a from "../../../2_feed_elements/TextMessage/TextMessage.vue.js";
|
|
6
|
+
import t from "../../../2_feed_elements/VideoMessage/VideoMessage.vue.js";
|
|
7
7
|
import i from "../../../2_feed_elements/DateMessage/DateMessage.vue.js";
|
|
8
8
|
import g from "../../../2_feed_elements/SystemMessage/SystemMessage.vue.js";
|
|
9
9
|
import p from "../../../2_feed_elements/TypingMessage/TypingMessage.vue.js";
|
|
10
|
-
import
|
|
10
|
+
import M from "../../../2_feed_elements/StickerMessage/StickerMessage.vue.js";
|
|
11
11
|
import f from "../../../2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js";
|
|
12
|
-
|
|
12
|
+
import n from "../../../2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js";
|
|
13
|
+
function I() {
|
|
13
14
|
return {
|
|
14
15
|
componentsMap: (e) => ({
|
|
15
|
-
"message.text":
|
|
16
|
+
"message.text": a,
|
|
16
17
|
"message.image": r,
|
|
17
18
|
"message.file": o,
|
|
18
19
|
"message.audio": s,
|
|
19
|
-
"message.video":
|
|
20
|
+
"message.video": t,
|
|
20
21
|
"message.call": m,
|
|
21
|
-
"message.
|
|
22
|
+
"message.missedCall": n,
|
|
23
|
+
"message.sticker": M,
|
|
22
24
|
"message.system": g,
|
|
23
25
|
"system.date": i,
|
|
24
26
|
"message.typing": p,
|
|
@@ -27,5 +29,5 @@ function v() {
|
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
31
|
export {
|
|
30
|
-
|
|
32
|
+
I as useFeedComponents
|
|
31
33
|
};
|