@nivaro/react 0.2.49 → 0.2.51
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/shared/components/CollectionBrowserView.js +1576 -1555
- package/dist/shared/components/ItemEditForm.js +3156 -3099
- package/dist/shared/components/RecordReadView.js +148 -149
- package/dist/shared/components/bulk/RowPushActions.js +37 -36
- package/dist/shared/components/chat/ChatPanel.js +1053 -993
- package/dist/shared/components/import/DocumentAutofillButton.js +141 -129
- package/dist/shared/components/item-edit/SummaryPanel.js +1 -0
- package/dist/shared/components/panels/ItemActionButtons.js +100 -68
- package/dist/shared/components/panels/ItemActionChoices.js +60 -0
- package/dist/shared/components/ui/dialog.js +11 -11
- package/dist/shared/lib/presence-state.js +43 -13
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
1
|
+
import { jsxs as m, jsx as r, Fragment as Ge } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as M, useQueryClient as lt } from "@tanstack/react-query";
|
|
3
|
-
import {
|
|
3
|
+
import { Pencil as rt, ChevronDown as nt } from "lucide-react";
|
|
4
4
|
import { useMemo as he, useRef as at, useState as D, useEffect as $e, useCallback as Ve } from "react";
|
|
5
5
|
import { useNivaroClient as ge, useApiFetchConfig as it, useDrilldown as De } from "../context.js";
|
|
6
6
|
import { useDebounced as st } from "../hooks/useDebounced.js";
|
|
@@ -34,7 +34,7 @@ const ie = (a) => {
|
|
|
34
34
|
}, Se = (a) => {
|
|
35
35
|
const o = Number(a);
|
|
36
36
|
return Number.isNaN(o) ? String(a) : o.toLocaleString("en-US");
|
|
37
|
-
}, te = () => /* @__PURE__ */
|
|
37
|
+
}, te = () => /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "—" }), xt = `
|
|
38
38
|
[data-read-board]{grid-template-columns:minmax(0,1fr)}
|
|
39
39
|
[data-read-dl]{grid-template-columns:repeat(2,minmax(0,1fr))}
|
|
40
40
|
@media (min-width:640px){[data-read-dl="full"]{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
@@ -54,7 +54,7 @@ function Ye({
|
|
|
54
54
|
trueTone: o = "positive"
|
|
55
55
|
}) {
|
|
56
56
|
const p = a === !0 || a === 1 || a === "1" || a === "true";
|
|
57
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ r(
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
60
|
className: `inline-flex h-[18px] items-center rounded-full px-1.5 text-[10.5px] font-semibold ${p ? o === "danger" ? "bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-400" : "bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-400" : "bg-slate-100 text-slate-500 dark:bg-slate-800 dark:text-slate-400"}`,
|
|
@@ -77,9 +77,9 @@ function yt({ collection: a, id: o }) {
|
|
|
77
77
|
staleTime: 6e4,
|
|
78
78
|
retry: !1
|
|
79
79
|
});
|
|
80
|
-
if (o == null) return /* @__PURE__ */
|
|
80
|
+
if (o == null) return /* @__PURE__ */ r(te, {});
|
|
81
81
|
if (!w && (P || !N))
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 align-middle dark:bg-[hsl(var(--nvr-skeleton))]" });
|
|
83
83
|
if (!w) return /* @__PURE__ */ m("span", { className: "text-slate-400", children: [
|
|
84
84
|
"#",
|
|
85
85
|
String(o)
|
|
@@ -105,7 +105,7 @@ function yt({ collection: a, id: o }) {
|
|
|
105
105
|
break;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
return x || (x = `#${String(o)}`), T ? /* @__PURE__ */
|
|
108
|
+
return x || (x = `#${String(o)}`), T ? /* @__PURE__ */ r(
|
|
109
109
|
"button",
|
|
110
110
|
{
|
|
111
111
|
type: "button",
|
|
@@ -113,7 +113,7 @@ function yt({ collection: a, id: o }) {
|
|
|
113
113
|
className: "text-left underline decoration-slate-300 underline-offset-2 transition-colors hover:text-[#007a99] hover:decoration-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan dark:hover:decoration-nvr-cyan",
|
|
114
114
|
children: x
|
|
115
115
|
}
|
|
116
|
-
) : /* @__PURE__ */
|
|
116
|
+
) : /* @__PURE__ */ r(Ge, { children: x });
|
|
117
117
|
}
|
|
118
118
|
function vt({ id: a }) {
|
|
119
119
|
const o = ge(), { apiBase: p } = it(), { data: y, isPending: T } = M({
|
|
@@ -125,11 +125,11 @@ function vt({ id: a }) {
|
|
|
125
125
|
staleTime: 5 * 6e4,
|
|
126
126
|
retry: !1
|
|
127
127
|
});
|
|
128
|
-
if (a == null) return /* @__PURE__ */
|
|
128
|
+
if (a == null) return /* @__PURE__ */ r(te, {});
|
|
129
129
|
if (!y && T)
|
|
130
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-24 animate-pulse rounded bg-slate-100 align-middle dark:bg-[hsl(var(--nvr-skeleton))]" });
|
|
131
131
|
const N = (y == null ? void 0 : y.title) || (y == null ? void 0 : y.filename_download) || `#${String(a)}`;
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ r(
|
|
133
133
|
"a",
|
|
134
134
|
{
|
|
135
135
|
href: `${p}/files/${a}`,
|
|
@@ -140,7 +140,7 @@ function vt({ id: a }) {
|
|
|
140
140
|
}
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
|
-
const Le = ({ collection: a, id: o }) => a === "nivaro_files" ? /* @__PURE__ */
|
|
143
|
+
const Le = ({ collection: a, id: o }) => a === "nivaro_files" ? /* @__PURE__ */ r(vt, { id: o }) : /* @__PURE__ */ r(yt, { collection: a, id: o });
|
|
144
144
|
function _t({
|
|
145
145
|
junction: a,
|
|
146
146
|
parentFk: o,
|
|
@@ -184,7 +184,7 @@ function _t({
|
|
|
184
184
|
f !== void 0 && (T == null || T(f));
|
|
185
185
|
}, [f, T]), $e(() => {
|
|
186
186
|
F && (N == null || N(F));
|
|
187
|
-
}, [F, N]), x && !F && (!A || S) ? /* @__PURE__ */
|
|
187
|
+
}, [F, N]), x && !F && (!A || S) ? /* @__PURE__ */ r(te, {}) : !_ || !F ? /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) : _.length === 0 ? /* @__PURE__ */ r(te, {}) : F === "nivaro_files" && w ? /* @__PURE__ */ r("div", { className: "mt-1", children: /* @__PURE__ */ r(
|
|
188
188
|
mt,
|
|
189
189
|
{
|
|
190
190
|
relation: w,
|
|
@@ -192,13 +192,13 @@ function _t({
|
|
|
192
192
|
allRelations: [],
|
|
193
193
|
disabled: !0
|
|
194
194
|
}
|
|
195
|
-
) }) : /* @__PURE__ */
|
|
195
|
+
) }) : /* @__PURE__ */ r("span", { className: "flex flex-wrap gap-x-1.5 gap-y-0.5", children: (S ?? []).map(({ id: h, collection: $ }, L) => /* @__PURE__ */ m(
|
|
196
196
|
"span",
|
|
197
197
|
{
|
|
198
198
|
className: "inline-flex items-center whitespace-nowrap",
|
|
199
199
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
L < _.length - 1 && /* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ r(Le, { collection: $ ?? F, id: h }),
|
|
201
|
+
L < _.length - 1 && /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "," })
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
204
|
`${$ ?? F}:${h}`
|
|
@@ -216,7 +216,7 @@ function kt({
|
|
|
216
216
|
const P = ge(), x = De(), g = (T ?? []).filter((t) => t && Array.isArray(t.columns)), [C, A] = D(
|
|
217
217
|
() => {
|
|
218
218
|
var t;
|
|
219
|
-
return g.length >= 2 ? ((t = g.find((
|
|
219
|
+
return g.length >= 2 ? ((t = g.find((n) => n.name === N)) == null ? void 0 : t.name) ?? g[0].name : "__all__";
|
|
220
220
|
}
|
|
221
221
|
), { data: K } = M({
|
|
222
222
|
queryKey: ["cbv-collection-meta", a],
|
|
@@ -224,19 +224,19 @@ function kt({
|
|
|
224
224
|
staleTime: 10 * 6e4,
|
|
225
225
|
retry: !1
|
|
226
226
|
}), q = (t) => {
|
|
227
|
-
var
|
|
228
|
-
return ((
|
|
227
|
+
var n;
|
|
228
|
+
return ((n = ((K == null ? void 0 : K.relations) ?? []).find(
|
|
229
229
|
(s) => s.many_collection === a && s.many_field === t && s.one_collection
|
|
230
|
-
)) == null ? void 0 :
|
|
230
|
+
)) == null ? void 0 : n.one_collection) ?? null;
|
|
231
231
|
}, { data: v } = M({
|
|
232
232
|
queryKey: ["rrv-cols", a, y ?? null],
|
|
233
233
|
queryFn: () => P.request(
|
|
234
234
|
J(`/field-config/${a}`, y ? { layout_id: y } : {})
|
|
235
235
|
).then((t) => ({
|
|
236
236
|
// Lines carry their own number — sort by it and show it first.
|
|
237
|
-
lineNo: (t.data ?? []).some((
|
|
237
|
+
lineNo: (t.data ?? []).some((n) => n.field === "line_number"),
|
|
238
238
|
cols: (t.data ?? []).filter(
|
|
239
|
-
(
|
|
239
|
+
(n) => !n.hidden && !n.field.startsWith("__") && (!n.field.includes(".") || n.interface === "relation-path") && n.field !== o && ((y ? n.layout_assigned : !0) ?? !0) && (n.interface === "relation-path" || [
|
|
240
240
|
"string",
|
|
241
241
|
"text",
|
|
242
242
|
"integer",
|
|
@@ -247,23 +247,23 @@ function kt({
|
|
|
247
247
|
"datetime",
|
|
248
248
|
"timestamp",
|
|
249
249
|
"uuid"
|
|
250
|
-
].includes(
|
|
251
|
-
).filter((
|
|
250
|
+
].includes(n.type ?? ""))
|
|
251
|
+
).filter((n, s, u) => u.findIndex((k) => k.field === n.field) === s)
|
|
252
252
|
})),
|
|
253
253
|
staleTime: 5 * 6e4,
|
|
254
254
|
retry: !1
|
|
255
255
|
}), S = (v == null ? void 0 : v.cols) ?? [], _ = !!(v != null && v.lineNo), F = C !== "__all__" ? g.find((t) => t.name === C) : null, f = he(() => {
|
|
256
256
|
if (!F) return S;
|
|
257
|
-
const t = new Set(F.columns),
|
|
258
|
-
return
|
|
257
|
+
const t = new Set(F.columns), n = S.filter((s) => t.has(s.field));
|
|
258
|
+
return n.length > 0 ? n : S;
|
|
259
259
|
}, [S, F]), [j, h] = D(""), [$, L] = D(1), [se, G] = D({}), I = st(se, 350), de = he(() => {
|
|
260
260
|
const t = [
|
|
261
261
|
{ path: [o], op: "_eq", value: p }
|
|
262
262
|
];
|
|
263
|
-
for (const [
|
|
263
|
+
for (const [n, s] of Object.entries(I)) {
|
|
264
264
|
if (!(s != null && s.value.trim())) continue;
|
|
265
265
|
const u = s.value.trim(), k = Number(u), R = s.op === "_contains" ? u : u === "true" || u === "false" ? u === "true" : Number.isNaN(k) ? u : k;
|
|
266
|
-
t.push({ path: [
|
|
266
|
+
t.push({ path: [n], op: s.op, value: R });
|
|
267
267
|
}
|
|
268
268
|
return JSON.stringify(t);
|
|
269
269
|
}, [I, o, p]), V = 25, {
|
|
@@ -302,16 +302,16 @@ function kt({
|
|
|
302
302
|
).then((t) => t.data ?? { rows: {}, targets: {} }).catch(() => ({ rows: {}, targets: {} })),
|
|
303
303
|
enabled: le.length > 0 && z.length > 0,
|
|
304
304
|
staleTime: 3e4
|
|
305
|
-
}), X = _ && W.some((t) => t.line_number != null),
|
|
305
|
+
}), X = _ && W.some((t) => t.line_number != null), re = Math.max(1, Math.ceil(Q / V)), Z = (t, n, s) => {
|
|
306
306
|
L(1), G((u) => {
|
|
307
307
|
const k = { ...u };
|
|
308
|
-
return s ? k[t] = { op:
|
|
308
|
+
return s ? k[t] = { op: n, value: s } : delete k[t], k;
|
|
309
309
|
});
|
|
310
310
|
}, Fe = (t) => {
|
|
311
|
-
L(1), h((
|
|
311
|
+
L(1), h((n) => n === t ? `-${t}` : n === `-${t}` ? "" : t);
|
|
312
312
|
};
|
|
313
313
|
if (oe)
|
|
314
|
-
return /* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ r("div", { className: "space-y-1.5 py-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ r(
|
|
315
315
|
"div",
|
|
316
316
|
{
|
|
317
317
|
className: "h-6 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]"
|
|
@@ -319,16 +319,16 @@ function kt({
|
|
|
319
319
|
t
|
|
320
320
|
)) });
|
|
321
321
|
if (W.length === 0 && Object.keys(I).length === 0)
|
|
322
|
-
return /* @__PURE__ */
|
|
323
|
-
const xe = (t,
|
|
322
|
+
return /* @__PURE__ */ r("p", { className: "py-3 text-[12px] text-slate-400", children: "No records" });
|
|
323
|
+
const xe = (t, n) => {
|
|
324
324
|
var R, U;
|
|
325
|
-
if (
|
|
326
|
-
const ee = (R = Y == null ? void 0 : Y.rows[String(t.id)]) == null ? void 0 : R[
|
|
325
|
+
if (n.field.includes(".")) {
|
|
326
|
+
const ee = (R = Y == null ? void 0 : Y.rows[String(t.id)]) == null ? void 0 : R[n.field];
|
|
327
327
|
if (!Y)
|
|
328
|
-
return /* @__PURE__ */
|
|
329
|
-
if (!ee || ee.value === "") return /* @__PURE__ */
|
|
330
|
-
const fe = Y.targets[
|
|
331
|
-
return x && fe && ke ? /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ r("span", { className: "inline-block h-3 w-14 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
|
|
329
|
+
if (!ee || ee.value === "") return /* @__PURE__ */ r(te, {});
|
|
330
|
+
const fe = Y.targets[n.field], ke = (U = ee.ids) == null ? void 0 : U[0];
|
|
331
|
+
return x && fe && ke ? /* @__PURE__ */ r(
|
|
332
332
|
"button",
|
|
333
333
|
{
|
|
334
334
|
type: "button",
|
|
@@ -340,45 +340,45 @@ function kt({
|
|
|
340
340
|
}
|
|
341
341
|
) : ee.value;
|
|
342
342
|
}
|
|
343
|
-
const s = t[
|
|
344
|
-
if (s == null || s === "") return /* @__PURE__ */
|
|
345
|
-
const u = q(
|
|
343
|
+
const s = t[n.field];
|
|
344
|
+
if (s == null || s === "") return /* @__PURE__ */ r(te, {});
|
|
345
|
+
const u = q(n.field);
|
|
346
346
|
if (u === "nivaro_users")
|
|
347
|
-
return /* @__PURE__ */
|
|
348
|
-
if (u) return /* @__PURE__ */
|
|
349
|
-
if (
|
|
350
|
-
if (
|
|
351
|
-
if (
|
|
352
|
-
if (
|
|
347
|
+
return /* @__PURE__ */ r("span", { className: "inline-block", children: /* @__PURE__ */ r(Ie, { userId: String(s), size: "compact" }) });
|
|
348
|
+
if (u) return /* @__PURE__ */ r(Le, { collection: u, id: s });
|
|
349
|
+
if (n.type === "boolean") return /* @__PURE__ */ r(Ye, { value: s });
|
|
350
|
+
if (n.type === "decimal" || n.type === "float") return Ae(s);
|
|
351
|
+
if (n.type === "integer") return Se(s);
|
|
352
|
+
if (n.type === "date" || n.type === "datetime" || n.type === "timestamp") return ze(s);
|
|
353
353
|
const k = String(s);
|
|
354
354
|
return k.length > 48 ? `${k.slice(0, 48)}…` : k;
|
|
355
355
|
}, ce = (t) => ["decimal", "float", "integer"].includes(t.type ?? "") && !q(t.field) && !t.field.includes("."), ye = (t) => {
|
|
356
|
-
const
|
|
357
|
-
if (!
|
|
358
|
-
if (typeof
|
|
356
|
+
const n = t.options;
|
|
357
|
+
if (!n) return {};
|
|
358
|
+
if (typeof n == "string")
|
|
359
359
|
try {
|
|
360
|
-
return JSON.parse(
|
|
360
|
+
return JSON.parse(n);
|
|
361
361
|
} catch {
|
|
362
362
|
return {};
|
|
363
363
|
}
|
|
364
|
-
return
|
|
364
|
+
return n;
|
|
365
365
|
}, ue = (t) => {
|
|
366
|
-
const
|
|
367
|
-
return typeof
|
|
366
|
+
const n = ye(t).aggregate;
|
|
367
|
+
return typeof n == "string" && ["sum", "avg", "min", "max", "count"].includes(n) ? n : null;
|
|
368
368
|
}, Ce = f.some((t) => ue(t)), ve = (t) => {
|
|
369
|
-
const
|
|
370
|
-
if (!
|
|
369
|
+
const n = ue(t);
|
|
370
|
+
if (!n) return null;
|
|
371
371
|
const s = W.map((R) => Number(R[t.field])).filter((R) => !Number.isNaN(R));
|
|
372
372
|
let u = null;
|
|
373
|
-
if (
|
|
373
|
+
if (n === "count" ? u = W.length : s.length > 0 && (n === "sum" ? u = s.reduce((R, U) => R + U, 0) : n === "avg" ? u = s.reduce((R, U) => R + U, 0) / s.length : n === "min" ? u = Math.min(...s) : n === "max" && (u = Math.max(...s))), u === null) return "—";
|
|
374
374
|
const k = ye(t).format;
|
|
375
|
-
return
|
|
376
|
-
}, me = (t) => !q(t.field) && !t.field.includes("."), _e = (t) => q(t.field) || t.field.includes(".") ? null : t.type === "boolean" ? "bool" : ["integer", "decimal", "float"].includes(t.type ?? "") ? "num" : ["string", "text"].includes(t.type ?? "") ? "text" : null,
|
|
375
|
+
return n === "count" || k === "int" ? Se(Math.round(u)) : k === "currency" || t.type === "decimal" || t.type === "float" ? Ae(u) : n === "avg" ? u.toFixed(2) : Se(u);
|
|
376
|
+
}, me = (t) => !q(t.field) && !t.field.includes("."), _e = (t) => q(t.field) || t.field.includes(".") ? null : t.type === "boolean" ? "bool" : ["integer", "decimal", "float"].includes(t.type ?? "") ? "num" : ["string", "text"].includes(t.type ?? "") ? "text" : null, ne = f.some((t) => _e(t) != null);
|
|
377
377
|
return /* @__PURE__ */ m("div", { children: [
|
|
378
|
-
g.length >= 2 && /* @__PURE__ */
|
|
378
|
+
g.length >= 2 && /* @__PURE__ */ r("div", { className: "mb-1.5 flex flex-wrap items-center gap-1", "data-read-presets": !0, children: [
|
|
379
379
|
{ name: "__all__", label: "All" },
|
|
380
380
|
...g.map((t) => ({ name: t.name, label: t.name }))
|
|
381
|
-
].map((t) => /* @__PURE__ */
|
|
381
|
+
].map((t) => /* @__PURE__ */ r(
|
|
382
382
|
"button",
|
|
383
383
|
{
|
|
384
384
|
type: "button",
|
|
@@ -389,16 +389,16 @@ function kt({
|
|
|
389
389
|
},
|
|
390
390
|
t.name
|
|
391
391
|
)) }),
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ r(
|
|
393
393
|
"div",
|
|
394
394
|
{
|
|
395
395
|
className: `overflow-x-auto rounded-md border border-slate-200 dark:border-slate-700 ${qe && !oe ? "opacity-70" : ""}`,
|
|
396
396
|
children: /* @__PURE__ */ m("table", { className: "w-full", style: { fontVariantNumeric: "tabular-nums" }, children: [
|
|
397
397
|
/* @__PURE__ */ m("thead", { children: [
|
|
398
398
|
/* @__PURE__ */ m("tr", { className: "border-b border-slate-200 bg-slate-50 dark:border-slate-700 dark:bg-slate-800", children: [
|
|
399
|
-
X && /* @__PURE__ */
|
|
399
|
+
X && /* @__PURE__ */ r("th", { className: "h-7 w-8 px-2 text-right text-[9.5px] font-bold uppercase tracking-wider text-slate-400", children: "#" }),
|
|
400
400
|
f.map((t) => {
|
|
401
|
-
const
|
|
401
|
+
const n = j === t.field || j === `-${t.field}`;
|
|
402
402
|
return /* @__PURE__ */ m(
|
|
403
403
|
"th",
|
|
404
404
|
{
|
|
@@ -406,19 +406,19 @@ function kt({
|
|
|
406
406
|
className: `h-7 select-none whitespace-nowrap px-2.5 text-[9.5px] font-bold uppercase tracking-wider text-slate-500 dark:text-slate-400 ${ce(t) ? "text-right" : "text-left"} ${me(t) ? "cursor-pointer hover:text-slate-700 dark:hover:text-slate-200" : ""}`,
|
|
407
407
|
children: [
|
|
408
408
|
t.label || He(t.field),
|
|
409
|
-
me(t) && /* @__PURE__ */
|
|
409
|
+
me(t) && /* @__PURE__ */ r("span", { className: n ? "ml-0.5 text-[#00a5cc]" : "ml-0.5 text-slate-300", children: n ? j.startsWith("-") ? "▼" : "▲" : "⇅" })
|
|
410
410
|
]
|
|
411
411
|
},
|
|
412
412
|
t.field
|
|
413
413
|
);
|
|
414
414
|
})
|
|
415
415
|
] }),
|
|
416
|
-
|
|
417
|
-
X && /* @__PURE__ */
|
|
416
|
+
ne && /* @__PURE__ */ m("tr", { className: "border-b border-slate-200 bg-slate-50 dark:border-slate-700 dark:bg-slate-800", children: [
|
|
417
|
+
X && /* @__PURE__ */ r("th", { className: "px-1.5 py-1" }),
|
|
418
418
|
f.map((t) => {
|
|
419
|
-
const
|
|
419
|
+
const n = _e(t), s = se[t.field];
|
|
420
420
|
return /* @__PURE__ */ m("th", { className: "px-1.5 py-1 font-normal", children: [
|
|
421
|
-
|
|
421
|
+
n === "text" && /* @__PURE__ */ r(
|
|
422
422
|
"input",
|
|
423
423
|
{
|
|
424
424
|
value: (s == null ? void 0 : s.value) ?? "",
|
|
@@ -428,8 +428,8 @@ function kt({
|
|
|
428
428
|
className: "h-6 w-full min-w-[56px] rounded border border-slate-200 bg-white px-1.5 text-[10.5px] font-normal normal-case tracking-normal outline-none focus:border-nvr-cyan/50 dark:border-slate-600 dark:bg-slate-900 dark:text-slate-100"
|
|
429
429
|
}
|
|
430
430
|
),
|
|
431
|
-
|
|
432
|
-
/* @__PURE__ */
|
|
431
|
+
n === "num" && /* @__PURE__ */ m("span", { className: "flex items-center gap-0.5", children: [
|
|
432
|
+
/* @__PURE__ */ r(
|
|
433
433
|
Qe,
|
|
434
434
|
{
|
|
435
435
|
value: (s == null ? void 0 : s.op) ?? "_eq",
|
|
@@ -442,7 +442,7 @@ function kt({
|
|
|
442
442
|
ariaLabel: `Filter op ${t.field}`
|
|
443
443
|
}
|
|
444
444
|
),
|
|
445
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ r(
|
|
446
446
|
"input",
|
|
447
447
|
{
|
|
448
448
|
type: "number",
|
|
@@ -453,7 +453,7 @@ function kt({
|
|
|
453
453
|
}
|
|
454
454
|
)
|
|
455
455
|
] }),
|
|
456
|
-
|
|
456
|
+
n === "bool" && /* @__PURE__ */ r(
|
|
457
457
|
Qe,
|
|
458
458
|
{
|
|
459
459
|
value: (s == null ? void 0 : s.value) ?? "",
|
|
@@ -472,7 +472,7 @@ function kt({
|
|
|
472
472
|
] })
|
|
473
473
|
] }),
|
|
474
474
|
/* @__PURE__ */ m("tbody", { children: [
|
|
475
|
-
W.length === 0 && /* @__PURE__ */
|
|
475
|
+
W.length === 0 && /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ r(
|
|
476
476
|
"td",
|
|
477
477
|
{
|
|
478
478
|
colSpan: f.length + (X ? 1 : 0),
|
|
@@ -486,36 +486,36 @@ function kt({
|
|
|
486
486
|
onClick: x ? () => x.open({ collection: a, itemId: String(t.id) }) : void 0,
|
|
487
487
|
className: `border-b border-slate-100 last:border-0 dark:border-slate-800 ${x ? "cursor-pointer hover:bg-nvr-cyan/5 dark:hover:bg-nvr-cyan/10" : ""}`,
|
|
488
488
|
children: [
|
|
489
|
-
X && /* @__PURE__ */
|
|
490
|
-
f.map((
|
|
489
|
+
X && /* @__PURE__ */ r("td", { className: "px-2 py-1.5 text-right text-[11px] tabular-nums text-slate-400", children: t.line_number == null ? "" : String(t.line_number) }),
|
|
490
|
+
f.map((n) => /* @__PURE__ */ r(
|
|
491
491
|
"td",
|
|
492
492
|
{
|
|
493
|
-
className: `whitespace-nowrap px-2.5 py-1.5 text-[12px] text-slate-700 dark:text-slate-200 ${ce(
|
|
494
|
-
children: xe(t,
|
|
493
|
+
className: `whitespace-nowrap px-2.5 py-1.5 text-[12px] text-slate-700 dark:text-slate-200 ${ce(n) ? "text-right" : ""}`,
|
|
494
|
+
children: xe(t, n)
|
|
495
495
|
},
|
|
496
|
-
|
|
496
|
+
n.field
|
|
497
497
|
))
|
|
498
498
|
]
|
|
499
499
|
},
|
|
500
500
|
String(t.id)
|
|
501
501
|
))
|
|
502
502
|
] }),
|
|
503
|
-
Ce && W.length > 0 && /* @__PURE__ */
|
|
503
|
+
Ce && W.length > 0 && /* @__PURE__ */ r("tfoot", { children: /* @__PURE__ */ m(
|
|
504
504
|
"tr",
|
|
505
505
|
{
|
|
506
506
|
"data-read-grid-footer": !0,
|
|
507
507
|
className: "border-t border-slate-200 bg-slate-50 text-[11px] font-medium text-slate-600 dark:border-slate-700 dark:bg-slate-800/60 dark:text-slate-300",
|
|
508
508
|
children: [
|
|
509
|
-
X && /* @__PURE__ */
|
|
509
|
+
X && /* @__PURE__ */ r("td", {}),
|
|
510
510
|
f.map((t) => {
|
|
511
|
-
const
|
|
512
|
-
return /* @__PURE__ */
|
|
511
|
+
const n = ue(t);
|
|
512
|
+
return /* @__PURE__ */ r(
|
|
513
513
|
"td",
|
|
514
514
|
{
|
|
515
515
|
className: `whitespace-nowrap px-2.5 py-1.5 ${ce(t) ? "text-right" : ""}`,
|
|
516
|
-
children:
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
516
|
+
children: n && /* @__PURE__ */ m(Ge, { children: [
|
|
517
|
+
/* @__PURE__ */ r("span", { className: "mr-1 font-mono text-[10px] text-slate-400", children: n.toUpperCase() }),
|
|
518
|
+
/* @__PURE__ */ r("span", { className: "tabular-nums", children: ve(t) })
|
|
519
519
|
] })
|
|
520
520
|
},
|
|
521
521
|
t.field
|
|
@@ -537,7 +537,7 @@ function kt({
|
|
|
537
537
|
Q.toLocaleString("en-US")
|
|
538
538
|
] }),
|
|
539
539
|
/* @__PURE__ */ m("span", { className: "flex items-center gap-0.5", children: [
|
|
540
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ r(
|
|
541
541
|
"button",
|
|
542
542
|
{
|
|
543
543
|
type: "button",
|
|
@@ -550,13 +550,13 @@ function kt({
|
|
|
550
550
|
/* @__PURE__ */ m("span", { className: "min-w-[48px] text-center text-[11px] tabular-nums text-slate-500", children: [
|
|
551
551
|
$,
|
|
552
552
|
" / ",
|
|
553
|
-
|
|
553
|
+
re.toLocaleString("en-US")
|
|
554
554
|
] }),
|
|
555
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ r(
|
|
556
556
|
"button",
|
|
557
557
|
{
|
|
558
558
|
type: "button",
|
|
559
|
-
disabled: $ >=
|
|
559
|
+
disabled: $ >= re,
|
|
560
560
|
onClick: () => L((t) => t + 1),
|
|
561
561
|
className: "h-6 rounded px-2 text-[11px] text-slate-600 hover:bg-slate-100 disabled:opacity-30 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
562
562
|
children: "Next →"
|
|
@@ -588,7 +588,7 @@ function Vt({
|
|
|
588
588
|
const l = A == null ? void 0 : A[e];
|
|
589
589
|
if (!l) return null;
|
|
590
590
|
const i = l.via !== "user";
|
|
591
|
-
return l.caller && l.activity_id ? /* @__PURE__ */
|
|
591
|
+
return l.caller && l.activity_id ? /* @__PURE__ */ r(
|
|
592
592
|
ut,
|
|
593
593
|
{
|
|
594
594
|
activityId: l.activity_id,
|
|
@@ -605,7 +605,7 @@ function Vt({
|
|
|
605
605
|
"aria-label": `Changed ${pe(l.at)} by ${l.caller.name} through the API`,
|
|
606
606
|
className: "ml-1 inline-flex items-center gap-1 rounded-full bg-amber-50 px-1.5 align-middle text-[9.5px] font-medium leading-4 text-amber-800 hover:bg-amber-100 dark:bg-amber-400/10 dark:text-amber-300 dark:hover:bg-amber-400/20",
|
|
607
607
|
children: [
|
|
608
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ r("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400", "aria-hidden": !0 }),
|
|
609
609
|
l.caller.name,
|
|
610
610
|
" · ",
|
|
611
611
|
pe(l.at)
|
|
@@ -613,7 +613,7 @@ function Vt({
|
|
|
613
613
|
}
|
|
614
614
|
)
|
|
615
615
|
}
|
|
616
|
-
) : /* @__PURE__ */
|
|
616
|
+
) : /* @__PURE__ */ r(
|
|
617
617
|
"span",
|
|
618
618
|
{
|
|
619
619
|
"data-field-touch": e,
|
|
@@ -631,7 +631,7 @@ function Vt({
|
|
|
631
631
|
if (!l || l.length === 0) return null;
|
|
632
632
|
const i = l.map((c) => c.message || c.rule).join(`
|
|
633
633
|
`);
|
|
634
|
-
return /* @__PURE__ */
|
|
634
|
+
return /* @__PURE__ */ r(
|
|
635
635
|
"span",
|
|
636
636
|
{
|
|
637
637
|
"data-integrity-mark": e,
|
|
@@ -714,15 +714,15 @@ function Vt({
|
|
|
714
714
|
(i, c) => l === "leading" && e === null ? Q.indexOf(i.field) - Q.indexOf(c.field) : 0
|
|
715
715
|
).map((i) => ({ key: i.field, node: T(i.field, i) })).filter((i) => i.node != null) : [], z = (e, l = "trailing") => {
|
|
716
716
|
const i = le(e, l);
|
|
717
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
717
|
+
return i.length === 0 ? null : /* @__PURE__ */ r(
|
|
718
718
|
"div",
|
|
719
719
|
{
|
|
720
720
|
className: l === "leading" ? "mb-4 space-y-4" : "mt-3 space-y-4",
|
|
721
721
|
"data-read-live-slots": l,
|
|
722
|
-
children: i.map((c) => /* @__PURE__ */
|
|
722
|
+
children: i.map((c) => /* @__PURE__ */ r("div", { children: c.node }, c.key))
|
|
723
723
|
}
|
|
724
724
|
);
|
|
725
|
-
}, [Y, X] = D({}),
|
|
725
|
+
}, [Y, X] = D({}), re = (e) => Y[e] === !0, [Z, Fe] = D({}), xe = Ve(
|
|
726
726
|
(e) => (l) => Fe((i) => i[e] === l ? i : { ...i, [e]: l }),
|
|
727
727
|
[]
|
|
728
728
|
), [ce, ye] = D({}), ue = Ve(
|
|
@@ -731,8 +731,8 @@ function Vt({
|
|
|
731
731
|
), Ce = (e) => {
|
|
732
732
|
const l = oe.filter((c) => c.group_key === e).sort((c, b) => c.sort - b.sort);
|
|
733
733
|
if (l.length === 0) return null;
|
|
734
|
-
const i = l.some((c) =>
|
|
735
|
-
return /* @__PURE__ */
|
|
734
|
+
const i = l.some((c) => re(c.field));
|
|
735
|
+
return /* @__PURE__ */ r("div", { className: i ? "mt-3 space-y-4" : "hidden", "data-read-widgets": !0, children: l.map((c) => /* @__PURE__ */ r("div", { hidden: !re(c.field), children: /* @__PURE__ */ r(
|
|
736
736
|
bt,
|
|
737
737
|
{
|
|
738
738
|
widgetId: c.widget_id,
|
|
@@ -745,17 +745,17 @@ function Vt({
|
|
|
745
745
|
onContentChange: (b) => X((O) => O[c.field] === b ? O : { ...O, [c.field]: b })
|
|
746
746
|
}
|
|
747
747
|
) }, c.field)) });
|
|
748
|
-
}, ve = [...p.groups].sort((e, l) => e.sort - l.sort).filter((e) => e.visibility_mode !== "new_only"), [me, _e] = D(() => /* @__PURE__ */ new Set()),
|
|
748
|
+
}, ve = [...p.groups].sort((e, l) => e.sort - l.sort).filter((e) => e.visibility_mode !== "new_only"), [me, _e] = D(() => /* @__PURE__ */ new Set()), ne = (e) => !e.is_collapsed || me.has(e.key), t = (e) => _e((l) => {
|
|
749
749
|
const i = new Set(l);
|
|
750
750
|
return i.has(e) ? i.delete(e) : i.add(e), i;
|
|
751
|
-
}),
|
|
751
|
+
}), n = [];
|
|
752
752
|
for (const e of ve) {
|
|
753
753
|
if (e.type === "container") {
|
|
754
754
|
for (const l of ve.filter((i) => i.container_id != null && i.container_id === e.id))
|
|
755
|
-
|
|
755
|
+
n.push(l);
|
|
756
756
|
continue;
|
|
757
757
|
}
|
|
758
|
-
e.container_id == null &&
|
|
758
|
+
e.container_id == null && n.push(e);
|
|
759
759
|
}
|
|
760
760
|
const s = (e) => {
|
|
761
761
|
var l;
|
|
@@ -769,7 +769,7 @@ function Vt({
|
|
|
769
769
|
}, k = (e) => {
|
|
770
770
|
const l = G.get(e.field), i = ie(e.overrides), c = V(e.field);
|
|
771
771
|
if (c != null && c.junction_field && c.many_collection && c.many_field)
|
|
772
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ r(
|
|
773
773
|
_t,
|
|
774
774
|
{
|
|
775
775
|
junction: c.many_collection,
|
|
@@ -783,11 +783,11 @@ function Vt({
|
|
|
783
783
|
);
|
|
784
784
|
const b = f == null ? void 0 : f[e.field], O = de(e.field);
|
|
785
785
|
if (O === "nivaro_users" && b != null)
|
|
786
|
-
return /* @__PURE__ */
|
|
787
|
-
if (O) return /* @__PURE__ */
|
|
788
|
-
if (b == null || b === "") return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ r("span", { className: "inline-block", children: /* @__PURE__ */ r(Ie, { userId: String(b), size: "compact" }) });
|
|
787
|
+
if (O) return /* @__PURE__ */ r(Le, { collection: O, id: b });
|
|
788
|
+
if (b == null || b === "") return /* @__PURE__ */ r(te, {});
|
|
789
789
|
if ((l == null ? void 0 : l.type) === "boolean")
|
|
790
|
-
return /* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ r(
|
|
791
791
|
Ye,
|
|
792
792
|
{
|
|
793
793
|
value: b,
|
|
@@ -795,13 +795,13 @@ function Vt({
|
|
|
795
795
|
}
|
|
796
796
|
);
|
|
797
797
|
const B = i.options ?? {};
|
|
798
|
-
return u(e) && typeof b == "string" ? /^\s*\{/.test(b) ? /* @__PURE__ */
|
|
798
|
+
return u(e) && typeof b == "string" ? /^\s*\{/.test(b) ? /* @__PURE__ */ r("div", { className: "whitespace-pre-wrap font-normal", children: pt(b) }) : /* @__PURE__ */ r(
|
|
799
799
|
"div",
|
|
800
800
|
{
|
|
801
801
|
className: "rrv-prose font-normal leading-relaxed [&_a]:underline [&_h1]:text-[15px] [&_h1]:font-semibold [&_h2]:text-[14px] [&_h2]:font-semibold [&_h3]:font-semibold [&_li]:ml-4 [&_ol]:list-decimal [&_p]:my-1 [&_ul]:list-disc",
|
|
802
802
|
dangerouslySetInnerHTML: { __html: ct(b) }
|
|
803
803
|
}
|
|
804
|
-
) : B.format === "currency" ? /* @__PURE__ */
|
|
804
|
+
) : B.format === "currency" ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: Ae(b) }) : (l == null ? void 0 : l.type) === "decimal" || (l == null ? void 0 : l.type) === "float" ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: Se(b) }) : (l == null ? void 0 : l.type) === "date" || (l == null ? void 0 : l.type) === "datetime" || (l == null ? void 0 : l.type) === "timestamp" ? ze(b) : String(b);
|
|
805
805
|
}, R = (e) => {
|
|
806
806
|
const l = ie(e.overrides), i = V(e.field);
|
|
807
807
|
if (!(i != null && i.many_collection) || !i.many_field) return null;
|
|
@@ -817,7 +817,7 @@ function Vt({
|
|
|
817
817
|
}
|
|
818
818
|
return B;
|
|
819
819
|
})(), O = c.layout_id ?? null;
|
|
820
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ r(
|
|
821
821
|
kt,
|
|
822
822
|
{
|
|
823
823
|
collection: i.many_collection,
|
|
@@ -841,7 +841,7 @@ function Vt({
|
|
|
841
841
|
}, Ze = (e) => {
|
|
842
842
|
const l = E.filter((d) => d.group_key === e.key && !ke.has(d.field)).sort((d, H) => d.sort - H.sort), i = oe.filter((d) => d.group_key === e.key), c = le(e.key);
|
|
843
843
|
if (l.length === 0 && i.length === 0 && c.length === 0) return null;
|
|
844
|
-
const b = (d) => ee && (U(d) || s(d)) && ((x == null ? void 0 : x[d.field]) ?? Z[d.field]) === 0, O = l.filter((d) => !U(d)), B = l.filter(U), we = i.filter((d) =>
|
|
844
|
+
const b = (d) => ee && (U(d) || s(d)) && ((x == null ? void 0 : x[d.field]) ?? Z[d.field]) === 0, O = l.filter((d) => !U(d)), B = l.filter(U), we = i.filter((d) => re(d.field)), tt = l.filter((d) => !b(d)).length === 0 && c.length === 0 && we.length === 0, je = e.read_width === "full" || e.read_width === "half" || e.read_width === "third" ? e.read_width : B.length > 0 || i.length > 0 || c.length > 0 || O.length > 4 ? "full" : "half";
|
|
845
845
|
return /* @__PURE__ */ m(
|
|
846
846
|
"section",
|
|
847
847
|
{
|
|
@@ -853,27 +853,19 @@ function Vt({
|
|
|
853
853
|
/* @__PURE__ */ m(
|
|
854
854
|
"h3",
|
|
855
855
|
{
|
|
856
|
-
className: `group/rs flex items-center justify-between gap-2 px-5 py-2.5 text-[11px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400 ${
|
|
856
|
+
className: `group/rs relative flex items-center justify-between gap-2 px-5 py-2.5 text-[11px] font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400 ${ne(e) ? "border-b border-slate-100 dark:border-slate-800" : ""}`,
|
|
857
857
|
children: [
|
|
858
|
-
e.is_collapsed ? /* @__PURE__ */
|
|
858
|
+
e.is_collapsed ? /* @__PURE__ */ r(
|
|
859
859
|
"button",
|
|
860
860
|
{
|
|
861
861
|
type: "button",
|
|
862
862
|
onClick: () => t(e.key),
|
|
863
|
-
"aria-expanded":
|
|
864
|
-
className: "
|
|
865
|
-
children:
|
|
866
|
-
/* @__PURE__ */ n("span", { children: e.label }),
|
|
867
|
-
/* @__PURE__ */ n(
|
|
868
|
-
nt,
|
|
869
|
-
{
|
|
870
|
-
className: `h-3.5 w-3.5 transition-transform ${re(e) ? "" : "-rotate-90"}`
|
|
871
|
-
}
|
|
872
|
-
)
|
|
873
|
-
]
|
|
863
|
+
"aria-expanded": ne(e),
|
|
864
|
+
className: "min-w-0 flex-1 text-left uppercase after:absolute after:inset-0 group-hover/rs:text-slate-700 dark:group-hover/rs:text-slate-200",
|
|
865
|
+
children: e.label
|
|
874
866
|
}
|
|
875
|
-
) : /* @__PURE__ */
|
|
876
|
-
P && (O.length > 0 || B.length > 0) && /* @__PURE__ */
|
|
867
|
+
) : /* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: e.label }),
|
|
868
|
+
P && (O.length > 0 || B.length > 0) && /* @__PURE__ */ r(
|
|
877
869
|
"button",
|
|
878
870
|
{
|
|
879
871
|
type: "button",
|
|
@@ -884,18 +876,25 @@ function Vt({
|
|
|
884
876
|
},
|
|
885
877
|
title: `Edit ${e.label}`,
|
|
886
878
|
"aria-label": `Edit ${e.label}`,
|
|
887
|
-
className: "-my-1 rounded p-1 text-slate-400 opacity-0 transition-opacity hover:bg-slate-100 hover:text-slate-700 focus-visible:opacity-100 group-hover/rs:opacity-100 dark:hover:bg-white/5 dark:hover:text-slate-200 motion-reduce:transition-none",
|
|
888
|
-
children: /* @__PURE__ */
|
|
879
|
+
className: "relative -my-1 rounded p-1 text-slate-400 opacity-0 transition-opacity hover:bg-slate-100 hover:text-slate-700 focus-visible:opacity-100 group-hover/rs:opacity-100 dark:hover:bg-white/5 dark:hover:text-slate-200 motion-reduce:transition-none",
|
|
880
|
+
children: /* @__PURE__ */ r(rt, { className: "h-3 w-3" })
|
|
881
|
+
}
|
|
882
|
+
),
|
|
883
|
+
e.is_collapsed && /* @__PURE__ */ r(
|
|
884
|
+
nt,
|
|
885
|
+
{
|
|
886
|
+
"aria-hidden": "true",
|
|
887
|
+
className: `pointer-events-none h-3.5 w-3.5 shrink-0 transition-transform group-hover/rs:text-slate-700 dark:group-hover/rs:text-slate-200 ${ne(e) ? "" : "-rotate-90"}`
|
|
889
888
|
}
|
|
890
889
|
)
|
|
891
890
|
]
|
|
892
891
|
}
|
|
893
892
|
),
|
|
894
|
-
/* @__PURE__ */ m("div", { className: "px-5 pb-5 pt-4", hidden: !
|
|
893
|
+
/* @__PURE__ */ m("div", { className: "px-5 pb-5 pt-4", hidden: !ne(e), children: [
|
|
895
894
|
O.length > 0 && // One column rhythm for the whole page: every section's facts sit
|
|
896
895
|
// on the same 2 / 3 / 4 / 6 tracks, so values line up card to
|
|
897
896
|
// card instead of each card auto-filling its own grid.
|
|
898
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ r("dl", { className: "grid gap-x-6 gap-y-5", "data-read-dl": je, children: O.map((d) => {
|
|
899
898
|
var Ue, Be, Je;
|
|
900
899
|
if (b(d)) return null;
|
|
901
900
|
const Me = !!(ie(d.overrides).options ?? {}).emphasis, Te = u(d) || !!((Be = (Ue = G.get(d.field)) == null ? void 0 : Ue.interface) != null && Be.includes("rich-text")), Ee = f == null ? void 0 : f[d.field], We = !Te && !s(d) && !de(d.field) && (String(((Je = G.get(d.field)) == null ? void 0 : Je.interface) ?? "").includes("textarea") || typeof Ee == "string" && Ee.length > 36);
|
|
@@ -906,17 +905,17 @@ function Vt({
|
|
|
906
905
|
children: [
|
|
907
906
|
/* @__PURE__ */ m("dt", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
|
|
908
907
|
Ne(d),
|
|
909
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ r(S, { field: d.field }),
|
|
910
909
|
K(d.field)
|
|
911
910
|
] }),
|
|
912
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ r(
|
|
913
912
|
"dd",
|
|
914
913
|
{
|
|
915
914
|
"data-replay-field": d.field,
|
|
916
915
|
"data-field-collection": a,
|
|
917
916
|
"data-remote-changed": h.has(d.field) || void 0,
|
|
918
917
|
className: `mt-1 min-w-0${L(d.field)} ${Me ? "text-[17px] font-semibold tracking-[-0.01em] text-slate-900 dark:text-white" : `${s(d) || Te ? "" : We ? "line-clamp-3 break-words " : "truncate "}text-[13px] font-medium text-slate-800 dark:text-slate-100`}`,
|
|
919
|
-
children: f ? k(d) : /* @__PURE__ */
|
|
918
|
+
children: f ? k(d) : /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
920
919
|
}
|
|
921
920
|
)
|
|
922
921
|
]
|
|
@@ -928,8 +927,8 @@ function Vt({
|
|
|
928
927
|
var H;
|
|
929
928
|
return /* @__PURE__ */ m("div", { className: O.length > 0 ? "mt-3" : "", hidden: b(d), children: [
|
|
930
929
|
(H = v == null ? void 0 : v.get(d.field)) != null && H.length ? /* @__PURE__ */ m("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] font-medium text-amber-700 dark:text-amber-300", children: [
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ r("span", { className: "uppercase tracking-wide", children: Ne(d) }),
|
|
931
|
+
/* @__PURE__ */ r(S, { field: d.field }),
|
|
933
932
|
/* @__PURE__ */ m("span", { className: "font-normal text-amber-700/80 dark:text-amber-300/80", children: [
|
|
934
933
|
"— ",
|
|
935
934
|
v.get(d.field).length,
|
|
@@ -964,9 +963,9 @@ function Vt({
|
|
|
964
963
|
ae && /* @__PURE__ */ m("div", { className: "min-w-0", children: [
|
|
965
964
|
/* @__PURE__ */ m("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
|
|
966
965
|
Ne(ae),
|
|
967
|
-
/* @__PURE__ */
|
|
966
|
+
/* @__PURE__ */ r(S, { field: ae.field })
|
|
968
967
|
] }),
|
|
969
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ r(
|
|
970
969
|
"p",
|
|
971
970
|
{
|
|
972
971
|
"data-replay-field": ae.field,
|
|
@@ -976,13 +975,13 @@ function Vt({
|
|
|
976
975
|
}
|
|
977
976
|
)
|
|
978
977
|
] }),
|
|
979
|
-
Pe.length > 0 && /* @__PURE__ */
|
|
978
|
+
Pe.length > 0 && /* @__PURE__ */ r("dl", { className: "mt-3 flex flex-wrap gap-x-8 gap-y-2", children: Pe.map((e) => /* @__PURE__ */ m("div", { className: "min-w-0", children: [
|
|
980
979
|
/* @__PURE__ */ m("dt", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: [
|
|
981
980
|
Ne(e),
|
|
982
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ r(S, { field: e.field }),
|
|
983
982
|
K(e.field)
|
|
984
983
|
] }),
|
|
985
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ r(
|
|
986
985
|
"dd",
|
|
987
986
|
{
|
|
988
987
|
"data-replay-field": e.field,
|
|
@@ -996,13 +995,13 @@ function Vt({
|
|
|
996
995
|
]
|
|
997
996
|
}
|
|
998
997
|
),
|
|
999
|
-
/* @__PURE__ */
|
|
1000
|
-
_ ? /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ r("style", { children: xt }),
|
|
999
|
+
_ ? /* @__PURE__ */ r("div", { className: "grid items-stretch gap-4", "data-read-board": !0, children: n.map(Ze) }) : /* @__PURE__ */ m("div", { className: "flex flex-col gap-4", "data-read-board-pending": !0, children: [
|
|
1000
|
+
/* @__PURE__ */ r("div", { className: "h-32 animate-pulse rounded-xl bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
1001
|
+
/* @__PURE__ */ r("div", { className: "h-32 animate-pulse rounded-xl bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
1002
|
+
/* @__PURE__ */ r("div", { className: "h-56 animate-pulse rounded-xl bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" })
|
|
1004
1003
|
] }),
|
|
1005
|
-
Re && /* @__PURE__ */
|
|
1004
|
+
Re && /* @__PURE__ */ r("div", { className: "mt-4", children: Re })
|
|
1006
1005
|
]
|
|
1007
1006
|
}
|
|
1008
1007
|
);
|