@mobilon-dev/chotto 0.3.46 → 0.3.48
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./MessageSmsInvite.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dfac27a5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLocale as
|
|
3
|
-
|
|
4
|
-
import "../../../hooks/useSearchModel.js";
|
|
5
|
-
import "../../../hooks/useTheme.js";
|
|
6
|
-
/* empty css */
|
|
7
|
-
/* empty css */
|
|
8
|
-
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
9
|
-
import "../../../functions/parseMarkdown.js";
|
|
10
|
-
const I = ["data-channel-type"], j = { class: "message-sms-invite__text" }, F = /* @__PURE__ */ _({
|
|
1
|
+
import { defineComponent as p, computed as n, createElementBlock as u, createCommentVNode as d, openBlock as h, createElementVNode as _, toDisplayString as f, unref as v } from "vue";
|
|
2
|
+
import { useLocale as g } from "../../../locale/useLocale.js";
|
|
3
|
+
const x = ["data-channel-type"], y = { class: "message-sms-invite__text" }, w = /* @__PURE__ */ p({
|
|
11
4
|
__name: "MessageSmsInvite",
|
|
12
5
|
props: {
|
|
13
6
|
status: {},
|
|
@@ -15,50 +8,24 @@ const I = ["data-channel-type"], j = { class: "message-sms-invite__text" }, F =
|
|
|
15
8
|
channel: {}
|
|
16
9
|
},
|
|
17
10
|
emits: ["sms-invite"],
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
var
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
}),
|
|
24
|
-
|
|
25
|
-
if (!n || !n.contact || !n.contact.attributes) return null;
|
|
26
|
-
const a = n.contact.attributes, l = (e) => {
|
|
27
|
-
if (!e) return null;
|
|
28
|
-
if (typeof e == "string")
|
|
29
|
-
return e.startsWith("+") ? e : `+${e}`;
|
|
30
|
-
if (typeof e == "object") {
|
|
31
|
-
const t = e;
|
|
32
|
-
if (t.phone)
|
|
33
|
-
return t.phone.startsWith("+") ? t.phone : `+${t.phone}`;
|
|
34
|
-
}
|
|
35
|
-
return null;
|
|
36
|
-
};
|
|
37
|
-
let o = null;
|
|
38
|
-
if (s.value === "whatsapp") {
|
|
39
|
-
const e = a.find((t) => t.type === "whatsapp" || t.type === "waba");
|
|
40
|
-
o = l((e == null ? void 0 : e.data) ?? (e == null ? void 0 : e.value));
|
|
41
|
-
} else if (s.value === "telegram") {
|
|
42
|
-
const e = a.find((t) => t.type === "telegram");
|
|
43
|
-
o = l((e == null ? void 0 : e.data) ?? (e == null ? void 0 : e.value));
|
|
44
|
-
} else if (s.value === "max") {
|
|
45
|
-
const e = a.find((t) => t.type === "max");
|
|
46
|
-
o = l((e == null ? void 0 : e.data) ?? (e == null ? void 0 : e.value));
|
|
47
|
-
}
|
|
48
|
-
return o ? s.value === "whatsapp" ? `Перейдите в WhatsApp https://wa.me/+${o.replace("+", "")}, чтобы продолжить общение` : s.value === "telegram" ? `Перейдите в Telegram https://t.me/+${o.replace("+", "")}, чтобы продолжить общение` : s.value === "max" ? `Перейдите в Max https://max.ru/ и найдите нас по номеру ${o}, чтобы продолжить общение` : null : null;
|
|
49
|
-
}), y = () => {
|
|
50
|
-
u.value && r && r(u.value), d("sms-invite");
|
|
11
|
+
setup(a, { emit: o }) {
|
|
12
|
+
const t = a, c = o, { t: i } = g(), r = n(() => t.status === "error" && t.hasMessengerAccount === !1), m = n(() => {
|
|
13
|
+
var s;
|
|
14
|
+
const e = ((s = t.channel) == null ? void 0 : s.toLowerCase()) ?? "";
|
|
15
|
+
return e.includes("whatsapp") || e.includes("waba") ? "whatsapp" : e.includes("max") ? "max" : "telegram";
|
|
16
|
+
}), l = () => {
|
|
17
|
+
c("sms-invite");
|
|
51
18
|
};
|
|
52
|
-
return (
|
|
19
|
+
return (e, s) => r.value ? (h(), u("div", {
|
|
53
20
|
key: 0,
|
|
54
21
|
class: "message-sms-invite",
|
|
55
|
-
"data-channel-type":
|
|
56
|
-
onClick:
|
|
22
|
+
"data-channel-type": m.value,
|
|
23
|
+
onClick: l
|
|
57
24
|
}, [
|
|
58
|
-
|
|
59
|
-
], 8,
|
|
25
|
+
_("span", y, f(v(i)("component.TextMessage.sendSmsInvite")), 1)
|
|
26
|
+
], 8, x)) : d("", !0);
|
|
60
27
|
}
|
|
61
28
|
});
|
|
62
29
|
export {
|
|
63
|
-
|
|
30
|
+
w as default
|
|
64
31
|
};
|