@apolitical/component-library 1.15.2 → 1.15.4-beta.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/index.mjs CHANGED
@@ -2188,7 +2188,7 @@ const Rt = "communityDetails_", Ja = ({
2188
2188
  members: { number: r = 0, data: i = [] } = { number: 0, data: [] },
2189
2189
  functions: { invite: d, ...u }
2190
2190
  }) => {
2191
- const a = D(), l = 5, o = r || i.length, m = i.length ? i : Array(l).fill({});
2191
+ const a = D(), l = 5, o = r || i.length, m = i.length ? i : Array(l).fill({}), c = `/communities/${n}/members`;
2192
2192
  return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", e), children: [
2193
2193
  /* @__PURE__ */ s.jsx(Ue, {}),
2194
2194
  /* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
@@ -2197,7 +2197,7 @@ const Rt = "communityDetails_", Ja = ({
2197
2197
  a.formatMessage({ id: `${Rt}members` }),
2198
2198
  /* @__PURE__ */ s.jsx("span", { className: "count", children: o })
2199
2199
  ] }),
2200
- /* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${Rt}viewAll` }) }) })
2200
+ c.includes(window.location.pathname) || /* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: c, children: a.formatMessage({ id: `${Rt}viewAll` }) }) })
2201
2201
  ] }),
2202
2202
  /* @__PURE__ */ s.jsx(
2203
2203
  Un,
@@ -3841,33 +3841,34 @@ const oo = ({
3841
3841
  }) });
3842
3842
  };
3843
3843
  const io = ({
3844
- members: { total: e, data: t = [] },
3845
- pagination: n,
3846
- gtmContext: r = "member",
3847
- gtmType: i = "member-click",
3848
- className: d = ""
3844
+ members: { data: e = [], total: t = e.length },
3845
+ hasNextPage: n = !1,
3846
+ loadNextPage: r = () => {
3847
+ },
3848
+ gtmContext: i = "member",
3849
+ gtmType: d = "member-click",
3850
+ className: u = ""
3849
3851
  }) => {
3850
- const u = D();
3851
- return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: S("members-list", d), children: [
3852
+ const a = D();
3853
+ return e.length === 0 ? null : /* @__PURE__ */ s.jsxs("div", { className: S("members-list", u), children: [
3852
3854
  /* @__PURE__ */ s.jsxs("h1", { children: [
3853
- u.formatMessage({ id: "membersList" }),
3854
- /* @__PURE__ */ s.jsx("span", { className: "count", children: e })
3855
+ a.formatMessage({ id: "membersList" }),
3856
+ /* @__PURE__ */ s.jsx("span", { className: "count", children: t })
3855
3857
  ] }),
3856
- /* @__PURE__ */ s.jsx("ul", { children: t.map((a, l) => /* @__PURE__ */ s.jsxs("li", { children: [
3857
- /* @__PURE__ */ s.jsx(tn, { member: a, gtmContext: r, gtmType: i }),
3858
- a.isAdmin && /* @__PURE__ */ s.jsx(ft, { children: u.formatMessage({ id: "membersList_admin" }) })
3859
- ] }, l)) }),
3858
+ /* @__PURE__ */ s.jsx("ul", { children: e.map((l, o) => /* @__PURE__ */ s.jsxs("li", { children: [
3859
+ /* @__PURE__ */ s.jsx(tn, { member: l, gtmContext: i, gtmType: d }),
3860
+ l.isAdmin && /* @__PURE__ */ s.jsx(ft, { children: a.formatMessage({ id: "membersList_admin" }) })
3861
+ ] }, o)) }),
3860
3862
  n && /* @__PURE__ */ s.jsx(
3861
3863
  Er,
3862
3864
  {
3863
- hasNextPage: !0,
3864
- loadNextPage: () => {
3865
- },
3865
+ hasNextPage: n,
3866
+ loadNextPage: r,
3866
3867
  icon: { icon: "arrow-down", position: "right" },
3867
- gtmContext: r
3868
+ gtmContext: i
3868
3869
  }
3869
3870
  )
3870
- ] }));
3871
+ ] });
3871
3872
  };
3872
3873
  let ct = null;
3873
3874
  const ve = "discussion_form_", qn = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "1.15.2",
3
+ "version": "1.15.4-beta.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {