@bcc-code/vue-bcc-chat-ui 7.1.55 → 7.1.57
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/style.css +1 -1
- package/dist/vue-bcc-chat-ui.js +475 -467
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -6233,7 +6233,7 @@ I([() => $.value?.conversations.value, () => nu.value], async () => {
|
|
|
6233
6233
|
async function fu(e, t) {
|
|
6234
6234
|
Jl.value = t.loggerCallback, gt(t.language ?? "en"), eu(t.themeMode), e.use(H);
|
|
6235
6235
|
let n = e.config.globalProperties.$primevue;
|
|
6236
|
-
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat",
|
|
6236
|
+
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.component("BccChat", Uh), e.provide("theme", { theme: Bl });
|
|
6237
6237
|
let r = tu(t.environment);
|
|
6238
6238
|
$l(Hl.INFO, "Initializing chat", {
|
|
6239
6239
|
environment: t.environment,
|
|
@@ -6966,8 +6966,16 @@ function _d(e) {
|
|
|
6966
6966
|
return null;
|
|
6967
6967
|
}
|
|
6968
6968
|
//#endregion
|
|
6969
|
+
//#region src/composables/useIsTouchUi.ts
|
|
6970
|
+
function vd() {
|
|
6971
|
+
let e = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null, t = w(!!e?.matches);
|
|
6972
|
+
return e?.addEventListener("change", (e) => {
|
|
6973
|
+
t.value = e.matches;
|
|
6974
|
+
}), { isTouchUI: n(() => !t.value) };
|
|
6975
|
+
}
|
|
6976
|
+
//#endregion
|
|
6969
6977
|
//#region src/composables/useComposerTriggers.ts
|
|
6970
|
-
function
|
|
6978
|
+
function yd(e) {
|
|
6971
6979
|
return {
|
|
6972
6980
|
id: "mention",
|
|
6973
6981
|
triggerChar: "@",
|
|
@@ -6984,7 +6992,7 @@ function vd(e) {
|
|
|
6984
6992
|
}
|
|
6985
6993
|
};
|
|
6986
6994
|
}
|
|
6987
|
-
function
|
|
6995
|
+
function bd(e) {
|
|
6988
6996
|
let t = w(null), r = w([]), i = w({
|
|
6989
6997
|
x: 0,
|
|
6990
6998
|
y: 0,
|
|
@@ -7017,7 +7025,7 @@ function yd(e) {
|
|
|
7017
7025
|
}
|
|
7018
7026
|
for (let i of e.getTriggers()) {
|
|
7019
7027
|
if (!i.enabled()) continue;
|
|
7020
|
-
let e =
|
|
7028
|
+
let e = xd(n, i.triggerChar);
|
|
7021
7029
|
if (!e) continue;
|
|
7022
7030
|
let c = i.getCandidates(e.query).slice(0, i.maxSuggestions ?? 8);
|
|
7023
7031
|
if (!c.length) {
|
|
@@ -7062,7 +7070,7 @@ function yd(e) {
|
|
|
7062
7070
|
refreshActiveTrigger: c
|
|
7063
7071
|
};
|
|
7064
7072
|
}
|
|
7065
|
-
function
|
|
7073
|
+
function xd(e, t) {
|
|
7066
7074
|
let n = window.getSelection();
|
|
7067
7075
|
if (!n || n.rangeCount === 0 || !n.isCollapsed) return null;
|
|
7068
7076
|
let r = n.getRangeAt(0);
|
|
@@ -7073,13 +7081,13 @@ function bd(e, t) {
|
|
|
7073
7081
|
if (o === -1 || o > 0 && !/\s/.test(a[o - 1] ?? "")) return null;
|
|
7074
7082
|
let s = a.slice(o + 1);
|
|
7075
7083
|
if (/\s/.test(s)) return null;
|
|
7076
|
-
let c =
|
|
7084
|
+
let c = Cd(e, o, a.length) ?? Sd(r, t);
|
|
7077
7085
|
return c ? {
|
|
7078
7086
|
query: s,
|
|
7079
7087
|
range: c
|
|
7080
7088
|
} : null;
|
|
7081
7089
|
}
|
|
7082
|
-
function
|
|
7090
|
+
function Sd(e, t) {
|
|
7083
7091
|
let n = e.endContainer;
|
|
7084
7092
|
n.nodeType !== Node.TEXT_NODE && (n = e.endContainer.childNodes[e.endOffset - 1] ?? e.endContainer.childNodes[0] ?? null);
|
|
7085
7093
|
for (let r = 0; r < 4 && n; r += 1) {
|
|
@@ -7095,7 +7103,7 @@ function xd(e, t) {
|
|
|
7095
7103
|
}
|
|
7096
7104
|
return null;
|
|
7097
7105
|
}
|
|
7098
|
-
function
|
|
7106
|
+
function Cd(e, t, n) {
|
|
7099
7107
|
let r = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), i = 0, a = null, o = 0, s = null, c = 0;
|
|
7100
7108
|
for (let e = r.nextNode(); e; e = r.nextNode()) {
|
|
7101
7109
|
let r = e.textContent?.length ?? 0, l = i + r;
|
|
@@ -7109,7 +7117,7 @@ function Sd(e, t, n) {
|
|
|
7109
7117
|
let l = document.createRange();
|
|
7110
7118
|
return l.setStart(a, o), l.setEnd(s, c), l;
|
|
7111
7119
|
}
|
|
7112
|
-
function
|
|
7120
|
+
function wd(e, t) {
|
|
7113
7121
|
e.deleteContents();
|
|
7114
7122
|
let n = document.createElement("span");
|
|
7115
7123
|
n.className = "composer-mention", n.setAttribute("data-mention-uid", t.uid), n.contentEditable = "false", n.textContent = `@${t.displayName}`;
|
|
@@ -7120,21 +7128,22 @@ function Cd(e, t) {
|
|
|
7120
7128
|
}
|
|
7121
7129
|
//#endregion
|
|
7122
7130
|
//#region src/composables/useRichTextComposer.ts
|
|
7123
|
-
|
|
7131
|
+
var Td = 64;
|
|
7132
|
+
function Ed(e, t, r, i) {
|
|
7124
7133
|
let a = w(0), o = w(!1), s = w({
|
|
7125
7134
|
x: 0,
|
|
7126
7135
|
y: 0,
|
|
7127
7136
|
placement: "above"
|
|
7128
7137
|
}), c = w(Is(i.getModelValue())), l = w(""), u = null, d = null, f = n(() => {
|
|
7129
7138
|
let e = [...i.extraTriggers ?? []];
|
|
7130
|
-
return i.getMentionCandidates && e.unshift(
|
|
7139
|
+
return i.getMentionCandidates && e.unshift(yd({
|
|
7131
7140
|
enabled: () => i.mentionsEnabled?.() ?? !0,
|
|
7132
7141
|
getMentionCandidates: () => i.getMentionCandidates?.() ?? [],
|
|
7133
7142
|
insertMention: (e, t) => {
|
|
7134
|
-
|
|
7143
|
+
wd(t, e), O(), k();
|
|
7135
7144
|
}
|
|
7136
7145
|
})), e;
|
|
7137
|
-
}), { triggerCandidates: p, triggerMenuPosition: m, highlightedTriggerIndex: g, showTriggerMenu: _, hideTriggerMenu: v, handleInput: x, handleKeydown: S, selectTriggerCandidate: C, refreshActiveTrigger: T } =
|
|
7146
|
+
}), { triggerCandidates: p, triggerMenuPosition: m, highlightedTriggerIndex: g, showTriggerMenu: _, hideTriggerMenu: v, handleInput: x, handleKeydown: S, selectTriggerCandidate: C, refreshActiveTrigger: T } = bd({
|
|
7138
7147
|
editorRef: t,
|
|
7139
7148
|
getTriggers: () => f.value,
|
|
7140
7149
|
onChange: () => O()
|
|
@@ -7245,20 +7254,20 @@ function wd(e, t, r, i) {
|
|
|
7245
7254
|
function ie(e, n) {
|
|
7246
7255
|
let r = t.value, i = e.getBoundingClientRect(), a = r?.getBoundingClientRect(), o = i.width || i.height ? i : a;
|
|
7247
7256
|
if (!o) return;
|
|
7248
|
-
let c = re(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ?
|
|
7249
|
-
if (!c && (
|
|
7257
|
+
let c = re(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ? Td : 0, f = !c && !!n, p = f ? n.clientX : o.left + o.width / 2, m = f ? n.clientY : o.top, h = f ? n.clientY : o.bottom, g = l / 2 + 8, _ = ne(p, g, Math.max(g, window.innerWidth - l / 2 - 8)), v = m - 6 - 8, y = window.innerHeight - h - 6 - 8;
|
|
7258
|
+
if (!c && (y >= u || y >= v)) {
|
|
7250
7259
|
let e = Math.max(8, window.innerHeight - u - 8);
|
|
7251
7260
|
s.value = {
|
|
7252
|
-
x:
|
|
7253
|
-
y: ne(
|
|
7261
|
+
x: Math.round(_),
|
|
7262
|
+
y: Math.round(ne(h + 6, 8, e)),
|
|
7254
7263
|
placement: "below"
|
|
7255
7264
|
};
|
|
7256
7265
|
return;
|
|
7257
7266
|
}
|
|
7258
|
-
let
|
|
7267
|
+
let b = u + 8, x = Math.max(b, window.innerHeight - 8 - d);
|
|
7259
7268
|
s.value = {
|
|
7260
|
-
x:
|
|
7261
|
-
y: ne(
|
|
7269
|
+
x: Math.round(_),
|
|
7270
|
+
y: Math.round(ne(m - 6 - d, b, x)),
|
|
7262
7271
|
placement: "above"
|
|
7263
7272
|
};
|
|
7264
7273
|
}
|
|
@@ -7296,29 +7305,31 @@ function wd(e, t, r, i) {
|
|
|
7296
7305
|
}
|
|
7297
7306
|
function ce(e) {
|
|
7298
7307
|
if (!S(e)) {
|
|
7299
|
-
if (
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7308
|
+
if (!i.isTouchUI?.()) {
|
|
7309
|
+
if ((e.ctrlKey || e.metaKey) && !e.shiftKey) {
|
|
7310
|
+
let t = e.key.toLowerCase();
|
|
7311
|
+
if (t === "b") {
|
|
7312
|
+
e.preventDefault(), ae("bold");
|
|
7313
|
+
return;
|
|
7314
|
+
}
|
|
7315
|
+
if (t === "i") {
|
|
7316
|
+
e.preventDefault(), ae("italic");
|
|
7317
|
+
return;
|
|
7318
|
+
}
|
|
7319
|
+
if (t === "u") {
|
|
7320
|
+
e.preventDefault(), ae("underline");
|
|
7321
|
+
return;
|
|
7322
|
+
}
|
|
7323
|
+
if (t === "k") {
|
|
7324
|
+
e.preventDefault(), W();
|
|
7325
|
+
return;
|
|
7326
|
+
}
|
|
7312
7327
|
}
|
|
7313
|
-
if (
|
|
7314
|
-
e.preventDefault(),
|
|
7328
|
+
if (e.key === "Enter" && e.shiftKey) {
|
|
7329
|
+
e.preventDefault(), i.submit();
|
|
7315
7330
|
return;
|
|
7316
7331
|
}
|
|
7317
7332
|
}
|
|
7318
|
-
if (e.key === "Enter" && e.shiftKey) {
|
|
7319
|
-
e.preventDefault(), i.submit();
|
|
7320
|
-
return;
|
|
7321
|
-
}
|
|
7322
7333
|
e.key === "Escape" && (A(), v());
|
|
7323
7334
|
}
|
|
7324
7335
|
}
|
|
@@ -7340,7 +7351,7 @@ function wd(e, t, r, i) {
|
|
|
7340
7351
|
A(), te(null);
|
|
7341
7352
|
return;
|
|
7342
7353
|
}
|
|
7343
|
-
P(t), te(U(t)), j() && (e.preventDefault(), ie(t, e), o.value = !0);
|
|
7354
|
+
P(t), te(U(t)), j() && (e.button === 2 && e.preventDefault(), ie(t, e), o.value = !0);
|
|
7344
7355
|
}
|
|
7345
7356
|
function de(t) {
|
|
7346
7357
|
let n = t.target;
|
|
@@ -7394,7 +7405,7 @@ function wd(e, t, r, i) {
|
|
|
7394
7405
|
}
|
|
7395
7406
|
//#endregion
|
|
7396
7407
|
//#region src/components/messages/ComposerActionsPopover.vue?vue&type=script&setup=true&lang.ts
|
|
7397
|
-
var
|
|
7408
|
+
var Dd = ["data-testid", "onClick"], Od = { class: "composer-actions-menu__icon" }, kd = { class: "composer-actions-menu__icon" }, Ad = /* @__PURE__ */ u({
|
|
7398
7409
|
__name: "ComposerActionsPopover",
|
|
7399
7410
|
emits: ["pickFile", "openPoll"],
|
|
7400
7411
|
setup(t, { expose: n, emit: i }) {
|
|
@@ -7459,18 +7470,18 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7459
7470
|
class: "composer-actions-menu__item",
|
|
7460
7471
|
"data-testid": e.testId,
|
|
7461
7472
|
onClick: (t) => h(e.kind)
|
|
7462
|
-
}, [o("span",
|
|
7473
|
+
}, [o("span", Od, [(S(), r(D(e.icon), { class: "size-5" }))]), o("span", null, k(j(u)(e.label)), 1)], 8, Dd)), 64)), o("button", {
|
|
7463
7474
|
type: "button",
|
|
7464
7475
|
class: "composer-actions-menu__item",
|
|
7465
7476
|
"data-testid": "composer-create-poll",
|
|
7466
7477
|
onClick: g
|
|
7467
|
-
}, [o("span",
|
|
7478
|
+
}, [o("span", kd, [(S(), r(D(j(ce)), { class: "size-5" }))]), o("span", null, k(j(u)("createPoll")), 1)])], 512)), [[F, c.value]]);
|
|
7468
7479
|
}
|
|
7469
|
-
}),
|
|
7480
|
+
}), jd = (e, t) => {
|
|
7470
7481
|
let n = e.__vccOpts || e;
|
|
7471
7482
|
for (let [e, r] of t) n[e] = r;
|
|
7472
7483
|
return n;
|
|
7473
|
-
},
|
|
7484
|
+
}, Md = /* @__PURE__ */ jd(Ad, [["__scopeId", "data-v-5e8b1d79"]]), Nd = { class: "border-default flex items-start justify-between gap-2 border-t-1 px-3 py-2" }, Pd = { class: "min-w-0" }, Fd = { class: "body-md text-default mt-0.5 overflow-hidden font-medium text-ellipsis whitespace-nowrap" }, Id = { class: "body-md text-subtle overflow-hidden text-ellipsis whitespace-nowrap" }, Ld = /* @__PURE__ */ u({
|
|
7474
7485
|
__name: "ComposerContextBanner",
|
|
7475
7486
|
props: {
|
|
7476
7487
|
message: {},
|
|
@@ -7480,10 +7491,10 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7480
7491
|
emits: ["cancel"],
|
|
7481
7492
|
setup(e, { emit: t }) {
|
|
7482
7493
|
let r = e, i = t, { t: s } = X(), c = Gu(), u = n(() => nc(r.message, s("message"), c.mentionNameByUid.value));
|
|
7483
|
-
return (t, n) => (S(), a("div",
|
|
7494
|
+
return (t, n) => (S(), a("div", Nd, [o("div", Pd, [
|
|
7484
7495
|
o("p", { class: g(["body-sm font-semibold uppercase", e.variant === "editing" ? "text-information" : "text-success"]) }, k(e.variant === "editing" ? j(s)("editingInContext", { context: e.contextLabel }) : j(s)("replyingInContext", { context: e.contextLabel })), 3),
|
|
7485
|
-
o("p",
|
|
7486
|
-
o("p",
|
|
7496
|
+
o("p", Fd, k(e.message.senderName), 1),
|
|
7497
|
+
o("p", Id, k(u.value), 1)
|
|
7487
7498
|
]), l(j(V), {
|
|
7488
7499
|
icon: j(de),
|
|
7489
7500
|
text: "",
|
|
@@ -7492,10 +7503,10 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7492
7503
|
onClick: n[0] ||= (e) => i("cancel")
|
|
7493
7504
|
}, null, 8, ["icon"])]));
|
|
7494
7505
|
}
|
|
7495
|
-
}),
|
|
7506
|
+
}), Rd = ["aria-label"], zd = { class: "format-menu__label" }, Bd = ["aria-label"], Vd = { class: "format-menu__label" }, Hd = ["aria-label"], Ud = { class: "format-menu__label" }, Wd = ["aria-label"], Gd = {
|
|
7496
7507
|
class: "format-menu__icon",
|
|
7497
7508
|
"aria-hidden": "true"
|
|
7498
|
-
},
|
|
7509
|
+
}, Kd = { class: "format-menu__label" }, qd = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
7499
7510
|
__name: "ComposerFormatMenu",
|
|
7500
7511
|
props: {
|
|
7501
7512
|
visible: { type: Boolean },
|
|
@@ -7522,7 +7533,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7522
7533
|
}, [u[12] ||= o("span", {
|
|
7523
7534
|
class: "format-menu__icon font-bold",
|
|
7524
7535
|
"aria-hidden": "true"
|
|
7525
|
-
}, "B", -1), o("span",
|
|
7536
|
+
}, "B", -1), o("span", zd, k(j(c)("bold")), 1)], 40, Rd),
|
|
7526
7537
|
o("button", {
|
|
7527
7538
|
type: "button",
|
|
7528
7539
|
class: "format-menu__item",
|
|
@@ -7533,7 +7544,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7533
7544
|
}, [u[13] ||= o("span", {
|
|
7534
7545
|
class: "format-menu__icon italic",
|
|
7535
7546
|
"aria-hidden": "true"
|
|
7536
|
-
}, "I", -1), o("span",
|
|
7547
|
+
}, "I", -1), o("span", Vd, k(j(c)("italic")), 1)], 40, Bd),
|
|
7537
7548
|
o("button", {
|
|
7538
7549
|
type: "button",
|
|
7539
7550
|
class: "format-menu__item",
|
|
@@ -7544,7 +7555,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7544
7555
|
}, [u[14] ||= o("span", {
|
|
7545
7556
|
class: "format-menu__icon underline",
|
|
7546
7557
|
"aria-hidden": "true"
|
|
7547
|
-
}, "U", -1), o("span",
|
|
7558
|
+
}, "U", -1), o("span", Ud, k(j(c)("underline")), 1)], 40, Hd),
|
|
7548
7559
|
o("button", {
|
|
7549
7560
|
type: "button",
|
|
7550
7561
|
class: "format-menu__item",
|
|
@@ -7552,16 +7563,16 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7552
7563
|
onPointerdown: u[9] ||= z(() => {}, ["prevent"]),
|
|
7553
7564
|
onMousedown: u[10] ||= z(() => {}, ["prevent"]),
|
|
7554
7565
|
onClick: u[11] ||= (e) => s("link")
|
|
7555
|
-
}, [o("span",
|
|
7566
|
+
}, [o("span", Gd, [l(j(Ee), { "aria-hidden": "true" })]), o("span", Kd, k(j(c)("link")), 1)], 40, Wd)
|
|
7556
7567
|
], 6)) : i("", !0)]));
|
|
7557
7568
|
}
|
|
7558
|
-
}), [["__scopeId", "data-v-
|
|
7569
|
+
}), [["__scopeId", "data-v-4151ff5d"]]), Jd = { class: "space-y-4" }, Yd = {
|
|
7559
7570
|
key: 0,
|
|
7560
7571
|
class: "body-md text-subtle truncate"
|
|
7561
|
-
},
|
|
7572
|
+
}, Xd = { class: "space-y-2" }, Zd = { class: "heading-sm text-subtle block font-medium!" }, Qd = {
|
|
7562
7573
|
key: 0,
|
|
7563
7574
|
class: "body-sm text-danger"
|
|
7564
|
-
},
|
|
7575
|
+
}, $d = /* @__PURE__ */ u({
|
|
7565
7576
|
__name: "ComposerLinkDialog",
|
|
7566
7577
|
props: {
|
|
7567
7578
|
visible: { type: Boolean },
|
|
@@ -7609,8 +7620,8 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7609
7620
|
"icon",
|
|
7610
7621
|
"disabled"
|
|
7611
7622
|
])]),
|
|
7612
|
-
default: L(() => [o("div",
|
|
7613
|
-
o("label",
|
|
7623
|
+
default: L(() => [o("div", Jd, [e.selectedText ? (S(), a("p", Yd, k(e.selectedText), 1)) : i("", !0), o("div", Xd, [
|
|
7624
|
+
o("label", Zd, k(j(d)("linkUrl")), 1),
|
|
7614
7625
|
l(j(re), {
|
|
7615
7626
|
modelValue: p.value,
|
|
7616
7627
|
"onUpdate:modelValue": n[0] ||= (e) => p.value = e,
|
|
@@ -7630,12 +7641,12 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7630
7641
|
"placeholder",
|
|
7631
7642
|
"onKeydown"
|
|
7632
7643
|
]),
|
|
7633
|
-
_.value ? (S(), a("p",
|
|
7644
|
+
_.value ? (S(), a("p", Qd, k(j(d)("invalidLinkUrl")), 1)) : i("", !0)
|
|
7634
7645
|
])])]),
|
|
7635
7646
|
_: 1
|
|
7636
7647
|
}, 8, ["visible", "header"]));
|
|
7637
7648
|
}
|
|
7638
|
-
}),
|
|
7649
|
+
}), ef = { class: "space-y-6" }, tf = { class: "space-y-2" }, nf = { class: "heading-sm text-subtle block font-medium!" }, rf = { class: "space-y-2" }, af = { class: "heading-sm text-subtle block font-medium!" }, of = /* @__PURE__ */ u({
|
|
7639
7650
|
__name: "ComposerPollDialog",
|
|
7640
7651
|
props: {
|
|
7641
7652
|
visible: { type: Boolean },
|
|
@@ -7687,13 +7698,13 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7687
7698
|
"icon",
|
|
7688
7699
|
"disabled"
|
|
7689
7700
|
])]),
|
|
7690
|
-
default: L(() => [o("div",
|
|
7701
|
+
default: L(() => [o("div", ef, [o("div", tf, [o("label", nf, k(j(d)("question")), 1), l(j(re), {
|
|
7691
7702
|
modelValue: f.value,
|
|
7692
7703
|
"onUpdate:modelValue": i[0] ||= (e) => f.value = e,
|
|
7693
7704
|
fluid: "",
|
|
7694
7705
|
placeholder: j(d)("pollQuestionPlaceholder")
|
|
7695
|
-
}, null, 8, ["modelValue", "placeholder"])]), o("div",
|
|
7696
|
-
o("label",
|
|
7706
|
+
}, null, 8, ["modelValue", "placeholder"])]), o("div", rf, [
|
|
7707
|
+
o("label", af, k(j(d)("options")), 1),
|
|
7697
7708
|
(S(!0), a(e, null, T(p.value, (e, t) => (S(), a("div", {
|
|
7698
7709
|
key: t,
|
|
7699
7710
|
class: "center"
|
|
@@ -7728,7 +7739,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7728
7739
|
_: 1
|
|
7729
7740
|
}, 8, ["visible", "header"]));
|
|
7730
7741
|
}
|
|
7731
|
-
}),
|
|
7742
|
+
}), sf = { class: "w-full space-y-6" }, cf = { class: "w-full space-y-2" }, lf = { class: "heading-sm text-subtle block font-medium!" }, uf = { class: "center left w-full gap-2" }, df = { class: "body-md bg-elevation-surface-sunken-default rounded-lg px-4 py-3" }, ff = /* @__PURE__ */ u({
|
|
7732
7743
|
__name: "ComposerScheduleDialog",
|
|
7733
7744
|
props: {
|
|
7734
7745
|
visible: { type: Boolean },
|
|
@@ -7786,7 +7797,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7786
7797
|
"icon",
|
|
7787
7798
|
"disabled"
|
|
7788
7799
|
])]),
|
|
7789
|
-
default: L(() => [o("div",
|
|
7800
|
+
default: L(() => [o("div", sf, [o("div", cf, [o("label", lf, k(j(c)("sendAt")), 1), o("div", uf, [l(j(ne), {
|
|
7790
7801
|
modelValue: u.value,
|
|
7791
7802
|
"onUpdate:modelValue": n[0] ||= (e) => u.value = e,
|
|
7792
7803
|
class: "w-full flex-1",
|
|
@@ -7800,22 +7811,22 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7800
7811
|
mask: "##:##",
|
|
7801
7812
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
7802
7813
|
"aria-label": "Time (24-hour)"
|
|
7803
|
-
}, null, 8, ["modelValue"])])]), o("div",
|
|
7814
|
+
}, null, 8, ["modelValue"])])]), o("div", df, k(e.contentPreview), 1)])]),
|
|
7804
7815
|
_: 1
|
|
7805
7816
|
}, 8, ["visible", "header"]));
|
|
7806
7817
|
}
|
|
7807
|
-
}),
|
|
7818
|
+
}), pf = [
|
|
7808
7819
|
"aria-selected",
|
|
7809
7820
|
"onMouseover",
|
|
7810
7821
|
"onMousedown"
|
|
7811
|
-
],
|
|
7822
|
+
], mf = {
|
|
7812
7823
|
key: 1,
|
|
7813
7824
|
class: "trigger-menu__avatar-fallback",
|
|
7814
7825
|
"aria-hidden": "true"
|
|
7815
|
-
},
|
|
7826
|
+
}, hf = { class: "min-w-0" }, gf = { class: "trigger-menu__label" }, _f = {
|
|
7816
7827
|
key: 0,
|
|
7817
7828
|
class: "trigger-menu__subtitle"
|
|
7818
|
-
},
|
|
7829
|
+
}, vf = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
7819
7830
|
__name: "ComposerTriggerMenu",
|
|
7820
7831
|
props: /* @__PURE__ */ m({
|
|
7821
7832
|
visible: { type: Boolean },
|
|
@@ -7850,18 +7861,18 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7850
7861
|
src: e.avatar,
|
|
7851
7862
|
name: e.label,
|
|
7852
7863
|
size: "sm"
|
|
7853
|
-
}, null, 8, ["src", "name"])) : (S(), a("span",
|
|
7864
|
+
}, null, 8, ["src", "name"])) : (S(), a("span", mf, k(e.label.charAt(0)), 1)), o("span", hf, [o("span", gf, k(e.label), 1), e.subtitle ? (S(), a("span", _f, k(e.subtitle), 1)) : i("", !0)])], 42, pf))), 128))], 38)) : i("", !0)]));
|
|
7854
7865
|
}
|
|
7855
|
-
}), [["__scopeId", "data-v-9cc0f5b0"]]),
|
|
7866
|
+
}), [["__scopeId", "data-v-9cc0f5b0"]]), yf = ["accept", "disabled"], bf = { class: "px-1 pb-1.5" }, xf = {
|
|
7856
7867
|
key: 0,
|
|
7857
7868
|
class: "composer-file-preview"
|
|
7858
|
-
},
|
|
7869
|
+
}, Sf = { class: "min-w-0" }, Cf = { class: "heading-sm text-default truncate" }, wf = { class: "body-sm text-subtle" }, Tf = ["data-placeholder"], Ef = {
|
|
7859
7870
|
key: 0,
|
|
7860
7871
|
class: "body-sm text-subtle flex items-center gap-2 px-0.5"
|
|
7861
|
-
},
|
|
7872
|
+
}, Df = {
|
|
7862
7873
|
key: 2,
|
|
7863
7874
|
class: "ml-auto"
|
|
7864
|
-
},
|
|
7875
|
+
}, Of = 450, kf = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
7865
7876
|
__name: "MessageComposer",
|
|
7866
7877
|
props: {
|
|
7867
7878
|
modelValue: {},
|
|
@@ -7897,99 +7908,100 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
7897
7908
|
video: "video/*",
|
|
7898
7909
|
audio: "audio/*",
|
|
7899
7910
|
file: "*/*"
|
|
7900
|
-
}, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), C = w(""), T = w(""), E = w(!1), { t: D } = X(), O =
|
|
7911
|
+
}, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), C = w(""), T = w(""), E = w(!1), { t: D } = X(), { isTouchUI: O } = vd(), A = null, M = w(null), N = w(null), P = w(null), { applyLink: F, applyFormat: L, cancelLink: ee, editorKey: R, formatMenuPosition: B, focusEditor: H, handleContextMenu: U, handleInput: te, handleKeydown: ne, handlePaste: re, hideFormatMenu: ie, getSelectionState: ae, requestLink: W, resetEditor: K, showFormatMenu: q, triggerCandidates: se, triggerMenuPosition: ce, highlightedTriggerIndex: le, showTriggerMenu: fe, selectTriggerCandidate: pe } = Ed(M, N, P, {
|
|
7901
7912
|
getModelValue: () => u.modelValue,
|
|
7902
7913
|
updateModelValue: (e) => d("update:modelValue", e),
|
|
7903
|
-
submit: () =>
|
|
7914
|
+
submit: () => Le(),
|
|
7904
7915
|
formatMenuEnabled: () => u.formattingMode !== "external",
|
|
7905
7916
|
onSelectionChange: (e) => d("composerSelectionChange", e),
|
|
7906
|
-
requestLink:
|
|
7917
|
+
requestLink: De,
|
|
7907
7918
|
shouldClearSelectionOnLinkRequest: () => u.formattingMode === "external",
|
|
7908
7919
|
getMentionCandidates: () => u.mentionCandidates ?? [],
|
|
7909
7920
|
getMentionNameByUid: () => u.mentionNameByUid ?? {},
|
|
7910
|
-
mentionsEnabled: () => u.mentionsEnabled ?? (u.mentionCandidates?.length ?? 0) > 0
|
|
7911
|
-
|
|
7921
|
+
mentionsEnabled: () => u.mentionsEnabled ?? (u.mentionCandidates?.length ?? 0) > 0,
|
|
7922
|
+
isTouchUI: () => O.value
|
|
7923
|
+
}), me = n(() => c[v.value]), he = n(() => {
|
|
7912
7924
|
if (!_.value) return null;
|
|
7913
7925
|
let e = _.value.type;
|
|
7914
7926
|
return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
|
|
7915
|
-
}),
|
|
7916
|
-
switch (
|
|
7927
|
+
}), ge = n(() => {
|
|
7928
|
+
switch (he.value) {
|
|
7917
7929
|
case "image": return D("image");
|
|
7918
7930
|
case "video": return D("video");
|
|
7919
7931
|
case "audio": return D("audio");
|
|
7920
7932
|
case "file": return D("file");
|
|
7921
7933
|
default: return D("attachment");
|
|
7922
7934
|
}
|
|
7923
|
-
}),
|
|
7935
|
+
}), ve = n(() => !u.editingMessage && !u.replyToMessage ? "" : u.compact ? "pt-1" : "pt-1.5"), ye = n(() => ec(u.modelValue) || !!_.value), be = n(() => ye.value && he.value !== "file"), xe = n(() => _.value ? D("attachmentSummary", { name: _.value.name }) : tc(u.modelValue) || D("currentDraftWillBeScheduled"));
|
|
7924
7936
|
I(() => u.resetSignal, () => {
|
|
7925
|
-
|
|
7937
|
+
K(), _.value = null, y.value = !1, b.value = !1, x.value = !1, ee(), f.value && (f.value.value = "");
|
|
7926
7938
|
});
|
|
7927
|
-
async function
|
|
7928
|
-
await h(),
|
|
7939
|
+
async function Se() {
|
|
7940
|
+
await h(), H();
|
|
7929
7941
|
}
|
|
7930
|
-
function
|
|
7942
|
+
function Ce() {
|
|
7931
7943
|
m.value?.hide();
|
|
7932
7944
|
}
|
|
7933
7945
|
t({
|
|
7934
|
-
focusEditor:
|
|
7935
|
-
hideComposerActions:
|
|
7936
|
-
applyComposerFormat:
|
|
7937
|
-
applyComposerLink:
|
|
7938
|
-
cancelComposerLink:
|
|
7939
|
-
getComposerSelection:
|
|
7940
|
-
requestComposerLink:
|
|
7946
|
+
focusEditor: Se,
|
|
7947
|
+
hideComposerActions: Ce,
|
|
7948
|
+
applyComposerFormat: Oe,
|
|
7949
|
+
applyComposerLink: Ae,
|
|
7950
|
+
cancelComposerLink: je,
|
|
7951
|
+
getComposerSelection: Me,
|
|
7952
|
+
requestComposerLink: ke
|
|
7941
7953
|
});
|
|
7942
|
-
async function
|
|
7954
|
+
async function we(e = "file") {
|
|
7943
7955
|
v.value = e, await h(), f.value?.click();
|
|
7944
7956
|
}
|
|
7945
|
-
function we(e) {
|
|
7946
|
-
_.value = e.target.files?.[0] ?? null, Se();
|
|
7947
|
-
}
|
|
7948
7957
|
function Te(e) {
|
|
7958
|
+
_.value = e.target.files?.[0] ?? null, Ce();
|
|
7959
|
+
}
|
|
7960
|
+
function Ee(e) {
|
|
7949
7961
|
if (u.disabled) return;
|
|
7950
7962
|
let t = _d(e);
|
|
7951
7963
|
if (t) {
|
|
7952
|
-
e.preventDefault(), _.value = t,
|
|
7964
|
+
e.preventDefault(), _.value = t, Ce();
|
|
7953
7965
|
return;
|
|
7954
7966
|
}
|
|
7955
|
-
|
|
7967
|
+
re(e);
|
|
7956
7968
|
}
|
|
7957
|
-
function
|
|
7969
|
+
function De(e) {
|
|
7958
7970
|
if (u.formattingMode === "external") {
|
|
7959
7971
|
d("composerLinkRequest", e);
|
|
7960
7972
|
return;
|
|
7961
7973
|
}
|
|
7962
7974
|
T.value = e.text, C.value = e.href ?? "", x.value = !0;
|
|
7963
7975
|
}
|
|
7964
|
-
function
|
|
7965
|
-
return
|
|
7966
|
-
}
|
|
7967
|
-
function Oe() {
|
|
7968
|
-
return ae();
|
|
7976
|
+
function Oe(e) {
|
|
7977
|
+
return L(e);
|
|
7969
7978
|
}
|
|
7970
|
-
function ke(
|
|
7971
|
-
return
|
|
7979
|
+
function ke() {
|
|
7980
|
+
return W();
|
|
7972
7981
|
}
|
|
7973
|
-
function Ae() {
|
|
7974
|
-
|
|
7982
|
+
function Ae(e) {
|
|
7983
|
+
return F(e);
|
|
7975
7984
|
}
|
|
7976
7985
|
function je() {
|
|
7977
|
-
|
|
7986
|
+
ee();
|
|
7978
7987
|
}
|
|
7979
|
-
function Me(
|
|
7980
|
-
|
|
7988
|
+
function Me() {
|
|
7989
|
+
return ae();
|
|
7981
7990
|
}
|
|
7982
|
-
function Pe() {
|
|
7983
|
-
|
|
7991
|
+
function Pe(e) {
|
|
7992
|
+
F(e) && (x.value = !1);
|
|
7984
7993
|
}
|
|
7985
7994
|
function J() {
|
|
7995
|
+
ee();
|
|
7996
|
+
}
|
|
7997
|
+
function Fe() {
|
|
7986
7998
|
_.value = null, f.value && (f.value.value = "");
|
|
7987
7999
|
}
|
|
7988
|
-
function
|
|
8000
|
+
function Ie(e) {
|
|
7989
8001
|
m.value?.toggle(e);
|
|
7990
8002
|
}
|
|
7991
|
-
function
|
|
7992
|
-
if (!(u.disabled || !
|
|
8003
|
+
function Le() {
|
|
8004
|
+
if (!(u.disabled || !ye.value)) {
|
|
7993
8005
|
if (_.value) {
|
|
7994
8006
|
d("sendAttachment", {
|
|
7995
8007
|
file: _.value,
|
|
@@ -8000,10 +8012,10 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8000
8012
|
d("sendText");
|
|
8001
8013
|
}
|
|
8002
8014
|
}
|
|
8003
|
-
function
|
|
8015
|
+
function Re(e) {
|
|
8004
8016
|
d("sendPoll", e);
|
|
8005
8017
|
}
|
|
8006
|
-
function
|
|
8018
|
+
function ze(e) {
|
|
8007
8019
|
d("scheduleMessage", {
|
|
8008
8020
|
...e,
|
|
8009
8021
|
text: _.value ? void 0 : $s(u.modelValue),
|
|
@@ -8011,48 +8023,48 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8011
8023
|
caption: _.value ? $s(u.modelValue) : void 0
|
|
8012
8024
|
});
|
|
8013
8025
|
}
|
|
8014
|
-
function ze() {
|
|
8015
|
-
d("openScheduled");
|
|
8016
|
-
}
|
|
8017
8026
|
function Be() {
|
|
8018
|
-
|
|
8027
|
+
d("openScheduled");
|
|
8019
8028
|
}
|
|
8020
|
-
function Ve(
|
|
8021
|
-
|
|
8022
|
-
O = null, E.value = !0, b.value = !0;
|
|
8023
|
-
}, Ef));
|
|
8029
|
+
function Ve() {
|
|
8030
|
+
A !== null && (clearTimeout(A), A = null);
|
|
8024
8031
|
}
|
|
8025
|
-
function Y() {
|
|
8026
|
-
|
|
8032
|
+
function Y(e) {
|
|
8033
|
+
u.disabled || !be.value || e instanceof MouseEvent && e.button !== 0 || (E.value = !1, Ve(), A = setTimeout(() => {
|
|
8034
|
+
A = null, E.value = !0, b.value = !0;
|
|
8035
|
+
}, Of));
|
|
8027
8036
|
}
|
|
8028
8037
|
function He() {
|
|
8029
|
-
|
|
8038
|
+
Ve();
|
|
8039
|
+
}
|
|
8040
|
+
function Ue() {
|
|
8041
|
+
if (!(u.disabled || !ye.value)) {
|
|
8030
8042
|
if (E.value) {
|
|
8031
8043
|
E.value = !1;
|
|
8032
8044
|
return;
|
|
8033
8045
|
}
|
|
8034
|
-
|
|
8046
|
+
Le();
|
|
8035
8047
|
}
|
|
8036
8048
|
}
|
|
8037
|
-
return (t, n) => (S(), a("div", { class: g([u.compact ? "space-y-1" : "space-y-1.5",
|
|
8049
|
+
return (t, n) => (S(), a("div", { class: g([u.compact ? "space-y-1" : "space-y-1.5", ve.value]) }, [
|
|
8038
8050
|
o("input", {
|
|
8039
8051
|
ref_key: "fileInputRef",
|
|
8040
8052
|
ref: f,
|
|
8041
8053
|
type: "file",
|
|
8042
8054
|
class: "hidden",
|
|
8043
|
-
accept:
|
|
8055
|
+
accept: me.value,
|
|
8044
8056
|
disabled: e.disabled,
|
|
8045
|
-
onChange:
|
|
8046
|
-
onCancel:
|
|
8047
|
-
}, null, 40,
|
|
8048
|
-
e.editingMessage ? (S(), r(
|
|
8057
|
+
onChange: Te,
|
|
8058
|
+
onCancel: Ce
|
|
8059
|
+
}, null, 40, yf),
|
|
8060
|
+
e.editingMessage ? (S(), r(Ld, {
|
|
8049
8061
|
key: 0,
|
|
8050
8062
|
message: e.editingMessage,
|
|
8051
8063
|
variant: "editing",
|
|
8052
8064
|
"context-label": e.contextLabel,
|
|
8053
8065
|
onCancel: n[0] ||= (e) => d("cancelEdit")
|
|
8054
8066
|
}, null, 8, ["message", "context-label"])) : i("", !0),
|
|
8055
|
-
e.replyToMessage ? (S(), r(
|
|
8067
|
+
e.replyToMessage ? (S(), r(Ld, {
|
|
8056
8068
|
key: 1,
|
|
8057
8069
|
message: e.replyToMessage,
|
|
8058
8070
|
variant: "replying",
|
|
@@ -8060,23 +8072,23 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8060
8072
|
"data-testid": "composer-reply-context",
|
|
8061
8073
|
onCancel: n[1] ||= (e) => d("cancelReply")
|
|
8062
8074
|
}, null, 8, ["message", "context-label"])) : i("", !0),
|
|
8063
|
-
o("div",
|
|
8064
|
-
_.value ? (S(), a("div",
|
|
8075
|
+
o("div", bf, [
|
|
8076
|
+
_.value ? (S(), a("div", xf, [o("div", Sf, [o("p", Cf, k(_.value.name), 1), o("p", wf, k(_.value.type || ge.value), 1)]), l(j(V), {
|
|
8065
8077
|
icon: j(de),
|
|
8066
8078
|
text: "",
|
|
8067
8079
|
rounded: "",
|
|
8068
8080
|
severity: "secondary",
|
|
8069
|
-
onClick:
|
|
8081
|
+
onClick: Fe
|
|
8070
8082
|
}, null, 8, ["icon"])])) : i("", !0),
|
|
8071
8083
|
o("div", {
|
|
8072
8084
|
ref_key: "composerShellRef",
|
|
8073
|
-
ref:
|
|
8085
|
+
ref: M,
|
|
8074
8086
|
class: g(["composer-shell", u.compact ? "composer-shell--compact" : "composer-shell--default"])
|
|
8075
8087
|
}, [
|
|
8076
|
-
l(
|
|
8088
|
+
l(Md, {
|
|
8077
8089
|
ref_key: "composerActionsRef",
|
|
8078
8090
|
ref: m,
|
|
8079
|
-
onPickFile:
|
|
8091
|
+
onPickFile: we,
|
|
8080
8092
|
onOpenPoll: n[2] ||= (e) => y.value = !0
|
|
8081
8093
|
}, null, 512),
|
|
8082
8094
|
l(j(V), {
|
|
@@ -8088,7 +8100,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8088
8100
|
"aria-label": j(D)("addToMessage"),
|
|
8089
8101
|
"data-testid": "composer-actions-button",
|
|
8090
8102
|
icon: j(oe),
|
|
8091
|
-
onClick:
|
|
8103
|
+
onClick: Ie
|
|
8092
8104
|
}, null, 8, [
|
|
8093
8105
|
"class",
|
|
8094
8106
|
"disabled",
|
|
@@ -8096,22 +8108,22 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8096
8108
|
"icon"
|
|
8097
8109
|
]),
|
|
8098
8110
|
(S(), a("div", {
|
|
8099
|
-
key: j(
|
|
8111
|
+
key: j(R),
|
|
8100
8112
|
ref_key: "composerEditorRef",
|
|
8101
|
-
ref:
|
|
8113
|
+
ref: N,
|
|
8102
8114
|
contenteditable: "true",
|
|
8103
8115
|
role: "textbox",
|
|
8104
8116
|
"aria-multiline": "true",
|
|
8105
8117
|
"data-placeholder": j(D)("writeMessage"),
|
|
8106
8118
|
class: g(["composer-editor", e.disabled ? "pointer-events-none opacity-60" : ""]),
|
|
8107
|
-
onFocus: n[3] ||= (...e) => j(
|
|
8108
|
-
onInput: n[4] ||= (...e) => j(
|
|
8109
|
-
onKeyup: n[5] ||= (...e) => j(
|
|
8110
|
-
onKeydown: n[6] ||= (...e) => j(
|
|
8111
|
-
onPaste:
|
|
8112
|
-
onContextmenu: n[7] ||= (...e) => j(
|
|
8113
|
-
}, null, 42,
|
|
8114
|
-
_.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div",
|
|
8119
|
+
onFocus: n[3] ||= (...e) => j(ie) && j(ie)(...e),
|
|
8120
|
+
onInput: n[4] ||= (...e) => j(te) && j(te)(...e),
|
|
8121
|
+
onKeyup: n[5] ||= (...e) => j(te) && j(te)(...e),
|
|
8122
|
+
onKeydown: n[6] ||= (...e) => j(ne) && j(ne)(...e),
|
|
8123
|
+
onPaste: Ee,
|
|
8124
|
+
onContextmenu: n[7] ||= (...e) => j(U) && j(U)(...e)
|
|
8125
|
+
}, null, 42, Tf)),
|
|
8126
|
+
_.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div", Ef, [
|
|
8115
8127
|
e.editingMessage ? (S(), r(j(G), {
|
|
8116
8128
|
key: 0,
|
|
8117
8129
|
text: j(D)("editing"),
|
|
@@ -8128,7 +8140,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8128
8140
|
size: "sm",
|
|
8129
8141
|
class: "composer-meta-tag"
|
|
8130
8142
|
}, null, 8, ["text"])) : i("", !0),
|
|
8131
|
-
e.offlineMode ? (S(), a("p",
|
|
8143
|
+
e.offlineMode ? (S(), a("p", Df, k(e.pendingQueueCount ? j(D)("offlineQueued", { count: e.pendingQueueCount }) : j(D)("offline")), 1)) : i("", !0)
|
|
8132
8144
|
])) : i("", !0),
|
|
8133
8145
|
e.showScheduledButton ? (S(), r(j(V), {
|
|
8134
8146
|
key: 1,
|
|
@@ -8138,7 +8150,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8138
8150
|
disabled: e.disabled,
|
|
8139
8151
|
"aria-label": j(D)("scheduledMessages"),
|
|
8140
8152
|
icon: j(_e),
|
|
8141
|
-
onClick:
|
|
8153
|
+
onClick: Be
|
|
8142
8154
|
}, null, 8, [
|
|
8143
8155
|
"class",
|
|
8144
8156
|
"disabled",
|
|
@@ -8150,17 +8162,17 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8150
8162
|
severity: "primary",
|
|
8151
8163
|
text: "",
|
|
8152
8164
|
class: g(["composer-send-button shrink-0 self-end", u.compact ? "h-9 w-9" : "h-10 w-10 max-md:h-9 max-md:w-9"]),
|
|
8153
|
-
disabled: e.disabled || !
|
|
8165
|
+
disabled: e.disabled || !ye.value,
|
|
8154
8166
|
"aria-label": e.editingMessage ? j(D)("saveMessage") : _.value ? j(D)("sendAttachment") : j(D)("sendMessage"),
|
|
8155
8167
|
icon: e.editingMessage ? j(ue) : j(Ne),
|
|
8156
|
-
onMousedown:
|
|
8157
|
-
onMouseup:
|
|
8158
|
-
onMouseleave:
|
|
8159
|
-
onTouchstart:
|
|
8160
|
-
onTouchend:
|
|
8161
|
-
onTouchcancel:
|
|
8168
|
+
onMousedown: Y,
|
|
8169
|
+
onMouseup: He,
|
|
8170
|
+
onMouseleave: He,
|
|
8171
|
+
onTouchstart: Y,
|
|
8172
|
+
onTouchend: He,
|
|
8173
|
+
onTouchcancel: He,
|
|
8162
8174
|
onContextmenu: n[8] ||= z(() => {}, ["prevent"]),
|
|
8163
|
-
onClick:
|
|
8175
|
+
onClick: Ue
|
|
8164
8176
|
}, null, 8, [
|
|
8165
8177
|
"class",
|
|
8166
8178
|
"disabled",
|
|
@@ -8168,60 +8180,60 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8168
8180
|
"icon"
|
|
8169
8181
|
])
|
|
8170
8182
|
], 2),
|
|
8171
|
-
e.formattingMode === "external" ? i("", !0) : (S(), r(
|
|
8183
|
+
e.formattingMode === "external" ? i("", !0) : (S(), r(qd, {
|
|
8172
8184
|
key: 1,
|
|
8173
|
-
visible: j(
|
|
8174
|
-
position: j(
|
|
8175
|
-
onFormat: n[9] ||= (e) => j(
|
|
8176
|
-
onLink: j(
|
|
8185
|
+
visible: j(q),
|
|
8186
|
+
position: j(B),
|
|
8187
|
+
onFormat: n[9] ||= (e) => j(L)(e),
|
|
8188
|
+
onLink: j(W)
|
|
8177
8189
|
}, null, 8, [
|
|
8178
8190
|
"visible",
|
|
8179
8191
|
"position",
|
|
8180
8192
|
"onLink"
|
|
8181
8193
|
])),
|
|
8182
|
-
l(
|
|
8194
|
+
l(vf, {
|
|
8183
8195
|
ref_key: "triggerMenuRef",
|
|
8184
|
-
ref:
|
|
8185
|
-
"highlighted-index": j(
|
|
8186
|
-
"onUpdate:highlightedIndex": n[10] ||= (e) => p(
|
|
8187
|
-
visible: j(
|
|
8188
|
-
position: j(
|
|
8189
|
-
candidates: j(
|
|
8190
|
-
onSelect: n[11] ||= (e) => j(
|
|
8196
|
+
ref: P,
|
|
8197
|
+
"highlighted-index": j(le),
|
|
8198
|
+
"onUpdate:highlightedIndex": n[10] ||= (e) => p(le) ? le.value = e : null,
|
|
8199
|
+
visible: j(fe),
|
|
8200
|
+
position: j(ce),
|
|
8201
|
+
candidates: j(se),
|
|
8202
|
+
onSelect: n[11] ||= (e) => j(pe)(e)
|
|
8191
8203
|
}, null, 8, [
|
|
8192
8204
|
"highlighted-index",
|
|
8193
8205
|
"visible",
|
|
8194
8206
|
"position",
|
|
8195
8207
|
"candidates"
|
|
8196
8208
|
]),
|
|
8197
|
-
l(
|
|
8209
|
+
l(of, {
|
|
8198
8210
|
visible: y.value,
|
|
8199
8211
|
"onUpdate:visible": n[12] ||= (e) => y.value = e,
|
|
8200
8212
|
disabled: e.disabled,
|
|
8201
|
-
onSend:
|
|
8213
|
+
onSend: Re
|
|
8202
8214
|
}, null, 8, ["visible", "disabled"]),
|
|
8203
|
-
e.formattingMode === "external" ? i("", !0) : (S(), r(
|
|
8215
|
+
e.formattingMode === "external" ? i("", !0) : (S(), r($d, {
|
|
8204
8216
|
key: 2,
|
|
8205
8217
|
visible: x.value,
|
|
8206
8218
|
"onUpdate:visible": n[13] ||= (e) => x.value = e,
|
|
8207
8219
|
disabled: e.disabled,
|
|
8208
8220
|
"initial-url": C.value,
|
|
8209
8221
|
"selected-text": T.value,
|
|
8210
|
-
onApply:
|
|
8211
|
-
onCancel:
|
|
8222
|
+
onApply: Pe,
|
|
8223
|
+
onCancel: J
|
|
8212
8224
|
}, null, 8, [
|
|
8213
8225
|
"visible",
|
|
8214
8226
|
"disabled",
|
|
8215
8227
|
"initial-url",
|
|
8216
8228
|
"selected-text"
|
|
8217
8229
|
])),
|
|
8218
|
-
l(
|
|
8230
|
+
l(ff, {
|
|
8219
8231
|
visible: b.value,
|
|
8220
8232
|
"onUpdate:visible": n[14] ||= (e) => b.value = e,
|
|
8221
8233
|
disabled: e.disabled,
|
|
8222
|
-
"can-schedule":
|
|
8223
|
-
"content-preview":
|
|
8224
|
-
onSchedule:
|
|
8234
|
+
"can-schedule": be.value,
|
|
8235
|
+
"content-preview": xe.value,
|
|
8236
|
+
onSchedule: ze
|
|
8225
8237
|
}, null, 8, [
|
|
8226
8238
|
"visible",
|
|
8227
8239
|
"disabled",
|
|
@@ -8231,10 +8243,10 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8231
8243
|
])
|
|
8232
8244
|
], 2));
|
|
8233
8245
|
}
|
|
8234
|
-
}), [["__scopeId", "data-v-
|
|
8246
|
+
}), [["__scopeId", "data-v-50a9c196"]]), Af = {
|
|
8235
8247
|
key: 1,
|
|
8236
8248
|
class: "composer-readonly-notice"
|
|
8237
|
-
},
|
|
8249
|
+
}, jf = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
8238
8250
|
__name: "ConversationComposer",
|
|
8239
8251
|
props: {
|
|
8240
8252
|
target: {},
|
|
@@ -8323,7 +8335,7 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8323
8335
|
focusEditor: ee,
|
|
8324
8336
|
getComposerSelection: H,
|
|
8325
8337
|
requestComposerLink: z
|
|
8326
|
-
}), (t, n) => x.value ? (S(), r(
|
|
8338
|
+
}), (t, n) => x.value ? (S(), r(kf, {
|
|
8327
8339
|
key: 0,
|
|
8328
8340
|
ref_key: "composerRef",
|
|
8329
8341
|
ref: L,
|
|
@@ -8364,19 +8376,15 @@ var Td = ["data-testid", "onClick"], Ed = { class: "composer-actions-menu__icon"
|
|
|
8364
8376
|
"mention-name-by-uid",
|
|
8365
8377
|
"mentions-enabled",
|
|
8366
8378
|
"formatting-mode"
|
|
8367
|
-
])) : C.value ? (S(), a("div",
|
|
8379
|
+
])) : C.value ? (S(), a("div", Af, k(h.value ? j(l)("repliesDisabledInChannels") : j(l)("readOnlyChannel")), 1)) : i("", !0);
|
|
8368
8380
|
}
|
|
8369
|
-
}), [["__scopeId", "data-v-924c6768"]]),
|
|
8370
|
-
function
|
|
8371
|
-
let t = e.actionMenuRef,
|
|
8372
|
-
|
|
8373
|
-
s.value = e.matches;
|
|
8374
|
-
});
|
|
8375
|
-
let c = null;
|
|
8376
|
-
function l(e) {
|
|
8381
|
+
}), [["__scopeId", "data-v-924c6768"]]), Mf = 1800;
|
|
8382
|
+
function Nf(e) {
|
|
8383
|
+
let t = e.actionMenuRef, n = w(null), r = w(null), i = w({}), { isTouchUI: a } = vd(), o = null;
|
|
8384
|
+
function s(e) {
|
|
8377
8385
|
return e.kind === "text" && ec(e.text);
|
|
8378
8386
|
}
|
|
8379
|
-
function
|
|
8387
|
+
function c(e) {
|
|
8380
8388
|
return e.isOwn && [
|
|
8381
8389
|
"text",
|
|
8382
8390
|
"image",
|
|
@@ -8385,29 +8393,29 @@ function jf(e) {
|
|
|
8385
8393
|
"file"
|
|
8386
8394
|
].includes(e.kind) && !e.isDeleted && e.deliveryState === "sent";
|
|
8387
8395
|
}
|
|
8388
|
-
function
|
|
8396
|
+
function l(e) {
|
|
8389
8397
|
return e.isOwn && e.deliveryState === "sent";
|
|
8390
8398
|
}
|
|
8391
|
-
function
|
|
8399
|
+
function u(e) {
|
|
8392
8400
|
return e.isOwn && !e.isDeleted;
|
|
8393
8401
|
}
|
|
8394
|
-
function
|
|
8402
|
+
function d(e) {
|
|
8395
8403
|
return cc(e);
|
|
8396
8404
|
}
|
|
8397
|
-
function
|
|
8405
|
+
function f(e) {
|
|
8398
8406
|
return e.attachments.find((e) => e.kind === "image" && !!e.url);
|
|
8399
8407
|
}
|
|
8400
|
-
async function
|
|
8401
|
-
let t =
|
|
8408
|
+
async function p(e) {
|
|
8409
|
+
let t = f(e);
|
|
8402
8410
|
if (!t?.url || typeof navigator > "u" || !navigator.clipboard?.write || typeof ClipboardItem > "u") return !1;
|
|
8403
8411
|
let n = await fetch(t.url);
|
|
8404
8412
|
if (!n.ok) return !1;
|
|
8405
8413
|
let r = await n.blob();
|
|
8406
8414
|
if (!r.type.startsWith("image/")) return !1;
|
|
8407
|
-
let i = { [r.type]: r }, a =
|
|
8415
|
+
let i = { [r.type]: r }, a = d(e);
|
|
8408
8416
|
return a && (i["text/plain"] = new Blob([a], { type: "text/plain" })), await navigator.clipboard.write([new ClipboardItem(i)]), !0;
|
|
8409
8417
|
}
|
|
8410
|
-
function
|
|
8418
|
+
function m(e) {
|
|
8411
8419
|
let t = Number.isFinite(e.clientX) ? e.clientX : 0, n = Number.isFinite(e.clientY) ? e.clientY : 0;
|
|
8412
8420
|
if (t > 0 || n > 0) return {
|
|
8413
8421
|
x: t,
|
|
@@ -8426,9 +8434,9 @@ function jf(e) {
|
|
|
8426
8434
|
y: 0
|
|
8427
8435
|
};
|
|
8428
8436
|
}
|
|
8429
|
-
async function
|
|
8430
|
-
if (
|
|
8431
|
-
let t =
|
|
8437
|
+
async function g(e, t) {
|
|
8438
|
+
if (!a.value) {
|
|
8439
|
+
let t = m(e);
|
|
8432
8440
|
return {
|
|
8433
8441
|
x: t.x + 2,
|
|
8434
8442
|
y: t.y + 2,
|
|
@@ -8459,91 +8467,91 @@ function jf(e) {
|
|
|
8459
8467
|
element: void 0
|
|
8460
8468
|
};
|
|
8461
8469
|
}
|
|
8462
|
-
async function
|
|
8463
|
-
if (!e.canUseMessageActions() ||
|
|
8464
|
-
i.preventDefault(), i.stopPropagation(), e.onMenuOpen?.(),
|
|
8465
|
-
let { x:
|
|
8470
|
+
async function _(r, i, o) {
|
|
8471
|
+
if (!e.canUseMessageActions() || o === "contextmenu" && a.value || o === "tap" && !a.value) return;
|
|
8472
|
+
i.preventDefault(), i.stopPropagation(), e.onMenuOpen?.(), n.value = r, M(r), await h();
|
|
8473
|
+
let { x: s, y: c, element: l } = await g(i, r);
|
|
8466
8474
|
t.value?.show(i, l ? void 0 : {
|
|
8467
|
-
x:
|
|
8475
|
+
x: s,
|
|
8468
8476
|
y: c
|
|
8469
8477
|
}, l);
|
|
8470
8478
|
}
|
|
8471
|
-
function
|
|
8472
|
-
|
|
8479
|
+
function v(e, t) {
|
|
8480
|
+
_(e, t, "contextmenu");
|
|
8473
8481
|
}
|
|
8474
|
-
function
|
|
8475
|
-
if (
|
|
8476
|
-
t.preventDefault(), t.stopPropagation(),
|
|
8482
|
+
function y(e, t) {
|
|
8483
|
+
if (n.value) {
|
|
8484
|
+
t.preventDefault(), t.stopPropagation(), b();
|
|
8477
8485
|
return;
|
|
8478
8486
|
}
|
|
8479
|
-
|
|
8487
|
+
_(e, t, "tap");
|
|
8480
8488
|
}
|
|
8481
|
-
function
|
|
8482
|
-
|
|
8489
|
+
function b() {
|
|
8490
|
+
x(), t.value?.hide();
|
|
8483
8491
|
}
|
|
8484
|
-
function
|
|
8492
|
+
function x() {
|
|
8485
8493
|
setTimeout(() => {
|
|
8486
|
-
|
|
8494
|
+
n.value = null;
|
|
8487
8495
|
}, 10);
|
|
8488
8496
|
}
|
|
8489
|
-
function
|
|
8490
|
-
e.canReact() && (e.emit.toggleReaction(t, n),
|
|
8497
|
+
function S(t, n) {
|
|
8498
|
+
e.canReact() && (e.emit.toggleReaction(t, n), b());
|
|
8491
8499
|
}
|
|
8492
|
-
function
|
|
8500
|
+
function C(t, n) {
|
|
8493
8501
|
e.canReact() && e.emit.toggleReaction(t, n);
|
|
8494
8502
|
}
|
|
8495
|
-
async function
|
|
8503
|
+
async function T(e) {
|
|
8496
8504
|
if (typeof navigator > "u") return;
|
|
8497
8505
|
let t = !1;
|
|
8498
8506
|
try {
|
|
8499
|
-
t = await
|
|
8507
|
+
t = await p(e);
|
|
8500
8508
|
} catch {
|
|
8501
8509
|
t = !1;
|
|
8502
8510
|
}
|
|
8503
8511
|
if (!t) {
|
|
8504
|
-
let t =
|
|
8512
|
+
let t = d(e);
|
|
8505
8513
|
if (!t || !navigator.clipboard?.writeText) return;
|
|
8506
8514
|
await navigator.clipboard.writeText(t);
|
|
8507
8515
|
}
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
},
|
|
8516
|
+
r.value = e.id, o && clearTimeout(o), o = setTimeout(() => {
|
|
8517
|
+
r.value = null;
|
|
8518
|
+
}, Mf), b();
|
|
8519
|
+
}
|
|
8520
|
+
function E(t) {
|
|
8521
|
+
e.canReply() && (e.emit.reply(t), b());
|
|
8522
|
+
}
|
|
8523
|
+
function D(t) {
|
|
8524
|
+
e.emit.edit(t), b();
|
|
8511
8525
|
}
|
|
8512
8526
|
function O(t) {
|
|
8513
|
-
e.
|
|
8527
|
+
e.canOpenThread() && (e.emit.openThread(t), b());
|
|
8514
8528
|
}
|
|
8515
8529
|
function k(t) {
|
|
8516
|
-
e.emit.
|
|
8530
|
+
e.emit.translate(t), b();
|
|
8517
8531
|
}
|
|
8518
8532
|
function A(t) {
|
|
8519
|
-
e.
|
|
8533
|
+
e.emit.delete(t), b();
|
|
8520
8534
|
}
|
|
8521
8535
|
function j(t) {
|
|
8522
|
-
e.
|
|
8523
|
-
}
|
|
8524
|
-
function M(t) {
|
|
8525
|
-
e.emit.delete(t), S();
|
|
8526
|
-
}
|
|
8527
|
-
function N(t) {
|
|
8528
|
-
return e.getCachedMessageReceipts?.(t) ?? a.value[t.id];
|
|
8536
|
+
return e.getCachedMessageReceipts?.(t) ?? i.value[t.id];
|
|
8529
8537
|
}
|
|
8530
|
-
async function
|
|
8531
|
-
if (!(!
|
|
8538
|
+
async function M(t) {
|
|
8539
|
+
if (!(!l(t) || j(t) || !e.loadMessageReceipts)) try {
|
|
8532
8540
|
let n = await e.loadMessageReceipts(t);
|
|
8533
|
-
|
|
8534
|
-
...
|
|
8541
|
+
i.value = {
|
|
8542
|
+
...i.value,
|
|
8535
8543
|
[t.id]: n
|
|
8536
8544
|
};
|
|
8537
8545
|
} catch {
|
|
8538
|
-
|
|
8539
|
-
...
|
|
8546
|
+
i.value = {
|
|
8547
|
+
...i.value,
|
|
8540
8548
|
[t.id]: []
|
|
8541
8549
|
};
|
|
8542
8550
|
}
|
|
8543
8551
|
}
|
|
8544
|
-
function
|
|
8545
|
-
if (!
|
|
8546
|
-
let n =
|
|
8552
|
+
function N(t) {
|
|
8553
|
+
if (!l(t)) return null;
|
|
8554
|
+
let n = j(t), r = e.isLoadingMessageReceipts?.(t) ?? !1;
|
|
8547
8555
|
if (!n) return !t.receipts.readAt || !r ? null : {
|
|
8548
8556
|
label: e.t("seen"),
|
|
8549
8557
|
receipts: [],
|
|
@@ -8556,72 +8564,72 @@ function jf(e) {
|
|
|
8556
8564
|
loading: r
|
|
8557
8565
|
} : null;
|
|
8558
8566
|
}
|
|
8559
|
-
function
|
|
8567
|
+
function P(t) {
|
|
8560
8568
|
return [
|
|
8561
8569
|
{
|
|
8562
8570
|
key: "reply",
|
|
8563
8571
|
label: e.t("reply"),
|
|
8564
8572
|
icon: je,
|
|
8565
8573
|
visible: e.canReply(),
|
|
8566
|
-
command: () =>
|
|
8574
|
+
command: () => E(t)
|
|
8567
8575
|
},
|
|
8568
8576
|
{
|
|
8569
8577
|
key: "edit",
|
|
8570
8578
|
label: e.t("edit"),
|
|
8571
8579
|
icon: ve,
|
|
8572
|
-
visible:
|
|
8573
|
-
command: () =>
|
|
8580
|
+
visible: c(t),
|
|
8581
|
+
command: () => D(t)
|
|
8574
8582
|
},
|
|
8575
8583
|
{
|
|
8576
8584
|
key: "copy",
|
|
8577
|
-
label:
|
|
8578
|
-
icon:
|
|
8585
|
+
label: r.value === t.id ? e.t("copied") : e.t("copyText"),
|
|
8586
|
+
icon: r.value === t.id ? ue : pe,
|
|
8579
8587
|
visible: !0,
|
|
8580
|
-
command: () =>
|
|
8588
|
+
command: () => T(t)
|
|
8581
8589
|
},
|
|
8582
8590
|
{
|
|
8583
8591
|
key: "thread",
|
|
8584
8592
|
label: e.t("threadWithCount", { count: t.replyCount }),
|
|
8585
8593
|
icon: Se,
|
|
8586
8594
|
visible: !e.isInThread() && e.canOpenThread(),
|
|
8587
|
-
command: () =>
|
|
8595
|
+
command: () => O(t)
|
|
8588
8596
|
},
|
|
8589
8597
|
{
|
|
8590
8598
|
key: "delete",
|
|
8591
8599
|
label: e.t("delete"),
|
|
8592
8600
|
icon: me,
|
|
8593
|
-
visible:
|
|
8594
|
-
command: () =>
|
|
8601
|
+
visible: u(t),
|
|
8602
|
+
command: () => A(t)
|
|
8595
8603
|
},
|
|
8596
8604
|
{
|
|
8597
8605
|
key: "translate",
|
|
8598
8606
|
label: e.t("translate"),
|
|
8599
8607
|
icon: Fe,
|
|
8600
|
-
visible:
|
|
8601
|
-
command: () =>
|
|
8608
|
+
visible: s(t),
|
|
8609
|
+
command: () => k(t)
|
|
8602
8610
|
}
|
|
8603
8611
|
].filter((e) => e.visible);
|
|
8604
8612
|
}
|
|
8605
8613
|
return {
|
|
8606
8614
|
actionMenuRef: t,
|
|
8607
|
-
activeActionMessage:
|
|
8608
|
-
copiedMessageId:
|
|
8609
|
-
isTouchUI:
|
|
8610
|
-
handleMessageContextMenu:
|
|
8611
|
-
handleMessageTap:
|
|
8612
|
-
closeActionMenu:
|
|
8613
|
-
resetActionMenuState:
|
|
8614
|
-
reactToMessage:
|
|
8615
|
-
toggleInlineReaction:
|
|
8616
|
-
loadReceiptPreview:
|
|
8617
|
-
getReceiptSummaryAction:
|
|
8618
|
-
getActionItems:
|
|
8615
|
+
activeActionMessage: n,
|
|
8616
|
+
copiedMessageId: r,
|
|
8617
|
+
isTouchUI: a,
|
|
8618
|
+
handleMessageContextMenu: v,
|
|
8619
|
+
handleMessageTap: y,
|
|
8620
|
+
closeActionMenu: b,
|
|
8621
|
+
resetActionMenuState: x,
|
|
8622
|
+
reactToMessage: S,
|
|
8623
|
+
toggleInlineReaction: C,
|
|
8624
|
+
loadReceiptPreview: M,
|
|
8625
|
+
getReceiptSummaryAction: N,
|
|
8626
|
+
getActionItems: P
|
|
8619
8627
|
};
|
|
8620
8628
|
}
|
|
8621
8629
|
//#endregion
|
|
8622
8630
|
//#region src/composables/useMessageListScroll.ts
|
|
8623
|
-
var
|
|
8624
|
-
function
|
|
8631
|
+
var Pf = 1, Ff = 2, If = 80, Lf = 1800, Rf = 4;
|
|
8632
|
+
function zf(e) {
|
|
8625
8633
|
let t = e.threadRef, n = !0, r = 0, i = null, a = null, o = null, s = null;
|
|
8626
8634
|
function c() {
|
|
8627
8635
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
@@ -8663,7 +8671,7 @@ function Lf(e) {
|
|
|
8663
8671
|
resizeObserver: o,
|
|
8664
8672
|
timeoutId: setTimeout(() => {
|
|
8665
8673
|
f();
|
|
8666
|
-
},
|
|
8674
|
+
}, Lf)
|
|
8667
8675
|
}, a(), o.observe(e);
|
|
8668
8676
|
}
|
|
8669
8677
|
function m() {
|
|
@@ -8674,9 +8682,9 @@ function Lf(e) {
|
|
|
8674
8682
|
let a = t.value;
|
|
8675
8683
|
if (!a) return;
|
|
8676
8684
|
let o = a.scrollTop;
|
|
8677
|
-
i?.el === a && Math.abs(o - i.expectedScrollTop) >
|
|
8685
|
+
i?.el === a && Math.abs(o - i.expectedScrollTop) > Rf && f();
|
|
8678
8686
|
let s = o < r, c = Math.max(0, a.scrollHeight - o - a.clientHeight);
|
|
8679
|
-
s && c >
|
|
8687
|
+
s && c > Pf ? n = !1 : c <= Ff && (n = !0), r = o, a.scrollTop <= If && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
|
|
8680
8688
|
}
|
|
8681
8689
|
return I(() => {
|
|
8682
8690
|
let t = e.getMessages();
|
|
@@ -8704,14 +8712,14 @@ function Lf(e) {
|
|
|
8704
8712
|
}
|
|
8705
8713
|
//#endregion
|
|
8706
8714
|
//#region src/composables/useImageZoom.ts
|
|
8707
|
-
var
|
|
8708
|
-
function
|
|
8715
|
+
var Bf = 1, Vf = 4;
|
|
8716
|
+
function Hf(e) {
|
|
8709
8717
|
let t = w(1), n = w(0), r = w(0), i = w(!1), a = /* @__PURE__ */ new Map(), o = null, s = 0, c = 0, l = 0, u = 0, d = 0, f = 1, p = 0, m = 0;
|
|
8710
8718
|
function h(e, t, n) {
|
|
8711
8719
|
return Math.min(Math.max(e, t), n);
|
|
8712
8720
|
}
|
|
8713
8721
|
function g(e) {
|
|
8714
|
-
return h(e,
|
|
8722
|
+
return h(e, Bf, Vf);
|
|
8715
8723
|
}
|
|
8716
8724
|
function _(n, r, i = t.value) {
|
|
8717
8725
|
let a = e.viewportRef.value?.clientWidth ?? 0, o = e.viewportRef.value?.clientHeight ?? 0, s = e.imageRef.value?.clientWidth ?? a, c = e.imageRef.value?.clientHeight ?? o, l = s * i, u = c * i, d = Math.max(0, (l - a) / 2), f = Math.max(0, (u - o) / 2);
|
|
@@ -8801,10 +8809,10 @@ function Bf(e) {
|
|
|
8801
8809
|
}
|
|
8802
8810
|
//#endregion
|
|
8803
8811
|
//#region src/components/overlays/FullscreenDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8804
|
-
var
|
|
8812
|
+
var Uf = { class: "w-full" }, Wf = {
|
|
8805
8813
|
key: 0,
|
|
8806
8814
|
class: "fullscreen-dialog__footer"
|
|
8807
|
-
},
|
|
8815
|
+
}, Gf = /* @__PURE__ */ u({
|
|
8808
8816
|
__name: "FullscreenDialog",
|
|
8809
8817
|
props: {
|
|
8810
8818
|
open: { type: Boolean },
|
|
@@ -8829,34 +8837,34 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8829
8837
|
closable: !0,
|
|
8830
8838
|
"onUpdate:visible": s
|
|
8831
8839
|
}, {
|
|
8832
|
-
default: L(() => [o("div",
|
|
8840
|
+
default: L(() => [o("div", Uf, [E(t.$slots, "default")]), t.$slots.footer ? (S(), a("div", Wf, [E(t.$slots, "footer")])) : i("", !0)]),
|
|
8833
8841
|
_: 3
|
|
8834
8842
|
}, 8, ["visible", "header"]));
|
|
8835
8843
|
}
|
|
8836
|
-
}),
|
|
8844
|
+
}), Kf = ["href"], qf = { class: "media-viewer-shell flex min-h-0 flex-1 items-center justify-center overflow-hidden" }, Jf = ["src", "alt"], Yf = {
|
|
8837
8845
|
key: 1,
|
|
8838
8846
|
class: "media-viewer-stage media-viewer-stage-video flex w-full items-center justify-center"
|
|
8839
|
-
},
|
|
8847
|
+
}, Xf = {
|
|
8840
8848
|
class: "max-h-full w-full bg-black",
|
|
8841
8849
|
controls: "",
|
|
8842
8850
|
playsinline: "",
|
|
8843
8851
|
autoplay: ""
|
|
8844
|
-
},
|
|
8852
|
+
}, Zf = ["src", "type"], Qf = {
|
|
8845
8853
|
key: 2,
|
|
8846
8854
|
class: "media-viewer-stage media-viewer-audio-stage flex w-full items-center justify-center px-5 py-6"
|
|
8847
|
-
},
|
|
8855
|
+
}, $f = {
|
|
8848
8856
|
class: "w-full",
|
|
8849
8857
|
controls: "",
|
|
8850
8858
|
autoplay: ""
|
|
8851
|
-
},
|
|
8859
|
+
}, ep = ["src", "type"], tp = {
|
|
8852
8860
|
key: 0,
|
|
8853
8861
|
class: "media-viewer-footer flex min-w-0 items-center justify-between gap-3 px-4 py-3 max-md:px-3.5 max-md:py-3"
|
|
8854
|
-
},
|
|
8862
|
+
}, np = { class: "min-w-0 flex-1" }, rp = { class: "heading-sm text-default truncate" }, ip = { class: "body-sm text-subtle" }, ap = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
8855
8863
|
__name: "MediaViewerDialog",
|
|
8856
8864
|
props: { attachment: {} },
|
|
8857
8865
|
emits: ["close"],
|
|
8858
8866
|
setup(t, { emit: s }) {
|
|
8859
|
-
let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = X(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: N, handleDoubleClick: P } =
|
|
8867
|
+
let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = X(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: N, handleDoubleClick: P } = Hf({
|
|
8860
8868
|
viewportRef: u,
|
|
8861
8869
|
imageRef: d,
|
|
8862
8870
|
isImage: () => p.value
|
|
@@ -8867,7 +8875,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8867
8875
|
function F() {
|
|
8868
8876
|
l("close");
|
|
8869
8877
|
}
|
|
8870
|
-
return (n, s) => (S(), r(
|
|
8878
|
+
return (n, s) => (S(), r(Gf, {
|
|
8871
8879
|
open: f.value,
|
|
8872
8880
|
title: t.attachment?.name || j(_)("attachment"),
|
|
8873
8881
|
subtitle: t.attachment?.kind || "",
|
|
@@ -8884,9 +8892,9 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8884
8892
|
}, [(S(), r(D(j(Oe)), {
|
|
8885
8893
|
class: "size-4",
|
|
8886
8894
|
"aria-hidden": "true"
|
|
8887
|
-
})), o("span", null, k(j(_)("openInNewTab")), 1)], 8,
|
|
8888
|
-
footer: L(() => [t.attachment ? (S(), a("div",
|
|
8889
|
-
default: L(() => [o("div",
|
|
8895
|
+
})), o("span", null, k(j(_)("openInNewTab")), 1)], 8, Kf)) : i("", !0)]),
|
|
8896
|
+
footer: L(() => [t.attachment ? (S(), a("div", tp, [o("div", np, [o("p", rp, k(t.attachment.name), 1), o("p", ip, k(t.attachment.kind), 1)])])) : i("", !0)]),
|
|
8897
|
+
default: L(() => [o("div", qf, [t.attachment?.url ? (S(), a(e, { key: 0 }, [p.value ? (S(), a("div", {
|
|
8890
8898
|
key: 0,
|
|
8891
8899
|
ref_key: "viewportRef",
|
|
8892
8900
|
ref: u,
|
|
@@ -8909,13 +8917,13 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8909
8917
|
transform: `translate3d(${j(b)}px, ${j(x)}px, 0) scale(${j(y)})`,
|
|
8910
8918
|
transformOrigin: "center center"
|
|
8911
8919
|
})
|
|
8912
|
-
}, null, 14,
|
|
8920
|
+
}, null, 14, Jf)], 544)) : m.value ? (S(), a("div", Yf, [o("video", Xf, [o("source", {
|
|
8913
8921
|
src: t.attachment.url,
|
|
8914
8922
|
type: t.attachment.mimeType || void 0
|
|
8915
|
-
}, null, 8,
|
|
8923
|
+
}, null, 8, Zf)])])) : h.value ? (S(), a("div", Qf, [o("audio", $f, [o("source", {
|
|
8916
8924
|
src: t.attachment.url,
|
|
8917
8925
|
type: t.attachment.mimeType || void 0
|
|
8918
|
-
}, null, 8,
|
|
8926
|
+
}, null, 8, ep)])])) : i("", !0)], 64)) : i("", !0)])]),
|
|
8919
8927
|
_: 1
|
|
8920
8928
|
}, 8, [
|
|
8921
8929
|
"open",
|
|
@@ -8925,7 +8933,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8925
8933
|
"close-aria-label"
|
|
8926
8934
|
]));
|
|
8927
8935
|
}
|
|
8928
|
-
}), [["__scopeId", "data-v-0e82cfd0"]]),
|
|
8936
|
+
}), [["__scopeId", "data-v-0e82cfd0"]]), op = { class: "date-separator" }, sp = { class: "date-separator__label" }, cp = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
8929
8937
|
__name: "MessageDateSeparator",
|
|
8930
8938
|
props: { date: {} },
|
|
8931
8939
|
setup(e) {
|
|
@@ -8939,24 +8947,24 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
8939
8947
|
year: "numeric"
|
|
8940
8948
|
}).format(n);
|
|
8941
8949
|
});
|
|
8942
|
-
return (e, t) => (S(), a("div",
|
|
8950
|
+
return (e, t) => (S(), a("div", op, [o("span", sp, k(s.value), 1)]));
|
|
8943
8951
|
}
|
|
8944
|
-
}), [["__scopeId", "data-v-49e72d67"]]),
|
|
8952
|
+
}), [["__scopeId", "data-v-49e72d67"]]), lp = {
|
|
8945
8953
|
"data-testid": "action-message",
|
|
8946
8954
|
class: "message-action-row border-default bg-elevation-surface-default body-sm text-subtle max-w-4/5 rounded-full border px-3 py-1 text-center"
|
|
8947
|
-
},
|
|
8955
|
+
}, up = { class: "message-action-row__text" }, dp = /* @__PURE__ */ u({
|
|
8948
8956
|
__name: "ActionMessageRow",
|
|
8949
8957
|
props: { text: {} },
|
|
8950
8958
|
setup(e) {
|
|
8951
|
-
return (t, n) => (S(), a("div",
|
|
8959
|
+
return (t, n) => (S(), a("div", lp, [o("span", up, k(e.text), 1)]));
|
|
8952
8960
|
}
|
|
8953
|
-
}),
|
|
8961
|
+
}), fp = ["href"], pp = {
|
|
8954
8962
|
key: 0,
|
|
8955
8963
|
class: "bg-elevation-surface-hovered aspect-[1.9/1] w-full overflow-hidden"
|
|
8956
|
-
},
|
|
8964
|
+
}, mp = ["src", "alt"], hp = { class: "space-y-1.5 px-3 py-3" }, gp = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, _p = { class: "heading-sm text-default line-clamp-2" }, vp = { class: "body-md text-subtle line-clamp-2" }, yp = {
|
|
8957
8965
|
key: 0,
|
|
8958
8966
|
class: "body-sm text-subtlest"
|
|
8959
|
-
},
|
|
8967
|
+
}, bp = /* @__PURE__ */ u({
|
|
8960
8968
|
__name: "LinkPreviewCard",
|
|
8961
8969
|
props: {
|
|
8962
8970
|
url: {},
|
|
@@ -9023,18 +9031,18 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9023
9031
|
target: "_blank",
|
|
9024
9032
|
rel: "noreferrer",
|
|
9025
9033
|
class: g(["bg-elevation-surface-default shadow-raised mt-2 block overflow-hidden rounded-xl border-0 no-underline transition hover:opacity-95", e.isOwn ? "bg-elevation-surface-default text-default" : "bg-elevation-surface-sunken text-default"])
|
|
9026
|
-
}, [r.value?.imageUrl ? (S(), a("div",
|
|
9034
|
+
}, [r.value?.imageUrl ? (S(), a("div", pp, [o("img", {
|
|
9027
9035
|
src: r.value.imageUrl,
|
|
9028
9036
|
alt: r.value.title || l.value,
|
|
9029
9037
|
class: "h-full w-full object-cover"
|
|
9030
|
-
}, null, 8,
|
|
9031
|
-
o("p",
|
|
9032
|
-
o("p",
|
|
9033
|
-
o("p",
|
|
9034
|
-
s.value && !r.value ? (S(), a("p",
|
|
9035
|
-
])], 10,
|
|
9036
|
-
}
|
|
9037
|
-
}),
|
|
9038
|
+
}, null, 8, mp)])) : i("", !0), o("div", hp, [
|
|
9039
|
+
o("p", gp, k(r.value?.siteName || l.value), 1),
|
|
9040
|
+
o("p", _p, k(r.value?.title || l.value), 1),
|
|
9041
|
+
o("p", vp, k(r.value?.description || u.value), 1),
|
|
9042
|
+
s.value && !r.value ? (S(), a("p", yp, k(j(c)("loadingPreview")), 1)) : i("", !0)
|
|
9043
|
+
])], 10, fp));
|
|
9044
|
+
}
|
|
9045
|
+
}), xp = { class: "linkified-text" }, Sp = ["innerHTML"], Cp = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9038
9046
|
__name: "LinkifiedText",
|
|
9039
9047
|
props: {
|
|
9040
9048
|
text: {},
|
|
@@ -9053,25 +9061,25 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9053
9061
|
let t = e.target;
|
|
9054
9062
|
t.tagName === "A" && d(e, t);
|
|
9055
9063
|
}
|
|
9056
|
-
return (t, n) => (S(), a("div",
|
|
9064
|
+
return (t, n) => (S(), a("div", xp, [o("div", {
|
|
9057
9065
|
class: g(["rich-text-content", e.textClass]),
|
|
9058
9066
|
onClick: f,
|
|
9059
9067
|
innerHTML: l.value
|
|
9060
|
-
}, null, 10,
|
|
9068
|
+
}, null, 10, Sp), e.showPreview !== !1 && u.value ? (S(), r(bp, {
|
|
9061
9069
|
key: 0,
|
|
9062
9070
|
url: u.value,
|
|
9063
9071
|
"is-own": e.isOwn
|
|
9064
9072
|
}, null, 8, ["url", "is-own"])) : i("", !0)]));
|
|
9065
9073
|
}
|
|
9066
|
-
}), [["__scopeId", "data-v-656b44e8"]]),
|
|
9074
|
+
}), [["__scopeId", "data-v-656b44e8"]]), wp = { class: "w-full space-y-1" }, Tp = {
|
|
9067
9075
|
class: "attachment-video",
|
|
9068
9076
|
controls: "",
|
|
9069
9077
|
playsinline: "",
|
|
9070
9078
|
preload: "metadata"
|
|
9071
|
-
},
|
|
9079
|
+
}, Ep = ["src", "type"], Dp = ["onClick"], Op = { class: "inline-flex items-center gap-2 truncate font-medium" }, kp = ["href"], Ap = { class: "flex min-w-0 items-center gap-2" }, jp = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, Mp = { class: "text-default truncate font-medium" }, Np = { class: "body-sm text-subtle shrink-0" }, Pp = {
|
|
9072
9080
|
key: 4,
|
|
9073
9081
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm"
|
|
9074
|
-
},
|
|
9082
|
+
}, Fp = { class: "flex min-w-0 items-center gap-2" }, Ip = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, Lp = { class: "text-default truncate font-medium" }, Rp = { class: "body-sm text-subtle shrink-0" }, zp = 4 / 3, Bp = 16 / 9, Vp = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9075
9083
|
__name: "MessageAttachmentList",
|
|
9076
9084
|
props: { message: {} },
|
|
9077
9085
|
emits: ["openMedia"],
|
|
@@ -9126,12 +9134,12 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9126
9134
|
return n ? t.localeCompare(n, void 0, { sensitivity: "accent" }) !== 0 : !0;
|
|
9127
9135
|
}
|
|
9128
9136
|
function m(e) {
|
|
9129
|
-
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ?
|
|
9137
|
+
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ? Bp : zp;
|
|
9130
9138
|
}
|
|
9131
9139
|
function h(e) {
|
|
9132
9140
|
return { aspectRatio: String(m(e)) };
|
|
9133
9141
|
}
|
|
9134
|
-
return (n, d) => (S(), a("div",
|
|
9142
|
+
return (n, d) => (S(), a("div", wp, [(S(!0), a(e, null, T(t.message.attachments, (n) => (S(), a(e, { key: `${t.message.id}-${n.name}` }, [n.kind === "image" && n.url ? (S(), r(j(te), {
|
|
9135
9143
|
key: 0,
|
|
9136
9144
|
preview: "",
|
|
9137
9145
|
src: n.url,
|
|
@@ -9151,34 +9159,34 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9151
9159
|
key: 1,
|
|
9152
9160
|
class: "attachment-media-bleed bg-elevation-surface-default shadow-raised attachment-media-frame group relative overflow-hidden rounded-xl border-0",
|
|
9153
9161
|
style: v(h(n))
|
|
9154
|
-
}, [o("video",
|
|
9162
|
+
}, [o("video", Tp, [o("source", {
|
|
9155
9163
|
src: n.url,
|
|
9156
9164
|
type: n.mimeType || void 0
|
|
9157
|
-
}, null, 8,
|
|
9165
|
+
}, null, 8, Ep)])], 4)) : n.kind === "audio" && n.url ? (S(), a("button", {
|
|
9158
9166
|
key: 2,
|
|
9159
9167
|
type: "button",
|
|
9160
9168
|
class: "flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left text-sm transition hover:opacity-90",
|
|
9161
9169
|
onClick: (e) => s("openMedia", n)
|
|
9162
|
-
}, [o("span",
|
|
9170
|
+
}, [o("span", Op, [d[0] ||= o("span", { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 items-center justify-center rounded-full" }, " ♪ ", -1), c(" " + k(j(l)("audioMessage")), 1)])], 8, Dp)) : n.url ? (S(), a("a", {
|
|
9163
9171
|
key: 3,
|
|
9164
9172
|
href: n.url,
|
|
9165
9173
|
target: "_blank",
|
|
9166
9174
|
rel: "noreferrer",
|
|
9167
9175
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm no-underline transition hover:opacity-90"
|
|
9168
|
-
}, [o("span",
|
|
9176
|
+
}, [o("span", Ap, [o("span", jp, [(S(), r(D(f(n)), {
|
|
9169
9177
|
class: "size-5",
|
|
9170
9178
|
"aria-hidden": "true"
|
|
9171
|
-
}))]), o("span",
|
|
9179
|
+
}))]), o("span", Mp, k(n.name), 1)]), o("span", Np, k(u(n.size)), 1)], 8, kp)) : (S(), a("div", Pp, [o("span", Fp, [o("span", Ip, [(S(), r(D(f(n)), {
|
|
9172
9180
|
class: "size-5",
|
|
9173
9181
|
"aria-hidden": "true"
|
|
9174
|
-
}))]), o("span",
|
|
9182
|
+
}))]), o("span", Lp, k(n.name), 1)]), o("span", Rp, k(u(n.size) || j(l)("queued")), 1)]))], 64))), 128)), p(t.message) ? (S(), r(Cp, {
|
|
9175
9183
|
key: 0,
|
|
9176
9184
|
text: t.message.text,
|
|
9177
9185
|
"is-own": t.message.isOwn,
|
|
9178
9186
|
"text-class": "whitespace-normal wrap-break-word body-md text-default"
|
|
9179
9187
|
}, null, 8, ["text", "is-own"])) : i("", !0)]));
|
|
9180
9188
|
}
|
|
9181
|
-
}), [["__scopeId", "data-v-5c0ccf0e"]]),
|
|
9189
|
+
}), [["__scopeId", "data-v-5c0ccf0e"]]), Hp = { class: "message-status" }, Up = { key: 0 }, Wp = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9182
9190
|
__name: "MessageDeliveryStatus",
|
|
9183
9191
|
props: { message: {} },
|
|
9184
9192
|
setup(e) {
|
|
@@ -9227,8 +9235,8 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9227
9235
|
};
|
|
9228
9236
|
}
|
|
9229
9237
|
});
|
|
9230
|
-
return (t, n) => (S(), a("div",
|
|
9231
|
-
e.message.isEdited && e.message.kind !== "poll" ? (S(), a("span",
|
|
9238
|
+
return (t, n) => (S(), a("div", Hp, [
|
|
9239
|
+
e.message.isEdited && e.message.kind !== "poll" ? (S(), a("span", Up, k(j(c)("edited")), 1)) : i("", !0),
|
|
9232
9240
|
o("span", null, k(l(e.message.sentAt)), 1),
|
|
9233
9241
|
u.value ? (S(), r(D(u.value.icon), {
|
|
9234
9242
|
key: 1,
|
|
@@ -9243,7 +9251,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9243
9251
|
])) : i("", !0)
|
|
9244
9252
|
]));
|
|
9245
9253
|
}
|
|
9246
|
-
}), [["__scopeId", "data-v-ff4e9daa"]]),
|
|
9254
|
+
}), [["__scopeId", "data-v-ff4e9daa"]]), Gp = { class: "mb-1 flex items-start justify-between gap-2" }, Kp = { class: "body-sm text-subtlest truncate font-medium!" }, qp = /* @__PURE__ */ u({
|
|
9247
9255
|
__name: "MessageItemHeader",
|
|
9248
9256
|
props: { message: {} },
|
|
9249
9257
|
setup(e) {
|
|
@@ -9259,7 +9267,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9259
9267
|
function l() {
|
|
9260
9268
|
return t.message.senderName?.trim() || (t.message.isOwn ? s("you") : s("system"));
|
|
9261
9269
|
}
|
|
9262
|
-
return (t, n) => (S(), a("div",
|
|
9270
|
+
return (t, n) => (S(), a("div", Gp, [o("span", Kp, k(l()), 1), e.message.scheduled?.scheduleDate ? (S(), r(j(G), {
|
|
9263
9271
|
key: 0,
|
|
9264
9272
|
text: j(s)("scheduledDateLabel", { date: c(e.message.scheduled.scheduleDate) }),
|
|
9265
9273
|
context: "warn",
|
|
@@ -9268,7 +9276,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9268
9276
|
class: "shrink-0"
|
|
9269
9277
|
}, null, 8, ["text"])) : i("", !0)]));
|
|
9270
9278
|
}
|
|
9271
|
-
}),
|
|
9279
|
+
}), Jp = ["disabled", "onClick"], Yp = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9272
9280
|
__name: "MessageReactionList",
|
|
9273
9281
|
props: {
|
|
9274
9282
|
message: {},
|
|
@@ -9287,9 +9295,9 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9287
9295
|
class: g(["message-reaction-list__item rounded-full px-2 py-0.75 leading-none transition", e.reactedByMe ? "reaction-chip-selected" : t.message.isOwn ? "reaction-chip-own" : "reaction-chip-other"]),
|
|
9288
9296
|
disabled: t.disabled,
|
|
9289
9297
|
onClick: (t) => r("toggle", e.emoji)
|
|
9290
|
-
}, k(e.emoji) + " " + k(e.count), 11,
|
|
9298
|
+
}, k(e.emoji) + " " + k(e.count), 11, Jp))), 128))], 2)) : i("", !0);
|
|
9291
9299
|
}
|
|
9292
|
-
}), [["__scopeId", "data-v-c17c8bfd"]]),
|
|
9300
|
+
}), [["__scopeId", "data-v-c17c8bfd"]]), Xp = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, Zp = ["aria-label", "title"], Qp = { class: "message-reactions__thread-count" }, $p = /* @__PURE__ */ u({
|
|
9293
9301
|
__name: "MessageItemReactions",
|
|
9294
9302
|
props: {
|
|
9295
9303
|
message: {},
|
|
@@ -9299,7 +9307,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9299
9307
|
emits: ["toggleReaction", "openThread"],
|
|
9300
9308
|
setup(e, { emit: t }) {
|
|
9301
9309
|
let s = e, c = t, { t: u } = X(), d = n(() => u("threadReplies", { count: s.message.replyCount })), f = n(() => s.canOpenThread !== !1 && s.message.replyCount > 0);
|
|
9302
|
-
return (t, n) => (S(), a("div",
|
|
9310
|
+
return (t, n) => (S(), a("div", Xp, [l(Yp, {
|
|
9303
9311
|
message: e.message,
|
|
9304
9312
|
disabled: e.canReact === !1,
|
|
9305
9313
|
compact: "",
|
|
@@ -9314,12 +9322,12 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9314
9322
|
}, [(S(), r(D(j(je)), {
|
|
9315
9323
|
class: "size-4",
|
|
9316
9324
|
"aria-hidden": "true"
|
|
9317
|
-
})), o("span",
|
|
9325
|
+
})), o("span", Qp, k(e.message.replyCount), 1)], 8, Zp)) : i("", !0)]));
|
|
9318
9326
|
}
|
|
9319
|
-
}),
|
|
9327
|
+
}), em = {
|
|
9320
9328
|
key: 0,
|
|
9321
9329
|
class: ""
|
|
9322
|
-
},
|
|
9330
|
+
}, tm = { class: "heading-sm text-default" }, nm = { class: "body-sm text-subtle" }, rm = { class: "space-y-2 py-3" }, im = ["disabled", "onClick"], am = { class: "body-md flex items-center justify-between gap-3 px-3 py-1.5" }, om = { class: "body-sm text-subtle shrink-0" }, sm = { class: "bg-alpha-default h-1.5" }, cm = /* @__PURE__ */ u({
|
|
9323
9331
|
__name: "MessagePollContent",
|
|
9324
9332
|
props: {
|
|
9325
9333
|
message: {},
|
|
@@ -9338,18 +9346,18 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9338
9346
|
let t = r.currentUserId;
|
|
9339
9347
|
return !!(!t || r.pendingOptionKey === `${r.message.id}:${e}` || r.message.poll.options.some((n) => n.id === e && n.voters.includes(t)));
|
|
9340
9348
|
}
|
|
9341
|
-
return (n, r) => t.message.poll ? (S(), a("div",
|
|
9349
|
+
return (n, r) => t.message.poll ? (S(), a("div", em, [o("div", null, [o("h4", tm, k(t.message.poll.question), 1), o("p", nm, k(j(c)("voteCount", { count: t.message.poll.totalVotes })), 1)]), o("div", rm, [(S(!0), a(e, null, T(t.message.poll.options, (e) => (S(), a("button", {
|
|
9342
9350
|
key: e.id,
|
|
9343
9351
|
type: "button",
|
|
9344
9352
|
class: "shadow-raised bg-elevation-surface-raised-default block w-full overflow-hidden rounded-lg text-left",
|
|
9345
9353
|
disabled: u(e.id),
|
|
9346
9354
|
onClick: (t) => s("vote", e.id)
|
|
9347
|
-
}, [o("div",
|
|
9355
|
+
}, [o("div", am, [o("span", { class: g(["truncate font-medium", l(e.id) ? "text-success" : ""]) }, k(e.text), 3), o("span", om, k(j(c)("voteCount", { count: e.voteCount })), 1)]), o("div", sm, [o("div", {
|
|
9348
9356
|
class: g(["h-full transition-all", l(e.id) ? "bg-accent-green-subtle-default" : "bg-accent-teal-subtle-default"]),
|
|
9349
9357
|
style: v({ width: `${t.message.poll.totalVotes ? e.voteCount / t.message.poll.totalVotes * 100 : 0}%` })
|
|
9350
|
-
}, null, 6)])], 8,
|
|
9358
|
+
}, null, 6)])], 8, im))), 128))])])) : i("", !0);
|
|
9351
9359
|
}
|
|
9352
|
-
}),
|
|
9360
|
+
}), lm = { class: "heading-xs" }, um = { class: "truncate" }, dm = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9353
9361
|
__name: "MessageReplyQuote",
|
|
9354
9362
|
props: { message: {} },
|
|
9355
9363
|
emits: ["open"],
|
|
@@ -9359,15 +9367,15 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9359
9367
|
type: "button",
|
|
9360
9368
|
class: "reply-quote",
|
|
9361
9369
|
onClick: n[0] ||= (e) => c("open")
|
|
9362
|
-
}, [o("p",
|
|
9370
|
+
}, [o("p", lm, k(e.message.replyTo.senderName), 1), o("p", um, k(s.value), 1)]));
|
|
9363
9371
|
}
|
|
9364
|
-
}), [["__scopeId", "data-v-e27c136c"]]),
|
|
9372
|
+
}), [["__scopeId", "data-v-e27c136c"]]), fm = { class: "space-y-2" }, pm = /* @__PURE__ */ u({
|
|
9365
9373
|
__name: "MessageTextContent",
|
|
9366
9374
|
props: { message: {} },
|
|
9367
9375
|
emits: ["anchorclick"],
|
|
9368
9376
|
setup(e) {
|
|
9369
9377
|
let t = Gu(), o = n(() => t.mentionNameByUid.value);
|
|
9370
|
-
return (t, n) => (S(), a("div",
|
|
9378
|
+
return (t, n) => (S(), a("div", fm, [e.message.translatedText ? (S(), r(Cp, {
|
|
9371
9379
|
key: 0,
|
|
9372
9380
|
text: e.message.translatedText,
|
|
9373
9381
|
"mention-name-by-uid": o.value,
|
|
@@ -9381,7 +9389,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9381
9389
|
"mention-name-by-uid",
|
|
9382
9390
|
"is-own",
|
|
9383
9391
|
"class"
|
|
9384
|
-
])) : i("", !0), l(
|
|
9392
|
+
])) : i("", !0), l(Cp, {
|
|
9385
9393
|
text: e.message.text,
|
|
9386
9394
|
"mention-name-by-uid": o.value,
|
|
9387
9395
|
"is-own": e.message.isOwn,
|
|
@@ -9394,11 +9402,11 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9394
9402
|
"is-own"
|
|
9395
9403
|
])]));
|
|
9396
9404
|
}
|
|
9397
|
-
}),
|
|
9405
|
+
}), mm = [
|
|
9398
9406
|
"id",
|
|
9399
9407
|
"data-message-id",
|
|
9400
9408
|
"data-message-kind"
|
|
9401
|
-
],
|
|
9409
|
+
], hm = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, gm = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, _m = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9402
9410
|
__name: "MessageItem",
|
|
9403
9411
|
props: {
|
|
9404
9412
|
message: {},
|
|
@@ -9451,7 +9459,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9451
9459
|
"data-message-id": t.message.id,
|
|
9452
9460
|
"data-message-kind": t.message.kind,
|
|
9453
9461
|
class: g(["message-item group", d.value])
|
|
9454
|
-
}, [t.message.kind === "action" ? (S(), r(
|
|
9462
|
+
}, [t.message.kind === "action" ? (S(), r(dp, {
|
|
9455
9463
|
key: 0,
|
|
9456
9464
|
text: t.message.text,
|
|
9457
9465
|
class: g(p.value)
|
|
@@ -9470,16 +9478,16 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9470
9478
|
onContextmenu: _,
|
|
9471
9479
|
onClick: y
|
|
9472
9480
|
}, [
|
|
9473
|
-
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(
|
|
9481
|
+
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(qp, {
|
|
9474
9482
|
key: 0,
|
|
9475
9483
|
message: t.message
|
|
9476
9484
|
}, null, 8, ["message"])) : i("", !0),
|
|
9477
|
-
t.message.replyTo ? (S(), r(
|
|
9485
|
+
t.message.replyTo ? (S(), r(dm, {
|
|
9478
9486
|
key: 1,
|
|
9479
9487
|
message: t.message,
|
|
9480
9488
|
onOpen: C
|
|
9481
9489
|
}, null, 8, ["message"])) : i("", !0),
|
|
9482
|
-
t.message.kind === "poll" && t.message.poll ? (S(), r(
|
|
9490
|
+
t.message.kind === "poll" && t.message.poll ? (S(), r(cm, {
|
|
9483
9491
|
key: 2,
|
|
9484
9492
|
message: t.message,
|
|
9485
9493
|
"current-user-id": t.currentUserId,
|
|
@@ -9489,16 +9497,16 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9489
9497
|
"message",
|
|
9490
9498
|
"current-user-id",
|
|
9491
9499
|
"pending-option-key"
|
|
9492
|
-
])) : t.message.attachments?.length ? (S(), r(
|
|
9500
|
+
])) : t.message.attachments?.length ? (S(), r(Vp, {
|
|
9493
9501
|
key: 3,
|
|
9494
9502
|
message: t.message,
|
|
9495
9503
|
onOpenMedia: s[1] ||= (e) => u("openMedia", e)
|
|
9496
|
-
}, null, 8, ["message"])) : (S(), r(
|
|
9504
|
+
}, null, 8, ["message"])) : (S(), r(pm, {
|
|
9497
9505
|
key: 4,
|
|
9498
9506
|
message: t.message,
|
|
9499
9507
|
onAnchorclick: s[2] ||= (e, t) => n.$emit("anchorclick", e, t)
|
|
9500
9508
|
}, null, 8, ["message"])),
|
|
9501
|
-
o("div",
|
|
9509
|
+
o("div", hm, [l($p, {
|
|
9502
9510
|
message: t.message,
|
|
9503
9511
|
"can-react": t.canReact,
|
|
9504
9512
|
"can-open-thread": t.canOpenThread,
|
|
@@ -9508,7 +9516,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9508
9516
|
"message",
|
|
9509
9517
|
"can-react",
|
|
9510
9518
|
"can-open-thread"
|
|
9511
|
-
]), l(
|
|
9519
|
+
]), l(Wp, { message: t.message }, null, 8, ["message"])])
|
|
9512
9520
|
], 34),
|
|
9513
9521
|
t.contextMenuOpen && t.isTouchUi ? (S(), a("div", {
|
|
9514
9522
|
key: 1,
|
|
@@ -9517,16 +9525,16 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9517
9525
|
class: "message-bubble-wrapper",
|
|
9518
9526
|
style: v({ top: x.value })
|
|
9519
9527
|
}, [o("div", { class: g(["message-bubble", f.value]) }, [
|
|
9520
|
-
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(
|
|
9528
|
+
!t.message.isOwn || t.message.scheduled?.scheduleDate ? (S(), r(qp, {
|
|
9521
9529
|
key: 0,
|
|
9522
9530
|
message: t.message
|
|
9523
9531
|
}, null, 8, ["message"])) : i("", !0),
|
|
9524
|
-
t.message.replyTo ? (S(), r(
|
|
9532
|
+
t.message.replyTo ? (S(), r(dm, {
|
|
9525
9533
|
key: 1,
|
|
9526
9534
|
message: t.message,
|
|
9527
9535
|
onOpen: C
|
|
9528
9536
|
}, null, 8, ["message"])) : i("", !0),
|
|
9529
|
-
t.message.kind === "poll" && t.message.poll ? (S(), r(
|
|
9537
|
+
t.message.kind === "poll" && t.message.poll ? (S(), r(cm, {
|
|
9530
9538
|
key: 2,
|
|
9531
9539
|
message: t.message,
|
|
9532
9540
|
"current-user-id": t.currentUserId,
|
|
@@ -9536,16 +9544,16 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9536
9544
|
"message",
|
|
9537
9545
|
"current-user-id",
|
|
9538
9546
|
"pending-option-key"
|
|
9539
|
-
])) : t.message.attachments?.length ? (S(), r(
|
|
9547
|
+
])) : t.message.attachments?.length ? (S(), r(Vp, {
|
|
9540
9548
|
key: 3,
|
|
9541
9549
|
message: t.message,
|
|
9542
9550
|
onOpenMedia: s[6] ||= (e) => u("openMedia", e)
|
|
9543
|
-
}, null, 8, ["message"])) : (S(), r(
|
|
9551
|
+
}, null, 8, ["message"])) : (S(), r(pm, {
|
|
9544
9552
|
key: 4,
|
|
9545
9553
|
message: t.message,
|
|
9546
9554
|
onAnchorclick: s[7] ||= (e, t) => n.$emit("anchorclick", e, t)
|
|
9547
9555
|
}, null, 8, ["message"])),
|
|
9548
|
-
o("div",
|
|
9556
|
+
o("div", gm, [l($p, {
|
|
9549
9557
|
message: t.message,
|
|
9550
9558
|
"can-react": t.canReact,
|
|
9551
9559
|
"can-open-thread": t.canOpenThread,
|
|
@@ -9555,21 +9563,21 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9555
9563
|
"message",
|
|
9556
9564
|
"can-react",
|
|
9557
9565
|
"can-open-thread"
|
|
9558
|
-
]), l(
|
|
9566
|
+
]), l(Wp, { message: t.message }, null, 8, ["message"])])
|
|
9559
9567
|
], 2)], 4)], 2)) : i("", !0)
|
|
9560
|
-
], 64))], 10,
|
|
9568
|
+
], 64))], 10, mm));
|
|
9561
9569
|
}
|
|
9562
|
-
}), [["__scopeId", "data-v-02761d2e"]]),
|
|
9570
|
+
}), [["__scopeId", "data-v-02761d2e"]]), vm = [
|
|
9563
9571
|
"👍",
|
|
9564
9572
|
"❤️",
|
|
9565
9573
|
"🔥",
|
|
9566
9574
|
"😂",
|
|
9567
9575
|
"🙏",
|
|
9568
9576
|
"🎉"
|
|
9569
|
-
],
|
|
9577
|
+
], ym = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), bm = { class: "shadow-overlay bg-elevation-surface-raised-default mx-auto flex w-max max-w-full items-center gap-1 rounded-full px-3 py-1" }, xm = ["disabled", "onClick"], Sm = ["disabled"], Cm = {
|
|
9570
9578
|
key: 0,
|
|
9571
9579
|
class: "bg-elevation-surface-raised-default shadow-overlay m-0 grid grid-cols-6 gap-1 rounded-lg p-1.5"
|
|
9572
|
-
},
|
|
9580
|
+
}, wm = ["onClick"], Tm = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9573
9581
|
__name: "MessageItemMenuReactions",
|
|
9574
9582
|
props: {
|
|
9575
9583
|
message: {},
|
|
@@ -9581,20 +9589,20 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9581
9589
|
I(() => c.message.id, () => {
|
|
9582
9590
|
u.value = !1;
|
|
9583
9591
|
});
|
|
9584
|
-
let d = n(() =>
|
|
9592
|
+
let d = n(() => ym);
|
|
9585
9593
|
function f(e) {
|
|
9586
9594
|
return (c.message.reactions ?? []).some((t) => t.emoji === e);
|
|
9587
9595
|
}
|
|
9588
9596
|
function p() {
|
|
9589
9597
|
c.canReact && (u.value = !u.value);
|
|
9590
9598
|
}
|
|
9591
|
-
return (n, s) => (S(), a(e, null, [o("div",
|
|
9599
|
+
return (n, s) => (S(), a(e, null, [o("div", bm, [(S(!0), a(e, null, T(j(vm), (e) => (S(), a("button", {
|
|
9592
9600
|
key: `${t.message.id}-${e}-common`,
|
|
9593
9601
|
type: "button",
|
|
9594
9602
|
class: g(["message-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
|
|
9595
9603
|
disabled: !t.canReact,
|
|
9596
9604
|
onClick: (t) => l("react", e)
|
|
9597
|
-
}, k(e), 11,
|
|
9605
|
+
}, k(e), 11, xm))), 128)), o("button", {
|
|
9598
9606
|
type: "button",
|
|
9599
9607
|
class: "message-reaction-more",
|
|
9600
9608
|
disabled: !t.canReact,
|
|
@@ -9602,25 +9610,25 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9602
9610
|
}, [(S(), r(D(u.value ? j(Te) : j(we)), {
|
|
9603
9611
|
class: "size-7",
|
|
9604
9612
|
"aria-hidden": "true"
|
|
9605
|
-
}))], 8,
|
|
9613
|
+
}))], 8, Sm)]), u.value && t.canReact ? (S(), a("div", Cm, [(S(!0), a(e, null, T(d.value, (e) => (S(), a("button", {
|
|
9606
9614
|
key: `${t.message.id}-${e}-extended`,
|
|
9607
9615
|
type: "button",
|
|
9608
9616
|
class: g(["message-expanded-reaction-button", f(e) ? "bg-background-success-default" : "bg-transparent"]),
|
|
9609
9617
|
onClick: (t) => l("react", e)
|
|
9610
|
-
}, k(e), 11,
|
|
9618
|
+
}, k(e), 11, wm))), 128))])) : i("", !0)], 64));
|
|
9611
9619
|
}
|
|
9612
|
-
}), [["__scopeId", "data-v-0a11761a"]]),
|
|
9620
|
+
}), [["__scopeId", "data-v-0a11761a"]]), Em = { class: "message-action-list" }, Dm = { class: "message-receipt-summary__icon" }, Om = { class: "message-receipt-summary__label" }, km = {
|
|
9613
9621
|
key: 0,
|
|
9614
9622
|
class: "message-receipt-summary__avatars",
|
|
9615
9623
|
"aria-hidden": "true"
|
|
9616
|
-
},
|
|
9624
|
+
}, Am = {
|
|
9617
9625
|
key: 1,
|
|
9618
9626
|
class: "message-action-list__divider",
|
|
9619
9627
|
"aria-hidden": "true"
|
|
9620
|
-
},
|
|
9628
|
+
}, jm = {
|
|
9621
9629
|
key: 1,
|
|
9622
9630
|
class: "message-action-list message-receipt-panel"
|
|
9623
|
-
},
|
|
9631
|
+
}, Mm = { class: "message-receipt-list" }, Nm = { class: "message-receipt-row__body" }, Pm = { class: "message-receipt-row__name" }, Fm = { class: "message-receipt-row__time" }, Im = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9624
9632
|
__name: "MessageItemMenu",
|
|
9625
9633
|
props: {
|
|
9626
9634
|
message: {},
|
|
@@ -9711,18 +9719,18 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9711
9719
|
top: `${E.value.top}px`
|
|
9712
9720
|
}),
|
|
9713
9721
|
"data-testid": "message-action-popover-shell"
|
|
9714
|
-
}, [C.value === "actions" ? (S(), a(e, { key: 0 }, [l(
|
|
9722
|
+
}, [C.value === "actions" ? (S(), a(e, { key: 0 }, [l(Tm, {
|
|
9715
9723
|
message: s.message,
|
|
9716
9724
|
"can-react": s.canReact,
|
|
9717
9725
|
onReact: c[0] ||= (e) => _("react", e)
|
|
9718
|
-
}, null, 8, ["message", "can-react"]), o("div",
|
|
9726
|
+
}, null, 8, ["message", "can-react"]), o("div", Em, [
|
|
9719
9727
|
s.receiptSummaryAction ? (S(), a("button", {
|
|
9720
9728
|
key: 0,
|
|
9721
9729
|
type: "button",
|
|
9722
9730
|
class: "message-receipt-summary",
|
|
9723
9731
|
onClick: F
|
|
9724
9732
|
}, [
|
|
9725
|
-
o("span",
|
|
9733
|
+
o("span", Dm, [s.receiptSummaryAction.loading ? (S(), r(j(W), {
|
|
9726
9734
|
key: 0,
|
|
9727
9735
|
style: {
|
|
9728
9736
|
width: "1rem",
|
|
@@ -9734,8 +9742,8 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9734
9742
|
class: "text-success size-4",
|
|
9735
9743
|
"aria-hidden": "true"
|
|
9736
9744
|
}))]),
|
|
9737
|
-
o("span",
|
|
9738
|
-
f.value.length ? (S(), a("span",
|
|
9745
|
+
o("span", Om, k(s.receiptSummaryAction.label), 1),
|
|
9746
|
+
f.value.length ? (S(), a("span", km, [(S(!0), a(e, null, T(f.value, (e) => (S(), r(j(B), {
|
|
9739
9747
|
key: e.user.uid,
|
|
9740
9748
|
image: e.user.avatar,
|
|
9741
9749
|
label: e.user.avatar ? void 0 : e.user.name.slice(0, 1).toUpperCase(),
|
|
@@ -9743,12 +9751,12 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9743
9751
|
class: "message-receipt-summary__avatar"
|
|
9744
9752
|
}, null, 8, ["image", "label"]))), 128))])) : i("", !0)
|
|
9745
9753
|
])) : i("", !0),
|
|
9746
|
-
s.receiptSummaryAction ? (S(), a("div",
|
|
9754
|
+
s.receiptSummaryAction ? (S(), a("div", Am)) : i("", !0),
|
|
9747
9755
|
l(j(ie), {
|
|
9748
9756
|
model: s.actionItems,
|
|
9749
9757
|
class: "message-action-list__menu"
|
|
9750
9758
|
}, null, 8, ["model"])
|
|
9751
|
-
])], 64)) : (S(), a("section",
|
|
9759
|
+
])], 64)) : (S(), a("section", jm, [
|
|
9752
9760
|
o("button", {
|
|
9753
9761
|
type: "button",
|
|
9754
9762
|
class: "message-receipt-back",
|
|
@@ -9761,7 +9769,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9761
9769
|
class: "message-action-list__divider",
|
|
9762
9770
|
"aria-hidden": "true"
|
|
9763
9771
|
}, null, -1),
|
|
9764
|
-
o("div",
|
|
9772
|
+
o("div", Mm, [(S(!0), a(e, null, T(p.value, (e) => (S(), a("div", {
|
|
9765
9773
|
key: e.user.uid,
|
|
9766
9774
|
class: "message-receipt-row"
|
|
9767
9775
|
}, [l(j(B), {
|
|
@@ -9769,19 +9777,19 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9769
9777
|
label: e.user.avatar ? void 0 : e.user.name.slice(0, 1).toUpperCase(),
|
|
9770
9778
|
shape: "circle",
|
|
9771
9779
|
class: "message-receipt-row__avatar"
|
|
9772
|
-
}, null, 8, ["image", "label"]), o("div",
|
|
9780
|
+
}, null, 8, ["image", "label"]), o("div", Nm, [o("p", Pm, k(e.user.name), 1), o("p", Fm, [l(j(ge), {
|
|
9773
9781
|
class: "message-receipt-row__icon text-success",
|
|
9774
9782
|
"aria-hidden": "true"
|
|
9775
9783
|
}), o("span", null, k(L(e.timestamp)), 1)])])]))), 128))])
|
|
9776
9784
|
]))], 4)) : i("", !0)]));
|
|
9777
9785
|
}
|
|
9778
|
-
}), [["__scopeId", "data-v-c561963f"]]),
|
|
9786
|
+
}), [["__scopeId", "data-v-c561963f"]]), Lm = { class: "chat-header border-default bg-elevation-surface-default sticky top-0 z-10 flex items-center justify-between gap-3 border-b px-4 py-3 max-md:px-4 max-md:pb-3 sm:px-5 sm:py-3.5" }, Rm = {
|
|
9779
9787
|
key: 0,
|
|
9780
9788
|
class: "chat-header__identity flex min-w-0 items-center gap-3"
|
|
9781
|
-
},
|
|
9789
|
+
}, zm = { class: "chat-header__text min-w-0" }, Bm = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, Vm = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, Hm = { key: 0 }, Um = { key: 1 }, Wm = { class: "chat-header__actions flex items-center gap-2" }, Gm = {
|
|
9782
9790
|
key: 0,
|
|
9783
9791
|
class: "chat-header__tags hidden flex-wrap gap-2 md:flex"
|
|
9784
|
-
},
|
|
9792
|
+
}, Km = /* @__PURE__ */ u({
|
|
9785
9793
|
__name: "MessageListHeader",
|
|
9786
9794
|
props: {
|
|
9787
9795
|
conversation: {},
|
|
@@ -9789,28 +9797,28 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9789
9797
|
},
|
|
9790
9798
|
setup(t) {
|
|
9791
9799
|
let { t: n } = X();
|
|
9792
|
-
return (s, c) => (S(), a("header",
|
|
9800
|
+
return (s, c) => (S(), a("header", Lm, [t.conversation ? (S(), a("div", Rm, [l(j(B), {
|
|
9793
9801
|
image: t.conversation.avatar,
|
|
9794
9802
|
label: t.conversation.avatar ? void 0 : t.conversation.title.slice(0, 1).toUpperCase(),
|
|
9795
9803
|
shape: "circle",
|
|
9796
9804
|
class: "chat-header__avatar shrink-0"
|
|
9797
|
-
}, null, 8, ["image", "label"]), o("div",
|
|
9805
|
+
}, null, 8, ["image", "label"]), o("div", zm, [o("p", Bm, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", Vm, [t.parentMessage ? (S(), a("span", Hm, k(t.parentMessage.senderName), 1)) : (S(), a("span", Um, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", Wm, [t.conversation?.tags?.length ? (S(), a("div", Gm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(G), {
|
|
9798
9806
|
key: e,
|
|
9799
9807
|
text: e,
|
|
9800
9808
|
context: "secondary",
|
|
9801
9809
|
rounded: ""
|
|
9802
9810
|
}, null, 8, ["text"]))), 128))])) : i("", !0)])]));
|
|
9803
9811
|
}
|
|
9804
|
-
}),
|
|
9812
|
+
}), qm = {
|
|
9805
9813
|
key: 1,
|
|
9806
9814
|
class: "message-list__empty-state"
|
|
9807
|
-
},
|
|
9815
|
+
}, Jm = { class: "space-y-2" }, Ym = {
|
|
9808
9816
|
key: 0,
|
|
9809
9817
|
class: "message-list__thread-root"
|
|
9810
|
-
},
|
|
9818
|
+
}, Xm = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, Zm = { class: "body-md text-default mt-1 line-clamp-2" }, Qm = {
|
|
9811
9819
|
key: 1,
|
|
9812
9820
|
class: "surface-default text-subtle rounded-2xl p-5 text-center"
|
|
9813
|
-
},
|
|
9821
|
+
}, $m = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9814
9822
|
__name: "MessageList",
|
|
9815
9823
|
props: {
|
|
9816
9824
|
target: {},
|
|
@@ -9827,7 +9835,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9827
9835
|
}), A = n(() => {
|
|
9828
9836
|
let e = u.conversation.value;
|
|
9829
9837
|
return e ? v.value ? v.value.senderName : e.memberCount ? c("members", { count: e.memberCount }) : c("groupChat") : "";
|
|
9830
|
-
}), M = n(() => u.conversation.value?.memberCount ?? 0), P = w(null), F = w(null), I = n(() => !!v.value), L = n(() => I.value && !b.value), ee = n(() => Bu(u.conversation.value)), R = N("threadRef"), { handleThreadScroll: z } =
|
|
9838
|
+
}), M = n(() => u.conversation.value?.memberCount ?? 0), P = w(null), F = w(null), I = n(() => !!v.value), L = n(() => I.value && !b.value), ee = n(() => Bu(u.conversation.value)), R = N("threadRef"), { handleThreadScroll: z } = zf({
|
|
9831
9839
|
getConversation: () => u.conversation.value,
|
|
9832
9840
|
getParentMessage: () => v.value,
|
|
9833
9841
|
getMessages: () => h.value,
|
|
@@ -9836,7 +9844,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9836
9844
|
canLoadOlder: () => x.value,
|
|
9837
9845
|
onLoadOlder: () => p.emit("list:loadOlder", { target: s.target }),
|
|
9838
9846
|
threadRef: R
|
|
9839
|
-
}), B = N("actionMenuRef"), { activeActionMessage: V, handleMessageContextMenu: H, handleMessageTap: U, resetActionMenuState: te, reactToMessage: ne, toggleInlineReaction: re, getReceiptSummaryAction: ie, getActionItems: ae, isTouchUI: W } =
|
|
9847
|
+
}), B = N("actionMenuRef"), { activeActionMessage: V, handleMessageContextMenu: H, handleMessageTap: U, resetActionMenuState: te, reactToMessage: ne, toggleInlineReaction: re, getReceiptSummaryAction: ie, getActionItems: ae, isTouchUI: W } = Nf({
|
|
9840
9848
|
canUseMessageActions: () => u.canUseMessageActions.value,
|
|
9841
9849
|
canReact: () => u.canReact.value,
|
|
9842
9850
|
canReply: () => u.canReply.value,
|
|
@@ -9905,7 +9913,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9905
9913
|
title: O.value,
|
|
9906
9914
|
subtitle: A.value,
|
|
9907
9915
|
memberCount: M.value
|
|
9908
|
-
}, () => [l(
|
|
9916
|
+
}, () => [l(Km, {
|
|
9909
9917
|
conversation: j(u).conversation.value,
|
|
9910
9918
|
"parent-message": v.value
|
|
9911
9919
|
}, null, 8, ["conversation", "parent-message"])], !0) : i("", !0), j(u).conversation.value ? (S(), a("div", {
|
|
@@ -9916,12 +9924,12 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9916
9924
|
ref: R,
|
|
9917
9925
|
class: g(["message-list__scroll min-h-0 flex-1", L.value ? "p-0" : I.value ? "px-5 py-4" : "px-2 pt-2 pb-3"]),
|
|
9918
9926
|
onScroll: n[2] ||= (...e) => j(z) && j(z)(...e)
|
|
9919
|
-
}, [o("div",
|
|
9920
|
-
v.value ? (S(), a("div",
|
|
9921
|
-
(S(!0), a(e, null, T(h.value, (o, c) => (S(), a(e, { key: o.id }, [le(c) ? (S(), r(
|
|
9927
|
+
}, [o("div", Jm, [
|
|
9928
|
+
v.value ? (S(), a("div", Ym, [o("p", Xm, k(v.value.senderName), 1), o("p", Zm, k(j(nc)(v.value, j(c)("message"), j(u).mentionNameByUid.value)), 1)])) : i("", !0),
|
|
9929
|
+
(S(!0), a(e, null, T(h.value, (o, c) => (S(), a(e, { key: o.id }, [le(c) ? (S(), r(cp, {
|
|
9922
9930
|
key: 0,
|
|
9923
9931
|
date: o.sentAt
|
|
9924
|
-
}, null, 8, ["date"])) : i("", !0), l(
|
|
9932
|
+
}, null, 8, ["date"])) : i("", !0), l(_m, {
|
|
9925
9933
|
message: o,
|
|
9926
9934
|
"current-user-id": j(u).currentUserId.value,
|
|
9927
9935
|
"can-react": j(u).canReact.value,
|
|
@@ -9957,13 +9965,13 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9957
9965
|
"onToggleReaction",
|
|
9958
9966
|
"onOpenThread"
|
|
9959
9967
|
])], 64))), 128)),
|
|
9960
|
-
h.value.length === 0 && D.value && !_.value ? (S(), a("div",
|
|
9961
|
-
])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", I.value ? L.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div",
|
|
9962
|
-
l(
|
|
9968
|
+
h.value.length === 0 && D.value && !_.value ? (S(), a("div", Qm, k(j(c)("noMessagesYetInThisGroup")), 1)) : i("", !0)
|
|
9969
|
+
])], 34), o("footer", { class: g(["message-list__composer flex shrink-0 flex-col", I.value ? L.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [E(t.$slots, "composer", {}, void 0, !0)], 2)], 2)) : (S(), a("div", qm, k(j(c)("selectConversationToStart")), 1))], 2),
|
|
9970
|
+
l(ap, {
|
|
9963
9971
|
attachment: P.value,
|
|
9964
9972
|
onClose: oe
|
|
9965
9973
|
}, null, 8, ["attachment"]),
|
|
9966
|
-
l(
|
|
9974
|
+
l(Im, {
|
|
9967
9975
|
ref_key: "actionMenuRef",
|
|
9968
9976
|
ref: B,
|
|
9969
9977
|
message: j(V),
|
|
@@ -9981,13 +9989,13 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
9981
9989
|
])
|
|
9982
9990
|
], 64));
|
|
9983
9991
|
}
|
|
9984
|
-
}), [["__scopeId", "data-v-6c8a5535"]]),
|
|
9992
|
+
}), [["__scopeId", "data-v-6c8a5535"]]), eh = { class: "receipt-section" }, th = {
|
|
9985
9993
|
key: 0,
|
|
9986
9994
|
class: "receipt-section__header"
|
|
9987
|
-
},
|
|
9995
|
+
}, nh = { class: "body-sm text-subtle font-semibold" }, rh = { class: "body-sm text-subtlest" }, ih = {
|
|
9988
9996
|
key: 1,
|
|
9989
9997
|
class: "receipt-section__list"
|
|
9990
|
-
},
|
|
9998
|
+
}, ah = { class: "receipt-section__identity" }, oh = { class: "min-w-0" }, sh = { class: "receipt-section__name heading-sm text-default truncate" }, ch = { class: "receipt-section__time body-md text-subtle" }, lh = { class: "truncate" }, uh = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
9991
9999
|
__name: "ReceiptSection",
|
|
9992
10000
|
props: {
|
|
9993
10001
|
title: {},
|
|
@@ -10000,35 +10008,35 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10000
10008
|
},
|
|
10001
10009
|
setup(t) {
|
|
10002
10010
|
let r = t, s = n(() => String(r.receipts.length));
|
|
10003
|
-
return (n, r) => (S(), a("section",
|
|
10011
|
+
return (n, r) => (S(), a("section", eh, [t.showHeader ? (S(), a("div", th, [o("p", nh, k(t.title), 1), o("span", rh, k(s.value), 1)])) : i("", !0), t.receipts.length ? (S(), a("div", ih, [(S(!0), a(e, null, T(t.receipts, (e) => (S(), a("div", {
|
|
10004
10012
|
key: `${e.kind}-${e.user.uid}`,
|
|
10005
10013
|
class: "receipt-section__row"
|
|
10006
|
-
}, [o("div",
|
|
10014
|
+
}, [o("div", ah, [l(j(B), {
|
|
10007
10015
|
image: e.user.avatar,
|
|
10008
10016
|
label: e.user.avatar ? void 0 : e.user.name.slice(0, 1).toUpperCase(),
|
|
10009
10017
|
shape: "circle",
|
|
10010
10018
|
class: "receipt-section__avatar"
|
|
10011
|
-
}, null, 8, ["image", "label"]), o("div",
|
|
10019
|
+
}, null, 8, ["image", "label"]), o("div", oh, [o("p", sh, k(e.user.name), 1), o("p", ch, [l(j(ge), {
|
|
10012
10020
|
class: "receipt-section__icon text-success",
|
|
10013
10021
|
"aria-hidden": "true"
|
|
10014
|
-
}), o("span",
|
|
10022
|
+
}), o("span", lh, k(t.formatDateTime(e.timestamp)), 1)])])])]))), 128))])) : i("", !0)]));
|
|
10015
10023
|
}
|
|
10016
|
-
}), [["__scopeId", "data-v-750f23c4"]]),
|
|
10024
|
+
}), [["__scopeId", "data-v-750f23c4"]]), dh = {
|
|
10017
10025
|
key: 0,
|
|
10018
10026
|
class: "message-info-dialog-content overflow-y-auto"
|
|
10019
|
-
},
|
|
10027
|
+
}, fh = {
|
|
10020
10028
|
key: 0,
|
|
10021
10029
|
class: "flex items-center justify-center px-4 py-8 sm:px-6"
|
|
10022
|
-
},
|
|
10030
|
+
}, ph = {
|
|
10023
10031
|
key: 1,
|
|
10024
10032
|
class: "message-info-error body-md mx-4 rounded-xl px-4 py-3 sm:mx-6"
|
|
10025
|
-
},
|
|
10033
|
+
}, mh = {
|
|
10026
10034
|
key: 2,
|
|
10027
10035
|
class: "message-info-list"
|
|
10028
|
-
},
|
|
10036
|
+
}, hh = {
|
|
10029
10037
|
key: 1,
|
|
10030
10038
|
class: "message-info-empty body-md text-subtle"
|
|
10031
|
-
},
|
|
10039
|
+
}, gh = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
10032
10040
|
__name: "MessageInfoDialog",
|
|
10033
10041
|
props: {
|
|
10034
10042
|
open: { type: Boolean },
|
|
@@ -10053,25 +10061,25 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10053
10061
|
return (t.timestamp?.getTime() ?? 0) - n;
|
|
10054
10062
|
});
|
|
10055
10063
|
}
|
|
10056
|
-
return (t, n) => (S(), r(
|
|
10064
|
+
return (t, n) => (S(), r(Gf, {
|
|
10057
10065
|
open: e.open,
|
|
10058
10066
|
title: j(u)("seen"),
|
|
10059
10067
|
"close-label": j(u)("close"),
|
|
10060
10068
|
onClose: n[0] ||= (e) => s("close")
|
|
10061
10069
|
}, {
|
|
10062
|
-
default: L(() => [e.message ? (S(), a("div",
|
|
10070
|
+
default: L(() => [e.message ? (S(), a("div", dh, [e.loading ? (S(), a("div", fh, [l(j(W), {
|
|
10063
10071
|
style: {
|
|
10064
10072
|
width: "2.5rem",
|
|
10065
10073
|
height: "2.5rem"
|
|
10066
10074
|
},
|
|
10067
10075
|
"stroke-width": "5"
|
|
10068
|
-
})])) : e.error ? (S(), a("div",
|
|
10076
|
+
})])) : e.error ? (S(), a("div", ph, k(e.error), 1)) : (S(), a("div", mh, [d.value.length ? (S(), r(uh, {
|
|
10069
10077
|
key: 0,
|
|
10070
10078
|
title: j(u)("readBy"),
|
|
10071
10079
|
receipts: d.value,
|
|
10072
10080
|
"format-date-time": f,
|
|
10073
10081
|
"show-header": !1
|
|
10074
|
-
}, null, 8, ["title", "receipts"])) : (S(), a("p",
|
|
10082
|
+
}, null, 8, ["title", "receipts"])) : (S(), a("p", hh, k(j(u)("nobodyHasReadThisMessageYet")), 1))]))])) : i("", !0)]),
|
|
10075
10083
|
_: 1
|
|
10076
10084
|
}, 8, [
|
|
10077
10085
|
"open",
|
|
@@ -10079,34 +10087,34 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10079
10087
|
"close-label"
|
|
10080
10088
|
]));
|
|
10081
10089
|
}
|
|
10082
|
-
}), [["__scopeId", "data-v-e025ada9"]]),
|
|
10090
|
+
}), [["__scopeId", "data-v-e025ada9"]]), _h = { class: "min-h-0 flex-1 overflow-y-auto" }, vh = {
|
|
10083
10091
|
key: 0,
|
|
10084
10092
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
10085
|
-
},
|
|
10093
|
+
}, yh = {
|
|
10086
10094
|
key: 1,
|
|
10087
10095
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-64 items-center justify-center rounded-xl px-6 text-center"
|
|
10088
|
-
},
|
|
10096
|
+
}, bh = {
|
|
10089
10097
|
key: 2,
|
|
10090
10098
|
class: "space-y-3"
|
|
10091
|
-
},
|
|
10099
|
+
}, xh = { class: "flex flex-wrap items-start justify-between gap-3" }, Sh = { class: "w-full space-y-2" }, Ch = { class: "center between gap-2" }, wh = { class: "" }, Th = { class: "space-y-1" }, Eh = { class: "heading-sm text-default" }, Dh = {
|
|
10092
10100
|
key: 0,
|
|
10093
10101
|
class: "body-md text-default"
|
|
10094
|
-
},
|
|
10102
|
+
}, Oh = {
|
|
10095
10103
|
key: 1,
|
|
10096
10104
|
class: "body-md text-default wrap-break-word whitespace-pre-wrap"
|
|
10097
|
-
},
|
|
10105
|
+
}, kh = {
|
|
10098
10106
|
key: 0,
|
|
10099
10107
|
class: "max-w-sm"
|
|
10100
|
-
},
|
|
10108
|
+
}, Ah = { class: "flex flex-wrap items-center gap-1" }, jh = {
|
|
10101
10109
|
key: 0,
|
|
10102
10110
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-center"
|
|
10103
|
-
},
|
|
10111
|
+
}, Mh = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, Nh = { class: "flex items-center gap-2" }, Ph = {
|
|
10104
10112
|
key: 1,
|
|
10105
10113
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3"
|
|
10106
|
-
},
|
|
10114
|
+
}, Fh = {
|
|
10107
10115
|
key: 0,
|
|
10108
10116
|
class: "relative max-w-sm"
|
|
10109
|
-
},
|
|
10117
|
+
}, Ih = { class: "absolute top-2 right-2" }, Lh = ["placeholder"], Rh = { class: "flex items-center justify-end gap-2" }, zh = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
10110
10118
|
__name: "ScheduledMessagesDialog",
|
|
10111
10119
|
props: {
|
|
10112
10120
|
open: { type: Boolean },
|
|
@@ -10188,24 +10196,24 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10188
10196
|
function H(e) {
|
|
10189
10197
|
d.value === e.id && M(), u("remove", e);
|
|
10190
10198
|
}
|
|
10191
|
-
return (n, s) => (S(), r(
|
|
10199
|
+
return (n, s) => (S(), r(Gf, {
|
|
10192
10200
|
open: t.open,
|
|
10193
10201
|
title: j(v)("scheduledMessages"),
|
|
10194
10202
|
subtitle: t.conversationTitle ? j(v)("queuedForConversation", { title: t.conversationTitle }) : j(v)("queuedOutgoingMessagesForThisChat"),
|
|
10195
10203
|
"close-label": j(v)("close"),
|
|
10196
10204
|
onClose: s[3] ||= (e) => u("close")
|
|
10197
10205
|
}, {
|
|
10198
|
-
default: L(() => [o("div",
|
|
10206
|
+
default: L(() => [o("div", _h, [t.loading ? (S(), a("div", vh, [l(j(W), {
|
|
10199
10207
|
style: {
|
|
10200
10208
|
width: "2.75rem",
|
|
10201
10209
|
height: "2.75rem"
|
|
10202
10210
|
},
|
|
10203
10211
|
"stroke-width": "6"
|
|
10204
|
-
})])) : y.value.length === 0 ? (S(), a("div",
|
|
10212
|
+
})])) : y.value.length === 0 ? (S(), a("div", yh, k(j(v)("noScheduledMessagesForConversation")), 1)) : (S(), a("div", bh, [(S(!0), a(e, null, T(y.value, (e) => (S(), a("article", {
|
|
10205
10213
|
key: e.id,
|
|
10206
10214
|
class: "border-default rounded-lg border px-4 py-3"
|
|
10207
|
-
}, [o("div",
|
|
10208
|
-
o("div",
|
|
10215
|
+
}, [o("div", xh, [o("div", Sh, [
|
|
10216
|
+
o("div", Ch, [o("div", wh, [e.kind === "poll" ? (S(), r(j(G), {
|
|
10209
10217
|
key: 0,
|
|
10210
10218
|
text: j(v)("poll"),
|
|
10211
10219
|
context: "info",
|
|
@@ -10226,9 +10234,9 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10226
10234
|
size: "small",
|
|
10227
10235
|
onClick: (t) => H(e)
|
|
10228
10236
|
}, null, 8, ["icon", "onClick"])]),
|
|
10229
|
-
o("div",
|
|
10230
|
-
R(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div",
|
|
10231
|
-
]), o("div",
|
|
10237
|
+
o("div", Th, [o("p", Eh, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", Dh, k(e.poll.question), 1)) : (S(), a("p", Oh, k(j(nc)(e, j(v)("attachment"))), 1))]),
|
|
10238
|
+
R(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", kh, [l(Vp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
|
|
10239
|
+
]), o("div", Ah, [e.kind === "poll" ? i("", !0) : (S(), r(j(V), {
|
|
10232
10240
|
key: 0,
|
|
10233
10241
|
label: j(v)("edit"),
|
|
10234
10242
|
icon: j(ve),
|
|
@@ -10250,7 +10258,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10250
10258
|
"label",
|
|
10251
10259
|
"icon",
|
|
10252
10260
|
"onClick"
|
|
10253
|
-
])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div",
|
|
10261
|
+
])) : i("", !0)])]), d.value === e.id && f.value === "reschedule" ? (S(), a("div", jh, [o("div", Mh, [ee(o("input", {
|
|
10254
10262
|
"onUpdate:modelValue": s[0] ||= (e) => m.value = e,
|
|
10255
10263
|
type: "date",
|
|
10256
10264
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
@@ -10262,7 +10270,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10262
10270
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
10263
10271
|
"aria-label": "Time (24-hour)",
|
|
10264
10272
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
10265
|
-
}, null, 512), [[P, h.value]])]), o("div",
|
|
10273
|
+
}, null, 512), [[P, h.value]])]), o("div", Nh, [l(j(V), {
|
|
10266
10274
|
label: j(v)("save"),
|
|
10267
10275
|
size: "small",
|
|
10268
10276
|
disabled: !m.value || !b.value,
|
|
@@ -10276,8 +10284,8 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10276
10284
|
size: "small",
|
|
10277
10285
|
text: "",
|
|
10278
10286
|
onClick: M
|
|
10279
|
-
}, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div",
|
|
10280
|
-
R(e) ? (S(), a("div",
|
|
10287
|
+
}, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div", Ph, [
|
|
10288
|
+
R(e) ? (S(), a("div", Fh, [l(Vp, { message: N(e) }, null, 8, ["message"]), o("div", Ih, [l(j(V), {
|
|
10281
10289
|
icon: j(de),
|
|
10282
10290
|
"aria-label": j(v)("remove"),
|
|
10283
10291
|
text: "",
|
|
@@ -10291,8 +10299,8 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10291
10299
|
rows: "3",
|
|
10292
10300
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
|
|
10293
10301
|
placeholder: j(v)("writeMessage")
|
|
10294
|
-
}, null, 8,
|
|
10295
|
-
o("div",
|
|
10302
|
+
}, null, 8, Lh), [[P, g.value]]),
|
|
10303
|
+
o("div", Rh, [l(j(V), {
|
|
10296
10304
|
label: j(v)("cancel"),
|
|
10297
10305
|
size: "small",
|
|
10298
10306
|
text: "",
|
|
@@ -10316,7 +10324,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10316
10324
|
"close-label"
|
|
10317
10325
|
]));
|
|
10318
10326
|
}
|
|
10319
|
-
}), [["__scopeId", "data-v-0bb2dc95"]]),
|
|
10327
|
+
}), [["__scopeId", "data-v-0bb2dc95"]]), Bh = { class: "chat-status-overlay" }, Vh = { class: "chat-status-overlay__card" }, Hh = /* @__PURE__ */ jd(/* @__PURE__ */ u({
|
|
10320
10328
|
__name: "ChatStatusOverlay",
|
|
10321
10329
|
props: {
|
|
10322
10330
|
visible: { type: Boolean },
|
|
@@ -10349,9 +10357,9 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10349
10357
|
message: t.messages.connecting,
|
|
10350
10358
|
slotName: "connecting"
|
|
10351
10359
|
} : null);
|
|
10352
|
-
return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div",
|
|
10360
|
+
return (e, t) => r.value ? E(e.$slots, r.value.slotName, { key: 0 }, () => [o("div", Bh, [o("div", Vh, [E(e.$slots, `${r.value.slotName}-content`, {}, () => [o("span", null, k(r.value.message), 1)], !0)])])], !0) : i("", !0);
|
|
10353
10361
|
}
|
|
10354
|
-
}), [["__scopeId", "data-v-7749aec9"]]),
|
|
10362
|
+
}), [["__scopeId", "data-v-7749aec9"]]), Uh = /* @__PURE__ */ u({
|
|
10355
10363
|
__name: "BccChat",
|
|
10356
10364
|
props: {
|
|
10357
10365
|
client: { default: null },
|
|
@@ -10619,7 +10627,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10619
10627
|
_: 1
|
|
10620
10628
|
})]) : i("", !0),
|
|
10621
10629
|
T.value ? (S(), a(e, { key: 1 }, [
|
|
10622
|
-
l(
|
|
10630
|
+
l($m, {
|
|
10623
10631
|
target: "main",
|
|
10624
10632
|
class: g(["h-full", t.containerClass]),
|
|
10625
10633
|
"hide-group-actions": t.hideGroupActions,
|
|
@@ -10628,7 +10636,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10628
10636
|
"action-message-row-class": t.actionMessageRowClass,
|
|
10629
10637
|
onAnchorclick: ie
|
|
10630
10638
|
}, s({
|
|
10631
|
-
composer: L(() => [l(
|
|
10639
|
+
composer: L(() => [l(jf, {
|
|
10632
10640
|
ref_key: "mainComposerRef",
|
|
10633
10641
|
ref: B,
|
|
10634
10642
|
target: "main",
|
|
@@ -10648,7 +10656,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10648
10656
|
"action-message-class",
|
|
10649
10657
|
"action-message-row-class"
|
|
10650
10658
|
]),
|
|
10651
|
-
l(
|
|
10659
|
+
l(Gf, {
|
|
10652
10660
|
open: !!j(F).activeThreadParentMessage.value,
|
|
10653
10661
|
title: j(m)("threadWithCount", { count: j(F).activeThreadParentMessage.value?.replyCount ?? 0 }),
|
|
10654
10662
|
subtitle: O.value?.title ?? "",
|
|
@@ -10656,13 +10664,13 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10656
10664
|
"close-aria-label": j(m)("closeThread"),
|
|
10657
10665
|
onClose: r[0] ||= (e) => j(U).emit("ui:closeThread")
|
|
10658
10666
|
}, {
|
|
10659
|
-
default: L(() => [l(
|
|
10667
|
+
default: L(() => [l($m, {
|
|
10660
10668
|
target: "thread",
|
|
10661
10669
|
class: "min-h-0 flex-1",
|
|
10662
10670
|
"action-message-class": t.actionMessageClass,
|
|
10663
10671
|
"action-message-row-class": t.actionMessageRowClass
|
|
10664
10672
|
}, {
|
|
10665
|
-
composer: L(() => [l(
|
|
10673
|
+
composer: L(() => [l(jf, {
|
|
10666
10674
|
ref_key: "threadComposerRef",
|
|
10667
10675
|
ref: V,
|
|
10668
10676
|
target: "thread",
|
|
@@ -10680,7 +10688,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10680
10688
|
"close-label",
|
|
10681
10689
|
"close-aria-label"
|
|
10682
10690
|
]),
|
|
10683
|
-
l(
|
|
10691
|
+
l(zh, {
|
|
10684
10692
|
open: j(z).showScheduledMessages.value,
|
|
10685
10693
|
loading: j(z).loadingScheduledMessages.value,
|
|
10686
10694
|
messages: j(z).scheduledMessages.value,
|
|
@@ -10695,7 +10703,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10695
10703
|
"messages",
|
|
10696
10704
|
"conversation-title"
|
|
10697
10705
|
]),
|
|
10698
|
-
l(
|
|
10706
|
+
l(gh, {
|
|
10699
10707
|
open: !!j(z).infoMessage.value,
|
|
10700
10708
|
message: j(z).infoMessage.value,
|
|
10701
10709
|
receipts: j(z).infoMessageReceipts.value,
|
|
@@ -10710,7 +10718,7 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10710
10718
|
"error"
|
|
10711
10719
|
])
|
|
10712
10720
|
], 64)) : i("", !0),
|
|
10713
|
-
l(
|
|
10721
|
+
l(Hh, {
|
|
10714
10722
|
visible: D.value && (T.value?.offlineMode.value || !T.value?.connected.value || x.value && !ee.value || v.value || C.value || t.displayNoMessagesText && j(F).isChatEmpty.value),
|
|
10715
10723
|
"offline-mode": !!(T.value?.offlineMode.value && !O.value),
|
|
10716
10724
|
connected: !!(T.value?.connected.value || O.value),
|
|
@@ -10750,6 +10758,6 @@ var Vf = { class: "w-full" }, Hf = {
|
|
|
10750
10758
|
}
|
|
10751
10759
|
});
|
|
10752
10760
|
//#endregion
|
|
10753
|
-
export {
|
|
10761
|
+
export { Uh as BccChat, Uh as BccChatMessageList, Hl as LogSeverity, Au as chat, Au as default, bc as createChatClient };
|
|
10754
10762
|
|
|
10755
10763
|
//# sourceMappingURL=vue-bcc-chat-ui.js.map
|