@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.
Files changed (30) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +2 -2
  3. package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +60 -52
  4. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +7 -0
  5. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +109 -0
  6. package/dist/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.js +34 -0
  7. package/dist/components/3_compounds/ChatList/ChatListHeader.vue.js +43 -10
  8. package/dist/components/3_compounds/ChatList/icons/LogoIcon.vue.js +19 -0
  9. package/dist/components/3_compounds/Feed/Feed.vue.js +2 -2
  10. package/dist/components/3_compounds/Feed/Feed.vue2.js +82 -81
  11. package/dist/components/3_compounds/Feed/composables/useFeedComponents.js +10 -8
  12. package/dist/index.js +147 -145
  13. package/dist/themes/dark.css +1 -1
  14. package/dist/themes/default.css +1 -1
  15. package/dist/themes/glass.css +1 -1
  16. package/dist/themes/green.css +1 -1
  17. package/dist/themes/mobilon1.css +1 -1
  18. package/dist/types/apps/data/messages.d.ts +31 -0
  19. package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +9 -0
  20. package/dist/types/components/1_atoms/Tooltip/styles/types.d.ts +2 -0
  21. package/dist/types/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.d.ts +40 -0
  22. package/dist/types/components/2_feed_elements/MissedCallMessage/icons/MissedCallIcon.vue.d.ts +2 -0
  23. package/dist/types/components/2_feed_elements/MissedCallMessage/stories/MissedCallMessage.stories.d.ts +12 -0
  24. package/dist/types/components/2_feed_elements/types/messages.d.ts +10 -0
  25. package/dist/types/components/3_compounds/ChatList/ChatListHeader.vue.d.ts +6 -0
  26. package/dist/types/components/3_compounds/ChatList/icons/LogoIcon.vue.d.ts +2 -0
  27. package/dist/types/components/3_compounds/ChatList/styles/types.d.ts +44 -0
  28. package/dist/types/components/index.d.ts +1 -0
  29. package/dist/types/main.d.ts +3 -0
  30. 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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-08344bf7"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-86785e9c"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as se, ref as b, computed as r, inject as le, watch as ne, nextTick as F, onMounted as ae, createElementBlock as d, openBlock as o, Fragment as M, createBlock as u, createCommentVNode as c, unref as t, normalizeStyle as re, createVNode as y, Transition as p, withCtx as k, renderList as ie, resolveDynamicComponent as de, createElementVNode as C, toDisplayString as ce, renderSlot as ue, Teleport as fe } from "vue";
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 Re } from "./composables/useFeedKeyboard.js";
11
- import { useFeedLoadMore as ve } from "./composables/useFeedLoadMore.js";
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__ */ se({
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: D }) {
99
- const s = e, g = b(), n = b(), h = b(), {
100
- isShowButton: w,
101
- isKeyboardPlace: j,
102
- checkButtonVisibility: K
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: n,
104
+ feedRef: a,
105
105
  keyboardRef: h
106
- }), { componentsMap: x } = he(), I = r(() => s.reactionsEnabled), { groupedObjects: O } = Se({
106
+ }), { componentsMap: O } = he(), $ = r(() => s.reactionsEnabled), { groupedObjects: V } = Se({
107
107
  objects: r(() => s.objects)
108
- }), m = le("chatAppId"), f = D, {
109
- checkScrollPosition: $,
108
+ }), m = ae("chatAppId"), f = j, {
109
+ checkScrollPosition: q,
110
110
  startScrollWatch: S,
111
- stopScrollWatch: R,
112
- resetAllowFlags: V
113
- } = ve({
114
- feedRef: n,
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: v,
119
- messageAction: q,
120
- handleClickReplied: z,
121
- feedObjectDoubleClick: E,
122
- handleResetReply: L
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: P,
128
- keyboardAction: N,
129
- feedKeyboardAction: W
130
- } = Re({
131
- isKeyboardPlace: j,
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: G,
136
- stickyDateText: J,
137
- show: U
135
+ showStickyDate: U,
136
+ stickyDateText: H,
137
+ show: Q
138
138
  } = Me({
139
- feedRef: n,
139
+ feedRef: a,
140
140
  trackingObjects: g
141
141
  }), {
142
- isInitialized: H,
143
- performScrollToBottom: Q,
142
+ isInitialized: X,
143
+ performScrollToBottom: Y,
144
144
  ensureScrollToBottom: B,
145
- initializeScroll: X,
146
- smoothScrollToBottom: Y
145
+ initializeScroll: Z,
146
+ smoothScrollToBottom: _
147
147
  } = Ae({
148
- feedRef: n,
148
+ feedRef: a,
149
149
  objectsRef: r(() => s.objects),
150
150
  scrollToBottomRef: r(() => s.scrollToBottom)
151
- }), Z = r(() => s.chatBackground ?? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(De)}`);
152
- function T(i = !0) {
153
- K(), $(i), U();
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 _ = Ce(() => T(), 250);
156
- function ee() {
157
- f("forceScrollToBottom"), Y();
155
+ const ee = Ce(() => A(), 250);
156
+ function te() {
157
+ f("forceScrollToBottom"), _();
158
158
  }
159
- const { restartObserving: te } = Be({
160
- feedRef: n,
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
- F(() => {
169
- V(), T(!1), g.value = document.querySelectorAll(".tracking-message"), te();
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
- }), ae(() => {
177
- F(() => {
178
- s.objects.length > 0 && !H.value && X();
176
+ }), re(() => {
177
+ M(() => {
178
+ s.objects.length > 0 && !X.value && Z();
179
179
  const i = new ResizeObserver(() => {
180
- s.scrollToBottom && (Q(), setTimeout(() => {
180
+ s.scrollToBottom && (Y(), setTimeout(() => {
181
181
  B();
182
182
  }, 200), setTimeout(() => {
183
183
  B();
184
184
  }, 800));
185
185
  });
186
- n.value && i.observe(n.value);
186
+ a.value && i.observe(a.value);
187
187
  });
188
- }), (i, a) => (o(), d(M, null, [
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: n,
193
+ ref: a,
194
194
  class: "message-feed",
195
- style: re({ backgroundImage: `url(${Z.value})` }),
196
- onScroll: a[0] || (a[0] = (l) => t(_)()),
197
- onMousedown: a[1] || (a[1] = //@ts-ignore
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: a[2] || (a[2] = //@ts-ignore
200
- (...l) => t(R) && t(R)(...l))
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(G) ? (o(), u(me, {
204
+ t(U) ? (o(), u(me, {
205
205
  key: 0,
206
206
  class: "message-feed__sticky-date",
207
- text: t(J)
207
+ text: t(H)
208
208
  }, null, 8, ["text"])) : c("", !0)
209
209
  ]),
210
210
  _: 1
211
211
  }),
212
- (o(!0), d(M, null, ie(t(O), (l, A) => (o(), d("div", {
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"}-${A}`,
214
+ key: `${l.messageId ?? "mid"}-${F}`,
215
215
  class: "tracking-message",
216
- onDblclick: (oe) => t(E)(oe, l)
216
+ onDblclick: (se) => t(P)(se, l)
217
217
  }, [
218
- (o(), u(de(t(x)(l.type)), {
219
- key: `${l.messageId ?? "mid"}-${A}`,
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": I.value,
224
+ "reactions-enabled": $.value,
225
225
  "subtext-tooltip-data": e.subtextTooltipData,
226
- onAction: t(q),
227
- onReply: t(z)
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(P) ? (o(), u(ge, {
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(N)
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(w) ? (o(), d("button", {
253
+ t(K) ? (o(), d("button", {
254
254
  key: 0,
255
255
  class: "message-feed__button-down",
256
- onClick: ee
256
+ onClick: te
257
257
  }, [
258
258
  e.buttonParams ? (o(), d("div", Ke, ce(e.buttonParams.unreadAmount), 1)) : c("", !0),
259
- a[3] || (a[3] = C("span", { class: "pi pi-angle-down message-feed__icon-down" }, null, -1))
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(W)
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: n,
274
- class: "message-feed"
273
+ ref: a,
274
+ class: "message-feed",
275
+ style: D({ backgroundImage: `url(${T.value})` })
275
276
  }, [
276
- C("div", xe, [
277
+ w("div", xe, [
277
278
  ue(i.$slots, "empty-feed", {}, void 0, !0)
278
279
  ])
279
- ], 512)),
280
- t(v)().reply ? (o(), u(fe, {
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(v)().reply,
287
- onReset: t(L)
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 t from "../../../2_feed_elements/TextMessage/TextMessage.vue.js";
6
- import a from "../../../2_feed_elements/VideoMessage/VideoMessage.vue.js";
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 n from "../../../2_feed_elements/StickerMessage/StickerMessage.vue.js";
10
+ import M from "../../../2_feed_elements/StickerMessage/StickerMessage.vue.js";
11
11
  import f from "../../../2_feed_elements/DelimiterMessage/DelimiterMessage.vue.js";
12
- function v() {
12
+ import n from "../../../2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js";
13
+ function I() {
13
14
  return {
14
15
  componentsMap: (e) => ({
15
- "message.text": t,
16
+ "message.text": a,
16
17
  "message.image": r,
17
18
  "message.file": o,
18
19
  "message.audio": s,
19
- "message.video": a,
20
+ "message.video": t,
20
21
  "message.call": m,
21
- "message.sticker": n,
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
- v as useFeedComponents
32
+ I as useFeedComponents
31
33
  };