@burdenoff/microfe-conversations 2026.625.1 → 2026.625.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.
@@ -8,9 +8,9 @@ import { Activity as c, Archive as l, CheckCircle2 as u, Package as d, ShieldChe
8
8
  import { gql as m } from "@apollo/client";
9
9
  import { useMutation as h, useQuery as g } from "@apollo/client/react";
10
10
  import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
- import { Button as y, CTAOverflowMenu as b, GlassCard as x, ShowMore as S } from "@burdenoff/fe-libs/ui";
11
+ import { Button as y, CTAOverflowMenu as b, GlassCard as x, PagePurpose as S, ShowMore as C } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/conversations/pages/ConversationAdminPages.tsx
13
- var C = m`
13
+ var w = m`
14
14
  query ConversationAdminMessageReports(
15
15
  $first: Int
16
16
  $filter: MessageReportFilter
@@ -38,7 +38,7 @@ var C = m`
38
38
  }
39
39
  }
40
40
  }
41
- `, w = m`
41
+ `, T = m`
42
42
  mutation ConversationAdminResolveMessageReport(
43
43
  $input: ResolveMessageReportInput!
44
44
  ) {
@@ -53,7 +53,7 @@ var C = m`
53
53
  }
54
54
  }
55
55
  }
56
- `, T = m`
56
+ `, E = m`
57
57
  query ConversationAdminBulkConversations(
58
58
  $first: Int
59
59
  $filter: ConversationFilter
@@ -70,7 +70,7 @@ var C = m`
70
70
  }
71
71
  }
72
72
  }
73
- `, E = m`
73
+ `, D = m`
74
74
  mutation ConversationAdminBulkUpdate(
75
75
  $input: BulkConversationOperationInput!
76
76
  ) {
@@ -86,7 +86,7 @@ var C = m`
86
86
  }
87
87
  }
88
88
  }
89
- `, D = m`
89
+ `, O = m`
90
90
  query ConversationAdminAuditLog($filter: ActivityLogFilter) {
91
91
  getActivities(filter: $filter) {
92
92
  id
@@ -98,7 +98,7 @@ var C = m`
98
98
  timestamp
99
99
  }
100
100
  }
101
- `, O = m`
101
+ `, k = m`
102
102
  query ConversationAdminAppInstallations($workspaceId: ID) {
103
103
  appInstallations(workspaceId: $workspaceId) {
104
104
  id
@@ -112,7 +112,7 @@ var C = m`
112
112
  updatedAt
113
113
  }
114
114
  }
115
- `, k = m`
115
+ `, A = m`
116
116
  mutation ConversationAdminInstallApp($input: InstallAppInput!) {
117
117
  installApp(input: $input) {
118
118
  id
@@ -122,7 +122,7 @@ var C = m`
122
122
  installedAt
123
123
  }
124
124
  }
125
- `, A = m`
125
+ `, j = m`
126
126
  mutation ConversationAdminUpdateAppSettings($id: ID!, $settings: JSON!) {
127
127
  updateAppSettings(id: $id, settings: $settings) {
128
128
  id
@@ -130,7 +130,7 @@ var C = m`
130
130
  updatedAt
131
131
  }
132
132
  }
133
- `, j = m`
133
+ `, M = m`
134
134
  mutation ConversationAdminUninstallApp($id: ID!) {
135
135
  uninstallApp(id: $id) {
136
136
  appInstallationId
@@ -138,7 +138,7 @@ var C = m`
138
138
  }
139
139
  }
140
140
  `;
141
- function M(e) {
141
+ function N(e) {
142
142
  if (typeof e == "string") return e;
143
143
  if (e && typeof e == "object" && "text" in e) {
144
144
  let t = e.text;
@@ -150,27 +150,27 @@ function M(e) {
150
150
  return "Message content unavailable";
151
151
  }
152
152
  }
153
- var N = new Intl.DateTimeFormat(void 0, {
153
+ var P = new Intl.DateTimeFormat(void 0, {
154
154
  dateStyle: "medium",
155
155
  timeStyle: "short"
156
156
  });
157
- function P(e) {
158
- return N.format(new Date(e));
157
+ function F(e) {
158
+ return P.format(new Date(e));
159
159
  }
160
- function F({ children: e }) {
160
+ function I({ children: e }) {
161
161
  return /* @__PURE__ */ _("span", {
162
162
  className: "rounded-full border border-border-subtle bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
163
163
  children: e
164
164
  });
165
165
  }
166
- function I() {
167
- let n = t(), { workspaceId: a } = e(), { data: o, loading: s, error: c, refetch: l } = g(C, {
166
+ function L() {
167
+ let n = t(), { workspaceId: a } = e(), { data: o, loading: s, error: c, refetch: l } = g(w, {
168
168
  variables: {
169
169
  first: 50,
170
170
  filter: { statuses: ["PENDING", "REVIEWING"] }
171
171
  },
172
172
  skip: !a
173
- }), [d, { loading: p }] = h(w, { onCompleted: () => void l() }), m = o?.messageReports.edges.map((e) => e.node) ?? [];
173
+ }), [d, { loading: p }] = h(T, { onCompleted: () => void l() }), m = o?.messageReports.edges.map((e) => e.node) ?? [];
174
174
  return /* @__PURE__ */ v(i, {
175
175
  title: n("conversations.admin.moderationPageTitle", "Moderation queue"),
176
176
  subtitle: n("conversations.admin.moderationPageDescription", "Review reported messages and apply moderator decisions."),
@@ -180,13 +180,21 @@ function I() {
180
180
  }),
181
181
  maxWidth: "2xl",
182
182
  children: [
183
+ /* @__PURE__ */ _(S, {
184
+ icon: /* @__PURE__ */ _(f, {
185
+ className: "size-4",
186
+ "aria-hidden": "true"
187
+ }),
188
+ children: n("conversations.admin.moderationPurpose", "Keep conversations safe: people can report messages they find abusive, spammy, or off-topic, and they land here for a moderator to hide the message or dismiss the report. Work the queue down to zero to stay on top of issues.")
189
+ }),
183
190
  !a && /* @__PURE__ */ _(r, {
184
191
  title: n("conversations.admin.selectWorkspace", "Select a workspace"),
185
192
  description: n("conversations.admin.selectWorkspaceModerationDescription", "Choose a workspace to review reported conversation messages."),
186
193
  icon: /* @__PURE__ */ _(f, {
187
194
  className: "size-6",
188
195
  "aria-hidden": "true"
189
- })
196
+ }),
197
+ illustration: "empty-generic"
190
198
  }),
191
199
  a && s && /* @__PURE__ */ _("p", {
192
200
  className: "text-sm text-text-secondary",
@@ -202,7 +210,8 @@ function I() {
202
210
  icon: /* @__PURE__ */ _(u, {
203
211
  className: "size-6",
204
212
  "aria-hidden": "true"
205
- })
213
+ }),
214
+ illustration: "empty-notifications"
206
215
  }),
207
216
  /* @__PURE__ */ _("div", {
208
217
  className: "grid gap-3",
@@ -217,11 +226,11 @@ function I() {
217
226
  /* @__PURE__ */ v("div", {
218
227
  className: "flex flex-wrap items-center gap-2",
219
228
  children: [
220
- /* @__PURE__ */ _(F, { children: e.status }),
221
- e.message.isHidden && /* @__PURE__ */ _(F, { children: "Hidden" }),
229
+ /* @__PURE__ */ _(I, { children: e.status }),
230
+ e.message.isHidden && /* @__PURE__ */ _(I, { children: "Hidden" }),
222
231
  /* @__PURE__ */ v("span", {
223
232
  className: "text-xs text-text-secondary",
224
- children: ["Reported ", P(e.createdAt)]
233
+ children: ["Reported ", F(e.createdAt)]
225
234
  })
226
235
  ]
227
236
  }),
@@ -231,7 +240,7 @@ function I() {
231
240
  }),
232
241
  /* @__PURE__ */ _("p", {
233
242
  className: "rounded-md border border-border-seam bg-bg-sunken p-3 text-sm text-text-secondary",
234
- children: M(e.message.content)
243
+ children: N(e.message.content)
235
244
  }),
236
245
  /* @__PURE__ */ v("p", {
237
246
  className: "text-xs text-text-secondary",
@@ -273,13 +282,13 @@ function I() {
273
282
  ]
274
283
  });
275
284
  }
276
- function L() {
277
- let n = t(), { workspaceId: a } = e(), [o, c] = s(() => /* @__PURE__ */ new Set()), [u, d] = s("ARCHIVE"), { data: f, loading: p, error: m, refetch: b } = g(T, {
285
+ function R() {
286
+ let n = t(), { workspaceId: a } = e(), [o, c] = s(() => /* @__PURE__ */ new Set()), [u, d] = s("ARCHIVE"), { data: f, loading: p, error: m, refetch: b } = g(E, {
278
287
  variables: { first: 100 },
279
288
  skip: !a
280
- }), [S, { data: C, loading: w }] = h(E, { onCompleted: () => {
289
+ }), [C, { data: w, loading: T }] = h(D, { onCompleted: () => {
281
290
  c(/* @__PURE__ */ new Set()), b();
282
- } }), D = f?.conversations.edges.map((e) => e.node) ?? [], O = (e) => {
291
+ } }), O = f?.conversations.edges.map((e) => e.node) ?? [], k = (e) => {
283
292
  c((t) => {
284
293
  let n = new Set(t);
285
294
  return n.has(e) ? n.delete(e) : n.add(e), n;
@@ -317,8 +326,8 @@ function L() {
317
326
  }), /* @__PURE__ */ v(y, {
318
327
  type: "button",
319
328
  size: "sm",
320
- disabled: o.size === 0 || w,
321
- onClick: () => void S({ variables: { input: {
329
+ disabled: o.size === 0 || T,
330
+ onClick: () => void C({ variables: { input: {
322
331
  conversationIds: Array.from(o),
323
332
  action: u
324
333
  } } }),
@@ -326,13 +335,21 @@ function L() {
326
335
  })]
327
336
  }),
328
337
  children: [
338
+ /* @__PURE__ */ _(S, {
339
+ icon: /* @__PURE__ */ _(l, {
340
+ className: "size-4",
341
+ "aria-hidden": "true"
342
+ }),
343
+ children: n("conversations.admin.bulkPurpose", "Clean up at scale instead of one conversation at a time — select many conversations, then archive them to declutter inboxes, unarchive to restore, or delete the ones you no longer need. Handy for closing out finished projects or removing test threads.")
344
+ }),
329
345
  !a && /* @__PURE__ */ _(r, {
330
346
  title: n("conversations.admin.selectWorkspace", "Select a workspace"),
331
347
  description: n("conversations.admin.selectWorkspaceBulkDescription", "Choose a workspace to manage conversations in bulk."),
332
348
  icon: /* @__PURE__ */ _(l, {
333
349
  className: "size-6",
334
350
  "aria-hidden": "true"
335
- })
351
+ }),
352
+ illustration: "empty-generic"
336
353
  }),
337
354
  a && p && /* @__PURE__ */ _("p", {
338
355
  className: "text-sm text-text-secondary",
@@ -342,18 +359,19 @@ function L() {
342
359
  className: "text-sm text-status-error-text",
343
360
  children: m.message
344
361
  }),
345
- C?.bulkUpdateConversations && /* @__PURE__ */ v(x, {
362
+ w?.bulkUpdateConversations && /* @__PURE__ */ v(x, {
346
363
  treatment: "metric",
364
+ glow: !0,
347
365
  className: "grid grid-cols-2 gap-4 border-border-seam p-4 sm:max-w-md",
348
366
  children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
349
367
  className: "text-2xl font-semibold tabular-nums text-status-success-text",
350
- children: C.bulkUpdateConversations.successCount
368
+ children: w.bulkUpdateConversations.successCount
351
369
  }), /* @__PURE__ */ _("p", {
352
370
  className: "text-xs text-text-secondary",
353
371
  children: "Succeeded"
354
372
  })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
355
373
  className: "text-2xl font-semibold tabular-nums text-text-primary",
356
- children: C.bulkUpdateConversations.failureCount
374
+ children: w.bulkUpdateConversations.failureCount
357
375
  }), /* @__PURE__ */ _("p", {
358
376
  className: "text-xs text-text-secondary",
359
377
  children: "Failed"
@@ -361,13 +379,13 @@ function L() {
361
379
  }),
362
380
  a && /* @__PURE__ */ _("div", {
363
381
  className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface",
364
- children: D.map((e) => /* @__PURE__ */ v("label", {
382
+ children: O.map((e) => /* @__PURE__ */ v("label", {
365
383
  className: "flex min-h-11 cursor-pointer items-center gap-3 border-b border-border-seam px-4 py-3 last:border-b-0 hover:bg-accent",
366
384
  children: [/* @__PURE__ */ _("input", {
367
385
  type: "checkbox",
368
386
  "aria-label": `Select ${e.title || "untitled conversation"}`,
369
387
  checked: o.has(e.id),
370
- onChange: () => O(e.id)
388
+ onChange: () => k(e.id)
371
389
  }), /* @__PURE__ */ v("div", {
372
390
  className: "min-w-0 flex-1",
373
391
  children: [/* @__PURE__ */ _("p", {
@@ -381,7 +399,7 @@ function L() {
381
399
  e.state,
382
400
  " · Updated",
383
401
  " ",
384
- P(e.updatedAt)
402
+ F(e.updatedAt)
385
403
  ]
386
404
  })]
387
405
  })]
@@ -390,8 +408,8 @@ function L() {
390
408
  ]
391
409
  });
392
410
  }
393
- function R() {
394
- let n = t(), { workspaceId: a } = e(), { data: o, loading: s, error: l } = g(D, {
411
+ function z() {
412
+ let n = t(), { workspaceId: a } = e(), { data: o, loading: s, error: l } = g(O, {
395
413
  variables: { filter: {
396
414
  workspaceId: a,
397
415
  resourceType: "conversation",
@@ -408,6 +426,13 @@ function R() {
408
426
  }),
409
427
  maxWidth: "2xl",
410
428
  children: [
429
+ /* @__PURE__ */ _(S, {
430
+ icon: /* @__PURE__ */ _(c, {
431
+ className: "size-4",
432
+ "aria-hidden": "true"
433
+ }),
434
+ children: n("conversations.admin.auditPurpose", "An accountability trail of who changed what — every admin and moderator action on workspace conversations is recorded here. Use it to investigate an incident, confirm a change was made, or satisfy a compliance review.")
435
+ }),
411
436
  s && /* @__PURE__ */ _("p", {
412
437
  className: "text-sm text-text-secondary",
413
438
  children: "Loading activity…"
@@ -418,7 +443,8 @@ function R() {
418
443
  }),
419
444
  !s && !l && u.length === 0 && /* @__PURE__ */ _(r, {
420
445
  title: "No activity found",
421
- description: "Conversation admin actions will appear here."
446
+ description: "Conversation admin actions will appear here.",
447
+ illustration: "empty-data"
422
448
  }),
423
449
  /* @__PURE__ */ _("div", {
424
450
  className: "grid gap-3",
@@ -433,7 +459,7 @@ function R() {
433
459
  children: e.action
434
460
  }), /* @__PURE__ */ _("span", {
435
461
  className: "text-xs tabular-nums text-text-secondary",
436
- children: P(e.timestamp)
462
+ children: F(e.timestamp)
437
463
  })]
438
464
  }),
439
465
  /* @__PURE__ */ _("p", {
@@ -455,20 +481,20 @@ function R() {
455
481
  ]
456
482
  });
457
483
  }
458
- function z() {
459
- let r = t(), { workspaceId: c } = e(), [l, u] = s(""), [f, m] = s("{}"), [C, w] = s({}), [T, E] = s(null), { data: D, loading: M, error: N, refetch: I } = g(O, {
484
+ function B() {
485
+ let r = t(), { workspaceId: c } = e(), [l, u] = s(""), [f, m] = s("{}"), [w, T] = s({}), [E, D] = s(null), { data: O, loading: N, error: P, refetch: L } = g(k, {
460
486
  variables: { workspaceId: c },
461
487
  skip: !c
462
- }), [L, { loading: R }] = h(k, { onCompleted: () => void I() }), [z, { loading: B }] = h(A, { onCompleted: () => void I() }), [V, { loading: H }] = h(j, { onCompleted: () => void I() }), U = o(() => D?.appInstallations ?? [], [D?.appInstallations]);
488
+ }), [R, { loading: z }] = h(A, { onCompleted: () => void L() }), [B, { loading: V }] = h(j, { onCompleted: () => void L() }), [H, { loading: U }] = h(M, { onCompleted: () => void L() }), W = o(() => O?.appInstallations ?? [], [O?.appInstallations]);
463
489
  a(() => {
464
- w((e) => {
465
- if (U.every((t) => e[t.id])) return e;
490
+ T((e) => {
491
+ if (W.every((t) => e[t.id])) return e;
466
492
  let t = { ...e };
467
- for (let e of U) t[e.id] || (t[e.id] = JSON.stringify(e.settings ?? {}, null, 2));
493
+ for (let e of W) t[e.id] || (t[e.id] = JSON.stringify(e.settings ?? {}, null, 2));
468
494
  return t;
469
495
  });
470
- }, [U]);
471
- let W = (e) => {
496
+ }, [W]);
497
+ let G = (e) => {
472
498
  try {
473
499
  let t = JSON.parse(e);
474
500
  return t && typeof t == "object" && !Array.isArray(t) ? t : null;
@@ -485,11 +511,20 @@ function z() {
485
511
  }),
486
512
  maxWidth: "2xl",
487
513
  children: [
514
+ /* @__PURE__ */ _(S, {
515
+ icon: /* @__PURE__ */ _(d, {
516
+ className: "size-4",
517
+ "aria-hidden": "true"
518
+ }),
519
+ children: r("conversations.admin.appsPurpose", "Extend conversations with apps and integrations — install bots, automations, or third-party connectors scoped to this workspace, adjust their settings, and remove the ones you no longer use.")
520
+ }),
488
521
  /* @__PURE__ */ v(n, {
489
522
  title: "Install app",
490
523
  description: "Install a workspace-scoped conversation app by app ID.",
491
- children: [/* @__PURE__ */ v("div", {
492
- className: "grid gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 sm:grid-cols-[minmax(0,1fr)_minmax(0,2fr)_auto]",
524
+ children: [/* @__PURE__ */ v(x, {
525
+ treatment: "glass",
526
+ glow: !0,
527
+ className: "grid gap-3 border-border-seam p-4 sm:grid-cols-[minmax(0,1fr)_minmax(0,2fr)_auto]",
493
528
  children: [
494
529
  /* @__PURE__ */ _("input", {
495
530
  value: l,
@@ -508,14 +543,14 @@ function z() {
508
543
  /* @__PURE__ */ _(y, {
509
544
  type: "button",
510
545
  size: "sm",
511
- disabled: R,
546
+ disabled: z,
512
547
  onClick: () => {
513
- let e = W(f);
548
+ let e = G(f);
514
549
  if (!l.trim() || !e) {
515
- E("Enter an app ID and a valid JSON settings object.");
550
+ D("Enter an app ID and a valid JSON settings object.");
516
551
  return;
517
552
  }
518
- E(null), L({ variables: { input: {
553
+ D(null), R({ variables: { input: {
519
554
  appId: l.trim(),
520
555
  workspaceId: c,
521
556
  settings: e
@@ -524,22 +559,22 @@ function z() {
524
559
  children: "Install"
525
560
  })
526
561
  ]
527
- }), T && /* @__PURE__ */ _("p", {
562
+ }), E && /* @__PURE__ */ _("p", {
528
563
  className: "text-sm text-status-error-text",
529
- children: T
564
+ children: E
530
565
  })]
531
566
  }),
532
- M && /* @__PURE__ */ _("p", {
567
+ N && /* @__PURE__ */ _("p", {
533
568
  className: "text-sm text-text-secondary",
534
569
  children: "Loading app installations…"
535
570
  }),
536
- N && /* @__PURE__ */ _("p", {
571
+ P && /* @__PURE__ */ _("p", {
537
572
  className: "text-sm text-status-error-text",
538
- children: N.message
573
+ children: P.message
539
574
  }),
540
575
  /* @__PURE__ */ _("div", {
541
576
  className: "grid gap-3",
542
- children: U.map((e) => /* @__PURE__ */ v(x, {
577
+ children: W.map((e) => /* @__PURE__ */ v(x, {
543
578
  treatment: "glass",
544
579
  className: "border-border-seam p-4",
545
580
  children: [/* @__PURE__ */ v("div", {
@@ -551,7 +586,7 @@ function z() {
551
586
  children: [/* @__PURE__ */ _("h3", {
552
587
  className: "text-sm font-semibold text-text-primary",
553
588
  children: e.appId
554
- }), /* @__PURE__ */ _(F, { children: e.state })]
589
+ }), /* @__PURE__ */ _(I, { children: e.state })]
555
590
  }), /* @__PURE__ */ v("p", {
556
591
  className: "text-xs text-text-secondary",
557
592
  children: [
@@ -562,7 +597,7 @@ function z() {
562
597
  e.installedBy,
563
598
  " on",
564
599
  " ",
565
- P(e.installedAt)
600
+ F(e.installedAt)
566
601
  ]
567
602
  })]
568
603
  }), /* @__PURE__ */ _(b, {
@@ -570,17 +605,17 @@ function z() {
570
605
  actions: [{
571
606
  label: "Uninstall",
572
607
  intent: "destructive",
573
- disabled: H,
608
+ disabled: U,
574
609
  icon: /* @__PURE__ */ _(p, {
575
610
  className: "size-4",
576
611
  "aria-hidden": "true"
577
612
  }),
578
613
  onSelect: () => {
579
- window.confirm(`Uninstall ${e.appId}? This removes the app and its settings from this workspace.`) && V({ variables: { id: e.id } });
614
+ window.confirm(`Uninstall ${e.appId}? This removes the app and its settings from this workspace.`) && H({ variables: { id: e.id } });
580
615
  }
581
616
  }]
582
617
  })]
583
- }), /* @__PURE__ */ _(S, {
618
+ }), /* @__PURE__ */ _(C, {
584
619
  className: "mt-3",
585
620
  collapsedHeight: 0,
586
621
  label: "Edit settings (JSON)",
@@ -589,8 +624,8 @@ function z() {
589
624
  children: [/* @__PURE__ */ _("textarea", {
590
625
  rows: 5,
591
626
  "aria-label": `Settings for ${e.appId}`,
592
- value: C[e.id] ?? "{}",
593
- onChange: (t) => w((n) => ({
627
+ value: w[e.id] ?? "{}",
628
+ onChange: (t) => T((n) => ({
594
629
  ...n,
595
630
  [e.id]: t.target.value
596
631
  })),
@@ -599,15 +634,15 @@ function z() {
599
634
  type: "button",
600
635
  variant: "secondary",
601
636
  size: "sm",
602
- disabled: B,
637
+ disabled: V,
603
638
  className: "w-fit",
604
639
  onClick: () => {
605
- let t = W(C[e.id] ?? "{}");
640
+ let t = G(w[e.id] ?? "{}");
606
641
  if (!t) {
607
- E("Installation settings must be a valid JSON object.");
642
+ D("Installation settings must be a valid JSON object.");
608
643
  return;
609
644
  }
610
- E(null), z({ variables: {
645
+ D(null), B({ variables: {
611
646
  id: e.id,
612
647
  settings: t
613
648
  } });
@@ -622,6 +657,6 @@ function z() {
622
657
  });
623
658
  }
624
659
  //#endregion
625
- export { z as AppInstallationsPage, L as BulkOperationsPage, R as ConversationAuditLogPage, I as ModerationQueuePage };
660
+ export { B as AppInstallationsPage, R as BulkOperationsPage, z as ConversationAuditLogPage, L as ModerationQueuePage };
626
661
 
627
662
  //# sourceMappingURL=ConversationAdminPages.js.map