@nivaro/react 0.3.46 → 0.3.48
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +248 -16
- package/dist/index.js +679 -659
- package/dist/shared/components/CollectionBrowserView.js +813 -826
- package/dist/shared/components/ErrorNotice.js +169 -0
- package/dist/shared/components/ErrorSurface.js +23 -17
- package/dist/shared/components/ListLoadError.js +8 -29
- package/dist/shared/components/LoadErrorNote.js +38 -21
- package/dist/shared/components/QueryErrorState.js +8 -11
- package/dist/shared/components/ReportView.js +1320 -1291
- package/dist/shared/components/chat/ChannelArchive.js +60 -60
- package/dist/shared/components/chat/ChannelExtras.js +74 -74
- package/dist/shared/components/chat/ChatPanel.js +368 -367
- package/dist/shared/components/command-center/PeekPanel.js +33 -32
- package/dist/shared/components/command-center/panels/BoardSettings.js +41 -40
- package/dist/shared/components/command-center/panels/PeoplePanel.js +32 -31
- package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
- package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
- package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
- package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
- package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
- package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
- package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
- package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
- package/dist/shared/components/import/ImportFromFileButton.js +61 -60
- package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
- package/dist/shared/components/imports/NewImportDialog.js +29 -28
- package/dist/shared/components/imports/RunDetailSheet.js +63 -63
- package/dist/shared/components/item-edit/FieldRow.js +329 -329
- package/dist/shared/components/item-edit/InlineTableField.js +898 -898
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
- package/dist/shared/components/item-edit/PlanGrid.js +220 -221
- package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
- package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
- package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
- package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
- package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
- package/dist/shared/components/panels/SlaClock.js +35 -36
- package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
- package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
- package/dist/shared/components/profile/AgentsPanel.js +73 -72
- package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
- package/dist/shared/components/support/SupportRequestDialog.js +85 -81
- package/dist/shared/components/support/SupportView.js +94 -87
- package/dist/shared/lib/autofill-poll.js +21 -18
- package/dist/shared/lib/error-actions.js +85 -0
- package/dist/shared/lib/error-message.js +223 -82
- package/dist/shared/lib/error-toast.js +71 -13
- package/dist/shared/lib/safe-error.js +136 -38
- package/package.json +1 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { jsxs as t, jsx as e, Fragment as
|
|
2
|
-
import { Megaphone as
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { Megaphone as H, X as $, Link2 as G, Plus as X, Check as q, UserPlus as K, History as Q } from "lucide-react";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { toast as C } from "sonner";
|
|
5
|
-
import {
|
|
5
|
+
import { userErrorMessage as V } from "../../lib/safe-error.js";
|
|
6
|
+
import { cn as i, formatRelative as Y } from "../../lib/utils.js";
|
|
6
7
|
import { Command as U, CommandInput as R, CommandList as I, CommandEmpty as J, CommandGroup as L, CommandItem as P } from "../ui/command.js";
|
|
7
8
|
import { Popover as W, PopoverTrigger as j, PopoverContent as D } from "../ui/popover.js";
|
|
8
|
-
import { SimpleSelect as
|
|
9
|
-
import { useChannelAdmin as
|
|
10
|
-
import { useTeams as
|
|
9
|
+
import { SimpleSelect as Z } from "../ui/SimpleSelect.js";
|
|
10
|
+
import { useChannelAdmin as ee, useChatRoles as B } from "./chat-core.js";
|
|
11
|
+
import { useTeams as te, useBulkInvite as ae, useChannelAudit as ne } from "./chat-hooks.js";
|
|
11
12
|
function A(l, s) {
|
|
12
|
-
|
|
13
|
-
return ((r = l == null ? void 0 : l.response) == null ? void 0 : r.error) ?? s;
|
|
13
|
+
return V(l, s);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function be({
|
|
16
16
|
channel: l,
|
|
17
17
|
th: s,
|
|
18
|
-
isAdmin:
|
|
18
|
+
isAdmin: m
|
|
19
19
|
}) {
|
|
20
|
-
const { update:
|
|
20
|
+
const { update: u } = ee(l.id), b = B(), [f, o] = p(!!l.announce), [h, w] = p(l.mention_policy ?? "owner"), [d, v] = p(l.description ?? ""), [N, g] = p(l.links ?? []), [n, y] = p(l.welcome_note ?? ""), [S, E] = p(
|
|
21
21
|
(l.default_roles ?? []).map((a) => String(a).toUpperCase())
|
|
22
|
-
), O = N.filter((a) => a.url.trim()),
|
|
22
|
+
), O = N.filter((a) => a.url.trim()), M = f !== !!l.announce || h !== (l.mention_policy ?? "owner") || d !== (l.description ?? "") || n !== (l.welcome_note ?? "") || JSON.stringify(O) !== JSON.stringify(l.links ?? []) || m && JSON.stringify([...S].sort()) !== JSON.stringify((l.default_roles ?? []).map((a) => String(a).toUpperCase()).sort()), z = () => u.mutate(
|
|
23
23
|
{
|
|
24
24
|
announce: f,
|
|
25
|
-
mention_policy:
|
|
26
|
-
description:
|
|
25
|
+
mention_policy: h,
|
|
26
|
+
description: d.trim() || null,
|
|
27
27
|
links: O.map((a) => ({
|
|
28
28
|
label: a.label.trim() || a.url.trim(),
|
|
29
29
|
url: a.url.trim()
|
|
30
30
|
})),
|
|
31
31
|
welcome_note: n.trim() || null,
|
|
32
|
-
...
|
|
32
|
+
...m ? { default_roles: S } : {}
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
onSuccess: () => C.success("Channel settings saved"),
|
|
36
36
|
onError: (a) => C.error(A(a, "Could not save the channel settings"))
|
|
37
37
|
}
|
|
38
38
|
), T = (a) => {
|
|
39
|
-
var
|
|
40
|
-
return ((
|
|
39
|
+
var r;
|
|
40
|
+
return ((r = b.find((c) => String(c.id).toUpperCase() === a)) == null ? void 0 : r.name) ?? "Unknown role";
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */ t("div", { className:
|
|
42
|
+
return /* @__PURE__ */ t("div", { className: i("space-y-3 border-t pt-3", s.divider), "data-chat-channel-extras": !0, children: [
|
|
43
43
|
/* @__PURE__ */ t("label", { className: "flex items-start gap-2 text-[12px] text-slate-700 dark:text-slate-200", children: [
|
|
44
44
|
/* @__PURE__ */ e(
|
|
45
45
|
"input",
|
|
@@ -53,7 +53,7 @@ function ue({
|
|
|
53
53
|
),
|
|
54
54
|
/* @__PURE__ */ t("span", { children: [
|
|
55
55
|
/* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1 font-medium", children: [
|
|
56
|
-
/* @__PURE__ */ e(
|
|
56
|
+
/* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
|
|
57
57
|
" Announcements only"
|
|
58
58
|
] }),
|
|
59
59
|
/* @__PURE__ */ t("span", { className: "block text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
@@ -66,9 +66,9 @@ function ue({
|
|
|
66
66
|
l.id !== 0 && /* @__PURE__ */ t("div", { "data-chat-channel-mention-policy": !0, children: [
|
|
67
67
|
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Who can use @channel and @here" }),
|
|
68
68
|
/* @__PURE__ */ e(
|
|
69
|
-
|
|
69
|
+
Z,
|
|
70
70
|
{
|
|
71
|
-
value:
|
|
71
|
+
value: h,
|
|
72
72
|
onChange: w,
|
|
73
73
|
ariaLabel: "Who can use @channel and @here",
|
|
74
74
|
className: "h-8 w-full max-w-[280px] text-[12px]",
|
|
@@ -86,11 +86,11 @@ function ue({
|
|
|
86
86
|
/* @__PURE__ */ e(
|
|
87
87
|
"textarea",
|
|
88
88
|
{
|
|
89
|
-
value:
|
|
89
|
+
value: d,
|
|
90
90
|
onChange: (a) => v(a.target.value),
|
|
91
91
|
rows: 3,
|
|
92
92
|
placeholder: "What people should know before posting here",
|
|
93
|
-
className:
|
|
93
|
+
className: i(
|
|
94
94
|
"w-full resize-none rounded-md px-2 py-1.5 text-[12.5px] outline-none",
|
|
95
95
|
s.input
|
|
96
96
|
),
|
|
@@ -100,16 +100,16 @@ function ue({
|
|
|
100
100
|
] }),
|
|
101
101
|
/* @__PURE__ */ t("div", { children: [
|
|
102
102
|
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Links" }),
|
|
103
|
-
N.map((a,
|
|
103
|
+
N.map((a, r) => (
|
|
104
104
|
// biome-ignore lint/suspicious/noArrayIndexKey: rows are edited in place and have no id
|
|
105
105
|
/* @__PURE__ */ t("div", { className: "mb-1 flex items-center gap-1", children: [
|
|
106
106
|
/* @__PURE__ */ e(
|
|
107
107
|
"input",
|
|
108
108
|
{
|
|
109
109
|
value: a.label,
|
|
110
|
-
onChange: (
|
|
110
|
+
onChange: (c) => g((k) => k.map((x, _) => _ === r ? { ...x, label: c.target.value } : x)),
|
|
111
111
|
placeholder: "Label",
|
|
112
|
-
className:
|
|
112
|
+
className: i("h-7 w-[38%] rounded-md px-2 text-[12px] outline-none", s.input),
|
|
113
113
|
"aria-label": "Link label"
|
|
114
114
|
}
|
|
115
115
|
),
|
|
@@ -117,9 +117,9 @@ function ue({
|
|
|
117
117
|
"input",
|
|
118
118
|
{
|
|
119
119
|
value: a.url,
|
|
120
|
-
onChange: (
|
|
120
|
+
onChange: (c) => g((k) => k.map((x, _) => _ === r ? { ...x, url: c.target.value } : x)),
|
|
121
121
|
placeholder: "https://… or /reports/…",
|
|
122
|
-
className:
|
|
122
|
+
className: i(
|
|
123
123
|
"h-7 min-w-0 flex-1 rounded-md px-2 text-[12px] outline-none",
|
|
124
124
|
s.input
|
|
125
125
|
),
|
|
@@ -130,20 +130,20 @@ function ue({
|
|
|
130
130
|
"button",
|
|
131
131
|
{
|
|
132
132
|
type: "button",
|
|
133
|
-
onClick: () => g((
|
|
133
|
+
onClick: () => g((c) => c.filter((k, x) => x !== r)),
|
|
134
134
|
className: "rounded p-1 text-slate-400 hover:text-red-500",
|
|
135
135
|
"aria-label": "Remove link",
|
|
136
136
|
children: /* @__PURE__ */ e($, { className: "h-3 w-3" })
|
|
137
137
|
}
|
|
138
138
|
)
|
|
139
|
-
] },
|
|
139
|
+
] }, r)
|
|
140
140
|
)),
|
|
141
141
|
N.length < 10 && /* @__PURE__ */ t(
|
|
142
142
|
"button",
|
|
143
143
|
{
|
|
144
144
|
type: "button",
|
|
145
145
|
onClick: () => g((a) => [...a, { label: "", url: "" }]),
|
|
146
|
-
className:
|
|
146
|
+
className: i(
|
|
147
147
|
"inline-flex items-center gap-1 text-[11.5px] font-medium",
|
|
148
148
|
s.accentText
|
|
149
149
|
),
|
|
@@ -164,7 +164,7 @@ function ue({
|
|
|
164
164
|
onChange: (a) => y(a.target.value),
|
|
165
165
|
rows: 3,
|
|
166
166
|
placeholder: "Say hello, point people at the pinned messages, explain the ground rules",
|
|
167
|
-
className:
|
|
167
|
+
className: i(
|
|
168
168
|
"w-full resize-none rounded-md px-2 py-1.5 text-[12.5px] outline-none",
|
|
169
169
|
s.input
|
|
170
170
|
),
|
|
@@ -172,13 +172,13 @@ function ue({
|
|
|
172
172
|
}
|
|
173
173
|
)
|
|
174
174
|
] }),
|
|
175
|
-
|
|
175
|
+
m && /* @__PURE__ */ t("div", { children: [
|
|
176
176
|
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Join automatically — everyone with these roles" }),
|
|
177
177
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
178
178
|
S.map((a) => /* @__PURE__ */ t(
|
|
179
179
|
"span",
|
|
180
180
|
{
|
|
181
|
-
className:
|
|
181
|
+
className: i(
|
|
182
182
|
"inline-flex h-6 items-center gap-1 rounded-full px-2 text-[11px]",
|
|
183
183
|
s.accentSoft
|
|
184
184
|
),
|
|
@@ -188,7 +188,7 @@ function ue({
|
|
|
188
188
|
"button",
|
|
189
189
|
{
|
|
190
190
|
type: "button",
|
|
191
|
-
onClick: () => E((
|
|
191
|
+
onClick: () => E((r) => r.filter((c) => c !== a)),
|
|
192
192
|
"aria-label": `Remove ${T(a)}`,
|
|
193
193
|
children: /* @__PURE__ */ e($, { className: "h-3 w-3" })
|
|
194
194
|
}
|
|
@@ -215,23 +215,23 @@ function ue({
|
|
|
215
215
|
/* @__PURE__ */ t(I, { children: [
|
|
216
216
|
/* @__PURE__ */ e(J, { children: "No role found" }),
|
|
217
217
|
/* @__PURE__ */ e(L, { children: b.map((a) => {
|
|
218
|
-
const
|
|
218
|
+
const r = String(a.id).toUpperCase(), c = S.includes(r);
|
|
219
219
|
return /* @__PURE__ */ t(
|
|
220
220
|
P,
|
|
221
221
|
{
|
|
222
222
|
value: a.name,
|
|
223
|
-
onSelect: () => E((k) =>
|
|
223
|
+
onSelect: () => E((k) => c ? k.filter((x) => x !== r) : [...k, r]),
|
|
224
224
|
children: [
|
|
225
225
|
/* @__PURE__ */ e(
|
|
226
226
|
q,
|
|
227
227
|
{
|
|
228
|
-
className:
|
|
228
|
+
className: i("mr-1.5 h-3.5 w-3.5", c ? "opacity-100" : "opacity-0")
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
231
|
a.name
|
|
232
232
|
]
|
|
233
233
|
},
|
|
234
|
-
|
|
234
|
+
r
|
|
235
235
|
);
|
|
236
236
|
}) })
|
|
237
237
|
] })
|
|
@@ -244,20 +244,20 @@ function ue({
|
|
|
244
244
|
"button",
|
|
245
245
|
{
|
|
246
246
|
type: "button",
|
|
247
|
-
disabled: !
|
|
248
|
-
onClick:
|
|
249
|
-
className:
|
|
247
|
+
disabled: !M || u.isPending,
|
|
248
|
+
onClick: z,
|
|
249
|
+
className: i(
|
|
250
250
|
"rounded-md px-2.5 py-1 text-[12px] font-medium disabled:opacity-40",
|
|
251
251
|
s.action
|
|
252
252
|
),
|
|
253
253
|
"data-chat-channel-extras-save": !0,
|
|
254
|
-
children:
|
|
254
|
+
children: u.isPending ? "Saving…" : "Save these settings"
|
|
255
255
|
}
|
|
256
256
|
)
|
|
257
257
|
] });
|
|
258
258
|
}
|
|
259
|
-
function
|
|
260
|
-
const [
|
|
259
|
+
function fe({ channelId: l, th: s }) {
|
|
260
|
+
const [m, u] = p(!1), b = te(m), f = B(), o = ae(l), [h, w] = p(null), [d, v] = p(null), N = (n) => n.kind === "team" ? { team_id: n.id } : { role_id: n.id }, g = (n) => {
|
|
261
261
|
w(n), v(null), o.mutate(
|
|
262
262
|
{ ...N(n), dry_run: !0 },
|
|
263
263
|
{
|
|
@@ -267,12 +267,12 @@ function xe({ channelId: l, th: s }) {
|
|
|
267
267
|
);
|
|
268
268
|
};
|
|
269
269
|
return /* @__PURE__ */ t("div", { "data-chat-bulk-invite": !0, children: [
|
|
270
|
-
/* @__PURE__ */ t(W, { open:
|
|
270
|
+
/* @__PURE__ */ t(W, { open: m, onOpenChange: u, children: [
|
|
271
271
|
/* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ t(
|
|
272
272
|
"button",
|
|
273
273
|
{
|
|
274
274
|
type: "button",
|
|
275
|
-
className:
|
|
275
|
+
className: i(
|
|
276
276
|
"inline-flex items-center gap-1 text-[11.5px] font-medium",
|
|
277
277
|
s.accentText
|
|
278
278
|
),
|
|
@@ -291,7 +291,7 @@ function xe({ channelId: l, th: s }) {
|
|
|
291
291
|
{
|
|
292
292
|
value: `team ${n.name}`,
|
|
293
293
|
onSelect: () => {
|
|
294
|
-
|
|
294
|
+
u(!1), g({ kind: "team", id: n.id, name: n.name });
|
|
295
295
|
},
|
|
296
296
|
children: n.name
|
|
297
297
|
},
|
|
@@ -302,7 +302,7 @@ function xe({ channelId: l, th: s }) {
|
|
|
302
302
|
{
|
|
303
303
|
value: `role ${n.name}`,
|
|
304
304
|
onSelect: () => {
|
|
305
|
-
|
|
305
|
+
u(!1), g({ kind: "role", id: String(n.id), name: n.name });
|
|
306
306
|
},
|
|
307
307
|
children: n.name
|
|
308
308
|
},
|
|
@@ -311,22 +311,22 @@ function xe({ channelId: l, th: s }) {
|
|
|
311
311
|
] })
|
|
312
312
|
] }) })
|
|
313
313
|
] }),
|
|
314
|
-
|
|
314
|
+
h && /* @__PURE__ */ e("div", { className: i("mt-1.5 rounded-lg border p-2 text-[12px]", s.divider), children: d ? d.would_add === 0 ? /* @__PURE__ */ t("p", { className: "text-slate-600 dark:text-slate-300", children: [
|
|
315
315
|
"Everyone in ",
|
|
316
|
-
|
|
316
|
+
h.name,
|
|
317
317
|
" is already here",
|
|
318
|
-
|
|
318
|
+
d.skipped ? ` (${d.skipped} skipped)` : "",
|
|
319
319
|
"."
|
|
320
|
-
] }) : /* @__PURE__ */ t(
|
|
320
|
+
] }) : /* @__PURE__ */ t(F, { children: [
|
|
321
321
|
/* @__PURE__ */ t("p", { className: "text-slate-700 dark:text-slate-200", children: [
|
|
322
322
|
"Adds ",
|
|
323
|
-
|
|
323
|
+
d.would_add,
|
|
324
324
|
" ",
|
|
325
|
-
|
|
325
|
+
d.would_add === 1 ? "person" : "people",
|
|
326
326
|
" from",
|
|
327
327
|
" ",
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
h.name,
|
|
329
|
+
d.skipped ? ` · ${d.skipped} already here or inactive` : "",
|
|
330
330
|
"."
|
|
331
331
|
] }),
|
|
332
332
|
/* @__PURE__ */ t("div", { className: "mt-1.5 flex gap-1.5", children: [
|
|
@@ -335,17 +335,17 @@ function xe({ channelId: l, th: s }) {
|
|
|
335
335
|
{
|
|
336
336
|
type: "button",
|
|
337
337
|
disabled: o.isPending,
|
|
338
|
-
onClick: () => o.mutate(N(
|
|
338
|
+
onClick: () => o.mutate(N(h), {
|
|
339
339
|
onSuccess: (n) => {
|
|
340
340
|
C.success(`Added ${n.added ?? 0} to the channel`), w(null), v(null);
|
|
341
341
|
},
|
|
342
342
|
onError: (n) => C.error(A(n, "Could not add them"))
|
|
343
343
|
}),
|
|
344
|
-
className:
|
|
344
|
+
className: i("h-7 rounded-md px-2 text-[11.5px] font-medium", s.action),
|
|
345
345
|
"data-chat-bulk-invite-confirm": !0,
|
|
346
346
|
children: [
|
|
347
347
|
"Add ",
|
|
348
|
-
|
|
348
|
+
d.would_add
|
|
349
349
|
]
|
|
350
350
|
}
|
|
351
351
|
),
|
|
@@ -363,12 +363,12 @@ function xe({ channelId: l, th: s }) {
|
|
|
363
363
|
] })
|
|
364
364
|
] }) : /* @__PURE__ */ t("p", { className: "text-slate-500", children: [
|
|
365
365
|
"Counting the people in ",
|
|
366
|
-
|
|
366
|
+
h.name,
|
|
367
367
|
"…"
|
|
368
368
|
] }) })
|
|
369
369
|
] });
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const le = {
|
|
372
372
|
"chat-channel-create": "created the channel",
|
|
373
373
|
"chat-channel-update": "changed settings",
|
|
374
374
|
"chat-channel-join": "joined",
|
|
@@ -378,35 +378,35 @@ const ne = {
|
|
|
378
378
|
"chat-channel-bulk-invite": "added a group of people",
|
|
379
379
|
"chat-message-delete": "deleted a message"
|
|
380
380
|
};
|
|
381
|
-
function
|
|
382
|
-
const [
|
|
381
|
+
function ge({ channelId: l, th: s }) {
|
|
382
|
+
const [m, u] = p(!1), { rows: b, loading: f } = ne(l, m);
|
|
383
383
|
return /* @__PURE__ */ t("div", { "data-chat-channel-audit": !0, children: [
|
|
384
384
|
/* @__PURE__ */ t(
|
|
385
385
|
"button",
|
|
386
386
|
{
|
|
387
387
|
type: "button",
|
|
388
|
-
onClick: () =>
|
|
389
|
-
"aria-expanded":
|
|
388
|
+
onClick: () => u((o) => !o),
|
|
389
|
+
"aria-expanded": m,
|
|
390
390
|
className: "inline-flex items-center gap-1 text-[11.5px] font-medium text-slate-600 hover:text-slate-900 dark:text-slate-300 dark:hover:text-white",
|
|
391
391
|
children: [
|
|
392
392
|
/* @__PURE__ */ e(Q, { className: "h-3.5 w-3.5" }),
|
|
393
393
|
" ",
|
|
394
|
-
|
|
394
|
+
m ? "Hide channel history" : "Channel history"
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
397
|
),
|
|
398
|
-
|
|
398
|
+
m && /* @__PURE__ */ e("div", { className: i("mt-1.5 max-h-60 overflow-y-auto rounded-lg border", s.divider), children: f ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ e("p", { className: "p-2 text-[11.5px] text-slate-500", children: "No changes recorded yet." }) : b.map((o) => /* @__PURE__ */ t(
|
|
399
399
|
"div",
|
|
400
400
|
{
|
|
401
|
-
className:
|
|
401
|
+
className: i("border-b px-2 py-1.5 text-[11.5px] last:border-b-0", s.divider),
|
|
402
402
|
children: [
|
|
403
403
|
/* @__PURE__ */ t("p", { className: "text-slate-700 dark:text-slate-200", children: [
|
|
404
404
|
/* @__PURE__ */ e("span", { className: "font-medium", children: o.user_name ?? "Someone" }),
|
|
405
405
|
" ",
|
|
406
|
-
|
|
406
|
+
le[o.action] ?? o.action.replace(/^chat-/, "").replace(/-/g, " "),
|
|
407
407
|
/* @__PURE__ */ t("span", { className: "ml-1 text-slate-400", children: [
|
|
408
408
|
"· ",
|
|
409
|
-
|
|
409
|
+
Y(o.at)
|
|
410
410
|
] })
|
|
411
411
|
] }),
|
|
412
412
|
o.comment && /* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: o.comment })
|
|
@@ -417,7 +417,7 @@ function be({ channelId: l, th: s }) {
|
|
|
417
417
|
] });
|
|
418
418
|
}
|
|
419
419
|
export {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
fe as BulkInvitePanel,
|
|
421
|
+
ge as ChannelAuditLog,
|
|
422
|
+
be as ChannelExtrasEditor
|
|
423
423
|
};
|