@nivaro/react 0.3.13 → 0.3.15
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/slots/pipeline/OwnersSection.js +79 -75
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +33 -2
- package/dist/index.js +520 -516
- package/dist/shared/components/CollectionBrowserView.js +2393 -2318
- package/dist/shared/components/DataTable.js +347 -335
- package/dist/shared/components/ItemEditForm.js +5278 -5149
- package/dist/shared/components/ListLoadError.js +33 -0
- package/dist/shared/components/PageRenderer.js +562 -529
- package/dist/shared/components/ProfileView.js +53 -51
- package/dist/shared/components/RecordReadView.js +119 -117
- package/dist/shared/components/ReportView.js +1268 -1241
- package/dist/shared/components/cbv/export-rows.js +69 -0
- package/dist/shared/components/cbv/saved-view-risk.js +35 -0
- package/dist/shared/components/cbv/unknown-fields.js +18 -0
- package/dist/shared/components/integrations/console/AlertsView.js +27 -25
- package/dist/shared/components/integrations/console/EventsView.js +244 -209
- package/dist/shared/components/item-edit/CatalogPickerField.js +946 -878
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +84 -57
- package/dist/shared/components/item-edit/FieldAffordances.js +63 -61
- package/dist/shared/components/item-edit/FieldRow.js +195 -179
- package/dist/shared/components/item-edit/FilePickerField.js +257 -254
- package/dist/shared/components/item-edit/HeaderTools.js +139 -95
- package/dist/shared/components/item-edit/InlineTableField.js +2087 -2075
- package/dist/shared/components/item-edit/RowComments.js +1 -3
- package/dist/shared/components/item-edit/SummaryPanel.js +62 -62
- package/dist/shared/components/item-edit/UserChip.js +113 -113
- package/dist/shared/components/item-edit/file-download.js +18 -0
- package/dist/shared/components/item-edit/line-qty.js +67 -32
- package/dist/shared/components/item-edit/save-refusal.js +23 -0
- package/dist/shared/components/monitoring/TrafficMiniMap.js +9 -9
- package/dist/shared/components/panels/CommentPanel.js +30 -30
- package/dist/shared/components/panels/ItemLockBanner.js +207 -185
- package/dist/shared/components/panels/PipelinePanel.js +915 -786
- package/dist/shared/components/pipeline/PipelineEditorView.js +45 -25
- package/dist/shared/components/profile/DelegationCard.js +1 -1
- package/dist/shared/components/profile/session-actions.js +24 -24
- package/dist/shared/components/queue/QueueItemSheet.js +18 -18
- package/dist/shared/components/queue/QueueWorklist.js +517 -504
- package/dist/shared/components/ui/dropdown-menu.js +8 -7
- package/dist/shared/lib/draft-store.js +60 -33
- package/dist/shared/lib/leave-guard.js +38 -0
- package/dist/shared/lib/load-error.js +38 -17
- package/dist/shared/lib/summary-mode.js +25 -25
- package/dist/shared/lib/table-pins.js +23 -0
- package/dist/shared/lib/validation-rules.js +55 -51
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r, jsxs as u, Fragment as he } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as V, useQueryClient as qt } from "@tanstack/react-query";
|
|
3
|
-
import { Pencil as
|
|
3
|
+
import { Pencil as Tt, ChevronDown as Ct } from "lucide-react";
|
|
4
4
|
import { useMemo as ge, useRef as Ot, useState as Z, useEffect as be, useCallback as st, Fragment as At } from "react";
|
|
5
|
-
import { DrilldownContext as Rt, useNivaroClient as
|
|
5
|
+
import { DrilldownContext as Rt, useNivaroClient as Ce, useApiFetchConfig as Dt, useDrilldown as ct } from "../context.js";
|
|
6
6
|
import { useDebounced as Lt } from "../hooks/useDebounced.js";
|
|
7
7
|
import { parseAllowedCollections as Pt } from "../lib/allowed-collections.js";
|
|
8
8
|
import { get as G } from "../lib/commands.js";
|
|
@@ -11,7 +11,7 @@ import { useLiveRecord as It } from "../lib/live.js";
|
|
|
11
11
|
import { isDisplayFormulaField as qe, resolvePlacementText as Wt, displayFormulaOf as Mt, formatDisplayValue as Ut } from "../lib/placement-behaviour.js";
|
|
12
12
|
import { useRecordReader as Vt } from "../lib/record-loader.js";
|
|
13
13
|
import { sanitizeHtml as Bt } from "../lib/sanitize-html.js";
|
|
14
|
-
import { titleCase as Ge, formatRelative as
|
|
14
|
+
import { titleCase as Ge, formatRelative as Te } from "../lib/utils.js";
|
|
15
15
|
import { InboundRequestPopover as Gt } from "./integrations/InboundRequest.js";
|
|
16
16
|
import { FileM2MField as Jt } from "./item-edit/FilePickerField.js";
|
|
17
17
|
import { useFieldTouches as Ht } from "./item-edit/HeaderFreshness.js";
|
|
@@ -33,8 +33,10 @@ const pe = (n) => {
|
|
|
33
33
|
return {};
|
|
34
34
|
}
|
|
35
35
|
}, mt = (n) => {
|
|
36
|
-
const m =
|
|
37
|
-
|
|
36
|
+
const m = String(n).match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ]00:00:00(?:\.0+)?(?:Z|[+-]00:?00)?)?$/);
|
|
37
|
+
if (m) return `${m[2]}/${m[3]}/${m[1]}`;
|
|
38
|
+
const y = new Date(String(n));
|
|
39
|
+
return Number.isNaN(y.getTime()) ? String(n) : `${String(y.getMonth() + 1).padStart(2, "0")}/${String(y.getDate()).padStart(2, "0")}/${y.getFullYear()}`;
|
|
38
40
|
}, Je = (n) => {
|
|
39
41
|
const m = Number(n);
|
|
40
42
|
return Number.isNaN(m) ? String(n) : `$${m.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
|
|
@@ -60,19 +62,19 @@ function ft({
|
|
|
60
62
|
value: n,
|
|
61
63
|
trueTone: m = "positive"
|
|
62
64
|
}) {
|
|
63
|
-
const
|
|
65
|
+
const y = n === !0 || n === 1 || n === "1" || n === "true";
|
|
64
66
|
return /* @__PURE__ */ r(
|
|
65
67
|
"span",
|
|
66
68
|
{
|
|
67
|
-
className: `inline-flex h-[18px] items-center rounded-full px-1.5 text-[10.5px] font-semibold ${
|
|
68
|
-
children:
|
|
69
|
+
className: `inline-flex h-[18px] items-center rounded-full px-1.5 text-[10.5px] font-semibold ${y ? m === "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"}`,
|
|
70
|
+
children: y ? "Yes" : "No"
|
|
69
71
|
}
|
|
70
72
|
);
|
|
71
73
|
}
|
|
72
74
|
function al({ collection: n, id: m }) {
|
|
73
|
-
const
|
|
75
|
+
const y = Ce(), c = Vt(), P = ct(), { data: w } = V({
|
|
74
76
|
queryKey: ["cbv-collection-meta", n],
|
|
75
|
-
queryFn: () =>
|
|
77
|
+
queryFn: () => y.request(
|
|
76
78
|
G(`/collections/${n}`)
|
|
77
79
|
).then((q) => q.data).catch(() => ({ display_template: null, fields: [] })),
|
|
78
80
|
staleTime: 10 * 6e4,
|
|
@@ -91,12 +93,12 @@ function al({ collection: n, id: m }) {
|
|
|
91
93
|
"#",
|
|
92
94
|
String(m)
|
|
93
95
|
] });
|
|
94
|
-
let
|
|
96
|
+
let _ = "";
|
|
95
97
|
const h = w == null ? void 0 : w.display_template;
|
|
96
|
-
if (h && (
|
|
98
|
+
if (h && (_ = h.replace(/\{\{\s*([^}]+?)\s*\}\}/g, (q, K) => {
|
|
97
99
|
const M = K.split(".").reduce((S, x) => S == null ? void 0 : S[x], $);
|
|
98
100
|
return M == null ? "" : String(M);
|
|
99
|
-
}).trim()), !
|
|
101
|
+
}).trim()), !_) {
|
|
100
102
|
for (const q of [
|
|
101
103
|
"name",
|
|
102
104
|
"title",
|
|
@@ -108,22 +110,22 @@ function al({ collection: n, id: m }) {
|
|
|
108
110
|
"filename"
|
|
109
111
|
])
|
|
110
112
|
if ($[q]) {
|
|
111
|
-
|
|
113
|
+
_ = String($[q]);
|
|
112
114
|
break;
|
|
113
115
|
}
|
|
114
116
|
}
|
|
115
|
-
return
|
|
117
|
+
return _ || (_ = `#${String(m)}`), P ? /* @__PURE__ */ r(
|
|
116
118
|
"button",
|
|
117
119
|
{
|
|
118
120
|
type: "button",
|
|
119
121
|
onClick: () => P.open({ collection: n, itemId: String(m) }),
|
|
120
122
|
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",
|
|
121
|
-
children:
|
|
123
|
+
children: _
|
|
122
124
|
}
|
|
123
|
-
) : /* @__PURE__ */ r(he, { children:
|
|
125
|
+
) : /* @__PURE__ */ r(he, { children: _ });
|
|
124
126
|
}
|
|
125
127
|
function il({ id: n }) {
|
|
126
|
-
const m =
|
|
128
|
+
const m = Ce(), { apiBase: y } = Dt(), { data: c, isPending: P } = V({
|
|
127
129
|
queryKey: ["rrv-file-meta", String(n)],
|
|
128
130
|
queryFn: () => m.request(
|
|
129
131
|
G(`/files/${n}/meta`)
|
|
@@ -139,7 +141,7 @@ function il({ id: n }) {
|
|
|
139
141
|
return /* @__PURE__ */ r(
|
|
140
142
|
"a",
|
|
141
143
|
{
|
|
142
|
-
href: `${
|
|
144
|
+
href: `${y}/files/${n}`,
|
|
143
145
|
target: "_blank",
|
|
144
146
|
rel: "noreferrer",
|
|
145
147
|
className: "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",
|
|
@@ -151,47 +153,47 @@ const He = ({ collection: n, id: m }) => n === "nivaro_files" ? /* @__PURE__ */
|
|
|
151
153
|
function sl({
|
|
152
154
|
junction: n,
|
|
153
155
|
parentFk: m,
|
|
154
|
-
junctionField:
|
|
156
|
+
junctionField: y,
|
|
155
157
|
parentId: c,
|
|
156
158
|
onCount: P,
|
|
157
159
|
onTarget: w,
|
|
158
160
|
relation: $
|
|
159
161
|
}) {
|
|
160
162
|
var j;
|
|
161
|
-
const W =
|
|
163
|
+
const W = Ce(), { data: _ } = V({
|
|
162
164
|
queryKey: ["cbv-collection-meta", n],
|
|
163
|
-
queryFn: () => W.request(G(`/collections/${n}`)).then((
|
|
165
|
+
queryFn: () => W.request(G(`/collections/${n}`)).then((v) => v.data),
|
|
164
166
|
staleTime: 10 * 6e4,
|
|
165
167
|
retry: !1
|
|
166
|
-
}), h = ((
|
|
167
|
-
(
|
|
168
|
-
), q = Pt(h == null ? void 0 : h.one_allowed_collections), K = !!h && !h.one_collection && (q.length > 0 || !!h.one_collection_field), M = (h == null ? void 0 : h.one_collection_field) ?? "collection", S = (
|
|
169
|
-
queryKey: ["rrv-m2m", n, m, c,
|
|
168
|
+
}), h = ((_ == null ? void 0 : _.relations) ?? []).find(
|
|
169
|
+
(v) => v.many_collection === n && v.many_field === y
|
|
170
|
+
), q = Pt(h == null ? void 0 : h.one_allowed_collections), K = !!h && !h.one_collection && (q.length > 0 || !!h.one_collection_field), M = (h == null ? void 0 : h.one_collection_field) ?? "collection", S = (v) => v ? v === "directus_users" ? "nivaro_users" : v : null, x = (h == null ? void 0 : h.one_collection) ?? (K ? q.some((v) => v === "directus_users" || v === "nivaro_users") ? "nivaro_users" : S(q[0]) : null), { data: g } = V({
|
|
171
|
+
queryKey: ["rrv-m2m", n, m, c, y, K ? M : ""],
|
|
170
172
|
queryFn: () => W.request(
|
|
171
173
|
G(`/items/${n}`, {
|
|
172
174
|
filter: JSON.stringify({ [m]: { _eq: c } }),
|
|
173
|
-
fields: K ? `id,${
|
|
175
|
+
fields: K ? `id,${y},${M}` : `id,${y}`,
|
|
174
176
|
limit: 200
|
|
175
177
|
})
|
|
176
178
|
).then(
|
|
177
|
-
(
|
|
178
|
-
const F =
|
|
179
|
+
(v) => (v.data ?? []).filter((N) => N[y] != null).map((N) => {
|
|
180
|
+
const F = N[y];
|
|
179
181
|
return {
|
|
180
182
|
id: String(typeof F == "object" ? F.id : F),
|
|
181
|
-
collection: K ? S(
|
|
183
|
+
collection: K ? S(N[M]) : null
|
|
182
184
|
};
|
|
183
185
|
})
|
|
184
186
|
).catch(() => []),
|
|
185
187
|
// The fields list depends on the companion leg — wait for it.
|
|
186
|
-
enabled: !!
|
|
188
|
+
enabled: !!_,
|
|
187
189
|
staleTime: 3e4,
|
|
188
190
|
retry: !1
|
|
189
|
-
}),
|
|
191
|
+
}), C = g == null ? void 0 : g.map((v) => v.id), k = x ?? (K ? ((j = g == null ? void 0 : g.find((v) => v.collection)) == null ? void 0 : j.collection) ?? null : null), O = C == null ? void 0 : C.length;
|
|
190
192
|
return be(() => {
|
|
191
193
|
O !== void 0 && (P == null || P(O));
|
|
192
194
|
}, [O, P]), be(() => {
|
|
193
|
-
|
|
194
|
-
}, [
|
|
195
|
+
k && (w == null || w(k));
|
|
196
|
+
}, [k, w]), _ && !k && (!K || g) ? /* @__PURE__ */ r(ee, {}) : !C || !k ? /* @__PURE__ */ r("span", { className: "inline-block h-3.5 w-20 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }) : C.length === 0 ? /* @__PURE__ */ r(ee, {}) : k === "nivaro_files" && $ ? /* @__PURE__ */ r("div", { className: "mt-1", children: /* @__PURE__ */ r(
|
|
195
197
|
Jt,
|
|
196
198
|
{
|
|
197
199
|
relation: $,
|
|
@@ -199,28 +201,28 @@ function sl({
|
|
|
199
201
|
allRelations: [],
|
|
200
202
|
disabled: !0
|
|
201
203
|
}
|
|
202
|
-
) }) : /* @__PURE__ */ r("span", { className: "flex flex-wrap gap-x-1.5 gap-y-0.5", children: (g ?? []).map(({ id:
|
|
204
|
+
) }) : /* @__PURE__ */ r("span", { className: "flex flex-wrap gap-x-1.5 gap-y-0.5", children: (g ?? []).map(({ id: v, collection: N }, F) => /* @__PURE__ */ u(
|
|
203
205
|
"span",
|
|
204
206
|
{
|
|
205
207
|
className: "inline-flex items-center whitespace-nowrap",
|
|
206
208
|
children: [
|
|
207
|
-
/* @__PURE__ */ r(He, { collection:
|
|
208
|
-
F <
|
|
209
|
+
/* @__PURE__ */ r(He, { collection: N ?? k, id: v }),
|
|
210
|
+
F < C.length - 1 && /* @__PURE__ */ r("span", { className: "text-slate-300 dark:text-slate-600", children: "," })
|
|
209
211
|
]
|
|
210
212
|
},
|
|
211
|
-
`${
|
|
213
|
+
`${N ?? k}:${v}`
|
|
212
214
|
)) });
|
|
213
215
|
}
|
|
214
216
|
function dl({
|
|
215
217
|
collection: n,
|
|
216
218
|
fkField: m,
|
|
217
|
-
parentId:
|
|
219
|
+
parentId: y,
|
|
218
220
|
layoutId: c,
|
|
219
221
|
presets: P,
|
|
220
222
|
defaultPreset: w,
|
|
221
223
|
onCount: $
|
|
222
224
|
}) {
|
|
223
|
-
const W =
|
|
225
|
+
const W = Ce(), _ = ct(), h = (P ?? []).filter((t) => t && Array.isArray(t.columns)), [q, K] = Z(
|
|
224
226
|
() => {
|
|
225
227
|
var t;
|
|
226
228
|
return h.length >= 2 ? ((t = h.find((i) => i.name === w)) == null ? void 0 : t.name) ?? h[0].name : "__all__";
|
|
@@ -255,35 +257,35 @@ function dl({
|
|
|
255
257
|
"timestamp",
|
|
256
258
|
"uuid"
|
|
257
259
|
].includes(i.type ?? ""))
|
|
258
|
-
).filter((i, o, f) => f.findIndex((
|
|
260
|
+
).filter((i, o, f) => f.findIndex((T) => T.field === i.field) === o)
|
|
259
261
|
})),
|
|
260
262
|
staleTime: 5 * 6e4,
|
|
261
263
|
retry: !1
|
|
262
|
-
}), g = (x == null ? void 0 : x.cols) ?? [],
|
|
263
|
-
if (!
|
|
264
|
-
const t = new Set(
|
|
264
|
+
}), g = (x == null ? void 0 : x.cols) ?? [], C = !!(x != null && x.lineNo), k = q !== "__all__" ? h.find((t) => t.name === q) : null, O = ge(() => {
|
|
265
|
+
if (!k) return g;
|
|
266
|
+
const t = new Set(k.columns), i = g.filter((o) => t.has(o.field));
|
|
265
267
|
return i.length > 0 ? i : g;
|
|
266
|
-
}, [g,
|
|
268
|
+
}, [g, k]), [j, v] = Z(""), [N, F] = Z(1), [ne, J] = Z({}), Y = Lt(ne, 350), Oe = ge(() => {
|
|
267
269
|
const t = [
|
|
268
|
-
{ path: [m], op: "_eq", value:
|
|
270
|
+
{ path: [m], op: "_eq", value: y }
|
|
269
271
|
];
|
|
270
272
|
for (const [i, o] of Object.entries(Y)) {
|
|
271
273
|
if (!(o != null && o.value.trim())) continue;
|
|
272
|
-
const f = o.value.trim(),
|
|
274
|
+
const f = o.value.trim(), T = Number(f), D = o.op === "_contains" ? f : f === "true" || f === "false" ? f === "true" : Number.isNaN(T) ? f : T;
|
|
273
275
|
t.push({ path: [i], op: o.op, value: D });
|
|
274
276
|
}
|
|
275
277
|
return JSON.stringify(t);
|
|
276
|
-
}, [Y, m,
|
|
278
|
+
}, [Y, m, y]), p = 25, {
|
|
277
279
|
data: B,
|
|
278
280
|
isLoading: oe,
|
|
279
281
|
isFetching: Ae
|
|
280
282
|
} = V({
|
|
281
|
-
queryKey: ["rrv-rows", n, m,
|
|
283
|
+
queryKey: ["rrv-rows", n, m, y, j, C, N, Oe],
|
|
282
284
|
queryFn: () => W.request(
|
|
283
285
|
G(`/items/${n}`, {
|
|
284
286
|
limit: p,
|
|
285
|
-
page:
|
|
286
|
-
...j ? { sort: j } :
|
|
287
|
+
page: N,
|
|
288
|
+
...j ? { sort: j } : C ? { sort: "line_number" } : {},
|
|
287
289
|
conditions: Oe
|
|
288
290
|
})
|
|
289
291
|
),
|
|
@@ -309,13 +311,13 @@ function dl({
|
|
|
309
311
|
).then((t) => t.data ?? { rows: {}, targets: {} }).catch(() => ({ rows: {}, targets: {} })),
|
|
310
312
|
enabled: ce.length > 0 && ue.length > 0,
|
|
311
313
|
staleTime: 3e4
|
|
312
|
-
}), R =
|
|
314
|
+
}), R = C && A.some((t) => t.line_number != null), ye = Math.max(1, Math.ceil(X / p)), ae = (t, i, o) => {
|
|
313
315
|
F(1), J((f) => {
|
|
314
|
-
const
|
|
315
|
-
return o ?
|
|
316
|
+
const T = { ...f };
|
|
317
|
+
return o ? T[t] = { op: i, value: o } : delete T[t], T;
|
|
316
318
|
});
|
|
317
319
|
}, We = (t) => {
|
|
318
|
-
F(1),
|
|
320
|
+
F(1), v((i) => i === t ? `-${t}` : i === `-${t}` ? "" : t);
|
|
319
321
|
};
|
|
320
322
|
if (oe)
|
|
321
323
|
return /* @__PURE__ */ r("div", { className: "space-y-1.5 py-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ r(
|
|
@@ -335,12 +337,12 @@ function dl({
|
|
|
335
337
|
return /* @__PURE__ */ r("span", { className: "inline-block h-3 w-14 animate-pulse rounded bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" });
|
|
336
338
|
if (!le || le.value === "") return /* @__PURE__ */ r(ee, {});
|
|
337
339
|
const Pe = Q.targets[i.field], me = (te = le.ids) == null ? void 0 : te[0];
|
|
338
|
-
return
|
|
340
|
+
return _ && Pe && me ? /* @__PURE__ */ r(
|
|
339
341
|
"button",
|
|
340
342
|
{
|
|
341
343
|
type: "button",
|
|
342
344
|
onClick: (fe) => {
|
|
343
|
-
fe.stopPropagation(),
|
|
345
|
+
fe.stopPropagation(), _.open({ collection: Pe, itemId: String(me) });
|
|
344
346
|
},
|
|
345
347
|
className: "text-left underline decoration-slate-300 underline-offset-2 hover:text-[#007a99] dark:decoration-slate-600 dark:hover:text-nvr-cyan",
|
|
346
348
|
children: le.value
|
|
@@ -357,8 +359,8 @@ function dl({
|
|
|
357
359
|
if (i.type === "decimal" || i.type === "float") return Je(o);
|
|
358
360
|
if (i.type === "integer") return Ie(o);
|
|
359
361
|
if (i.type === "date" || i.type === "datetime" || i.type === "timestamp") return mt(o);
|
|
360
|
-
const
|
|
361
|
-
return
|
|
362
|
+
const T = String(o);
|
|
363
|
+
return T.length > 48 ? `${T.slice(0, 48)}…` : T;
|
|
362
364
|
}, ie = (t) => ["decimal", "float", "integer"].includes(t.type ?? "") && !S(t.field) && !t.field.includes("."), Re = (t) => {
|
|
363
365
|
const i = t.options;
|
|
364
366
|
if (!i) return {};
|
|
@@ -369,17 +371,17 @@ function dl({
|
|
|
369
371
|
return {};
|
|
370
372
|
}
|
|
371
373
|
return i;
|
|
372
|
-
},
|
|
374
|
+
}, xe = (t) => {
|
|
373
375
|
const i = Re(t).aggregate;
|
|
374
376
|
return typeof i == "string" && ["sum", "avg", "min", "max", "count"].includes(i) ? i : null;
|
|
375
|
-
}, De = O.some((t) =>
|
|
376
|
-
const i =
|
|
377
|
+
}, De = O.some((t) => xe(t)), ve = (t) => {
|
|
378
|
+
const i = xe(t);
|
|
377
379
|
if (!i) return null;
|
|
378
380
|
const o = A.map((D) => Number(D[t.field])).filter((D) => !Number.isNaN(D));
|
|
379
381
|
let f = null;
|
|
380
382
|
if (i === "count" ? f = A.length : o.length > 0 && (i === "sum" ? f = o.reduce((D, te) => D + te, 0) : i === "avg" ? f = o.reduce((D, te) => D + te, 0) / o.length : i === "min" ? f = Math.min(...o) : i === "max" && (f = Math.max(...o))), f === null) return "—";
|
|
381
|
-
const
|
|
382
|
-
return i === "count" ||
|
|
383
|
+
const T = Re(t).format;
|
|
384
|
+
return i === "count" || T === "int" ? Ie(Math.round(f)) : T === "currency" || t.type === "decimal" || t.type === "float" ? Je(f) : i === "avg" ? f.toFixed(2) : Ie(f);
|
|
383
385
|
}, _e = (t) => !S(t.field) && !t.field.includes("."), Le = (t) => S(t.field) || t.field.includes(".") ? null : t.type === "boolean" ? "bool" : ["integer", "decimal", "float"].includes(t.type ?? "") ? "num" : ["string", "text"].includes(t.type ?? "") ? "text" : null, ke = O.some((t) => Le(t) != null);
|
|
384
386
|
return /* @__PURE__ */ u("div", { children: [
|
|
385
387
|
h.length >= 2 && /* @__PURE__ */ r("div", { className: "mb-1.5 flex flex-wrap items-center gap-1", "data-read-presets": !0, children: [
|
|
@@ -490,8 +492,8 @@ function dl({
|
|
|
490
492
|
A.map((t) => /* @__PURE__ */ u(
|
|
491
493
|
"tr",
|
|
492
494
|
{
|
|
493
|
-
onClick:
|
|
494
|
-
className: `border-b border-slate-100 last:border-0 dark:border-slate-800 ${
|
|
495
|
+
onClick: _ ? () => _.open({ collection: n, itemId: String(t.id) }) : void 0,
|
|
496
|
+
className: `border-b border-slate-100 last:border-0 dark:border-slate-800 ${_ ? "cursor-pointer hover:bg-nvr-cyan/5 dark:hover:bg-nvr-cyan/10" : ""}`,
|
|
495
497
|
children: [
|
|
496
498
|
R && /* @__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) }),
|
|
497
499
|
O.map((i) => /* @__PURE__ */ r(
|
|
@@ -515,7 +517,7 @@ function dl({
|
|
|
515
517
|
children: [
|
|
516
518
|
R && /* @__PURE__ */ r("td", {}),
|
|
517
519
|
O.map((t) => {
|
|
518
|
-
const i =
|
|
520
|
+
const i = xe(t);
|
|
519
521
|
return /* @__PURE__ */ r(
|
|
520
522
|
"td",
|
|
521
523
|
{
|
|
@@ -536,9 +538,9 @@ function dl({
|
|
|
536
538
|
),
|
|
537
539
|
X > p && /* @__PURE__ */ u("div", { className: "mt-1.5 flex items-center justify-between", children: [
|
|
538
540
|
/* @__PURE__ */ u("p", { className: "text-[11px] tabular-nums text-slate-400", children: [
|
|
539
|
-
((
|
|
541
|
+
((N - 1) * p + 1).toLocaleString("en-US"),
|
|
540
542
|
"–",
|
|
541
|
-
Math.min(
|
|
543
|
+
Math.min(N * p, X).toLocaleString("en-US"),
|
|
542
544
|
" of",
|
|
543
545
|
" ",
|
|
544
546
|
X.toLocaleString("en-US")
|
|
@@ -548,22 +550,22 @@ function dl({
|
|
|
548
550
|
"button",
|
|
549
551
|
{
|
|
550
552
|
type: "button",
|
|
551
|
-
disabled:
|
|
553
|
+
disabled: N <= 1,
|
|
552
554
|
onClick: () => F((t) => Math.max(1, t - 1)),
|
|
553
555
|
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",
|
|
554
556
|
children: "← Prev"
|
|
555
557
|
}
|
|
556
558
|
),
|
|
557
559
|
/* @__PURE__ */ u("span", { className: "min-w-[48px] text-center text-[11px] tabular-nums text-slate-500", children: [
|
|
558
|
-
|
|
560
|
+
N,
|
|
559
561
|
" / ",
|
|
560
|
-
|
|
562
|
+
ye.toLocaleString("en-US")
|
|
561
563
|
] }),
|
|
562
564
|
/* @__PURE__ */ r(
|
|
563
565
|
"button",
|
|
564
566
|
{
|
|
565
567
|
type: "button",
|
|
566
|
-
disabled:
|
|
568
|
+
disabled: N >= ye,
|
|
567
569
|
onClick: () => F((t) => t + 1),
|
|
568
570
|
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",
|
|
569
571
|
children: "Next →"
|
|
@@ -576,34 +578,34 @@ function dl({
|
|
|
576
578
|
function ot({
|
|
577
579
|
collection: n,
|
|
578
580
|
itemId: m,
|
|
579
|
-
layoutData:
|
|
581
|
+
layoutData: y,
|
|
580
582
|
design: c,
|
|
581
583
|
flush: P,
|
|
582
584
|
renderSlot: w,
|
|
583
585
|
integrityMarks: $,
|
|
584
586
|
renderGrid: W,
|
|
585
|
-
onEditSection:
|
|
587
|
+
onEditSection: _,
|
|
586
588
|
gridCounts: h
|
|
587
589
|
}) {
|
|
588
590
|
var et;
|
|
589
|
-
const q =
|
|
591
|
+
const q = Ce(), K = zt(), M = c ? c.record ?? {} : null, S = !!(c != null && c.context.showHidden), x = c ? String(((et = c.record) == null ? void 0 : et.id) ?? "") : m ?? "", g = ge(
|
|
590
592
|
() => c ? {
|
|
591
593
|
...c.layout,
|
|
592
594
|
layout: c.layout.layout ?? { id: 0, name: "" }
|
|
593
|
-
} :
|
|
594
|
-
[c,
|
|
595
|
-
),
|
|
595
|
+
} : y,
|
|
596
|
+
[c, y]
|
|
597
|
+
), C = (e) => ({
|
|
596
598
|
kind: qe(e.field) ? "slot" : "field",
|
|
597
599
|
field: e.field,
|
|
598
600
|
group_key: e.group_key ?? null
|
|
599
|
-
}),
|
|
601
|
+
}), k = (e, l, s = !1) => c ? /* @__PURE__ */ r(Xt, { target: e, children: s ? /* @__PURE__ */ r("div", { "data-design-hidden": !0, className: "opacity-40", children: l }) : l }) : l, O = ge(
|
|
600
602
|
() => [
|
|
601
603
|
...new Set(
|
|
602
604
|
(c ? [] : (g == null ? void 0 : g.assignments) ?? []).map((e) => e.field).filter((e) => e && !e.startsWith("__") && !e.includes("."))
|
|
603
605
|
)
|
|
604
606
|
].sort(),
|
|
605
607
|
[g, c]
|
|
606
|
-
), { data: j } = Ht(n, x, O),
|
|
608
|
+
), { data: j } = Ht(n, x, O), v = (e) => {
|
|
607
609
|
const l = j == null ? void 0 : j[e];
|
|
608
610
|
if (!l) return null;
|
|
609
611
|
const s = l.via !== "user";
|
|
@@ -620,14 +622,14 @@ function ot({
|
|
|
620
622
|
type: "button",
|
|
621
623
|
"data-field-touch": e,
|
|
622
624
|
"data-field-touch-caller": l.caller.key,
|
|
623
|
-
"data-tip": `Changed ${
|
|
624
|
-
"aria-label": `Changed ${
|
|
625
|
+
"data-tip": `Changed ${Te(l.at)} by ${l.caller.name} (through the API) — click for the request`,
|
|
626
|
+
"aria-label": `Changed ${Te(l.at)} by ${l.caller.name} through the API`,
|
|
625
627
|
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",
|
|
626
628
|
children: [
|
|
627
629
|
/* @__PURE__ */ r("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400", "aria-hidden": !0 }),
|
|
628
630
|
l.caller.name,
|
|
629
631
|
" · ",
|
|
630
|
-
|
|
632
|
+
Te(l.at)
|
|
631
633
|
]
|
|
632
634
|
}
|
|
633
635
|
)
|
|
@@ -636,15 +638,15 @@ function ot({
|
|
|
636
638
|
"span",
|
|
637
639
|
{
|
|
638
640
|
"data-field-touch": e,
|
|
639
|
-
"data-tip": `Changed ${
|
|
641
|
+
"data-tip": `Changed ${Te(l.at)} by ${l.who}${s ? ` · ${l.via}` : ""}`,
|
|
640
642
|
role: "img",
|
|
641
|
-
"aria-label": `Changed ${
|
|
643
|
+
"aria-label": `Changed ${Te(l.at)} by ${l.who}`,
|
|
642
644
|
className: `ml-1 inline-block h-1.5 w-1.5 rounded-full align-middle ${s ? "bg-amber-400" : "bg-slate-300 dark:bg-slate-600"}`
|
|
643
645
|
}
|
|
644
646
|
);
|
|
645
|
-
}, { data:
|
|
646
|
-
() => $ && (
|
|
647
|
-
[$,
|
|
647
|
+
}, { data: N } = tl(n, x, !!$ && !c), F = ge(
|
|
648
|
+
() => $ && (N != null && N.enabled) ? ll(N.findings) : null,
|
|
649
|
+
[$, N]
|
|
648
650
|
), ne = ({ field: e }) => {
|
|
649
651
|
const l = F == null ? void 0 : F.get(e);
|
|
650
652
|
if (!l || l.length === 0) return null;
|
|
@@ -716,7 +718,7 @@ function ot({
|
|
|
716
718
|
) ?? null, R = (e) => {
|
|
717
719
|
var l;
|
|
718
720
|
return !((e.is_visible === void 0 || e.is_visible) && pe(e.overrides).hidden !== !0 && !((l = H.get(e.field)) != null && l.hidden));
|
|
719
|
-
},
|
|
721
|
+
}, ye = g.assignments.filter(
|
|
720
722
|
(e) => (!e.field.startsWith("__") || qe(e.field)) && (S || !R(e))
|
|
721
723
|
), ae = g.assignments.filter(
|
|
722
724
|
(e) => e.field.startsWith("__widget_") && e.widget_id != null && (S || e.is_visible === void 0 || !!e.is_visible)
|
|
@@ -729,18 +731,18 @@ function ot({
|
|
|
729
731
|
}
|
|
730
732
|
}, Me = w || c ? g.assignments.filter(
|
|
731
733
|
(e) => e.field.startsWith("__") && !e.field.startsWith("__widget_") && !qe(e.field) && (S || e.is_visible === void 0 || !!e.is_visible)
|
|
732
|
-
).sort((e, l) => e.sort - l.sort) : [], ie = ["__pipeline__", "__addendums__"], Re = new Set(ie),
|
|
734
|
+
).sort((e, l) => e.sort - l.sort) : [], ie = ["__pipeline__", "__addendums__"], Re = new Set(ie), xe = (e) => (w == null ? void 0 : w(e.field, e)) ?? (c ? /* @__PURE__ */ r("div", { className: "rounded-xl border border-dashed border-slate-300 bg-white px-5 py-3 text-[12px] font-medium text-slate-500 dark:border-slate-600 dark:bg-slate-900/40 dark:text-slate-400", children: e.label_override || Ge(e.field.replace(/^_+|_+$/g, "")) }) : null), De = (e, l = "trailing") => w || c ? Me.filter(
|
|
733
735
|
(s) => e === null ? s.group_key == null && l === "leading" === Re.has(s.field) : s.group_key === e
|
|
734
736
|
).sort(
|
|
735
737
|
(s, d) => l === "leading" && e === null ? ie.indexOf(s.field) - ie.indexOf(d.field) : 0
|
|
736
|
-
).map((s) => ({ key: s.field, a: s, node:
|
|
738
|
+
).map((s) => ({ key: s.field, a: s, node: xe(s) })).filter((s) => s.node != null) : [], ve = (e, l = "trailing") => {
|
|
737
739
|
const s = De(e, l);
|
|
738
740
|
return s.length === 0 ? null : /* @__PURE__ */ r(
|
|
739
741
|
"div",
|
|
740
742
|
{
|
|
741
743
|
className: l === "leading" ? "mb-4 space-y-4" : "mt-3 space-y-4",
|
|
742
744
|
"data-read-live-slots": l,
|
|
743
|
-
children: s.map((d) => /* @__PURE__ */ r("div", { children:
|
|
745
|
+
children: s.map((d) => /* @__PURE__ */ r("div", { children: k(
|
|
744
746
|
{ kind: "slot", field: d.a.field, group_key: d.a.group_key ?? null },
|
|
745
747
|
d.node,
|
|
746
748
|
R(d.a)
|
|
@@ -750,14 +752,14 @@ function ot({
|
|
|
750
752
|
}, [_e, Le] = Z({}), ke = (e) => S || _e[e] === !0, [t, i] = Z({}), o = st(
|
|
751
753
|
(e) => (l) => i((s) => s[e] === l ? s : { ...s, [e]: l }),
|
|
752
754
|
[]
|
|
753
|
-
), [f,
|
|
754
|
-
(e) => (l) =>
|
|
755
|
+
), [f, T] = Z({}), D = st(
|
|
756
|
+
(e) => (l) => T((s) => s[e] === l ? s : { ...s, [e]: l }),
|
|
755
757
|
[]
|
|
756
758
|
), te = (e) => {
|
|
757
759
|
const l = ae.filter((d) => d.group_key === e).sort((d, b) => d.sort - b.sort);
|
|
758
760
|
if (l.length === 0) return null;
|
|
759
761
|
const s = l.some((d) => ke(d.field));
|
|
760
|
-
return /* @__PURE__ */ r("div", { className: s ? "mt-3 space-y-4" : "hidden", "data-read-widgets": !0, children: l.map((d) => /* @__PURE__ */ r("div", { hidden: !ke(d.field), children:
|
|
762
|
+
return /* @__PURE__ */ r("div", { className: s ? "mt-3 space-y-4" : "hidden", "data-read-widgets": !0, children: l.map((d) => /* @__PURE__ */ r("div", { hidden: !ke(d.field), children: k(
|
|
761
763
|
{ kind: "slot", field: d.field, group_key: d.group_key ?? null },
|
|
762
764
|
/* @__PURE__ */ r(
|
|
763
765
|
rl,
|
|
@@ -839,10 +841,10 @@ function ot({
|
|
|
839
841
|
}
|
|
840
842
|
);
|
|
841
843
|
const z = s.options ?? {};
|
|
842
|
-
return Qe(e) && typeof b == "string" ? /^\s*\{/.test(b) ? /* @__PURE__ */ r("div", { className: "whitespace-pre-wrap font-normal", children: Qt(b) }) : /* @__PURE__ */ r(
|
|
844
|
+
return Qe(e) && typeof b == "string" ? /^\s*\{/.test(b) ? /* @__PURE__ */ r("div", { className: "min-w-0 whitespace-pre-wrap font-normal [overflow-wrap:anywhere]", children: Qt(b) }) : /* @__PURE__ */ r(
|
|
843
845
|
"div",
|
|
844
846
|
{
|
|
845
|
-
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",
|
|
847
|
+
className: "rrv-prose min-w-0 font-normal leading-relaxed [overflow-wrap:anywhere] [&_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",
|
|
846
848
|
dangerouslySetInnerHTML: { __html: Bt(b) }
|
|
847
849
|
}
|
|
848
850
|
) : z.format === "currency" ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: Je(b) }) : (l == null ? void 0 : l.type) === "decimal" || (l == null ? void 0 : l.type) === "float" ? /* @__PURE__ */ r("span", { className: "tabular-nums", children: Ie(b) }) : (l == null ? void 0 : l.type) === "date" || (l == null ? void 0 : l.type) === "datetime" || (l == null ? void 0 : l.type) === "timestamp" ? mt(b) : String(b);
|
|
@@ -875,16 +877,16 @@ function ot({
|
|
|
875
877
|
},
|
|
876
878
|
e.field
|
|
877
879
|
);
|
|
878
|
-
}, Se = (e) => !!Q(e.field) && !se(e), gt = !!g.layout.hide_empty, ze = Array.isArray(g.layout.header_fields) ? g.layout.header_fields.filter((e) => typeof e == "string") : [], bt = new Set(ze),
|
|
880
|
+
}, Se = (e) => !!Q(e.field) && !se(e), gt = !!g.layout.hide_empty, ze = Array.isArray(g.layout.header_fields) ? g.layout.header_fields.filter((e) => typeof e == "string") : [], bt = new Set(ze), yt = (e) => {
|
|
879
881
|
if (!p || se(e)) return !1;
|
|
880
882
|
const l = p[e.field];
|
|
881
883
|
return l == null || l === "" || Array.isArray(l) && l.length === 0;
|
|
882
|
-
},
|
|
884
|
+
}, xt = (e) => ye.find((l) => l.field === e), $e = (e) => {
|
|
883
885
|
var d;
|
|
884
886
|
const l = pe(e.overrides).label, s = K ? Wt(e.overrides, K).label : void 0;
|
|
885
887
|
return s !== void 0 ? s : qe(e.field) ? typeof l == "string" && l.trim() ? l : "Formula" : typeof l == "string" && l.trim() ? l : e.label_override || ((d = H.get(e.field)) == null ? void 0 : d.label) || Ge(e.field);
|
|
886
888
|
}, vt = (e) => {
|
|
887
|
-
const l = Kt(e.swap_config), s =
|
|
889
|
+
const l = Kt(e.swap_config), s = ye.filter((a) => a.group_key === e.key && !bt.has(a.field)).filter((a) => S || !p || !jt(a.overrides) || !Be(p[a.field])).sort((a, I) => a.sort - I.sort), d = ae.filter((a) => a.group_key === e.key), b = De(e.key), E = s.length === 0 && d.length === 0 && b.length === 0;
|
|
888
890
|
if (E && !c) return null;
|
|
889
891
|
const z = (a) => gt && !S && (Se(a) || se(a)) && ((h == null ? void 0 : h[a.field]) ?? t[a.field]) === 0, L = s.filter((a) => !Se(a)), de = s.filter(Se), tt = d.filter((a) => ke(a.field)), kt = s.filter((a) => !z(a)), Nt = !E && kt.length === 0 && b.length === 0 && tt.length === 0, wt = (a) => (h == null ? void 0 : h[a.field]) ?? t[a.field], Ve = !!l.emptyText && !!p && !c && b.length === 0 && tt.length === 0 && s.every((a) => Se(a) || se(a) ? wt(a) === 0 : Be(p[a.field])), St = Et(L, { rows: l.rows }).units, lt = e.read_width === "full" || e.read_width === "half" || e.read_width === "third" ? e.read_width : de.length > 0 || d.length > 0 || b.length > 0 || L.length > 4 ? "full" : "half", $t = (a) => {
|
|
890
892
|
var nt, at, it;
|
|
@@ -894,13 +896,13 @@ function ot({
|
|
|
894
896
|
"div",
|
|
895
897
|
{
|
|
896
898
|
className: `min-w-0 ${U || se(a) && (f[a.field] === "nivaro_files" || (t[a.field] ?? 0) > 3) ? "col-span-full" : Fe || rt ? "col-span-2" : ""}`,
|
|
897
|
-
children:
|
|
898
|
-
|
|
899
|
+
children: k(
|
|
900
|
+
C(a),
|
|
899
901
|
/* @__PURE__ */ u(he, { children: [
|
|
900
902
|
/* @__PURE__ */ u("dt", { className: Ee, children: [
|
|
901
903
|
$e(a),
|
|
902
904
|
/* @__PURE__ */ r(ne, { field: a.field }),
|
|
903
|
-
|
|
905
|
+
v(a.field)
|
|
904
906
|
] }),
|
|
905
907
|
/* @__PURE__ */ r(
|
|
906
908
|
"dd",
|
|
@@ -929,8 +931,8 @@ function ot({
|
|
|
929
931
|
/* @__PURE__ */ r("dt", { className: Ee, children: a.label.trim() || I.map($e).join(" / ") }),
|
|
930
932
|
/* @__PURE__ */ r("dd", { className: "mt-1 flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-[13px] font-medium text-slate-800 dark:text-slate-100", children: p ? Fe.length === 0 ? /* @__PURE__ */ r(ee, {}) : Fe.map((U, je) => /* @__PURE__ */ u(At, { children: [
|
|
931
933
|
je > 0 && /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "text-slate-300 dark:text-slate-600", children: "·" }),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
+
k(
|
|
935
|
+
C(U),
|
|
934
936
|
/* @__PURE__ */ r(
|
|
935
937
|
"span",
|
|
936
938
|
{
|
|
@@ -955,7 +957,7 @@ function ot({
|
|
|
955
957
|
"data-read-section": e.key,
|
|
956
958
|
"data-read-width": lt,
|
|
957
959
|
className: "min-w-0 rounded-xl border border-slate-200 bg-white dark:border-slate-700/60 dark:bg-slate-900/40",
|
|
958
|
-
children:
|
|
960
|
+
children: k(
|
|
959
961
|
{ kind: "group", key: e.key },
|
|
960
962
|
/* @__PURE__ */ u(he, { children: [
|
|
961
963
|
/* @__PURE__ */ u(
|
|
@@ -973,23 +975,23 @@ function ot({
|
|
|
973
975
|
children: e.label
|
|
974
976
|
}
|
|
975
977
|
) : /* @__PURE__ */ r("span", { className: "min-w-0 flex-1", children: e.label }),
|
|
976
|
-
|
|
978
|
+
_ && (L.length > 0 || de.length > 0) && /* @__PURE__ */ r(
|
|
977
979
|
"button",
|
|
978
980
|
{
|
|
979
981
|
type: "button",
|
|
980
982
|
"data-read-edit-section": e.key,
|
|
981
983
|
onClick: () => {
|
|
982
984
|
var a, I;
|
|
983
|
-
return
|
|
985
|
+
return _(e.key, ((a = L[0]) == null ? void 0 : a.field) ?? ((I = de[0]) == null ? void 0 : I.field) ?? null);
|
|
984
986
|
},
|
|
985
987
|
title: `Edit ${e.label}`,
|
|
986
988
|
"aria-label": `Edit ${e.label}`,
|
|
987
989
|
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",
|
|
988
|
-
children: /* @__PURE__ */ r(
|
|
990
|
+
children: /* @__PURE__ */ r(Tt, { className: "h-3 w-3" })
|
|
989
991
|
}
|
|
990
992
|
),
|
|
991
993
|
e.is_collapsed && /* @__PURE__ */ r(
|
|
992
|
-
|
|
994
|
+
Ct,
|
|
993
995
|
{
|
|
994
996
|
"aria-hidden": "true",
|
|
995
997
|
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 ${fe(e) ? "" : "-rotate-90"}`
|
|
@@ -1020,8 +1022,8 @@ function ot({
|
|
|
1020
1022
|
{
|
|
1021
1023
|
className: L.length > 0 ? "mt-3" : "",
|
|
1022
1024
|
hidden: z(a) || Ve,
|
|
1023
|
-
children:
|
|
1024
|
-
|
|
1025
|
+
children: k(
|
|
1026
|
+
C(a),
|
|
1025
1027
|
/* @__PURE__ */ u(he, { children: [
|
|
1026
1028
|
(I = F == null ? void 0 : F.get(a.field)) != null && I.length ? /* @__PURE__ */ u("div", { className: "mb-1.5 flex items-center gap-1.5 text-[11px] font-medium text-amber-700 dark:text-amber-300", children: [
|
|
1027
1029
|
/* @__PURE__ */ r("span", { children: $e(a) }),
|
|
@@ -1059,7 +1061,7 @@ function ot({
|
|
|
1059
1061
|
},
|
|
1060
1062
|
e.key
|
|
1061
1063
|
);
|
|
1062
|
-
}, Ye = ve(null), _t = ve(null, "leading"), Xe = ze.map((e) =>
|
|
1064
|
+
}, Ye = ve(null), _t = ve(null, "leading"), Xe = ze.map((e) => xt(e)).filter((e) => !!e && !Se(e)).filter((e) => S || !yt(e)), [re, ...Ze] = Xe;
|
|
1063
1065
|
return /* @__PURE__ */ u(
|
|
1064
1066
|
"div",
|
|
1065
1067
|
{
|
|
@@ -1072,7 +1074,7 @@ function ot({
|
|
|
1072
1074
|
"data-read-header": !0,
|
|
1073
1075
|
className: "mb-4 rounded-xl border border-slate-200 bg-white px-5 py-4 dark:border-slate-700/60 dark:bg-slate-900/40",
|
|
1074
1076
|
children: [
|
|
1075
|
-
re &&
|
|
1077
|
+
re && k(
|
|
1076
1078
|
{ kind: "header", field: re.field },
|
|
1077
1079
|
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
1078
1080
|
/* @__PURE__ */ u("p", { className: Ee, children: [
|
|
@@ -1091,13 +1093,13 @@ function ot({
|
|
|
1091
1093
|
] }),
|
|
1092
1094
|
R(re)
|
|
1093
1095
|
),
|
|
1094
|
-
Ze.length > 0 && /* @__PURE__ */ r("dl", { className: "mt-3 flex flex-wrap gap-x-8 gap-y-2", children: Ze.map((e) => /* @__PURE__ */ r("div", { className: "min-w-0", children:
|
|
1096
|
+
Ze.length > 0 && /* @__PURE__ */ r("dl", { className: "mt-3 flex flex-wrap gap-x-8 gap-y-2", children: Ze.map((e) => /* @__PURE__ */ r("div", { className: "min-w-0", children: k(
|
|
1095
1097
|
{ kind: "header", field: e.field },
|
|
1096
1098
|
/* @__PURE__ */ u(he, { children: [
|
|
1097
1099
|
/* @__PURE__ */ u("dt", { className: Ee, children: [
|
|
1098
1100
|
$e(e),
|
|
1099
1101
|
/* @__PURE__ */ r(ne, { field: e.field }),
|
|
1100
|
-
|
|
1102
|
+
v(e.field)
|
|
1101
1103
|
] }),
|
|
1102
1104
|
/* @__PURE__ */ r(
|
|
1103
1105
|
"dd",
|