@nivaro/react 0.3.139 → 0.3.141
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/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2702 -2671
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3475 -3458
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +884 -872
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +123 -123
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { useQueries as
|
|
3
|
-
import { ChevronRight as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { Sheet as
|
|
9
|
-
function
|
|
2
|
+
import { useQueries as se } from "@tanstack/react-query";
|
|
3
|
+
import { ChevronRight as z, Minimize2 as ce, Waypoints as le, Loader2 as de } from "lucide-react";
|
|
4
|
+
import { useState as X, useMemo as T } from "react";
|
|
5
|
+
import { useNivaroClient as ie, useDrilldown as he, useItemNavigation as ue } from "../context.js";
|
|
6
|
+
import { get as me } from "../lib/commands.js";
|
|
7
|
+
import { cn as M, formatNumber as S } from "../lib/utils.js";
|
|
8
|
+
import { Sheet as fe, SheetContent as pe, SheetHeader as ge, SheetTitle as xe } from "./ui/sheet.js";
|
|
9
|
+
function B(o) {
|
|
10
10
|
return !/^(nivaro|directus)_/i.test(o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
function xe(o) {
|
|
14
|
-
const s = Math.floor(o / 2) * (B + H + 2 * X);
|
|
15
|
-
return o % 2 === 0 ? s : s + B + X;
|
|
16
|
-
}
|
|
12
|
+
const F = 236, ee = 184, Y = 52, Z = 50, H = 34, j = 10, C = (o) => `${o.collection}:${o.id}`;
|
|
17
13
|
function be(o) {
|
|
14
|
+
const s = Math.floor(o / 2) * (F + ee + 2 * Y);
|
|
15
|
+
return o % 2 === 0 ? s : s + F + Y;
|
|
16
|
+
}
|
|
17
|
+
function we(o) {
|
|
18
18
|
const s = [], c = (n) => {
|
|
19
|
-
const h = n.kind === "record" ?
|
|
19
|
+
const h = n.kind === "record" ? Z : H;
|
|
20
20
|
if (n.children.length === 0) return h;
|
|
21
|
-
const b = n.children.reduce((w, g) => w + c(g), 0) +
|
|
21
|
+
const b = n.children.reduce((w, g) => w + c(g), 0) + j * (n.children.length - 1);
|
|
22
22
|
return Math.max(h, b);
|
|
23
23
|
}, t = (n, h) => {
|
|
24
|
-
const b = c(n), w = n.kind === "record" ?
|
|
24
|
+
const b = c(n), w = n.kind === "record" ? Z : H;
|
|
25
25
|
s.push({
|
|
26
26
|
t: n,
|
|
27
|
-
x:
|
|
27
|
+
x: be(n.depth),
|
|
28
28
|
y: h + b / 2 - w / 2,
|
|
29
|
-
w: n.kind === "record" ?
|
|
29
|
+
w: n.kind === "record" ? F : ee,
|
|
30
30
|
h: w
|
|
31
31
|
});
|
|
32
32
|
let g = h;
|
|
33
|
-
const
|
|
34
|
-
g += (b -
|
|
35
|
-
for (const
|
|
36
|
-
t(
|
|
33
|
+
const R = n.children.reduce((p, N) => p + c(N), 0) + j * Math.max(0, n.children.length - 1);
|
|
34
|
+
g += (b - R) / 2;
|
|
35
|
+
for (const p of n.children)
|
|
36
|
+
t(p, g), g += c(p) + j;
|
|
37
37
|
};
|
|
38
38
|
t(o, 0);
|
|
39
|
-
const
|
|
40
|
-
return { placed: s, width:
|
|
39
|
+
const f = Math.max(...s.map((n) => n.x + n.w)), $ = Math.max(...s.map((n) => n.y + n.h));
|
|
40
|
+
return { placed: s, width: f, height: $ };
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function ye({
|
|
43
43
|
collection: o,
|
|
44
44
|
itemId: s,
|
|
45
45
|
className: c
|
|
46
46
|
}) {
|
|
47
|
-
const t =
|
|
47
|
+
const t = ie(), f = he(), $ = ue(), n = C({ collection: o, id: String(s) }), [h, b] = X(() => /* @__PURE__ */ new Set([n])), [w, g] = X(() => /* @__PURE__ */ new Set()), R = T(() => {
|
|
48
48
|
const e = /* @__PURE__ */ new Map();
|
|
49
49
|
for (const l of h) {
|
|
50
50
|
const r = l.split("/").pop(), i = r.indexOf(":");
|
|
51
51
|
e.set(r, { collection: r.slice(0, i), id: r.slice(i + 1) });
|
|
52
52
|
}
|
|
53
53
|
return [...e.values()];
|
|
54
|
-
}, [h]),
|
|
55
|
-
queries:
|
|
54
|
+
}, [h]), p = se({
|
|
55
|
+
queries: R.map((e) => ({
|
|
56
56
|
queryKey: ["record-graph", e.collection, e.id],
|
|
57
|
-
queryFn: () => t.request(
|
|
57
|
+
queryFn: () => t.request(me(`/record-graph/${e.collection}/${e.id}`)).then((l) => l.data),
|
|
58
58
|
staleTime: 6e4,
|
|
59
59
|
retry: !1
|
|
60
60
|
}))
|
|
61
61
|
}), N = /* @__PURE__ */ new Map();
|
|
62
|
-
|
|
62
|
+
R.forEach((e, l) => {
|
|
63
63
|
var r, i, x;
|
|
64
|
-
N.set(
|
|
65
|
-
data: (r =
|
|
66
|
-
loading: !!((i =
|
|
67
|
-
error: !!((x =
|
|
64
|
+
N.set(C(e), {
|
|
65
|
+
data: (r = p[l]) == null ? void 0 : r.data,
|
|
66
|
+
loading: !!((i = p[l]) != null && i.isLoading),
|
|
67
|
+
error: !!((x = p[l]) != null && x.isError)
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
|
-
const d = N.get(n),
|
|
70
|
+
const d = N.get(n), A = T(() => {
|
|
71
71
|
var r, i;
|
|
72
|
-
const e = (x,
|
|
73
|
-
const
|
|
72
|
+
const e = (x, _, k, y, E) => {
|
|
73
|
+
const W = C(x), I = E.has(W), v = !I && h.has(k), m = v ? N.get(W) : void 0, J = [];
|
|
74
74
|
if (v && (m != null && m.data)) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
for (const
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const
|
|
81
|
-
|
|
75
|
+
const U = new Set(E);
|
|
76
|
+
U.add(W);
|
|
77
|
+
for (const O of m.data.groups) {
|
|
78
|
+
const q = O.items.filter((G) => !E.has(C(G)));
|
|
79
|
+
if (q.length === 0) continue;
|
|
80
|
+
const L = `${k}/${O.key}`, V = w.has(L);
|
|
81
|
+
J.push({
|
|
82
82
|
kind: "group",
|
|
83
|
-
path:
|
|
83
|
+
path: L,
|
|
84
84
|
depth: y + 1,
|
|
85
|
-
group:
|
|
86
|
-
shown:
|
|
87
|
-
collapsed:
|
|
88
|
-
children:
|
|
89
|
-
(
|
|
85
|
+
group: O,
|
|
86
|
+
shown: q.length,
|
|
87
|
+
collapsed: V,
|
|
88
|
+
children: V ? [] : q.map(
|
|
89
|
+
(G) => e(G, O.collection_label, `${L}/${C(G)}`, y + 2, U)
|
|
90
90
|
)
|
|
91
91
|
});
|
|
92
92
|
}
|
|
@@ -96,13 +96,13 @@ function we({
|
|
|
96
96
|
path: k,
|
|
97
97
|
depth: y,
|
|
98
98
|
node: x,
|
|
99
|
-
collectionLabel:
|
|
100
|
-
seen:
|
|
99
|
+
collectionLabel: _,
|
|
100
|
+
seen: I,
|
|
101
101
|
root: y === 0,
|
|
102
102
|
expanded: v,
|
|
103
103
|
loading: v && !!(m != null && m.loading),
|
|
104
104
|
error: v && !!(m != null && m.error),
|
|
105
|
-
children:
|
|
105
|
+
children: J
|
|
106
106
|
};
|
|
107
107
|
}, l = ((r = d == null ? void 0 : d.data) == null ? void 0 : r.node) ?? {
|
|
108
108
|
collection: o,
|
|
@@ -117,31 +117,31 @@ function we({
|
|
|
117
117
|
0,
|
|
118
118
|
/* @__PURE__ */ new Set()
|
|
119
119
|
);
|
|
120
|
-
}, [h, w,
|
|
120
|
+
}, [h, w, p, d == null ? void 0 : d.data, o, s, n]), { placed: P, width: K, height: D } = T(() => we(A), [A]), te = new Map(P.map((e) => [e.t.path, e])), oe = (e) => b((l) => {
|
|
121
121
|
const r = new Set(l);
|
|
122
122
|
if (r.has(e))
|
|
123
123
|
for (const i of l) (i === e || i.startsWith(`${e}/`)) && r.delete(i);
|
|
124
124
|
else r.add(e);
|
|
125
125
|
return r;
|
|
126
|
-
}),
|
|
126
|
+
}), ne = (e) => g((l) => {
|
|
127
127
|
const r = new Set(l);
|
|
128
128
|
return r.has(e) ? r.delete(e) : r.add(e), r;
|
|
129
|
-
}),
|
|
130
|
-
|
|
129
|
+
}), re = (e) => {
|
|
130
|
+
B(e.collection) && (f ? f.open({ collection: e.collection, itemId: e.id, title: e.label }) : $.open({ collection: e.collection, itemId: e.id }));
|
|
131
131
|
};
|
|
132
132
|
if (d != null && d.error)
|
|
133
133
|
return /* @__PURE__ */ a("p", { className: "p-6 text-sm text-muted-foreground", "data-record-graph-error": !0, children: "This record's relationships could not be loaded — you may not have access to it." });
|
|
134
|
-
const
|
|
135
|
-
for (const e of
|
|
134
|
+
const Q = [];
|
|
135
|
+
for (const e of P)
|
|
136
136
|
for (const l of e.t.children) {
|
|
137
|
-
const r =
|
|
137
|
+
const r = te.get(l.path);
|
|
138
138
|
if (!r) continue;
|
|
139
|
-
const i = e.x + e.w, x = e.y + e.h / 2,
|
|
140
|
-
|
|
139
|
+
const i = e.x + e.w, x = e.y + e.h / 2, _ = r.x, k = r.y + r.h / 2, y = (i + _) / 2;
|
|
140
|
+
Q.push(
|
|
141
141
|
/* @__PURE__ */ a(
|
|
142
142
|
"path",
|
|
143
143
|
{
|
|
144
|
-
d: `M${i},${x} C${y},${x} ${y},${k} ${
|
|
144
|
+
d: `M${i},${x} C${y},${x} ${y},${k} ${_},${k}`,
|
|
145
145
|
className: "fill-none stroke-[#cbd5e1] dark:stroke-[#475569]",
|
|
146
146
|
strokeWidth: 1.25
|
|
147
147
|
},
|
|
@@ -149,15 +149,15 @@ function we({
|
|
|
149
149
|
)
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
return /* @__PURE__ */ u("div", { className:
|
|
152
|
+
const ae = h.size;
|
|
153
|
+
return /* @__PURE__ */ u("div", { className: M("flex min-h-0 flex-1 flex-col", c), "data-record-graph": !0, children: [
|
|
154
154
|
/* @__PURE__ */ u("div", { className: "flex shrink-0 items-center gap-3 border-b border-border px-4 py-2 text-[12px] text-muted-foreground", children: [
|
|
155
155
|
/* @__PURE__ */ u("span", { children: [
|
|
156
156
|
"Click a record to open it · ",
|
|
157
|
-
/* @__PURE__ */ a(
|
|
157
|
+
/* @__PURE__ */ a(z, { className: "inline h-3 w-3" }),
|
|
158
158
|
" shows what it connects to"
|
|
159
159
|
] }),
|
|
160
|
-
|
|
160
|
+
ae > 1 && /* @__PURE__ */ u(
|
|
161
161
|
"button",
|
|
162
162
|
{
|
|
163
163
|
type: "button",
|
|
@@ -167,31 +167,31 @@ function we({
|
|
|
167
167
|
},
|
|
168
168
|
"data-record-graph-reset": !0,
|
|
169
169
|
children: [
|
|
170
|
-
/* @__PURE__ */ a(
|
|
170
|
+
/* @__PURE__ */ a(ce, { className: "h-3.5 w-3.5" }),
|
|
171
171
|
"Collapse all"
|
|
172
172
|
]
|
|
173
173
|
}
|
|
174
174
|
)
|
|
175
175
|
] }),
|
|
176
176
|
/* @__PURE__ */ u("div", { className: "min-h-0 flex-1 overflow-auto p-6", children: [
|
|
177
|
-
/* @__PURE__ */ u("div", { className: "relative", style: { width:
|
|
177
|
+
/* @__PURE__ */ u("div", { className: "relative", style: { width: K, height: D }, children: [
|
|
178
178
|
/* @__PURE__ */ a(
|
|
179
179
|
"svg",
|
|
180
180
|
{
|
|
181
181
|
className: "pointer-events-none absolute inset-0",
|
|
182
|
-
width:
|
|
183
|
-
height:
|
|
182
|
+
width: K,
|
|
183
|
+
height: D,
|
|
184
184
|
"aria-hidden": "true",
|
|
185
|
-
children:
|
|
185
|
+
children: Q
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
|
|
189
|
-
(e) => e.t.kind === "group" ? /* @__PURE__ */ a(
|
|
190
|
-
|
|
188
|
+
P.map(
|
|
189
|
+
(e) => e.t.kind === "group" ? /* @__PURE__ */ a(ke, { p: e, onToggle: () => ne(e.t.path) }, e.t.path) : /* @__PURE__ */ a(
|
|
190
|
+
$e,
|
|
191
191
|
{
|
|
192
192
|
p: e,
|
|
193
|
-
onOpen: () =>
|
|
194
|
-
onToggle: () =>
|
|
193
|
+
onOpen: () => re(e.t.node),
|
|
194
|
+
onToggle: () => oe(e.t.path)
|
|
195
195
|
},
|
|
196
196
|
e.t.path
|
|
197
197
|
)
|
|
@@ -201,16 +201,16 @@ function we({
|
|
|
201
201
|
] })
|
|
202
202
|
] });
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function $e({
|
|
205
205
|
p: o,
|
|
206
206
|
onOpen: s,
|
|
207
207
|
onToggle: c
|
|
208
208
|
}) {
|
|
209
|
-
const t = o.t,
|
|
209
|
+
const t = o.t, f = !t.seen && B(t.node.collection), $ = B(t.node.collection);
|
|
210
210
|
return /* @__PURE__ */ u(
|
|
211
211
|
"div",
|
|
212
212
|
{
|
|
213
|
-
className:
|
|
213
|
+
className: M(
|
|
214
214
|
"absolute flex items-stretch overflow-hidden rounded-lg border bg-card shadow-sm",
|
|
215
215
|
t.root ? "border-nvr-cyan ring-2 ring-nvr-cyan/20" : "border-border",
|
|
216
216
|
t.seen && "opacity-60"
|
|
@@ -225,7 +225,7 @@ function ye({
|
|
|
225
225
|
type: "button",
|
|
226
226
|
onClick: s,
|
|
227
227
|
disabled: !$,
|
|
228
|
-
className:
|
|
228
|
+
className: M(
|
|
229
229
|
"min-w-0 flex-1 px-3 py-1.5 text-left",
|
|
230
230
|
$ ? "hover:bg-muted" : "cursor-default"
|
|
231
231
|
),
|
|
@@ -236,7 +236,7 @@ function ye({
|
|
|
236
236
|
]
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
|
-
|
|
239
|
+
f && /* @__PURE__ */ a(
|
|
240
240
|
"button",
|
|
241
241
|
{
|
|
242
242
|
type: "button",
|
|
@@ -245,10 +245,10 @@ function ye({
|
|
|
245
245
|
"aria-expanded": t.expanded,
|
|
246
246
|
className: "flex w-8 shrink-0 items-center justify-center border-l border-border text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
247
247
|
"data-record-graph-expand": !0,
|
|
248
|
-
children: t.loading ? /* @__PURE__ */ a(
|
|
249
|
-
|
|
248
|
+
children: t.loading ? /* @__PURE__ */ a(de, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(
|
|
249
|
+
z,
|
|
250
250
|
{
|
|
251
|
-
className:
|
|
251
|
+
className: M("h-4 w-4 transition-transform", t.expanded && "rotate-180")
|
|
252
252
|
}
|
|
253
253
|
)
|
|
254
254
|
}
|
|
@@ -257,8 +257,8 @@ function ye({
|
|
|
257
257
|
}
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
const c = o.t, t = c.group,
|
|
260
|
+
function ke({ p: o, onToggle: s }) {
|
|
261
|
+
const c = o.t, t = c.group, f = t.total > c.shown;
|
|
262
262
|
return /* @__PURE__ */ u(
|
|
263
263
|
"button",
|
|
264
264
|
{
|
|
@@ -268,45 +268,45 @@ function $e({ p: o, onToggle: s }) {
|
|
|
268
268
|
style: { left: o.x, top: o.y, width: o.w, height: o.h },
|
|
269
269
|
"aria-expanded": !c.collapsed,
|
|
270
270
|
"data-record-graph-group": t.key,
|
|
271
|
-
"data-tip":
|
|
271
|
+
"data-tip": f ? `${t.label}: showing the newest ${S(c.shown)} of ${S(t.total)}` : `${t.label} (${t.collection_label})`,
|
|
272
272
|
children: [
|
|
273
273
|
/* @__PURE__ */ a(
|
|
274
|
-
|
|
274
|
+
z,
|
|
275
275
|
{
|
|
276
|
-
className:
|
|
276
|
+
className: M(
|
|
277
277
|
"h-3 w-3 shrink-0 text-muted-foreground transition-transform",
|
|
278
278
|
!c.collapsed && "rotate-90"
|
|
279
279
|
)
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
282
|
/* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate font-medium", children: t.label }),
|
|
283
|
-
/* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums text-muted-foreground", children:
|
|
283
|
+
/* @__PURE__ */ a("span", { className: "shrink-0 tabular-nums text-muted-foreground", children: f ? `${S(c.shown)} of ${S(t.total)}` : S(t.total) })
|
|
284
284
|
]
|
|
285
285
|
}
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ge({
|
|
289
289
|
collection: o,
|
|
290
290
|
itemId: s,
|
|
291
291
|
open: c,
|
|
292
292
|
onOpenChange: t
|
|
293
293
|
}) {
|
|
294
|
-
return /* @__PURE__ */ a(
|
|
294
|
+
return /* @__PURE__ */ a(fe, { open: c, onOpenChange: t, children: /* @__PURE__ */ u(
|
|
295
295
|
pe,
|
|
296
296
|
{
|
|
297
297
|
side: "right",
|
|
298
298
|
className: "flex w-[92vw] max-w-[1400px] flex-col gap-0 p-0 sm:max-w-[1400px]",
|
|
299
299
|
children: [
|
|
300
|
-
/* @__PURE__ */ a(
|
|
301
|
-
/* @__PURE__ */ a(
|
|
300
|
+
/* @__PURE__ */ a(ge, { className: "shrink-0 border-b border-border px-4 py-3", children: /* @__PURE__ */ u(xe, { className: "flex items-center gap-2 text-base", children: [
|
|
301
|
+
/* @__PURE__ */ a(le, { className: "h-4 w-4 text-muted-foreground" }),
|
|
302
302
|
"Relationships"
|
|
303
303
|
] }) }),
|
|
304
|
-
c && /* @__PURE__ */ a(
|
|
304
|
+
c && /* @__PURE__ */ a(ye, { collection: o, itemId: s })
|
|
305
305
|
]
|
|
306
306
|
}
|
|
307
307
|
) });
|
|
308
308
|
}
|
|
309
309
|
export {
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
ye as RecordGraphExplorer,
|
|
311
|
+
Ge as RecordGraphSheet
|
|
312
312
|
};
|