@apolitical/component-library 6.6.23-beta.0 → 6.6.23
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { IDiscussionForm, IDiscussionFormMeta
|
|
1
|
+
export type { IDiscussionForm, IDiscussionFormMeta } from './form.type';
|
|
2
2
|
export { default as DiscussionForm } from './form';
|
|
@@ -4,5 +4,5 @@ interface ILikeVars {
|
|
|
4
4
|
activityId: string;
|
|
5
5
|
reactionId?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError
|
|
7
|
+
export declare function useLikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, queryClient, queryKey, }: IMutationContext<ICacheSubitem, Error, ILikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<import('../../../../../../discussion/shared').IReaction, Error, ILikeVars, import('../../../../../../discussion/shared').IActivity>;
|
|
8
8
|
export {};
|
|
@@ -4,5 +4,5 @@ interface IUnlikeVars {
|
|
|
4
4
|
activityId: string;
|
|
5
5
|
reactionId?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError
|
|
7
|
+
export declare function useUnlikeActivity({ mutationFn, mutationHandlers: { mutate: mutateWrapper, error: onError }, user, }: IMutationContext<unknown, Error, IUnlikeVars, ICache>): import("@tanstack/react-query/build/legacy/types").UseMutateFunction<unknown, Error, IUnlikeVars, import('../../../../../../discussion/shared').IActivity>;
|
|
8
8
|
export {};
|
package/index.mjs
CHANGED
|
@@ -2349,18 +2349,10 @@ const Nh = ({
|
|
|
2349
2349
|
variant: "subtle",
|
|
2350
2350
|
className: V("hide-show-text-box", t),
|
|
2351
2351
|
children: [
|
|
2352
|
-
/* @__PURE__ */ c.jsx(
|
|
2353
|
-
"
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
id: e,
|
|
2357
|
-
className: V("content", h, s),
|
|
2358
|
-
children: i ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2359
|
-
/* @__PURE__ */ c.jsx(en, { options: { forceBlock: !0, ...a }, children: h === "closed" ? d : i }),
|
|
2360
|
-
h !== "closed" && o
|
|
2361
|
-
] }) : o
|
|
2362
|
-
}
|
|
2363
|
-
),
|
|
2352
|
+
/* @__PURE__ */ c.jsx("div", { ref: u, id: e, className: V("content", h, s), children: i ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2353
|
+
/* @__PURE__ */ c.jsx(en, { options: { forceBlock: !0, ...a }, children: h === "closed" ? d : i }),
|
|
2354
|
+
h !== "closed" && o
|
|
2355
|
+
] }) : o }),
|
|
2364
2356
|
/* @__PURE__ */ c.jsx("p", { className: "cta", children: /* @__PURE__ */ c.jsx(
|
|
2365
2357
|
je,
|
|
2366
2358
|
{
|
|
@@ -2537,7 +2529,9 @@ const Yh = ({ children: e, user: t, updateDetails: n }) => /* @__PURE__ */ c.jsx
|
|
|
2537
2529
|
const r = $e((a) => {
|
|
2538
2530
|
n((s) => [...s, a]);
|
|
2539
2531
|
}, []), i = $e((a) => {
|
|
2540
|
-
n(
|
|
2532
|
+
n(
|
|
2533
|
+
(s) => s.filter((o) => o !== a)
|
|
2534
|
+
);
|
|
2541
2535
|
}, []);
|
|
2542
2536
|
return /* @__PURE__ */ c.jsx(vd.Provider, { value: { registerOverlay: r, unregisterOverlay: i }, children: e });
|
|
2543
2537
|
}, Uk = ({ bootstrap: e, children: t, intl: n, showDevTools: r }) => {
|
|
@@ -2688,7 +2682,11 @@ const tp = ({
|
|
|
2688
2682
|
return /* @__PURE__ */ c.jsxs("section", { className: V("page-heading", i), children: [
|
|
2689
2683
|
/* @__PURE__ */ c.jsxs("div", { className: V("content", { "has-max-width": e }), style: s, children: [
|
|
2690
2684
|
/* @__PURE__ */ c.jsxs("div", { className: V("content-wrapper", { "has-max-width": e }), children: [
|
|
2691
|
-
t && t.text && re.createElement(
|
|
2685
|
+
t && t.text && re.createElement(
|
|
2686
|
+
t.element || "h1",
|
|
2687
|
+
{ className: "title" },
|
|
2688
|
+
t.text
|
|
2689
|
+
),
|
|
2692
2690
|
n && n.text && re.createElement(
|
|
2693
2691
|
n.element || "h2",
|
|
2694
2692
|
{ className: "text-medium" },
|
|
@@ -5451,7 +5449,9 @@ function wg({ reply: e, user: t }) {
|
|
|
5451
5449
|
like: (n = e.children_counts) != null && n.like ? e.children_counts.like - 1 : 0
|
|
5452
5450
|
}, t != null && t.id && (e.latest_children = {
|
|
5453
5451
|
...e.latest_children || {},
|
|
5454
|
-
like: (((r = e.latest_children) == null ? void 0 : r.like) || []).filter(
|
|
5452
|
+
like: (((r = e.latest_children) == null ? void 0 : r.like) || []).filter(
|
|
5453
|
+
({ user_id: a }) => a !== t.id
|
|
5454
|
+
)
|
|
5455
5455
|
}, e.own_children = {
|
|
5456
5456
|
...e.own_children || {},
|
|
5457
5457
|
like: (((i = e.own_children) == null ? void 0 : i.like) || []).filter(({ user_id: a }) => a !== t.id)
|
|
@@ -28304,10 +28304,7 @@ function K_({
|
|
|
28304
28304
|
}
|
|
28305
28305
|
function Z_({
|
|
28306
28306
|
mutationFn: e,
|
|
28307
|
-
mutationHandlers: {
|
|
28308
|
-
mutate: t,
|
|
28309
|
-
error: n
|
|
28310
|
-
},
|
|
28307
|
+
mutationHandlers: { mutate: t, error: n },
|
|
28311
28308
|
queryClient: r,
|
|
28312
28309
|
queryKey: i
|
|
28313
28310
|
}) {
|
|
@@ -28338,12 +28335,7 @@ function Y_({
|
|
|
28338
28335
|
return a;
|
|
28339
28336
|
}
|
|
28340
28337
|
function G_({ queryFn: e, queryKey: t }) {
|
|
28341
|
-
const {
|
|
28342
|
-
data: n,
|
|
28343
|
-
error: r,
|
|
28344
|
-
isLoading: i,
|
|
28345
|
-
isFetching: a
|
|
28346
|
-
} = Zm({
|
|
28338
|
+
const { data: n, error: r, isLoading: i, isFetching: a } = Zm({
|
|
28347
28339
|
queryFn: e,
|
|
28348
28340
|
queryKey: t
|
|
28349
28341
|
});
|
|
@@ -28401,10 +28393,7 @@ function J_({
|
|
|
28401
28393
|
}
|
|
28402
28394
|
function X_({
|
|
28403
28395
|
mutationFn: e,
|
|
28404
|
-
mutationHandlers: {
|
|
28405
|
-
mutate: t,
|
|
28406
|
-
error: n
|
|
28407
|
-
},
|
|
28396
|
+
mutationHandlers: { mutate: t, error: n },
|
|
28408
28397
|
user: r
|
|
28409
28398
|
}) {
|
|
28410
28399
|
const { mutate: i } = rt({
|