@vlprojects-chat/chat 0.32.2-rc-LK-56-5a89619.1 → 0.33.0
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/index.mjs +15 -23
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -24983,7 +24983,7 @@ const oO = yS("PollRef", {
|
|
|
24983
24983
|
const t = [], n = [];
|
|
24984
24984
|
let r = !1;
|
|
24985
24985
|
e.options.forEach((i) => {
|
|
24986
|
-
t.push(i), i.valid && (n.push(i.option), r = !0);
|
|
24986
|
+
t.push(i), i.valid === !0 && (n.push(i.option), r = !0);
|
|
24987
24987
|
}), r = e.withAnswer;
|
|
24988
24988
|
const o = e.isMultiselect;
|
|
24989
24989
|
return new Kc({ ...e, id: `${e.id}`, options: t, validOptions: n, withAnswer: r, isMultiselect: o });
|
|
@@ -25294,7 +25294,7 @@ let Yt = class extends ur({
|
|
|
25294
25294
|
}
|
|
25295
25295
|
upsertPoll(e) {
|
|
25296
25296
|
const t = this.findPollById(String(e.id));
|
|
25297
|
-
return t ? (t.question = e.question, t.isOpenEnded = e.isOpenEnded, t.withAnswer = e.withAnswer, t.isVoted = !!e.isVoted, t.options = e.options.map((n) => ({ ...n })), t.validOptions = e.options.filter((n) => n.valid).map((n) => n.option), t.templateId = e.templateId, t.createdAt = e.createdAt, t.stoppedAt = e.stoppedAt, t.status = e.status, t.votes = e.votes ?? [], t.updatedAt = void 0, t.isMultiselect = e.isMultiselect, t) : this.addPoll(e);
|
|
25297
|
+
return t ? (t.question = e.question, t.isOpenEnded = e.isOpenEnded, t.withAnswer = e.withAnswer, t.isVoted = !!e.isVoted, t.options = e.options.map((n) => ({ ...n })), t.validOptions = e.options.filter((n) => n.valid === !0).map((n) => n.option), t.templateId = e.templateId, t.createdAt = e.createdAt, t.stoppedAt = e.stoppedAt, t.status = e.status, t.votes = e.votes ?? [], t.updatedAt = void 0, t.isMultiselect = e.isMultiselect, t) : this.addPoll(e);
|
|
25298
25298
|
}
|
|
25299
25299
|
startPoll(e) {
|
|
25300
25300
|
e && this.setActivePoll(oO(e));
|
|
@@ -38244,7 +38244,7 @@ const P$ = {
|
|
|
38244
38244
|
const r = mk(e, (/* @__PURE__ */ new Date()).toISOString());
|
|
38245
38245
|
return r === -2 ? /* @__PURE__ */ h.jsx(Te, { id: "time.dayBefore" }) : r < -2 ? qs({ date: e, formatString: "dd MMMM", lang: n }) : qs({ date: e, lang: n });
|
|
38246
38246
|
}, gk = (e) => /* @__PURE__ */ h.jsx(je, { container: !0, alignItems: "center", children: e.children }), eee = (e) => {
|
|
38247
|
-
const { option: t } = e;
|
|
38247
|
+
const { option: t } = e, n = t.valid === !0 ? q.SUCCESS_BASE : t.valid === !1 ? q.ERROR_BASE : q.PRIMARY;
|
|
38248
38248
|
return /* @__PURE__ */ h.jsxs(gk, { children: [
|
|
38249
38249
|
/* @__PURE__ */ h.jsx(
|
|
38250
38250
|
je,
|
|
@@ -38253,7 +38253,7 @@ const P$ = {
|
|
|
38253
38253
|
xs: !0,
|
|
38254
38254
|
component: be,
|
|
38255
38255
|
variant: "subtitle2",
|
|
38256
|
-
color:
|
|
38256
|
+
color: n,
|
|
38257
38257
|
sx: { wordBreak: "break-word" },
|
|
38258
38258
|
children: t.option
|
|
38259
38259
|
}
|
|
@@ -38264,7 +38264,7 @@ const P$ = {
|
|
|
38264
38264
|
item: !0,
|
|
38265
38265
|
component: be,
|
|
38266
38266
|
variant: "subtitle2",
|
|
38267
|
-
color:
|
|
38267
|
+
color: n,
|
|
38268
38268
|
children: t.votesCount
|
|
38269
38269
|
}
|
|
38270
38270
|
)
|
|
@@ -55922,14 +55922,6 @@ const pj = 10 * 1024 * 1024, Ole = "png|jpe?g|gif|webp|bmp|ico|avif", Tle = new
|
|
|
55922
55922
|
return e.isError ? q.ERROR_02 : q[((t = e == null ? void 0 : e.user) == null ? void 0 : t.getAvatarColor) || "AVATAR2_RED"];
|
|
55923
55923
|
},
|
|
55924
55924
|
color: q.CONTRAST,
|
|
55925
|
-
/* The bubble is painted with one of the eight avatar colours, several of them dark, so a
|
|
55926
|
-
link left at the browser's default blue is barely readable (LK-56). The design shows the
|
|
55927
|
-
link in the same colour as the surrounding text, told apart by its underline. CssBaseline
|
|
55928
|
-
already carries a global `a { color: inherit }`, but it is injected first on purpose so
|
|
55929
|
-
the host app can override library styles - this selector is specific enough to hold. */
|
|
55930
|
-
"& a": {
|
|
55931
|
-
color: "inherit"
|
|
55932
|
-
},
|
|
55933
55925
|
margin: "0 64px 0 0",
|
|
55934
55926
|
borderRadius: (e) => e != null && e.short ? 15 : "15px 0 15px 15px",
|
|
55935
55927
|
outline: (e) => e.selected || e.isError ? `2px solid ${fA(e)}` : "none",
|
|
@@ -60552,14 +60544,14 @@ const ode = (e) => {
|
|
|
60552
60544
|
/* @__PURE__ */ h.jsx(be, { variant: "h2", children: /* @__PURE__ */ h.jsx(Te, { id: "thanks" }) }),
|
|
60553
60545
|
/* @__PURE__ */ h.jsx(be, { variant: "body1", children: /* @__PURE__ */ h.jsx(Te, { id: "answerAccepted" }) })
|
|
60554
60546
|
] }) : /* @__PURE__ */ h.jsx(h.Fragment, { children: /* @__PURE__ */ h.jsx(je, { container: !0, direction: "column", rowGap: 2, children: r.options.map((s) => {
|
|
60555
|
-
const a = () => {
|
|
60556
|
-
if (
|
|
60557
|
-
return
|
|
60547
|
+
const a = s.valid === !0 ? q.SUCCESS_BASE : s.valid === !1 ? q.ERROR_BASE : null, l = () => {
|
|
60548
|
+
if (a)
|
|
60549
|
+
return a;
|
|
60558
60550
|
if (s.isVoted) {
|
|
60559
|
-
const
|
|
60560
|
-
return sfe(
|
|
60551
|
+
const c = q[t.me.getAvatarColor];
|
|
60552
|
+
return sfe(c);
|
|
60561
60553
|
} else return s.votesCount > 0 ? q.SECONDARY_01 : q.BG;
|
|
60562
|
-
},
|
|
60554
|
+
}, u = (c) => c === q.SECONDARY_01 ? q.BG : `color-mix(in srgb,${c}, #fff 50%)`;
|
|
60563
60555
|
return /* @__PURE__ */ h.jsxs(
|
|
60564
60556
|
je,
|
|
60565
60557
|
{
|
|
@@ -60568,13 +60560,13 @@ const ode = (e) => {
|
|
|
60568
60560
|
className: o.progress,
|
|
60569
60561
|
"data-qa-votes": s.votesCount,
|
|
60570
60562
|
"data-qa-option": s.option,
|
|
60571
|
-
bgcolor: l(
|
|
60563
|
+
bgcolor: u(l()),
|
|
60572
60564
|
children: [
|
|
60573
60565
|
/* @__PURE__ */ h.jsx(
|
|
60574
60566
|
be,
|
|
60575
60567
|
{
|
|
60576
60568
|
component: "span",
|
|
60577
|
-
color: s.isVoted ||
|
|
60569
|
+
color: s.isVoted || a ? q.BG : q.PRIMARY,
|
|
60578
60570
|
fontWeight: 500,
|
|
60579
60571
|
padding: "8px 25px 8px 12px",
|
|
60580
60572
|
zIndex: "10",
|
|
@@ -60585,7 +60577,7 @@ const ode = (e) => {
|
|
|
60585
60577
|
Ss,
|
|
60586
60578
|
{
|
|
60587
60579
|
width: s.votesCount ? `${s.votesCount / i * 100}%` : "100%",
|
|
60588
|
-
bgcolor:
|
|
60580
|
+
bgcolor: l(),
|
|
60589
60581
|
position: "absolute",
|
|
60590
60582
|
minHeight: "100%",
|
|
60591
60583
|
borderRadius: "10px"
|
|
@@ -60598,7 +60590,7 @@ const ode = (e) => {
|
|
|
60598
60590
|
variant: "body2",
|
|
60599
60591
|
position: "absolute",
|
|
60600
60592
|
right: "10px",
|
|
60601
|
-
color: s.isVoted ||
|
|
60593
|
+
color: s.isVoted || a ? `color-mix(in srgb,${q.BG}, #fff 50%)` : q.PRIMARY,
|
|
60602
60594
|
children: s.votesCount
|
|
60603
60595
|
}
|
|
60604
60596
|
)
|