@mobilon-dev/chotto 0.3.11 → 0.3.12

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 (60) hide show
  1. package/dist/CreateChat-DYGyItgE.js +31 -0
  2. package/dist/CreateChat2-BssQxlzC.js +42 -0
  3. package/dist/CreateDialog-nG1d1JLQ.js +77 -0
  4. package/dist/{ModalVideoRecorder-BM0u4RGq.js → ModalVideoRecorder-Di7x1f3E.js} +1 -1
  5. package/dist/SelectUser2-CMkdxD6H.js +46 -0
  6. package/dist/chotto.css +1 -1
  7. package/dist/{index-BHd0LYyt.js → index-CBuP7XAZ.js} +2594 -2714
  8. package/dist/types/apps/data/index.d.ts +1 -0
  9. package/dist/types/apps/data/themes.d.ts +7 -0
  10. package/dist/types/apps/validators/chats/chatValidator.d.ts +21 -0
  11. package/dist/types/apps/validators/chats/index.d.ts +7 -0
  12. package/dist/types/apps/validators/chats/types.d.ts +63 -0
  13. package/dist/types/apps/validators/chats/useChatValidator.d.ts +49 -0
  14. package/dist/types/apps/validators/examples.d.ts +1358 -0
  15. package/dist/types/apps/validators/index.d.ts +29 -0
  16. package/dist/types/apps/validators/messages/index.d.ts +7 -0
  17. package/dist/types/apps/validators/messages/messageValidator.d.ts +21 -0
  18. package/dist/types/apps/validators/messages/types.d.ts +66 -0
  19. package/dist/types/apps/validators/messages/useMessageValidator.d.ts +49 -0
  20. package/dist/types/apps/validators/sidebar/index.d.ts +7 -0
  21. package/dist/types/apps/validators/sidebar/sidebarValidator.d.ts +21 -0
  22. package/dist/types/apps/validators/sidebar/types.d.ts +14 -0
  23. package/dist/types/apps/validators/sidebar/useSidebarValidator.d.ts +45 -0
  24. package/dist/types/apps/validators/test.d.ts +23 -0
  25. package/dist/types/components/1_icons/AvatarIcon.vue.d.ts +6 -6
  26. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -2
  27. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +2 -2
  28. package/dist/types/components/2_chatinput_elements/PlaceholderComponent/PlaceholderComponent.vue.d.ts +2 -2
  29. package/dist/types/components/2_elements/ContactInfo/ContactInfo.vue.d.ts +2 -2
  30. package/dist/types/components/2_elements/ContactInfo/stories/ContactInfo.stories.d.ts +2 -2
  31. package/dist/types/components/2_modals/CreateDialog/CreateDialog.vue.d.ts +2 -2
  32. package/dist/types/components/2_modals/CreateDialog/stories/CreateDialog.stories.d.ts +2 -2
  33. package/dist/types/components/index.d.ts +0 -4
  34. package/dist/types/functions/formatTimestamp.d.ts +20 -0
  35. package/dist/types/functions/getStatusMessage.d.ts +14 -0
  36. package/dist/types/functions/index.d.ts +5 -0
  37. package/dist/types/functions/insertDaySeparators.d.ts +46 -0
  38. package/dist/types/functions/playNotificationAudio.d.ts +6 -0
  39. package/dist/types/hooks/index.d.ts +1 -7
  40. package/dist/types/hooks/modals/index.d.ts +4 -0
  41. package/dist/types/hooks/uploadFile/index.d.ts +3 -0
  42. package/dist/types/hooks/useMessage.d.ts +69 -1
  43. package/dist/types/index.d.ts +1 -0
  44. package/dist/vuessages.es.js +81 -81
  45. package/dist/vuessages.umd.js +5 -5
  46. package/package.json +1 -1
  47. package/dist/types/apps/helpers/index.d.ts +0 -9
  48. package/dist/types/hooks/formatTimestamp.d.ts +0 -1
  49. package/dist/types/hooks/getStatusMessage.d.ts +0 -2
  50. package/dist/types/hooks/insertDaySeparators.d.ts +0 -3
  51. package/dist/types/hooks/playNotificationAudio.d.ts +0 -1
  52. /package/dist/types/{hooks → components/3_compounds/Feed/functions}/throttle.d.ts +0 -0
  53. /package/dist/types/{apps/helpers → functions}/sortByTimestamp.d.ts +0 -0
  54. /package/dist/types/{apps/helpers → hooks/modals}/useCreateChat.d.ts +0 -0
  55. /package/dist/types/{apps/helpers → hooks/modals}/useCreateChat2.d.ts +0 -0
  56. /package/dist/types/{apps/helpers → hooks/modals}/useCreateDialog.d.ts +0 -0
  57. /package/dist/types/{apps/helpers → hooks/modals}/useModalSelectUser2.d.ts +0 -0
  58. /package/dist/types/hooks/{generatePreview.d.ts → uploadFile/generatePreview.d.ts} +0 -0
  59. /package/dist/types/hooks/{getTypeFileByMime.d.ts → uploadFile/getTypeFileByMime.d.ts} +0 -0
  60. /package/dist/types/hooks/{uploadFile.d.ts → uploadFile/uploadFile.d.ts} +0 -0
@@ -0,0 +1,31 @@
1
+ import { ref as s, createElementBlock as c, openBlock as m, createElementVNode as n, withDirectives as p, toDisplayString as u, vModelText as d } from "vue";
2
+ import { _ } from "./index-CBuP7XAZ.js";
3
+ const f = {
4
+ __name: "CreateChat",
5
+ props: {
6
+ title: {
7
+ type: String,
8
+ required: !0
9
+ }
10
+ },
11
+ emits: ["change"],
12
+ setup(a, { emit: o }) {
13
+ const e = s(""), r = o, l = () => {
14
+ r("change", { name: e.value });
15
+ };
16
+ return (v, t) => (m(), c("div", null, [
17
+ n("h2", null, u(a.title), 1),
18
+ p(n("input", {
19
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => e.value = i),
20
+ type: "text",
21
+ class: "name",
22
+ onInput: l
23
+ }, null, 544), [
24
+ [d, e.value]
25
+ ])
26
+ ]));
27
+ }
28
+ }, x = /* @__PURE__ */ _(f, [["__scopeId", "data-v-65f726e8"]]);
29
+ export {
30
+ x as default
31
+ };
@@ -0,0 +1,42 @@
1
+ import { ref as m, createElementBlock as s, openBlock as d, createElementVNode as e, withDirectives as u, toDisplayString as v, vModelText as a } from "vue";
2
+ import { _ as f } from "./index-CBuP7XAZ.js";
3
+ const x = {
4
+ __name: "CreateChat2",
5
+ props: {
6
+ title: {
7
+ type: String,
8
+ required: !0
9
+ }
10
+ },
11
+ emits: ["change"],
12
+ setup(r, { emit: p }) {
13
+ const n = m({}), i = p, o = () => {
14
+ i("change", {
15
+ contact: n.value
16
+ });
17
+ };
18
+ return (g, t) => (d(), s("div", null, [
19
+ e("h2", null, v(r.title), 1),
20
+ t[2] || (t[2] = e("label", null, "Имя", -1)),
21
+ u(e("input", {
22
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => n.value.name = l),
23
+ type: "text",
24
+ onInput: o
25
+ }, null, 544), [
26
+ [a, n.value.name]
27
+ ]),
28
+ t[3] || (t[3] = e("br", null, null, -1)),
29
+ t[4] || (t[4] = e("label", null, "Телефон", -1)),
30
+ u(e("input", {
31
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => n.value.phone = l),
32
+ type: "text",
33
+ onInput: o
34
+ }, null, 544), [
35
+ [a, n.value.phone]
36
+ ])
37
+ ]));
38
+ }
39
+ }, b = /* @__PURE__ */ f(x, [["__scopeId", "data-v-3a76f520"]]);
40
+ export {
41
+ b as default
42
+ };
@@ -0,0 +1,77 @@
1
+ import { ref as v, computed as d, createElementBlock as r, openBlock as i, createElementVNode as t, toDisplayString as u, withDirectives as m, Fragment as f, renderList as p, vModelSelect as _ } from "vue";
2
+ import { _ as D } from "./index-CBuP7XAZ.js";
3
+ const S = { class: "modal__contact-line" }, k = ["value"], q = { class: "modal__channel-line" }, w = ["disabled"], x = ["value"], V = ["disabled"], A = {
4
+ __name: "CreateDialog",
5
+ props: {
6
+ title: {
7
+ type: String,
8
+ required: !0
9
+ },
10
+ name: {
11
+ type: String,
12
+ required: !0
13
+ },
14
+ contacts: {
15
+ type: Array,
16
+ required: !0
17
+ },
18
+ channels: {
19
+ type: Array,
20
+ required: !0
21
+ },
22
+ filter: {
23
+ type: Function,
24
+ required: !1,
25
+ default: null
26
+ }
27
+ },
28
+ emits: ["change", "submit"],
29
+ setup(o, { emit: g }) {
30
+ const n = o, s = v(), a = v(), y = d(() => !!(s.value && a.value)), b = d(() => !!(n.filter && a.value || !n.filter)), h = d(() => n.filter && a.value ? n.filter(a.value, n.channels) : n.channels), c = g, C = () => {
31
+ c("change", { channel: s.value, contact: a.value }), c("submit");
32
+ };
33
+ return (B, l) => (i(), r("div", null, [
34
+ t("h3", null, u(o.title), 1),
35
+ t("div", null, " Контакт: " + u(o.name), 1),
36
+ t("div", S, [
37
+ l[2] || (l[2] = t("h3", { style: { margin: "0" } }, " Куда пишем ", -1)),
38
+ m(t("select", {
39
+ id: "folder",
40
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => a.value = e)
41
+ }, [
42
+ (i(!0), r(f, null, p(o.contacts, (e) => (i(), r("option", {
43
+ key: e.id || e.value,
44
+ value: e
45
+ }, u(e.value), 9, k))), 128))
46
+ ], 512), [
47
+ [_, a.value]
48
+ ])
49
+ ]),
50
+ t("div", q, [
51
+ l[3] || (l[3] = t("h3", { style: { margin: "0" } }, " Через какой канал ", -1)),
52
+ m(t("select", {
53
+ id: "folder",
54
+ "onUpdate:modelValue": l[1] || (l[1] = (e) => s.value = e),
55
+ disabled: !b.value
56
+ }, [
57
+ (i(!0), r(f, null, p(h.value, (e) => (i(), r("option", {
58
+ key: e.id || e.title,
59
+ value: e
60
+ }, u(e.title), 9, x))), 128))
61
+ ], 8, w), [
62
+ [_, s.value]
63
+ ])
64
+ ]),
65
+ t("button", {
66
+ type: "button",
67
+ class: "modal__button-start",
68
+ "aria-label": "Close modal",
69
+ disabled: !y.value,
70
+ onClick: C
71
+ }, " Начать диалог ", 8, V)
72
+ ]));
73
+ }
74
+ }, U = /* @__PURE__ */ D(A, [["__scopeId", "data-v-c9b375bd"]]);
75
+ export {
76
+ U as default
77
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as N, ref as l, computed as z, onMounted as $, createElementBlock as m, openBlock as f, Fragment as q, createElementVNode as o, withDirectives as E, vShow as I, createCommentVNode as g, normalizeClass as y, toDisplayString as A, nextTick as G, unref as k } from "vue";
2
- import { _ as H } from "./index-BHd0LYyt.js";
2
+ import { _ as H } from "./index-CBuP7XAZ.js";
3
3
  const J = { class: "video-recorder__header" }, K = { class: "video-recorder__controls" }, P = { class: "video-recorder__recording-container" }, Q = { class: "video-recorder__recording-time" }, W = /* @__PURE__ */ N({
4
4
  __name: "ModalVideoRecorder",
5
5
  emits: ["change", "submit", "close"],
@@ -0,0 +1,46 @@
1
+ import { ref as p, createElementBlock as n, openBlock as s, createElementVNode as t, toDisplayString as i, Fragment as m, renderList as _, withDirectives as h, vModelCheckbox as v } from "vue";
2
+ import { _ as f } from "./index-CBuP7XAZ.js";
3
+ const g = { class: "participant-list" }, k = ["id", "value"], y = ["for"], x = {
4
+ __name: "SelectUser2",
5
+ props: {
6
+ users: {
7
+ type: Array,
8
+ required: !0
9
+ },
10
+ title: {
11
+ type: String,
12
+ required: !0
13
+ }
14
+ },
15
+ emits: ["change"],
16
+ setup(o, { emit: a }) {
17
+ const r = p([]), c = a, d = () => {
18
+ console.log("check"), c("change", { selectedUsers: r.value });
19
+ };
20
+ return (I, l) => (s(), n("div", null, [
21
+ t("h2", null, i(o.title), 1),
22
+ t("div", g, [
23
+ (s(!0), n(m, null, _(o.users, (e) => (s(), n("div", {
24
+ key: e.userId,
25
+ class: "participant-item"
26
+ }, [
27
+ h(t("input", {
28
+ id: e.userId,
29
+ "onUpdate:modelValue": l[0] || (l[0] = (u) => r.value = u),
30
+ type: "checkbox",
31
+ value: e.userId,
32
+ onChange: d
33
+ }, null, 40, k), [
34
+ [v, r.value]
35
+ ]),
36
+ t("label", {
37
+ for: e.userId
38
+ }, i(e.name || "unknown username"), 9, y)
39
+ ]))), 128))
40
+ ])
41
+ ]));
42
+ }
43
+ }, b = /* @__PURE__ */ f(x, [["__scopeId", "data-v-9268d5f4"]]);
44
+ export {
45
+ b as default
46
+ };