@burdenoff/microfe-comradecircle 2026.720.2 → 2026.720.3
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/comradecircle/ComradeCircleRoutes.d.ts.map +1 -1
- package/dist/comradecircle/ComradeCircleRoutes.js +39 -34
- package/dist/comradecircle/ComradeCircleRoutes.js.map +1 -1
- package/dist/comradecircle/components/CommentThread.js +1 -1
- package/dist/comradecircle/components/MemberIdentity.js +1 -1
- package/dist/comradecircle/components/MobileBottomNav.d.ts +4 -0
- package/dist/comradecircle/components/MobileBottomNav.d.ts.map +1 -0
- package/dist/comradecircle/components/MobileBottomNav.js +65 -0
- package/dist/comradecircle/components/MobileBottomNav.js.map +1 -0
- package/dist/comradecircle/components/PostCard.d.ts +3 -1
- package/dist/comradecircle/components/PostCard.d.ts.map +1 -1
- package/dist/comradecircle/components/PostCard.js +86 -73
- package/dist/comradecircle/components/PostCard.js.map +1 -1
- package/dist/comradecircle/components/PostComposer.d.ts +7 -1
- package/dist/comradecircle/components/PostComposer.d.ts.map +1 -1
- package/dist/comradecircle/components/PostComposer.js +53 -49
- package/dist/comradecircle/components/PostComposer.js.map +1 -1
- package/dist/comradecircle/components/ReactionBar.js +1 -1
- package/dist/comradecircle/components/index.d.ts +1 -0
- package/dist/comradecircle/components/index.d.ts.map +1 -1
- package/dist/comradecircle/hooks/useComradeCircleApi.js +37 -22
- package/dist/comradecircle/hooks/useComradeCircleApi.js.map +1 -1
- package/dist/comradecircle/index.js +1 -1
- package/dist/comradecircle/pages/FeedPage.js +1 -1
- package/dist/comradecircle/pages/circles/CircleDetailPage.js +242 -219
- package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
- package/dist/comradecircle/pages/circles/CirclesPage.d.ts.map +1 -1
- package/dist/comradecircle/pages/circles/CirclesPage.js +72 -39
- package/dist/comradecircle/pages/circles/CirclesPage.js.map +1 -1
- package/dist/comradecircle/pages/events/EventDetailPage.js +1 -1
- package/dist/comradecircle/pages/events/EventsPage.js +1 -1
- package/dist/comradecircle/pages/members/MemberProfilePage.js +1 -1
- package/dist/comradecircle/pages/members/MembersPage.js +1 -1
- package/dist/comradecircle/pages/posts/PostThreadPage.d.ts +14 -0
- package/dist/comradecircle/pages/posts/PostThreadPage.d.ts.map +1 -0
- package/dist/comradecircle/pages/posts/PostThreadPage.js +48 -0
- package/dist/comradecircle/pages/posts/PostThreadPage.js.map +1 -0
- package/dist/comradecircle/pages/profile/MyProfilePage.js +1 -1
- package/package.json +1 -1
|
@@ -1,87 +1,91 @@
|
|
|
1
1
|
import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
|
|
2
2
|
import "../context/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cn as t } from "../utils/cn.js";
|
|
4
|
+
import { useComCreatePost as n } from "../hooks/useComradeCircleApi.js";
|
|
4
5
|
import "../hooks/index.js";
|
|
5
|
-
import { Avatar as
|
|
6
|
-
import { describeError as
|
|
7
|
-
import { AttachmentPicker as
|
|
8
|
-
import { TagInput as
|
|
9
|
-
import { useState as
|
|
10
|
-
import { Send as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Button as
|
|
6
|
+
import { Avatar as r } from "./Avatar.js";
|
|
7
|
+
import { describeError as i, notify as a } from "../lib/toast.js";
|
|
8
|
+
import { AttachmentPicker as o } from "./ImageAttachments.js";
|
|
9
|
+
import { TagInput as s } from "./TagInput.js";
|
|
10
|
+
import { useState as c } from "react";
|
|
11
|
+
import { Megaphone as l, Send as u } from "lucide-react";
|
|
12
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
13
|
+
import { Button as m, GlassCard as h, Textarea as g } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
//#region src/comradecircle/components/PostComposer.tsx
|
|
14
|
-
function
|
|
15
|
-
let { currentUser:
|
|
16
|
-
let e =
|
|
17
|
-
if (!(!e &&
|
|
18
|
-
await
|
|
19
|
-
channelId:
|
|
15
|
+
function _({ channelId: _, channelName: v, onPosted: y, variant: b = "default" }) {
|
|
16
|
+
let x = b === "announcement", { currentUser: S } = e(), C = n(), [w, T] = c(""), [E, D] = c([]), [O, k] = c(!1), [A, j] = c([]), M = async () => {
|
|
17
|
+
let e = w.trim();
|
|
18
|
+
if (!(!e && A.length === 0)) try {
|
|
19
|
+
await C.mutateAsync({
|
|
20
|
+
channelId: _,
|
|
20
21
|
body: e,
|
|
21
|
-
tags:
|
|
22
|
-
attachmentFileIds:
|
|
23
|
-
}),
|
|
22
|
+
tags: E.length ? E : null,
|
|
23
|
+
attachmentFileIds: A.length ? A : null
|
|
24
|
+
}), T(""), D([]), j([]), k(!1), a.success(x ? "Announcement published" : "Posted", v ? `Shared to #${v}` : void 0), y?.();
|
|
24
25
|
} catch (e) {
|
|
25
|
-
|
|
26
|
+
a.error("Could not publish post", i(e));
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ p(h, {
|
|
29
30
|
treatment: "plain",
|
|
30
|
-
className: "p-4",
|
|
31
|
-
children: /* @__PURE__ */
|
|
31
|
+
className: t("p-4", x && "border-2 border-[color:var(--color-accent)]"),
|
|
32
|
+
children: [x && /* @__PURE__ */ p("div", {
|
|
33
|
+
className: "mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-accent",
|
|
34
|
+
children: [/* @__PURE__ */ f(l, { className: "h-3.5 w-3.5" }), " New announcement"]
|
|
35
|
+
}), /* @__PURE__ */ p("div", {
|
|
32
36
|
className: "flex gap-3",
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
-
name:
|
|
37
|
+
children: [/* @__PURE__ */ f(r, {
|
|
38
|
+
name: S?.name ?? S?.email ?? "You",
|
|
35
39
|
size: "md"
|
|
36
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ p("div", {
|
|
37
41
|
className: "flex-1",
|
|
38
42
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
value:
|
|
41
|
-
onChange: (e) =>
|
|
42
|
-
placeholder:
|
|
43
|
+
/* @__PURE__ */ f(g, {
|
|
44
|
+
value: w,
|
|
45
|
+
onChange: (e) => T(e.target.value),
|
|
46
|
+
placeholder: x ? `Broadcast an announcement to #${v ?? "this channel"}…` : v ? `Share something in #${v}…` : "Share something…",
|
|
43
47
|
rows: 2,
|
|
44
48
|
className: "resize-none border-0 bg-transparent px-0 shadow-none focus-visible:ring-0",
|
|
45
49
|
onKeyDown: (e) => {
|
|
46
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(),
|
|
50
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), M());
|
|
47
51
|
}
|
|
48
52
|
}),
|
|
49
|
-
|
|
53
|
+
O && /* @__PURE__ */ f("div", {
|
|
50
54
|
className: "mt-2",
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
-
value:
|
|
53
|
-
onChange:
|
|
55
|
+
children: /* @__PURE__ */ f(s, {
|
|
56
|
+
value: E,
|
|
57
|
+
onChange: D,
|
|
54
58
|
placeholder: "Add topics…"
|
|
55
59
|
})
|
|
56
60
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ f("div", {
|
|
58
62
|
className: "mt-2",
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
fileIds:
|
|
61
|
-
onChange:
|
|
62
|
-
disabled:
|
|
63
|
+
children: /* @__PURE__ */ f(o, {
|
|
64
|
+
fileIds: A,
|
|
65
|
+
onChange: j,
|
|
66
|
+
disabled: C.isPending
|
|
63
67
|
})
|
|
64
68
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ p("div", {
|
|
66
70
|
className: "mt-3 flex items-center justify-between",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ f("button", {
|
|
68
72
|
type: "button",
|
|
69
|
-
onClick: () =>
|
|
73
|
+
onClick: () => k((e) => !e),
|
|
70
74
|
className: "text-xs font-medium text-text-secondary transition-colors hover:text-text-primary",
|
|
71
|
-
children:
|
|
72
|
-
}), /* @__PURE__ */
|
|
75
|
+
children: O ? "Hide topics" : "# Add topics"
|
|
76
|
+
}), /* @__PURE__ */ f(m, {
|
|
73
77
|
size: "sm",
|
|
74
|
-
onClick:
|
|
75
|
-
disabled: !
|
|
76
|
-
children: [/* @__PURE__ */ l(
|
|
78
|
+
onClick: M,
|
|
79
|
+
disabled: !w.trim() && A.length === 0 || C.isPending,
|
|
80
|
+
children: x ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, { className: "mr-1.5 h-4 w-4" }), " Broadcast"] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(u, { className: "mr-1.5 h-4 w-4" }), " Post"] })
|
|
77
81
|
})]
|
|
78
82
|
})
|
|
79
83
|
]
|
|
80
84
|
})]
|
|
81
|
-
})
|
|
85
|
+
})]
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
88
|
//#endregion
|
|
85
|
-
export {
|
|
89
|
+
export { _ as PostComposer };
|
|
86
90
|
|
|
87
91
|
//# sourceMappingURL=PostComposer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComposer.js","names":[],"sources":["../../../src/comradecircle/components/PostComposer.tsx"],"sourcesContent":["/**\n * PostComposer — compose and publish a post to a channel.\n * @module comradecircle/components\n *\n * Writes `comCreatePost({ channelId, body, tags })`. Text + tags only (file\n * attachments are a future enhancement — the svc accepts attachmentFileIds but\n * file upload/preview is out of scope for v1).\n */\n\nimport { useState } from 'react';\nimport { Send } from 'lucide-react';\nimport { Button, Textarea, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { TagInput } from './TagInput';\nimport { Avatar } from './Avatar';\nimport { AttachmentPicker } from './ImageAttachments';\nimport { useComCreatePost } from '../hooks';\nimport { useComradeCircle } from '../context';\nimport { notify, describeError } from '../lib/toast';\n\ninterface PostComposerProps {\n channelId: string;\n channelName?: string;\n onPosted?: () => void;\n}\n\nexport function PostComposer({
|
|
1
|
+
{"version":3,"file":"PostComposer.js","names":[],"sources":["../../../src/comradecircle/components/PostComposer.tsx"],"sourcesContent":["/**\n * PostComposer — compose and publish a post to a channel.\n * @module comradecircle/components\n *\n * Writes `comCreatePost({ channelId, body, tags })`. Text + tags only (file\n * attachments are a future enhancement — the svc accepts attachmentFileIds but\n * file upload/preview is out of scope for v1).\n */\n\nimport { useState } from 'react';\nimport { Send, Megaphone } from 'lucide-react';\nimport { Button, Textarea, GlassCard } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { TagInput } from './TagInput';\nimport { Avatar } from './Avatar';\nimport { AttachmentPicker } from './ImageAttachments';\nimport { useComCreatePost } from '../hooks';\nimport { useComradeCircle } from '../context';\nimport { notify, describeError } from '../lib/toast';\n\ninterface PostComposerProps {\n channelId: string;\n channelName?: string;\n onPosted?: () => void;\n /**\n * 'announcement' renders the manager-only broadcast composer with distinct\n * styling (accent border + \"New announcement\" affordance) per BOFF-3969's\n * mock; 'default' is the regular post composer used on TEXT/FORUM channels.\n */\n variant?: 'default' | 'announcement';\n}\n\nexport function PostComposer({\n channelId,\n channelName,\n onPosted,\n variant = 'default',\n}: PostComposerProps) {\n const isAnnouncement = variant === 'announcement';\n const { currentUser } = useComradeCircle();\n const createPost = useComCreatePost();\n const [body, setBody] = useState('');\n const [tags, setTags] = useState<string[]>([]);\n const [showTags, setShowTags] = useState(false);\n const [attachmentFileIds, setAttachmentFileIds] = useState<string[]>([]);\n\n const submit = async () => {\n const text = body.trim();\n if (!text && attachmentFileIds.length === 0) return;\n try {\n await createPost.mutateAsync({\n channelId,\n body: text,\n tags: tags.length ? tags : null,\n attachmentFileIds: attachmentFileIds.length ? attachmentFileIds : null,\n });\n setBody('');\n setTags([]);\n setAttachmentFileIds([]);\n setShowTags(false);\n notify.success(\n isAnnouncement ? 'Announcement published' : 'Posted',\n channelName ? `Shared to #${channelName}` : undefined\n );\n onPosted?.();\n } catch (err) {\n notify.error('Could not publish post', describeError(err));\n }\n };\n\n return (\n <GlassCard\n treatment=\"plain\"\n className={cn('p-4', isAnnouncement && 'border-2 border-[color:var(--color-accent)]')}\n >\n {isAnnouncement && (\n <div className=\"mb-3 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-accent\">\n <Megaphone className=\"h-3.5 w-3.5\" /> New announcement\n </div>\n )}\n <div className=\"flex gap-3\">\n <Avatar name={currentUser?.name ?? currentUser?.email ?? 'You'} size=\"md\" />\n <div className=\"flex-1\">\n <Textarea\n value={body}\n onChange={(e) => setBody(e.target.value)}\n placeholder={\n isAnnouncement\n ? `Broadcast an announcement to #${channelName ?? 'this channel'}…`\n : channelName\n ? `Share something in #${channelName}…`\n : 'Share something…'\n }\n rows={2}\n className=\"resize-none border-0 bg-transparent px-0 shadow-none focus-visible:ring-0\"\n onKeyDown={(e) => {\n if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n void submit();\n }\n }}\n />\n {showTags && (\n <div className=\"mt-2\">\n <TagInput value={tags} onChange={setTags} placeholder=\"Add topics…\" />\n </div>\n )}\n <div className=\"mt-2\">\n <AttachmentPicker\n fileIds={attachmentFileIds}\n onChange={setAttachmentFileIds}\n disabled={createPost.isPending}\n />\n </div>\n <div className=\"mt-3 flex items-center justify-between\">\n <button\n type=\"button\"\n onClick={() => setShowTags((s) => !s)}\n className=\"text-xs font-medium text-text-secondary transition-colors hover:text-text-primary\"\n >\n {showTags ? 'Hide topics' : '# Add topics'}\n </button>\n <Button\n size=\"sm\"\n onClick={submit}\n disabled={(!body.trim() && attachmentFileIds.length === 0) || createPost.isPending}\n >\n {isAnnouncement ? (\n <>\n <Megaphone className=\"mr-1.5 h-4 w-4\" /> Broadcast\n </>\n ) : (\n <>\n <Send className=\"mr-1.5 h-4 w-4\" /> Post\n </>\n )}\n </Button>\n </div>\n </div>\n </div>\n </Glass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,KAC/D,IACE,uBAAuB,EAAY,KACnC;MAER,MAAM;MACN,WAAU;MACV,YAAY,MAAM;OAChB,AAAI,EAAE,QAAQ,YAAY,EAAE,WAAW,EAAE,aACvC,EAAE,eAAe,GACjB,EAAY;MAEhB;KACD,CAAA;KACA,KACC,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OAAU,OAAO;OAAM,UAAU;OAAS,aAAY;MAAe,CAAA;KAClE,CAAA;KAEP,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OACE,SAAS;OACT,UAAU;OACV,UAAU,EAAW;MACtB,CAAA;KACE,CAAA;KACL,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,UAAD;OACE,MAAK;OACL,eAAe,GAAa,MAAM,CAAC,CAAC;OACpC,WAAU;iBAET,IAAW,gBAAgB;MACtB,CAAA,GACR,kBAAC,GAAD;OACE,MAAK;OACL,SAAS;OACT,UAAW,CAAC,EAAK,KAAK,KAAK,EAAkB,WAAW,KAAM,EAAW;iBAExE,IACC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,EAAW,WAAU,iBAAkB,CAAA,GAAC,YACxC,EAAA,CAAA,IAEF,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,EAAM,WAAU,iBAAkB,CAAA,GAAC,OACnC,EAAA,CAAA;MAEE,CAAA,CACL;;IACF;KACF;IACI;;AAEf"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useComradeCircle as e } from "../context/ComradeCircleContext.js";
|
|
2
|
-
import { cn as t } from "../utils/cn.js";
|
|
3
2
|
import "../context/index.js";
|
|
3
|
+
import { cn as t } from "../utils/cn.js";
|
|
4
4
|
import { useComReactToPost as n } from "../hooks/useComradeCircleApi.js";
|
|
5
5
|
import "../hooks/index.js";
|
|
6
6
|
import { describeError as r, notify as i } from "../lib/toast.js";
|
|
@@ -12,6 +12,7 @@ export { FilterTabs, type FilterOption } from './FilterTabs';
|
|
|
12
12
|
export { Tabs, type TabItem } from './Tabs';
|
|
13
13
|
export { Pagination } from './Pagination';
|
|
14
14
|
export { MiniBar } from './MiniBar';
|
|
15
|
+
export { MobileBottomNav } from './MobileBottomNav';
|
|
15
16
|
export { Avatar, initialsOf } from './Avatar';
|
|
16
17
|
export { FileImage } from './FileImage';
|
|
17
18
|
export { AvatarUploadField } from './AvatarUploadField';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/comradecircle/components/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CA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21 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
209
209
|
}, n)).comListPosts, E)
|
|
210
210
|
});
|
|
211
211
|
}, z = (t) => {
|
|
212
|
+
let { apiGatewayUrl: n } = e();
|
|
213
|
+
return r({
|
|
214
|
+
queryKey: c.post(t ?? ""),
|
|
215
|
+
enabled: !!t,
|
|
216
|
+
queryFn: async () => {
|
|
217
|
+
let e = await s(`query ComPost($id: ID!) {
|
|
218
|
+
comPost(id: $id) {
|
|
219
|
+
${g}
|
|
220
|
+
comments { ${m(h)} }
|
|
221
|
+
}
|
|
222
|
+
}`, { id: t }, n);
|
|
223
|
+
return e.comPost ? E(e.comPost) : null;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
}, B = (t) => {
|
|
212
227
|
let { apiGatewayUrl: n } = e();
|
|
213
228
|
return r({
|
|
214
229
|
queryKey: [...c.feed, t],
|
|
@@ -218,7 +233,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
218
233
|
}
|
|
219
234
|
}`, { pagination: u(t) }, n)).comMyFeed, E)
|
|
220
235
|
});
|
|
221
|
-
},
|
|
236
|
+
}, V = () => {
|
|
222
237
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
223
238
|
return n({
|
|
224
239
|
mutationFn: async (e) => E((await s(`mutation ComCreatePost($input: ComCreatePostInput!) {
|
|
@@ -228,7 +243,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
228
243
|
r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.feed });
|
|
229
244
|
}
|
|
230
245
|
});
|
|
231
|
-
},
|
|
246
|
+
}, H = () => {
|
|
232
247
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
233
248
|
return n({
|
|
234
249
|
mutationFn: async (e) => E((await s(`mutation ComUpdatePost($id: ID!, $input: ComUpdatePostInput!) {
|
|
@@ -238,7 +253,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
238
253
|
r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.post(e.id) }), r.invalidateQueries({ queryKey: c.feed });
|
|
239
254
|
}
|
|
240
255
|
});
|
|
241
|
-
},
|
|
256
|
+
}, U = () => {
|
|
242
257
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
243
258
|
return n({
|
|
244
259
|
mutationFn: async (e) => (await s("mutation ComRemovePost($id: ID!) { comRemovePost(id: $id) }", { id: e.id }, t)).comRemovePost,
|
|
@@ -246,7 +261,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
246
261
|
t.channelId && r.invalidateQueries({ queryKey: c.posts(t.channelId) }), r.invalidateQueries({ queryKey: c.feed });
|
|
247
262
|
}
|
|
248
263
|
});
|
|
249
|
-
},
|
|
264
|
+
}, ee = () => {
|
|
250
265
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
251
266
|
return n({
|
|
252
267
|
mutationFn: async (e) => E((await s(`mutation ComReactToPost($postId: ID!, $type: ComReactionType!) {
|
|
@@ -256,7 +271,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
256
271
|
r.invalidateQueries({ queryKey: c.posts(e.channelId) }), r.invalidateQueries({ queryKey: c.post(e.id) }), r.invalidateQueries({ queryKey: c.feed });
|
|
257
272
|
}
|
|
258
273
|
});
|
|
259
|
-
},
|
|
274
|
+
}, W = (t) => {
|
|
260
275
|
let { apiGatewayUrl: n } = e();
|
|
261
276
|
return r({
|
|
262
277
|
queryKey: c.comments(t ?? ""),
|
|
@@ -265,7 +280,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
265
280
|
comListComments(postId: $postId) { ${m(h)} }
|
|
266
281
|
}`, { postId: t }, n)).comListComments)
|
|
267
282
|
});
|
|
268
|
-
},
|
|
283
|
+
}, G = () => {
|
|
269
284
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
270
285
|
return n({
|
|
271
286
|
mutationFn: async (e) => (await s(`mutation ComAddComment($input: ComCreateCommentInput!) {
|
|
@@ -275,7 +290,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
275
290
|
r.invalidateQueries({ queryKey: c.comments(e.postId) }), r.invalidateQueries({ queryKey: c.post(e.postId) }), r.invalidateQueries({ queryKey: c.feed });
|
|
276
291
|
}
|
|
277
292
|
});
|
|
278
|
-
},
|
|
293
|
+
}, K = (t) => {
|
|
279
294
|
let { apiGatewayUrl: n } = e();
|
|
280
295
|
return r({
|
|
281
296
|
queryKey: [...c.follows, t ?? "all"],
|
|
@@ -283,7 +298,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
283
298
|
comMyFollows(targetType: $targetType) { ${m(C)} }
|
|
284
299
|
}`, { targetType: t }, n)).comMyFollows)
|
|
285
300
|
});
|
|
286
|
-
},
|
|
301
|
+
}, q = () => {
|
|
287
302
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
288
303
|
return n({
|
|
289
304
|
mutationFn: async (e) => (await s(`mutation ComFollow($input: ComFollowInput!) {
|
|
@@ -293,7 +308,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
293
308
|
r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
|
|
294
309
|
}
|
|
295
310
|
});
|
|
296
|
-
},
|
|
311
|
+
}, J = () => {
|
|
297
312
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
298
313
|
return n({
|
|
299
314
|
mutationFn: async (e) => (await s("mutation ComUnfollow($input: ComFollowInput!) { comUnfollow(input: $input) }", { input: e }, t)).comUnfollow,
|
|
@@ -301,7 +316,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
301
316
|
r.invalidateQueries({ queryKey: c.follows }), r.invalidateQueries({ queryKey: c.feed });
|
|
302
317
|
}
|
|
303
318
|
});
|
|
304
|
-
},
|
|
319
|
+
}, Y = (t = {}) => {
|
|
305
320
|
let { apiGatewayUrl: n } = e();
|
|
306
321
|
return r({
|
|
307
322
|
queryKey: [...c.events, t],
|
|
@@ -315,7 +330,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
315
330
|
pagination: u(t.pagination)
|
|
316
331
|
}, n)).comListEvents, O)
|
|
317
332
|
});
|
|
318
|
-
},
|
|
333
|
+
}, X = (t) => {
|
|
319
334
|
let { apiGatewayUrl: n } = e();
|
|
320
335
|
return r({
|
|
321
336
|
queryKey: c.event(t ?? ""),
|
|
@@ -330,7 +345,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
330
345
|
return e.comEvent ? O(e.comEvent) : null;
|
|
331
346
|
}
|
|
332
347
|
});
|
|
333
|
-
},
|
|
348
|
+
}, Z = () => {
|
|
334
349
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
335
350
|
return n({
|
|
336
351
|
mutationFn: async (e) => O((await s(`mutation ComCreateEvent($input: ComCreateEventInput!) {
|
|
@@ -338,7 +353,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
338
353
|
}`, { input: e }, t)).comCreateEvent),
|
|
339
354
|
onSuccess: () => r.invalidateQueries({ queryKey: c.events })
|
|
340
355
|
});
|
|
341
|
-
},
|
|
356
|
+
}, Q = () => {
|
|
342
357
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
343
358
|
return n({
|
|
344
359
|
mutationFn: async (e) => O((await s(`mutation ComTransitionEvent($id: ID!, $status: ComEventStatus!) {
|
|
@@ -348,7 +363,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
348
363
|
r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.id) });
|
|
349
364
|
}
|
|
350
365
|
});
|
|
351
|
-
},
|
|
366
|
+
}, $ = () => {
|
|
352
367
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
353
368
|
return n({
|
|
354
369
|
mutationFn: async (e) => (await s(`mutation ComRsvpEvent($eventId: ID!, $status: ComRsvpStatus!, $note: String) {
|
|
@@ -358,7 +373,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
358
373
|
r.invalidateQueries({ queryKey: c.events }), r.invalidateQueries({ queryKey: c.event(e.eventId) });
|
|
359
374
|
}
|
|
360
375
|
});
|
|
361
|
-
},
|
|
376
|
+
}, te = (t, n) => {
|
|
362
377
|
let { apiGatewayUrl: i } = e();
|
|
363
378
|
return r({
|
|
364
379
|
queryKey: [...c.polls(t ?? ""), n ?? "all"],
|
|
@@ -370,7 +385,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
370
385
|
status: n
|
|
371
386
|
}, i)).comListPolls).map(D)
|
|
372
387
|
});
|
|
373
|
-
},
|
|
388
|
+
}, ne = () => {
|
|
374
389
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
375
390
|
return n({
|
|
376
391
|
mutationFn: async (e) => D((await s(`mutation ComCreatePoll($input: ComCreatePollInput!) {
|
|
@@ -378,13 +393,13 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
378
393
|
}`, { input: e }, t)).comCreatePoll),
|
|
379
394
|
onSuccess: (e) => r.invalidateQueries({ queryKey: c.polls(e.circleId) })
|
|
380
395
|
});
|
|
381
|
-
},
|
|
396
|
+
}, re = () => {
|
|
382
397
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
383
398
|
return n({
|
|
384
399
|
mutationFn: async (e) => D((await s(`mutation ComClosePoll($id: ID!) { comClosePoll(id: $id) { ${v} } }`, { id: e }, t)).comClosePoll),
|
|
385
400
|
onSuccess: (e) => r.invalidateQueries({ queryKey: c.polls(e.circleId) })
|
|
386
401
|
});
|
|
387
|
-
},
|
|
402
|
+
}, ie = () => {
|
|
388
403
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
389
404
|
return n({
|
|
390
405
|
mutationFn: async (e) => (await s(`mutation ComVotePoll($pollId: ID!, $optionId: ID!) {
|
|
@@ -397,7 +412,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
397
412
|
t.circleId && r.invalidateQueries({ queryKey: c.polls(t.circleId) }), r.invalidateQueries({ queryKey: c.poll(t.pollId) });
|
|
398
413
|
}
|
|
399
414
|
});
|
|
400
|
-
},
|
|
415
|
+
}, ae = (t = {}) => {
|
|
401
416
|
let { apiGatewayUrl: n } = e();
|
|
402
417
|
return r({
|
|
403
418
|
queryKey: [...c.profiles, t],
|
|
@@ -411,7 +426,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
411
426
|
pagination: u(t.pagination)
|
|
412
427
|
}, n)).comListProfiles
|
|
413
428
|
});
|
|
414
|
-
},
|
|
429
|
+
}, oe = (t) => {
|
|
415
430
|
let { apiGatewayUrl: n } = e();
|
|
416
431
|
return r({
|
|
417
432
|
queryKey: c.profile(t ?? ""),
|
|
@@ -421,7 +436,7 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
421
436
|
comProfile(memberId: $memberId) { ${x} }
|
|
422
437
|
}`, { memberId: t }, n)).comProfile
|
|
423
438
|
});
|
|
424
|
-
},
|
|
439
|
+
}, se = () => {
|
|
425
440
|
let { apiGatewayUrl: t } = e(), r = i();
|
|
426
441
|
return n({
|
|
427
442
|
mutationFn: async (e) => (await s(`mutation ComUpsertProfile($input: ComUpsertProfileInput!) {
|
|
@@ -433,6 +448,6 @@ var o = (e) => /^\s*mutation\b/.test(e), s = async (e, n, r) => {
|
|
|
433
448
|
});
|
|
434
449
|
};
|
|
435
450
|
//#endregion
|
|
436
|
-
export {
|
|
451
|
+
export { G as useComAddComment, j as useComCircle, A as useComCircles, re as useComClosePoll, W as useComComments, L as useComCreateChannel, M as useComCreateCircle, Z as useComCreateEvent, ne as useComCreatePoll, V as useComCreatePost, X as useComEvent, Y as useComEvents, q as useComFollow, N as useComJoinCircle, P as useComLeaveCircle, I as useComMemberships, B as useComMyFeed, K as useComMyFollows, te as useComPolls, z as useComPost, R as useComPosts, oe as useComProfile, ae as useComProfiles, ee as useComReactToPost, U as useComRemovePost, $ as useComRsvpEvent, F as useComSetMemberRole, Q as useComTransitionEvent, J as useComUnfollow, H as useComUpdatePost, se as useComUpsertProfile, ie as useComVotePoll };
|
|
437
452
|
|
|
438
453
|
//# sourceMappingURL=useComradeCircleApi.js.map
|