@apolitical/component-library 3.5.17 → 3.5.19-ac.1

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
@@ -11206,96 +11206,95 @@ const ll = ({
11206
11206
  list: (v) => i.list({ ...v, reactionId: r })
11207
11207
  }
11208
11208
  });
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 }
11209
+ return /* @__PURE__ */ a.jsx(
11210
+ Mc,
11211
+ {
11212
+ loadMore: { isLoading: l, hasNextPage: d, loadNextPage: () => c() },
11213
+ form: {
11214
+ content: {
11215
+ type: "reply",
11216
+ slugs: {
11217
+ question: `${t}/${e}`,
11218
+ answer: n,
11219
+ reply: r
11220
+ }
11228
11221
  },
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
- {
11252
- content: {
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: $
11222
+ functions: {
11223
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11224
+ create: (v, { body: y }) => u({ activityId: n, replyId: r, content: y })
11225
+ },
11226
+ meta: { isEditing: !1, showSuccessMessage: !1 }
11227
+ },
11228
+ children: o && o.length > 0 ? o == null ? void 0 : o.map((v) => {
11229
+ var A, W, Z, z, K, T, P, I, q, U, te, G;
11230
+ const {
11231
+ id: y,
11232
+ own_children: _,
11233
+ latest_children: S,
11234
+ children_counts: j
11235
+ } = 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) => {
11236
+ var ee;
11237
+ return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (b == null ? void 0 : b.id);
11238
+ }) : !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) => {
11239
+ var ee, re, O;
11240
+ return {
11241
+ id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
11242
+ name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
11243
+ };
11244
+ }) : !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 : (
11245
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11246
+ ((P = (T = v == null ? void 0 : v.data) == null ? void 0 : T.content) == null ? void 0 : P.text) || ""
11247
+ );
11248
+ return /* @__PURE__ */ a.jsx(
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
11279
11263
  },
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
- }
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: $
11293
11278
  },
11294
- y
11295
- );
11296
- }) : null
11297
- }
11298
- );
11279
+ functions: {
11280
+ content: {
11281
+ createContent: () => null,
11282
+ deleteContent: () => p({ replyId: y }),
11283
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11284
+ updateContent: (V, { body: ee }) => m({ replyId: y, content: ee })
11285
+ },
11286
+ likes: {
11287
+ createLike: () => f({ replyId: y }),
11288
+ deleteLike: () => h({ replyId: y, reactionId: R })
11289
+ },
11290
+ comments: {}
11291
+ }
11292
+ },
11293
+ y
11294
+ );
11295
+ }) : null
11296
+ }
11297
+ );
11299
11298
  };
11300
11299
  const ul = ({
11301
11300
  basePath: t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "3.5.17",
3
+ "version": "3.5.19-ac.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {