@wexio/messenger-widget-react 1.1.5 → 1.2.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/widget-react--D5-TDqS.js +475 -0
- package/dist/{widget-react-D9b9f-j_2.js → widget-react-2tTH7-bO.js} +1 -1
- package/dist/{widget-react-GkCAcRz0.js → widget-react-B8rXZyxg.js} +1 -1
- package/dist/widget-react-B9X7Tn7t.js +125 -0
- package/dist/{widget-react-D7Q1S5E02.js → widget-react-BPNfTldJ.js} +134 -121
- package/dist/{widget-react-NffhFueH.js → widget-react-BlTmXnei.js} +2 -2
- package/dist/{widget-react-D_1wQTaz.js → widget-react-CIy9jXND.js} +2 -2
- package/dist/widget-react-CVLHwRZh.js +21619 -0
- package/dist/{widget-react-DWO5MXt62.js → widget-react-CtvdaJvy.js} +5 -5
- package/dist/widget-react-D8-Z8fvu.js +323 -0
- package/dist/{widget-react-NUWScxeE2.js → widget-react-DF5yY9sQ.js} +120 -108
- package/dist/widget-react-DNFROpaS.js +262 -0
- package/dist/{widget-react-BhdM1EXE2.js → widget-react-DXP6EOCM.js} +1 -1
- package/dist/{widget-react-BDd1HJHs.js → widget-react-DejnNTzJ.js} +36 -36
- package/dist/{widget-react-Br8qtj152.js → widget-react-DubCiNev.js} +5 -5
- package/dist/{widget-react-BVRYDaf5.js → widget-react-faSyVXFQ.js} +2 -2
- package/dist/{widget-react-BGCZpMUT.js → widget-react-krPPnv02.js} +1 -1
- package/dist/widget-react.js +14513 -6394
- package/package.json +1 -1
- package/dist/widget-react--A4IVF5N2.js +0 -359
- package/dist/widget-react-BFgpQWPW.js +0 -7733
- package/dist/widget-react-BGmjRit12.js +0 -359
- package/dist/widget-react-BJN4_XqD.js +0 -359
- package/dist/widget-react-BepZON2O.js +0 -359
- package/dist/widget-react-BirV4fjr.js +0 -359
- package/dist/widget-react-BjeN5jDi.js +0 -359
- package/dist/widget-react-Blj9taMI2.js +0 -359
- package/dist/widget-react-Bpjcku_E.js +0 -359
- package/dist/widget-react-Br-jpQBt.js +0 -359
- package/dist/widget-react-C4jVLX4O.js +0 -359
- package/dist/widget-react-CMn2M4G7.js +0 -359
- package/dist/widget-react-CPIqSc_J.js +0 -359
- package/dist/widget-react-CPnUEeex.js +0 -9907
- package/dist/widget-react-CVrATfkA.js +0 -359
- package/dist/widget-react-CeQaem4N2.js +0 -126
- package/dist/widget-react-CkDPMun5.js +0 -359
- package/dist/widget-react-Cp0KM0D6.js +0 -359
- package/dist/widget-react-Cs_ooZdD.js +0 -359
- package/dist/widget-react-Csr68eN1.js +0 -359
- package/dist/widget-react-CxzW4Bam.js +0 -359
- package/dist/widget-react-D00lhVJW.js +0 -359
- package/dist/widget-react-DM5ptbez2.js +0 -359
- package/dist/widget-react-DU5Wg6Cl.js +0 -359
- package/dist/widget-react-DYBhHaDC.js +0 -359
- package/dist/widget-react-DZxVgDlM2.js +0 -359
- package/dist/widget-react-Dhi-efUB2.js +0 -359
- package/dist/widget-react-DmQP1bcj.js +0 -4293
- package/dist/widget-react-Dvze5gXC.js +0 -359
- package/dist/widget-react-H0QV1X13.js +0 -359
- package/dist/widget-react-JcQ9Xwb6.js +0 -359
- package/dist/widget-react-LjYTh4EJ.js +0 -359
- package/dist/widget-react-M3D_BLuT.js +0 -359
- package/dist/widget-react-O_BU6qSC.js +0 -359
- package/dist/widget-react-TB2Eoyvi2.js +0 -263
- package/dist/widget-react-WSHbDgKs.js +0 -359
- package/dist/widget-react-_6vfCiAZ.js +0 -359
- package/dist/widget-react-e8MoPThS2.js +0 -359
|
@@ -11,15 +11,15 @@ import "react";
|
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react-dom/client";
|
|
14
|
-
import {
|
|
15
|
-
import { i
|
|
16
|
-
import { d as
|
|
17
|
-
import { t as
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import { jsx as
|
|
14
|
+
import { N as e, c as t, k as n, l as r } from "./widget-react-CVLHwRZh.js";
|
|
15
|
+
import { i, n as a, o } from "./widget-react-krPPnv02.js";
|
|
16
|
+
import { d as s, h as c, m as l, n as u, r as d } from "./widget-react-DejnNTzJ.js";
|
|
17
|
+
import { t as f } from "./widget-react-CIy9jXND.js";
|
|
18
|
+
import { a as p, c as ee, i as m, l as h, n as g, o as _, r as v, t as y } from "./widget-react-D8-Z8fvu.js";
|
|
19
|
+
import { useEffect as b, useRef as x, useState as S } from "react";
|
|
20
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
21
21
|
//#region components/widget/news-article-view/helpers.ts
|
|
22
|
-
function
|
|
22
|
+
function T(e) {
|
|
23
23
|
if (!e || typeof e != "object") return null;
|
|
24
24
|
let t = e, n = String(t._id ?? t.id ?? "");
|
|
25
25
|
if (!n) return null;
|
|
@@ -81,8 +81,8 @@ function C(e) {
|
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region components/widget/news-article-view/related-news-list.tsx
|
|
84
|
-
function
|
|
85
|
-
let c =
|
|
84
|
+
function E({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPostsById: r, visitorRelatedRaw: a, isDummy: o, onOpen: s }) {
|
|
85
|
+
let c = i("news"), l = (() => {
|
|
86
86
|
if (o) return [];
|
|
87
87
|
if (Array.isArray(a) && a.length > 0) return a.filter((e) => !!e && typeof e == "object").map((e) => {
|
|
88
88
|
let t = e.coverImageUrl?.url ?? e.externalCoverImageUrl;
|
|
@@ -92,11 +92,11 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
|
|
|
92
92
|
coverImageUrl: typeof t == "string" ? t : void 0
|
|
93
93
|
};
|
|
94
94
|
}).filter((e) => e.id && e.title);
|
|
95
|
-
if (
|
|
96
|
-
let
|
|
97
|
-
for (let [t, n] of Object.entries(
|
|
95
|
+
if (r && Object.keys(r).length > 0 && (t.length > 0 || n.length > 0)) {
|
|
96
|
+
let i = new Set(t), a = new Set(n), o = [];
|
|
97
|
+
for (let [t, n] of Object.entries(r)) {
|
|
98
98
|
if (t === e || !n || typeof n != "object") continue;
|
|
99
|
-
let
|
|
99
|
+
let r = n, s = Array.isArray(r.categories) ? r.categories : [], c = Array.isArray(r.tags) ? r.tags : [], l = (e) => {
|
|
100
100
|
let t = /* @__PURE__ */ new Set();
|
|
101
101
|
for (let n of e) if (n && typeof n == "object") {
|
|
102
102
|
let e = n._id ?? n.id;
|
|
@@ -104,16 +104,16 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
|
|
|
104
104
|
}
|
|
105
105
|
return t;
|
|
106
106
|
}, u = l(s), d = l(c), f = 0;
|
|
107
|
-
for (let e of u)
|
|
107
|
+
for (let e of u) i.has(e) && f++;
|
|
108
108
|
for (let e of d) a.has(e) && f++;
|
|
109
109
|
if (f === 0) continue;
|
|
110
|
-
let p =
|
|
110
|
+
let p = r.coverImageUrl?.url ?? r.externalCoverImageUrl;
|
|
111
111
|
o.push({
|
|
112
112
|
id: t,
|
|
113
|
-
title: typeof
|
|
113
|
+
title: typeof r.title == "string" ? r.title : "",
|
|
114
114
|
coverImageUrl: typeof p == "string" ? p : void 0,
|
|
115
115
|
overlap: f,
|
|
116
|
-
publishedAt: typeof
|
|
116
|
+
publishedAt: typeof r.publishedAt == "string" ? r.publishedAt : ""
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
return o.sort((e, t) => t.overlap === e.overlap ? t.publishedAt.localeCompare(e.publishedAt) : t.overlap - e.overlap), o.slice(0, 5).map(({ id: e, title: t, coverImageUrl: n }) => ({
|
|
@@ -124,22 +124,22 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
|
|
|
124
124
|
}
|
|
125
125
|
return [];
|
|
126
126
|
})();
|
|
127
|
-
return l.length === 0 ? null : /* @__PURE__ */
|
|
127
|
+
return l.length === 0 ? null : /* @__PURE__ */ w("section", {
|
|
128
128
|
className: "mt-6",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ C("p", {
|
|
130
130
|
className: "mb-2 text-xs font-semibold tracking-wide text-wx-fg-muted uppercase",
|
|
131
131
|
children: c("relatedTitle")
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ C("ul", {
|
|
133
133
|
className: "flex flex-col gap-2",
|
|
134
|
-
children: l.map((e) => /* @__PURE__ */
|
|
134
|
+
children: l.map((e) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("button", {
|
|
135
135
|
type: "button",
|
|
136
136
|
onClick: () => s(e.id),
|
|
137
137
|
className: "flex w-full items-center gap-3 rounded-wx-lg bg-wx-bg-elevated px-3 py-2 text-left transition-colors hover:bg-wx-bg-elevated/80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ C("span", {
|
|
139
139
|
className: "aspect-square w-12 shrink-0 rounded-wx-sm bg-cover bg-center",
|
|
140
140
|
style: e.coverImageUrl ? { backgroundImage: `url(${e.coverImageUrl})` } : { background: "linear-gradient(135deg, #1e1f21, #121314)" },
|
|
141
141
|
"aria-hidden": "true"
|
|
142
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ C("span", {
|
|
143
143
|
className: "min-w-0 flex-1 truncate text-sm font-medium text-wx-fg",
|
|
144
144
|
children: e.title
|
|
145
145
|
})]
|
|
@@ -149,149 +149,162 @@ function w({ currentId: e, currentCategoryIds: t, currentTagIds: n, previewPosts
|
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region components/widget/news-article-view/index.tsx
|
|
152
|
-
function
|
|
153
|
-
let
|
|
152
|
+
function D({ id: D, isDummy: k, onOpenRelated: A, onTitleResolved: j }) {
|
|
153
|
+
let M = i("news"), N = i("demo"), P = o(), F = e(), { config: I } = n(), L = I.messenger?.showRelatedNews ?? !0, R = I.messenger?.showReactionCounts ?? !0, { trackLinkClick: z } = t(), B = x(null), V = (e) => {
|
|
154
|
+
A?.(e);
|
|
155
|
+
}, [H, U] = S(P), W = p(H, N), G = k ? null : F.previewData?.newsPostsById?.[D], K = !!G, { data: q, loading: J } = l({
|
|
154
156
|
variables: { args: {
|
|
155
|
-
id:
|
|
156
|
-
locale:
|
|
157
|
+
id: D,
|
|
158
|
+
locale: P
|
|
157
159
|
} },
|
|
158
|
-
skip:
|
|
159
|
-
}), { data:
|
|
160
|
+
skip: k || K || !D
|
|
161
|
+
}), { data: Y } = c({
|
|
160
162
|
variables: {
|
|
161
|
-
postId:
|
|
163
|
+
postId: D,
|
|
162
164
|
limit: 5,
|
|
163
|
-
locale:
|
|
165
|
+
locale: P
|
|
164
166
|
},
|
|
165
|
-
skip:
|
|
166
|
-
}),
|
|
167
|
-
id:
|
|
168
|
-
title:
|
|
169
|
-
excerpt:
|
|
170
|
-
contentMarkdown:
|
|
167
|
+
skip: k || K || !D || !L
|
|
168
|
+
}), X = k ? s(W).find((e) => e.id === D) ?? null : null, Z = X ? {
|
|
169
|
+
id: X.id,
|
|
170
|
+
title: X.title,
|
|
171
|
+
excerpt: X.excerpt,
|
|
172
|
+
contentMarkdown: X.contentMarkdown,
|
|
171
173
|
bodyFormat: "markdown",
|
|
172
|
-
coverImageUrl:
|
|
173
|
-
coverGradient:
|
|
174
|
-
publishedAt:
|
|
175
|
-
upstreamUpdatedAt:
|
|
176
|
-
tags:
|
|
177
|
-
authors:
|
|
178
|
-
category:
|
|
179
|
-
locale:
|
|
180
|
-
} :
|
|
181
|
-
if (_(
|
|
174
|
+
coverImageUrl: X.coverImageUrl,
|
|
175
|
+
coverGradient: X.coverGradient,
|
|
176
|
+
publishedAt: X.publishedAt,
|
|
177
|
+
upstreamUpdatedAt: X.upstreamUpdatedAt,
|
|
178
|
+
tags: X.tags,
|
|
179
|
+
authors: X.authors,
|
|
180
|
+
category: X.category,
|
|
181
|
+
locale: H
|
|
182
|
+
} : T(K ? G : q?.visitorNewsPost);
|
|
183
|
+
if (_(Z?.title, j), b(() => {
|
|
184
|
+
k || K || !Z?.id || B.current !== Z.id && (B.current = Z.id, z({
|
|
185
|
+
url: `/news/${Z.id}`,
|
|
186
|
+
targetType: "NEWS_POST",
|
|
187
|
+
targetRefId: Z.id
|
|
188
|
+
}));
|
|
189
|
+
}, [
|
|
190
|
+
Z?.id,
|
|
191
|
+
k,
|
|
192
|
+
K,
|
|
193
|
+
z
|
|
194
|
+
]), !Z) return J ? /* @__PURE__ */ C(O, {}) : /* @__PURE__ */ C("div", {
|
|
182
195
|
className: "flex flex-1 items-center justify-center px-6 py-12 text-center",
|
|
183
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ C("p", {
|
|
184
197
|
className: "text-sm text-wx-fg-muted",
|
|
185
|
-
children:
|
|
198
|
+
children: M("articleNotFound")
|
|
186
199
|
})
|
|
187
200
|
});
|
|
188
|
-
let
|
|
189
|
-
if (!
|
|
201
|
+
let te = P.split("-")[0].toLowerCase(), Q = Z.locale ? Z.locale.split("-")[0].toLowerCase() : null;
|
|
202
|
+
if (!k && !K && !I.contentLocaleFallback && Q !== null && Q !== te) return /* @__PURE__ */ C("div", {
|
|
190
203
|
className: "flex flex-1 items-center justify-center px-6 py-12 text-center",
|
|
191
|
-
children: /* @__PURE__ */
|
|
204
|
+
children: /* @__PURE__ */ C("p", {
|
|
192
205
|
className: "text-sm text-wx-fg-muted",
|
|
193
|
-
children:
|
|
206
|
+
children: M("articleNotTranslated")
|
|
194
207
|
})
|
|
195
208
|
});
|
|
196
|
-
let
|
|
197
|
-
return /* @__PURE__ */
|
|
209
|
+
let $ = Z.coverGradient ?? ["#1e1f21", "#121314"];
|
|
210
|
+
return /* @__PURE__ */ C(r, {
|
|
198
211
|
className: "flex-1",
|
|
199
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ w("div", {
|
|
200
213
|
className: "flex flex-col",
|
|
201
|
-
children: [/* @__PURE__ */
|
|
202
|
-
className:
|
|
214
|
+
children: [/* @__PURE__ */ C("div", {
|
|
215
|
+
className: a("relative w-full"),
|
|
203
216
|
style: {
|
|
204
217
|
aspectRatio: "16 / 9",
|
|
205
|
-
background:
|
|
218
|
+
background: Z.coverImageUrl ? `url(${Z.coverImageUrl}) center/cover` : `linear-gradient(135deg, ${$[0]}, ${$[1]})`
|
|
206
219
|
},
|
|
207
220
|
"aria-hidden": "true"
|
|
208
|
-
}), /* @__PURE__ */
|
|
221
|
+
}), /* @__PURE__ */ w("div", {
|
|
209
222
|
className: "flex flex-col gap-3 px-5 pt-5 pb-12",
|
|
210
223
|
children: [
|
|
211
|
-
|
|
224
|
+
Z.category && /* @__PURE__ */ C("p", {
|
|
212
225
|
className: "text-[11px] font-semibold tracking-[0.14em] text-wx-primary uppercase",
|
|
213
|
-
children:
|
|
226
|
+
children: Z.category.label
|
|
214
227
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ w("p", {
|
|
216
229
|
className: "flex items-center gap-2 text-xs text-wx-fg-subtle",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ C("span", { children: new Date(Z.publishedAt).toLocaleDateString(P, {
|
|
218
231
|
month: "long",
|
|
219
232
|
day: "numeric",
|
|
220
233
|
year: "numeric"
|
|
221
|
-
}) }),
|
|
234
|
+
}) }), d(Z) && Z.upstreamUpdatedAt && /* @__PURE__ */ C("span", {
|
|
222
235
|
className: "rounded-full bg-wx-bg-elevated px-1.5 py-0.5 text-[10px] font-medium text-wx-fg-muted",
|
|
223
|
-
title: new Date(
|
|
224
|
-
children:
|
|
236
|
+
title: new Date(Z.upstreamUpdatedAt).toLocaleString(P),
|
|
237
|
+
children: M("editedAt", { when: u(Z.upstreamUpdatedAt) })
|
|
225
238
|
})]
|
|
226
239
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ C("h2", {
|
|
228
241
|
className: "text-2xl leading-tight font-bold text-wx-fg",
|
|
229
|
-
children:
|
|
242
|
+
children: Z.title
|
|
230
243
|
}),
|
|
231
|
-
|
|
244
|
+
Z.authors && Z.authors.length > 0 && /* @__PURE__ */ w("p", {
|
|
232
245
|
className: "flex items-center gap-2 text-xs text-wx-fg-muted",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ C("span", {
|
|
234
247
|
className: "flex -space-x-1.5",
|
|
235
|
-
children:
|
|
248
|
+
children: Z.authors.slice(0, 3).map((e) => /* @__PURE__ */ C("span", {
|
|
236
249
|
className: "h-5 w-5 overflow-hidden rounded-full bg-wx-bg-elevated ring-1 ring-wx-bg",
|
|
237
250
|
"aria-hidden": "true",
|
|
238
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ C("img", {
|
|
239
252
|
src: e.photo.url,
|
|
240
253
|
alt: "",
|
|
241
254
|
className: "h-full w-full object-cover"
|
|
242
255
|
})
|
|
243
256
|
}, e._id))
|
|
244
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ C("span", { children: M("writtenBy", { names: Z.authors.map((e) => e.name).join(", ") }) })]
|
|
245
258
|
}),
|
|
246
|
-
|
|
259
|
+
Z.tags && Z.tags.length > 0 && /* @__PURE__ */ C("div", {
|
|
247
260
|
className: "flex flex-wrap gap-1",
|
|
248
|
-
children:
|
|
261
|
+
children: Z.tags.map((e) => /* @__PURE__ */ C("span", {
|
|
249
262
|
className: "rounded-full bg-wx-bg-elevated px-2 py-0.5 text-[11px] font-medium text-wx-fg-muted",
|
|
250
263
|
children: e.label
|
|
251
264
|
}, e.slug))
|
|
252
265
|
}),
|
|
253
|
-
|
|
266
|
+
Z.excerpt && /* @__PURE__ */ C("p", {
|
|
254
267
|
className: "text-base leading-relaxed text-wx-fg-muted",
|
|
255
|
-
children:
|
|
268
|
+
children: Z.excerpt
|
|
256
269
|
}),
|
|
257
|
-
|
|
258
|
-
content:
|
|
259
|
-
isHtml:
|
|
270
|
+
Z.contentMarkdown && /* @__PURE__ */ C(v, {
|
|
271
|
+
content: Z.contentMarkdown,
|
|
272
|
+
isHtml: Z.bodyFormat === "html" || h(Z.contentMarkdown),
|
|
260
273
|
markdownMarginClass: "mt-3"
|
|
261
274
|
}),
|
|
262
|
-
|
|
263
|
-
href:
|
|
275
|
+
Z.sourceUrl && /* @__PURE__ */ w("a", {
|
|
276
|
+
href: Z.sourceUrl,
|
|
264
277
|
target: "_blank",
|
|
265
278
|
rel: "noopener noreferrer",
|
|
266
279
|
className: "mt-4 flex items-center justify-center gap-1.5 text-xs text-wx-primary underline underline-offset-2 transition-opacity hover:opacity-80",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ C(f, { size: 12 }), /* @__PURE__ */ C("span", { children: M("readOriginal") })]
|
|
268
281
|
}),
|
|
269
|
-
|
|
270
|
-
currentId:
|
|
271
|
-
currentCategoryIds:
|
|
272
|
-
currentTagIds:
|
|
273
|
-
previewPostsById:
|
|
274
|
-
visitorRelatedRaw:
|
|
275
|
-
isDummy:
|
|
276
|
-
onOpen:
|
|
282
|
+
L && /* @__PURE__ */ C(E, {
|
|
283
|
+
currentId: Z.id,
|
|
284
|
+
currentCategoryIds: Z.categoryIds ?? [],
|
|
285
|
+
currentTagIds: Z.tagIds ?? [],
|
|
286
|
+
previewPostsById: k ? void 0 : F.previewData?.newsPostsById,
|
|
287
|
+
visitorRelatedRaw: Y?.visitorNewsRelated,
|
|
288
|
+
isDummy: k,
|
|
289
|
+
onOpen: V
|
|
277
290
|
}),
|
|
278
|
-
|
|
279
|
-
surface:
|
|
280
|
-
itemId:
|
|
281
|
-
reactionCounts:
|
|
282
|
-
viewerReaction:
|
|
283
|
-
groupItemIds: [
|
|
284
|
-
isDummy:
|
|
285
|
-
showCounts:
|
|
291
|
+
Z.id && /* @__PURE__ */ C(y, {
|
|
292
|
+
surface: ee.NEWS,
|
|
293
|
+
itemId: Z.id,
|
|
294
|
+
reactionCounts: Z.reactionCounts ?? null,
|
|
295
|
+
viewerReaction: Z.viewerReaction ?? null,
|
|
296
|
+
groupItemIds: [Z.id, ...(Z.translations ?? []).map((e) => e.id)],
|
|
297
|
+
isDummy: k,
|
|
298
|
+
showCounts: R,
|
|
286
299
|
className: "mt-6"
|
|
287
300
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
currentLocale:
|
|
290
|
-
locales:
|
|
291
|
-
allowedLocales:
|
|
292
|
-
onSelect:
|
|
293
|
-
let t = (
|
|
294
|
-
t &&
|
|
301
|
+
/* @__PURE__ */ C(g, {
|
|
302
|
+
currentLocale: k ? H : Z.locale ?? P,
|
|
303
|
+
locales: k ? [...m] : (Z.translations ?? []).map((e) => e.locale),
|
|
304
|
+
allowedLocales: k ? void 0 : I.supportedLocales,
|
|
305
|
+
onSelect: k ? (e) => U(e) : (e) => {
|
|
306
|
+
let t = (Z.translations ?? []).find((t) => t.locale === e);
|
|
307
|
+
t && V(t.id);
|
|
295
308
|
},
|
|
296
309
|
className: "mt-6"
|
|
297
310
|
})
|
|
@@ -300,28 +313,28 @@ function T({ id: T, isDummy: D, onOpenRelated: O, onTitleResolved: k }) {
|
|
|
300
313
|
})
|
|
301
314
|
});
|
|
302
315
|
}
|
|
303
|
-
function
|
|
304
|
-
return /* @__PURE__ */
|
|
316
|
+
function O() {
|
|
317
|
+
return /* @__PURE__ */ C(r, {
|
|
305
318
|
className: "flex-1",
|
|
306
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ w("div", {
|
|
307
320
|
className: "flex flex-col",
|
|
308
321
|
"aria-busy": "true",
|
|
309
322
|
"aria-live": "polite",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ C("div", {
|
|
311
324
|
className: "w-full animate-pulse bg-wx-bg-elevated",
|
|
312
325
|
style: { aspectRatio: "16 / 9" }
|
|
313
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ w("div", {
|
|
314
327
|
className: "px-5 pt-5 pb-12",
|
|
315
328
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ w("div", {
|
|
317
330
|
className: "animate-pulse space-y-2.5",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ C("div", { className: "h-5 w-3/4 rounded-md bg-wx-bg-elevated" }), /* @__PURE__ */ C("div", { className: "h-5 w-1/2 rounded-md bg-wx-bg-elevated" })]
|
|
319
332
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ C("div", {
|
|
321
334
|
className: "mt-4 flex items-center gap-2 animate-pulse",
|
|
322
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ C("div", { className: "h-3 w-24 rounded-md bg-wx-bg-elevated" })
|
|
323
336
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ C("div", {
|
|
325
338
|
className: "mt-6 space-y-2.5 animate-pulse",
|
|
326
339
|
children: [
|
|
327
340
|
"w-full",
|
|
@@ -330,7 +343,7 @@ function E() {
|
|
|
330
343
|
"w-full",
|
|
331
344
|
"w-9/12",
|
|
332
345
|
"w-7/12"
|
|
333
|
-
].map((e, t) => /* @__PURE__ */
|
|
346
|
+
].map((e, t) => /* @__PURE__ */ C("div", { className: a("h-3 rounded-md bg-wx-bg-elevated", e) }, t))
|
|
334
347
|
})
|
|
335
348
|
]
|
|
336
349
|
})]
|
|
@@ -338,6 +351,6 @@ function E() {
|
|
|
338
351
|
});
|
|
339
352
|
}
|
|
340
353
|
//#endregion
|
|
341
|
-
export {
|
|
354
|
+
export { D as NewsArticleView };
|
|
342
355
|
|
|
343
|
-
//# sourceMappingURL=widget-react-
|
|
356
|
+
//# sourceMappingURL=widget-react-BPNfTldJ.js.map
|
|
@@ -11,7 +11,7 @@ import "react";
|
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react-dom/client";
|
|
14
|
-
import { t as e } from "./widget-react-
|
|
14
|
+
import { t as e } from "./widget-react-krPPnv02.js";
|
|
15
15
|
var t = e("send", [["path", {
|
|
16
16
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
17
17
|
key: "1ffxy3"
|
|
@@ -22,4 +22,4 @@ var t = e("send", [["path", {
|
|
|
22
22
|
//#endregion
|
|
23
23
|
export { t };
|
|
24
24
|
|
|
25
|
-
//# sourceMappingURL=widget-react-
|
|
25
|
+
//# sourceMappingURL=widget-react-BlTmXnei.js.map
|
|
@@ -11,7 +11,7 @@ import "react";
|
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react-dom/client";
|
|
14
|
-
import { t as e } from "./widget-react-
|
|
14
|
+
import { t as e } from "./widget-react-krPPnv02.js";
|
|
15
15
|
var t = e("external-link", [
|
|
16
16
|
["path", {
|
|
17
17
|
d: "M15 3h6v6",
|
|
@@ -29,4 +29,4 @@ var t = e("external-link", [
|
|
|
29
29
|
//#endregion
|
|
30
30
|
export { t };
|
|
31
31
|
|
|
32
|
-
//# sourceMappingURL=widget-react-
|
|
32
|
+
//# sourceMappingURL=widget-react-CIy9jXND.js.map
|