@wexio/messenger-widget-react 1.0.11 → 1.0.13
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.js +5 -5
- package/package.json +1 -1
package/dist/widget-react.js
CHANGED
|
@@ -3145,7 +3145,7 @@ function Ca({ title: e, slug: t, onOpenArticle: n, onOpenTab: r }) {
|
|
|
3145
3145
|
});
|
|
3146
3146
|
}
|
|
3147
3147
|
function wa({ block: e, onOpenTab: t, onOpenArticle: n, isDummy: r }) {
|
|
3148
|
-
let i = H("home"), a = H("demo"), o = p(), s = je(), c = e.suggestions, l = c ? Math.max(0, Math.min(c.maxItems ?? 0, 10)) : 0, u = o.previewData?.helpArticles, d = !r && !!u && l > 0, f = c?.mode === "popular" ? Ee.Popular : c?.mode === "recent" ? Ee.Recent : void 0, m = c?.mode === "category" ? c.categoryId : void 0, h = r || d || l === 0 || !c || !(c.mode === "popular" || c.mode === "recent" || c.mode === "category") || c.mode === "category" && !m, { data: g, loading: _ } = _e({
|
|
3148
|
+
let i = H("home"), a = H("demo"), o = p(), s = je(), c = e.suggestions, l = c ? c.mode === "manual" ? Math.min((c.articleIds ?? []).length, 10) : Math.max(0, Math.min(c.maxItems ?? 0, 10)) : 0, u = o.previewData?.helpArticles, d = !r && !!u && l > 0, f = c?.mode === "popular" ? Ee.Popular : c?.mode === "recent" ? Ee.Recent : void 0, m = c?.mode === "category" ? c.categoryId : void 0, h = r || d || l === 0 || !c || !(c.mode === "popular" || c.mode === "recent" || c.mode === "category") || c.mode === "category" && !m, { data: g, loading: _ } = _e({
|
|
3149
3149
|
variables: { args: {
|
|
3150
3150
|
limit: l,
|
|
3151
3151
|
locale: s,
|
|
@@ -3242,7 +3242,7 @@ function Ta({ title: e, onOpenAll: t, children: n }) {
|
|
|
3242
3242
|
//#endregion
|
|
3243
3243
|
//#region components/widget/home-blocks/blocks/news-preview.tsx
|
|
3244
3244
|
function Ea({ block: e, onOpenTab: t, isDummy: n }) {
|
|
3245
|
-
let r = H("home"), i = H("demo"), a = je(), o = p(), s = pa(), c = Math.max(1, Math.min(
|
|
3245
|
+
let r = H("home"), i = H("demo"), a = je(), o = p(), s = pa(), c = Math.max(1, Math.min(10, e.maxItems ?? 3)), l = n ? void 0 : o.previewData?.newsPosts, u = Array.isArray(l) && l.length > 0, { data: d, error: f, loading: m } = Re({
|
|
3246
3246
|
variables: { args: {
|
|
3247
3247
|
locale: a,
|
|
3248
3248
|
limit: c
|
|
@@ -3279,7 +3279,7 @@ function Ea({ block: e, onOpenTab: t, isDummy: n }) {
|
|
|
3279
3279
|
//#endregion
|
|
3280
3280
|
//#region components/widget/home-blocks/blocks/pinned-articles.tsx
|
|
3281
3281
|
function Da({ block: e, onOpenTab: t, onOpenArticle: n, isDummy: r }) {
|
|
3282
|
-
let i = H("home"), a = H("demo"), o = p(), s = je(), c = pa(), l = (e.articleIds ?? []).slice(0,
|
|
3282
|
+
let i = H("home"), a = H("demo"), o = p(), s = je(), c = pa(), l = (e.articleIds ?? []).slice(0, 10), u = l.length, d = r ? null : o.previewData?.helpArticlesById, f = !!d, { data: m } = xe({
|
|
3283
3283
|
variables: {
|
|
3284
3284
|
ids: l,
|
|
3285
3285
|
locale: s
|
|
@@ -3594,7 +3594,7 @@ function Wa({ block: e, onOpenTab: t }) {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
};
|
|
3596
3596
|
if (e.layout === "inline") {
|
|
3597
|
-
let t = e.buttons.slice(0,
|
|
3597
|
+
let t = e.buttons.slice(0, 8);
|
|
3598
3598
|
return /* @__PURE__ */ Q("div", {
|
|
3599
3599
|
className: U("grid gap-2", t.length === 1 && "grid-cols-1", t.length === 2 && "grid-cols-2", t.length === 3 && "grid-cols-3", t.length >= 4 && "grid-cols-4"),
|
|
3600
3600
|
children: t.map((e, t) => /* @__PURE__ */ Q(Ga, {
|
|
@@ -3627,7 +3627,7 @@ function Ga({ btn: e, onClick: t }) {
|
|
|
3627
3627
|
damping: 24
|
|
3628
3628
|
},
|
|
3629
3629
|
title: e.label,
|
|
3630
|
-
className: "group flex
|
|
3630
|
+
className: "group flex h-24 flex-col items-center justify-center gap-1.5 rounded-wx-lg bg-wx-bg-elevated px-2 py-3 text-wx-fg transition-colors hover:bg-wx-bg-elevated-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary",
|
|
3631
3631
|
children: [/* @__PURE__ */ Q("span", {
|
|
3632
3632
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-wx-bg transition-transform group-hover:scale-110",
|
|
3633
3633
|
children: e.icon?.kind === "media" ? /* @__PURE__ */ Q("img", {
|
package/package.json
CHANGED