@apolitical/component-library 3.5.17-ac.0 → 3.5.17-ac.2
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.js +2 -2
- package/index.mjs +90 -89
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -7664,7 +7664,8 @@ const uc = ({
|
|
|
7664
7664
|
"aria-haspopup": "true",
|
|
7665
7665
|
"aria-expanded": o,
|
|
7666
7666
|
"aria-controls": e,
|
|
7667
|
-
screenreaderText: s.formatMessage({ id: "moreMenu" })
|
|
7667
|
+
screenreaderText: s.formatMessage({ id: "moreMenu" }),
|
|
7668
|
+
className: "more-menu-button"
|
|
7668
7669
|
}
|
|
7669
7670
|
),
|
|
7670
7671
|
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: u, text: m, icon: f, ...p }, h) => {
|
|
@@ -7682,7 +7683,7 @@ const uc = ({
|
|
|
7682
7683
|
}, 100);
|
|
7683
7684
|
}
|
|
7684
7685
|
};
|
|
7685
|
-
return l && (b.href = l), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7686
|
+
return l && (b.href = l), /* @__PURE__ */ a.jsx("li", { className: "more-menu-list-item", children: /* @__PURE__ */ a.jsx(
|
|
7686
7687
|
ie,
|
|
7687
7688
|
{
|
|
7688
7689
|
variant: "tertiary",
|
|
@@ -9685,7 +9686,6 @@ const Me = "discussion_", $c = 280, ln = ({
|
|
|
9685
9686
|
O.preventDefault(), O.stopPropagation(), f.comments && (window.location.href = f.comments), typeof m == "function" && m();
|
|
9686
9687
|
},
|
|
9687
9688
|
icon: { icon: "speech-bubble_square_thick" },
|
|
9688
|
-
href: f.comments ? f.comments : !1,
|
|
9689
9689
|
"data-gtm-event-context": h,
|
|
9690
9690
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9691
9691
|
screenreaderText: y.formatMessage(
|
|
@@ -11206,95 +11206,96 @@ const ll = ({
|
|
|
11206
11206
|
list: (v) => i.list({ ...v, reactionId: r })
|
|
11207
11207
|
}
|
|
11208
11208
|
});
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11209
|
+
if (o.length !== 0)
|
|
11210
|
+
return /* @__PURE__ */ a.jsx(
|
|
11211
|
+
Mc,
|
|
11212
|
+
{
|
|
11213
|
+
loadMore: { isLoading: l, hasNextPage: d, loadNextPage: () => c() },
|
|
11214
|
+
form: {
|
|
11215
|
+
content: {
|
|
11216
|
+
type: "reply",
|
|
11217
|
+
slugs: {
|
|
11218
|
+
question: `${t}/${e}`,
|
|
11219
|
+
answer: n,
|
|
11220
|
+
reply: r
|
|
11221
|
+
}
|
|
11222
|
+
},
|
|
11223
|
+
functions: {
|
|
11224
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11225
|
+
create: (v, { body: y }) => u({ activityId: n, replyId: r, content: y })
|
|
11226
|
+
},
|
|
11227
|
+
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
11225
11228
|
},
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
ln,
|
|
11250
|
-
{
|
|
11251
|
-
content: {
|
|
11252
|
-
id: y,
|
|
11253
|
-
type: "reply",
|
|
11254
|
-
body: N,
|
|
11255
|
-
canLike: k,
|
|
11256
|
-
createdAt: v == null ? void 0 : v.created_at,
|
|
11257
|
-
slugs: {
|
|
11258
|
-
question: `${t}/${e}`,
|
|
11259
|
-
answer: n,
|
|
11260
|
-
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
11261
|
-
// The `reply` is currently used to define the form ID which handles the focus
|
|
11262
|
-
reply: v == null ? void 0 : v.parent
|
|
11263
|
-
},
|
|
11264
|
-
slug: "",
|
|
11265
|
-
author: {
|
|
11266
|
-
id: C == null ? void 0 : C.id,
|
|
11267
|
-
name: (I = C.data) == null ? void 0 : I.name,
|
|
11268
|
-
organization: (q = C.data) == null ? void 0 : q.organization,
|
|
11269
|
-
jobTitle: (U = C.data) == null ? void 0 : U.jobTitle,
|
|
11270
|
-
location: (te = C.data) == null ? void 0 : te.location,
|
|
11271
|
-
image: {
|
|
11272
|
-
thumbnail: ((G = C.data) == null ? void 0 : G.thumbnail) || void 0
|
|
11273
|
-
}
|
|
11274
|
-
},
|
|
11275
|
-
userLiked: X,
|
|
11276
|
-
likes: (j == null ? void 0 : j.like) || 0,
|
|
11277
|
-
peopleWhoLiked: $
|
|
11278
|
-
},
|
|
11279
|
-
functions: {
|
|
11229
|
+
children: o && o.length > 0 ? o == null ? void 0 : o.map((v) => {
|
|
11230
|
+
var A, W, Z, z, K, T, P, I, q, U, te, G;
|
|
11231
|
+
const {
|
|
11232
|
+
id: y,
|
|
11233
|
+
own_children: _,
|
|
11234
|
+
latest_children: S,
|
|
11235
|
+
children_counts: j
|
|
11236
|
+
} = v, F = (((A = _ == null ? void 0 : _.like) == null ? void 0 : A.length) || 0) > 0 ? (W = _ == null ? void 0 : _.like) == null ? void 0 : W.find((V) => {
|
|
11237
|
+
var ee;
|
|
11238
|
+
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (b == null ? void 0 : b.id);
|
|
11239
|
+
}) : !1, R = F ? F == null ? void 0 : F.id : "", X = !!F, $ = (((Z = S == null ? void 0 : S.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = S == null ? void 0 : S.like) == null ? void 0 : z.map((V) => {
|
|
11240
|
+
var ee, re, O;
|
|
11241
|
+
return {
|
|
11242
|
+
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11243
|
+
name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
|
|
11244
|
+
};
|
|
11245
|
+
}) : !1, C = v == null ? void 0 : v.user, w = (C == null ? void 0 : C.id) === (b == null ? void 0 : b.id), k = cn(s, w), N = typeof v.data.content == "string" ? (K = v == null ? void 0 : v.data) == null ? void 0 : K.content : (
|
|
11246
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11247
|
+
((P = (T = v == null ? void 0 : v.data) == null ? void 0 : T.content) == null ? void 0 : P.text) || ""
|
|
11248
|
+
);
|
|
11249
|
+
return /* @__PURE__ */ a.jsx(
|
|
11250
|
+
ln,
|
|
11251
|
+
{
|
|
11280
11252
|
content: {
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11253
|
+
id: y,
|
|
11254
|
+
type: "reply",
|
|
11255
|
+
body: N,
|
|
11256
|
+
canLike: k,
|
|
11257
|
+
createdAt: v == null ? void 0 : v.created_at,
|
|
11258
|
+
slugs: {
|
|
11259
|
+
question: `${t}/${e}`,
|
|
11260
|
+
answer: n,
|
|
11261
|
+
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
11262
|
+
// The `reply` is currently used to define the form ID which handles the focus
|
|
11263
|
+
reply: v == null ? void 0 : v.parent
|
|
11264
|
+
},
|
|
11265
|
+
slug: "",
|
|
11266
|
+
author: {
|
|
11267
|
+
id: C == null ? void 0 : C.id,
|
|
11268
|
+
name: (I = C.data) == null ? void 0 : I.name,
|
|
11269
|
+
organization: (q = C.data) == null ? void 0 : q.organization,
|
|
11270
|
+
jobTitle: (U = C.data) == null ? void 0 : U.jobTitle,
|
|
11271
|
+
location: (te = C.data) == null ? void 0 : te.location,
|
|
11272
|
+
image: {
|
|
11273
|
+
thumbnail: ((G = C.data) == null ? void 0 : G.thumbnail) || void 0
|
|
11274
|
+
}
|
|
11275
|
+
},
|
|
11276
|
+
userLiked: X,
|
|
11277
|
+
likes: (j == null ? void 0 : j.like) || 0,
|
|
11278
|
+
peopleWhoLiked: $
|
|
11289
11279
|
},
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11280
|
+
functions: {
|
|
11281
|
+
content: {
|
|
11282
|
+
createContent: () => null,
|
|
11283
|
+
deleteContent: () => p({ replyId: y }),
|
|
11284
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11285
|
+
updateContent: (V, { body: ee }) => m({ replyId: y, content: ee })
|
|
11286
|
+
},
|
|
11287
|
+
likes: {
|
|
11288
|
+
createLike: () => f({ replyId: y }),
|
|
11289
|
+
deleteLike: () => h({ replyId: y, reactionId: R })
|
|
11290
|
+
},
|
|
11291
|
+
comments: {}
|
|
11292
|
+
}
|
|
11293
|
+
},
|
|
11294
|
+
y
|
|
11295
|
+
);
|
|
11296
|
+
}) : null
|
|
11297
|
+
}
|
|
11298
|
+
);
|
|
11298
11299
|
};
|
|
11299
11300
|
const ul = ({
|
|
11300
11301
|
basePath: t,
|