@nivaro/react 0.3.9 → 0.3.11
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/fields/FileField.js +20 -19
- package/dist/full.css +1 -1
- package/dist/hooks/useNivaroForm.js +129 -126
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +103 -4
- package/dist/index.js +512 -501
- package/dist/shared/components/CollectionBrowserView.js +1632 -1564
- package/dist/shared/components/ConformanceView.js +36 -35
- package/dist/shared/components/ForceReloadBanner.js +58 -34
- package/dist/shared/components/ItemEditForm.js +4386 -4142
- package/dist/shared/components/JsonMapEditor.js +18 -17
- package/dist/shared/components/MatrixEditor.js +8 -7
- package/dist/shared/components/MyWorkView.js +32 -31
- package/dist/shared/components/PageRenderer.js +527 -479
- package/dist/shared/components/QueryStatStrip.js +74 -70
- package/dist/shared/components/RecordGridEditor.js +76 -75
- package/dist/shared/components/ReportView.js +818 -827
- package/dist/shared/components/SheetHeaderBody.js +16 -14
- package/dist/shared/components/ai/AiMemorySuggestions.js +15 -14
- package/dist/shared/components/ai/AskPanel.js +55 -54
- package/dist/shared/components/bulk/BulkActionButtons.js +30 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +57 -56
- package/dist/shared/components/chat/SlashCommands.js +30 -29
- package/dist/shared/components/chat/chat-outbox.js +76 -75
- package/dist/shared/components/help-videos/recorder/useLeaveWarning.js +6 -5
- package/dist/shared/components/integrations/console/SignalCard.js +124 -123
- package/dist/shared/components/integrations/console/SnoozeMenu.js +24 -23
- package/dist/shared/components/item-edit/CatalogPickerField.js +1029 -933
- package/dist/shared/components/item-edit/CloneDialog.js +85 -78
- package/dist/shared/components/item-edit/FieldRenderer.js +161 -156
- package/dist/shared/components/item-edit/FieldRow.js +20 -19
- package/dist/shared/components/item-edit/FilePickerField.js +52 -40
- package/dist/shared/components/item-edit/GroupSection.js +221 -221
- package/dist/shared/components/item-edit/InlineGridField.js +41 -41
- package/dist/shared/components/item-edit/InlineTableField.js +2287 -2275
- package/dist/shared/components/item-edit/M2MCombobox.js +46 -44
- package/dist/shared/components/item-edit/MembershipSetField.js +24 -23
- package/dist/shared/components/item-edit/NestedRelationEditor.js +11 -11
- package/dist/shared/components/item-edit/QuickCreateButton.js +8 -7
- package/dist/shared/components/item-edit/QuickPicker.js +263 -216
- package/dist/shared/components/item-edit/RecordLiveSync.js +101 -100
- package/dist/shared/components/item-edit/RelationCombobox.js +285 -245
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +42 -32
- package/dist/shared/components/item-edit/RowHistorySheet.js +130 -134
- package/dist/shared/components/item-edit/SummaryPanel.js +305 -279
- package/dist/shared/components/item-edit/helpers.js +133 -134
- package/dist/shared/components/item-edit/line-qty.js +57 -0
- package/dist/shared/components/item-edit/option-disambiguate.js +53 -0
- package/dist/shared/components/item-edit/staged-links.js +86 -0
- package/dist/shared/components/layout-editor/LayoutEditor.js +275 -274
- package/dist/shared/components/layout-editor/editors/cascade-rule-row.js +18 -17
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +37 -36
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +50 -49
- package/dist/shared/components/panels/AddendumLinesDiff.js +87 -90
- package/dist/shared/components/panels/CommentPanel.js +350 -315
- package/dist/shared/components/panels/ItemLockBanner.js +297 -230
- package/dist/shared/components/panels/PipelinePanel.js +719 -701
- package/dist/shared/components/profile/AiMemoryCard.js +15 -14
- package/dist/shared/components/profile/PersonAdminTools.js +70 -67
- package/dist/shared/components/queue/QueueItemSheet.js +36 -35
- package/dist/shared/components/queue/QueueQuickFilters.js +43 -41
- package/dist/shared/components/queue/QueueWorklist.js +1026 -957
- package/dist/shared/components/widgets/ReviewListWidget.js +99 -93
- package/dist/shared/lib/client-version.js +63 -0
- package/dist/shared/lib/force-reload.js +36 -0
- package/dist/shared/lib/load-error.js +11 -10
- package/dist/shared/lib/obligation-banner.js +14 -13
- package/dist/shared/lib/obligation-reason-text.js +13 -0
- package/dist/shared/lib/presence-live.js +54 -35
- package/dist/shared/lib/query-filter-seed.js +34 -11
- package/dist/shared/lib/record-outbox.js +76 -75
- package/dist/shared/lib/safe-error.js +39 -0
- package/dist/shared/lib/sanitize-html.js +24 -15
- package/dist/shared/lib/server-clock.js +11 -7
- package/dist/shared/lib/sheet-def.js +38 -22
- package/dist/shared/lib/unique-options.js +10 -0
- package/dist/shared/lib/unsaved-work.js +62 -0
- package/dist/shared/lib/utils.js +57 -43
- package/dist/shared/lib/validation-rules.js +58 -34
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useQuery as U } from "@tanstack/react-query";
|
|
3
3
|
import { ChevronDown as X } from "lucide-react";
|
|
4
|
-
import { useMemo as q, useState as Z, Fragment as
|
|
5
|
-
import { get as
|
|
6
|
-
import { numericIntlOptions as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
4
|
+
import { useMemo as q, useState as Z, Fragment as B } from "react";
|
|
5
|
+
import { get as T } from "../../lib/commands.js";
|
|
6
|
+
import { numericIntlOptions as C } from "../../lib/format-value.js";
|
|
7
|
+
import { htmlToText as ee } from "../../lib/sanitize-html.js";
|
|
8
|
+
import { cn as g, titleCase as te, formatDate as ne, formatDateTime as re } from "../../lib/utils.js";
|
|
9
|
+
import { applyDisplayTemplate as ae, SYSTEM_FIELDS as se } from "../item-edit/helpers.js";
|
|
10
|
+
const x = (a) => a == null || a === "", oe = (a, s) => x(a) && x(s) ? !0 : typeof a == "object" || typeof s == "object" ? JSON.stringify(a) === JSON.stringify(s) : Number.isFinite(Number(a)) && Number.isFinite(Number(s)) && String(a).trim() !== "" && String(s).trim() !== "" ? Math.abs(Number(a) - Number(s)) < 5e-3 : String(a) === String(s), Q = (a) => {
|
|
10
11
|
const s = a == null ? void 0 : a.options;
|
|
11
12
|
if (!s) return {};
|
|
12
13
|
if (typeof s == "string")
|
|
@@ -16,7 +17,7 @@ const x = (a) => a == null || a === "", se = (a, s) => x(a) && x(s) ? !0 : typeo
|
|
|
16
17
|
return {};
|
|
17
18
|
}
|
|
18
19
|
return s;
|
|
19
|
-
},
|
|
20
|
+
}, ie = /* @__PURE__ */ new Set([
|
|
20
21
|
"sort",
|
|
21
22
|
"created",
|
|
22
23
|
"updated",
|
|
@@ -24,15 +25,15 @@ const x = (a) => a == null || a === "", se = (a, s) => x(a) && x(s) ? !0 : typeo
|
|
|
24
25
|
"updated_at",
|
|
25
26
|
"changed",
|
|
26
27
|
"creator"
|
|
27
|
-
]), W = (a, s) => !
|
|
28
|
-
function
|
|
29
|
-
if (!s && !
|
|
28
|
+
]), W = (a, s) => !se.has(a) && !ie.has(a) && a !== s && a !== "id" && !a.startsWith("__") && !a.includes("."), le = /amount|cost|price|total|budget|spend/i;
|
|
29
|
+
function de(a, s, w, b) {
|
|
30
|
+
if (!s && !le.test(a)) return null;
|
|
30
31
|
const $ = (h) => x(h) ? 0 : Number(h), _ = $(w), j = $(b);
|
|
31
32
|
if (!Number.isFinite(_) || !Number.isFinite(j)) return null;
|
|
32
33
|
const y = Math.round((j - _) * 100) / 100;
|
|
33
34
|
return y === 0 ? null : y;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function ce(a, s, w, b = !1) {
|
|
36
37
|
const $ = new Map(s.map((m) => [String(m.id), m])), _ = /* @__PURE__ */ new Set(), j = [], y = [];
|
|
37
38
|
for (const m of a) {
|
|
38
39
|
const N = x(m.id) ? null : String(m.id), f = N ? $.get(N) : void 0;
|
|
@@ -41,15 +42,15 @@ function de(a, s, w, b = !1) {
|
|
|
41
42
|
continue;
|
|
42
43
|
}
|
|
43
44
|
_.add(N);
|
|
44
|
-
const
|
|
45
|
+
const O = [];
|
|
45
46
|
for (const u of Object.keys(m))
|
|
46
|
-
W(u, w) && (b && !(u in f) ||
|
|
47
|
-
|
|
47
|
+
W(u, w) && (b && !(u in f) || oe(f[u], m[u]) || O.push({ field: u, before: f[u], after: m[u] }));
|
|
48
|
+
O.length && y.push({ row: m, before: f, cells: O });
|
|
48
49
|
}
|
|
49
50
|
const h = s.filter((m) => !_.has(String(m.id)));
|
|
50
51
|
return { added: j, changed: y, removed: h };
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function Se({
|
|
53
54
|
client: a,
|
|
54
55
|
childCollection: s,
|
|
55
56
|
fkField: w,
|
|
@@ -61,19 +62,19 @@ function ye({
|
|
|
61
62
|
}) {
|
|
62
63
|
const { data: h = [] } = U({
|
|
63
64
|
queryKey: ["field-config", s, null],
|
|
64
|
-
queryFn: () => a.request(
|
|
65
|
+
queryFn: () => a.request(T(`/field-config/${s}`)).then((e) => e.data ?? []),
|
|
65
66
|
staleTime: 6e4
|
|
66
67
|
}), { data: m = [] } = U({
|
|
67
68
|
queryKey: ["collection-relations-for", s],
|
|
68
|
-
queryFn: () => a.request(
|
|
69
|
+
queryFn: () => a.request(T(`/data-model/relations/for/${s}`)).then((e) => e.data ?? []),
|
|
69
70
|
staleTime: 5 * 6e4
|
|
70
71
|
}), N = q(() => new Map(h.map((e) => [e.field, e])), [h]), f = q(() => {
|
|
71
72
|
const e = /* @__PURE__ */ new Map();
|
|
72
73
|
for (const t of m)
|
|
73
74
|
t.many_collection === s && t.many_field && !t.junction_field && t.one_collection && e.set(t.many_field, t);
|
|
74
75
|
return e;
|
|
75
|
-
}, [m, s]),
|
|
76
|
-
() =>
|
|
76
|
+
}, [m, s]), O = (e) => W(e, w), u = j ?? (N.has("line_number") ? "line_number" : void 0), l = q(
|
|
77
|
+
() => ce(b, $, w, y),
|
|
77
78
|
[b, $, w, y]
|
|
78
79
|
), I = q(() => {
|
|
79
80
|
const e = /* @__PURE__ */ new Map(), t = (n, r) => {
|
|
@@ -83,7 +84,7 @@ function ye({
|
|
|
83
84
|
p.add(String(r)), e.set(i.one_collection, p);
|
|
84
85
|
};
|
|
85
86
|
for (const n of [...l.added, ...l.removed])
|
|
86
|
-
for (const r of Object.keys(n))
|
|
87
|
+
for (const r of Object.keys(n)) O(r) && t(r, n[r]);
|
|
87
88
|
for (const n of l.changed)
|
|
88
89
|
for (const r of n.cells)
|
|
89
90
|
t(r.field, r.before), t(r.field, r.after);
|
|
@@ -95,31 +96,31 @@ function ye({
|
|
|
95
96
|
return await Promise.all(
|
|
96
97
|
[...I.entries()].map(async ([t, n]) => {
|
|
97
98
|
const r = await a.request(
|
|
98
|
-
|
|
99
|
-
).then((
|
|
100
|
-
|
|
99
|
+
T(`/collections/${t}`)
|
|
100
|
+
).then((c) => c.data).catch(() => null), i = (r == null ? void 0 : r.display_template) ?? void 0, p = i ? [...i.matchAll(/\{\{([\w.]+)\}\}/g)].map((c) => c[1]) : [], S = p.some((c) => c.includes(".")) ? ["id", ...p].join(",") : void 0, M = await a.request(
|
|
101
|
+
T(`/items/${t}`, {
|
|
101
102
|
filter: JSON.stringify({ id: { _in: [...n] } }),
|
|
102
103
|
limit: n.size,
|
|
103
104
|
...S ? { fields: S } : {}
|
|
104
105
|
})
|
|
105
|
-
).then((
|
|
106
|
+
).then((c) => c.data ?? []).catch(() => []);
|
|
106
107
|
e[t] = {};
|
|
107
|
-
for (const
|
|
108
|
+
for (const c of M) e[t][String(c.id)] = ae(i, c);
|
|
108
109
|
})
|
|
109
110
|
), e;
|
|
110
111
|
},
|
|
111
112
|
enabled: I.size > 0,
|
|
112
113
|
staleTime: 5 * 6e4
|
|
113
|
-
}),
|
|
114
|
+
}), L = (e) => {
|
|
114
115
|
var t;
|
|
115
|
-
return ((t = N.get(e)) == null ? void 0 : t.label) ||
|
|
116
|
-
},
|
|
117
|
-
var
|
|
116
|
+
return ((t = N.get(e)) == null ? void 0 : t.label) || te(e);
|
|
117
|
+
}, D = (e, t) => {
|
|
118
|
+
var M;
|
|
118
119
|
if (x(t)) return { text: "—" };
|
|
119
120
|
const n = N.get(e), r = Q(n), i = f.get(e);
|
|
120
121
|
if (i != null && i.one_collection) {
|
|
121
|
-
const
|
|
122
|
-
return
|
|
122
|
+
const c = (M = R[i.one_collection]) == null ? void 0 : M[String(t)];
|
|
123
|
+
return c ? { text: c } : { text: `#${String(t)}`, mono: !0 };
|
|
123
124
|
}
|
|
124
125
|
if (typeof t == "boolean" || (n == null ? void 0 : n.type) === "boolean")
|
|
125
126
|
return { text: t === !0 || t === 1 || t === "1" || t === "true" ? "Yes" : "No" };
|
|
@@ -128,26 +129,22 @@ function ye({
|
|
|
128
129
|
if (r.format === "currency" && Number.isFinite(Number(t)))
|
|
129
130
|
return {
|
|
130
131
|
text: Number(t).toLocaleString("en-US", {
|
|
131
|
-
...
|
|
132
|
+
...C(r, "currency"),
|
|
132
133
|
currency: r.currency || "USD"
|
|
133
134
|
}),
|
|
134
135
|
mono: !0
|
|
135
136
|
};
|
|
136
137
|
if (/^(date|dateTime|datetime|timestamp)$/i.test(p)) {
|
|
137
|
-
const
|
|
138
|
-
return { text: /^\d{4}-\d{2}-\d{2}$/.test(
|
|
138
|
+
const c = String(t);
|
|
139
|
+
return { text: /^\d{4}-\d{2}-\d{2}$/.test(c) ? ne(c) : re(c), mono: !0 };
|
|
139
140
|
}
|
|
140
141
|
if (typeof t == "number" || /^(integer|decimal|float|bigInteger|money)$/i.test(p) && Number.isFinite(Number(t)))
|
|
141
|
-
return { text: Number(t).toLocaleString("en-US",
|
|
142
|
+
return { text: Number(t).toLocaleString("en-US", C(r)), mono: !0 };
|
|
142
143
|
const S = String(t);
|
|
143
|
-
|
|
144
|
-
const d = document.createElement("div");
|
|
145
|
-
return d.innerHTML = S, { text: (d.textContent || "").trim() || "—" };
|
|
146
|
-
}
|
|
147
|
-
return { text: S.length > 80 ? `${S.slice(0, 80)}…` : S };
|
|
144
|
+
return /<[a-z][\s\S]*>/i.test(S) ? { text: ee(S).trim() || "—" } : { text: S.length > 80 ? `${S.slice(0, 80)}…` : S };
|
|
148
145
|
}, E = (e, t, n) => {
|
|
149
|
-
const r = Q(N.get(e)), i =
|
|
150
|
-
return i == null ? null : /* @__PURE__ */
|
|
146
|
+
const r = Q(N.get(e)), i = de(e, r.format === "currency", t, n);
|
|
147
|
+
return i == null ? null : /* @__PURE__ */ d(
|
|
151
148
|
"span",
|
|
152
149
|
{
|
|
153
150
|
className: g(
|
|
@@ -167,49 +164,49 @@ function ye({
|
|
|
167
164
|
}, K = (e) => {
|
|
168
165
|
const t = u ? e[u] : void 0;
|
|
169
166
|
return x(t) ? x(e.id) ? "New line" : `#${String(e.id)}` : `Line ${String(t)}`;
|
|
170
|
-
},
|
|
167
|
+
}, v = (e) => {
|
|
171
168
|
for (const t of Object.keys(e)) {
|
|
172
|
-
if (!
|
|
169
|
+
if (!O(t) || f.has(t) || t === u) continue;
|
|
173
170
|
const n = e[t];
|
|
174
171
|
if (typeof n == "string" && n.trim() && !/^-?\d+(\.\d+)?$/.test(n.trim()))
|
|
175
172
|
return n.length > 48 ? `${n.slice(0, 48)}…` : n;
|
|
176
173
|
}
|
|
177
174
|
return null;
|
|
178
|
-
}, A = (e) => Object.keys(e).filter((t) =>
|
|
175
|
+
}, A = (e) => Object.keys(e).filter((t) => O(t) && !x(e[t])).sort(
|
|
179
176
|
(t, n) => (h.findIndex((r) => r.field === t) ?? 999) - (h.findIndex((r) => r.field === n) ?? 999)
|
|
180
|
-
), [
|
|
177
|
+
), [k, V] = Z(!0);
|
|
181
178
|
if (l.added.length + l.changed.length + l.removed.length === 0)
|
|
182
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ d("p", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: [
|
|
183
180
|
b.length,
|
|
184
181
|
" ",
|
|
185
182
|
b.length === 1 ? "line" : "lines",
|
|
186
183
|
", no changes"
|
|
187
184
|
] });
|
|
188
|
-
const
|
|
189
|
-
l.added.length &&
|
|
190
|
-
const z = "mt-1 grid grid-cols-[minmax(84px,max-content)_1fr] gap-x-3 gap-y-0.5 text-[11.5px] leading-[18px]",
|
|
185
|
+
const F = [];
|
|
186
|
+
l.added.length && F.push(`${l.added.length} added`), l.changed.length && F.push(`${l.changed.length} changed`), l.removed.length && F.push(`${l.removed.length} removed`);
|
|
187
|
+
const z = "mt-1 grid grid-cols-[minmax(84px,max-content)_1fr] gap-x-3 gap-y-0.5 text-[11.5px] leading-[18px]", P = (e) => g(
|
|
191
188
|
"rounded-full px-1.5 py-px text-[10px] font-medium",
|
|
192
189
|
e === "added" && "bg-emerald-50 text-emerald-700 dark:bg-emerald-500/10 dark:text-emerald-400",
|
|
193
190
|
e === "changed" && "bg-amber-50 text-amber-700 dark:bg-amber-500/10 dark:text-amber-300",
|
|
194
191
|
e === "removed" && "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400"
|
|
195
|
-
),
|
|
196
|
-
return /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
192
|
+
), Y = [...new Set(l.changed.flatMap((e) => e.cells.map((t) => t.field)))], H = "py-1.5 pr-5 text-left text-[11px] font-medium text-slate-500 dark:text-slate-400", J = "py-1.5 pr-5 align-baseline whitespace-nowrap";
|
|
193
|
+
return /* @__PURE__ */ d("div", { className: "min-w-0", children: [
|
|
194
|
+
/* @__PURE__ */ d(
|
|
198
195
|
"button",
|
|
199
196
|
{
|
|
200
197
|
type: "button",
|
|
201
198
|
onClick: () => V((e) => !e),
|
|
202
199
|
className: "inline-flex items-center gap-1.5 rounded text-[12px] text-slate-700 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-200",
|
|
203
|
-
"aria-expanded":
|
|
204
|
-
"aria-label": `${
|
|
200
|
+
"aria-expanded": k,
|
|
201
|
+
"aria-label": `${k ? "Hide" : "Show"} ${_} changes`,
|
|
205
202
|
children: [
|
|
206
|
-
/* @__PURE__ */ o("span", { children:
|
|
203
|
+
/* @__PURE__ */ o("span", { children: F.join(" · ") }),
|
|
207
204
|
/* @__PURE__ */ o(
|
|
208
205
|
X,
|
|
209
206
|
{
|
|
210
207
|
className: g(
|
|
211
208
|
"h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform duration-150 motion-reduce:transition-none",
|
|
212
|
-
!
|
|
209
|
+
!k && "-rotate-90"
|
|
213
210
|
),
|
|
214
211
|
"aria-hidden": "true"
|
|
215
212
|
}
|
|
@@ -217,25 +214,25 @@ function ye({
|
|
|
217
214
|
]
|
|
218
215
|
}
|
|
219
216
|
),
|
|
220
|
-
|
|
221
|
-
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */ o("th", { className:
|
|
223
|
-
|
|
217
|
+
k && l.changed.length > 0 && /* @__PURE__ */ o("div", { className: "mt-1.5 overflow-x-auto", children: /* @__PURE__ */ d("table", { className: "border-collapse text-[12px]", children: [
|
|
218
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ d("tr", { className: "border-b border-slate-200 dark:border-border", children: [
|
|
219
|
+
/* @__PURE__ */ o("th", { className: H, children: "Line" }),
|
|
220
|
+
Y.map((e) => /* @__PURE__ */ o("th", { className: g(H, "whitespace-nowrap"), children: L(e) }, e))
|
|
224
221
|
] }) }),
|
|
225
|
-
/* @__PURE__ */ o("tbody", { children: l.changed.map((e) => /* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ o("tbody", { children: l.changed.map((e) => /* @__PURE__ */ d(
|
|
226
223
|
"tr",
|
|
227
224
|
{
|
|
228
225
|
className: "border-b border-slate-100 last:border-0 dark:border-border/60",
|
|
229
226
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ d("td", { className: J, children: [
|
|
231
228
|
/* @__PURE__ */ o("span", { className: "font-medium text-foreground", children: K(e.before) }),
|
|
232
|
-
|
|
229
|
+
v(e.before) && /* @__PURE__ */ o("span", { className: "ml-1.5 inline-block max-w-[180px] truncate align-bottom text-slate-500 dark:text-slate-400", children: v(e.before) })
|
|
233
230
|
] }),
|
|
234
|
-
|
|
231
|
+
Y.map((t) => {
|
|
235
232
|
const n = e.cells.find((p) => p.field === t);
|
|
236
233
|
if (!n) return /* @__PURE__ */ o("td", { className: J }, t);
|
|
237
|
-
const r =
|
|
238
|
-
return /* @__PURE__ */ o("td", { className: J, children: /* @__PURE__ */
|
|
234
|
+
const r = D(n.field, n.before), i = D(n.field, n.after);
|
|
235
|
+
return /* @__PURE__ */ o("td", { className: J, children: /* @__PURE__ */ d("span", { className: "inline-flex items-baseline gap-x-1.5", children: [
|
|
239
236
|
/* @__PURE__ */ o(
|
|
240
237
|
"span",
|
|
241
238
|
{
|
|
@@ -262,21 +259,21 @@ function ye({
|
|
|
262
259
|
`c-${String(e.row.id)}`
|
|
263
260
|
)) })
|
|
264
261
|
] }) }),
|
|
265
|
-
|
|
266
|
-
l.added.map((e, t) => /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
/* @__PURE__ */ o("span", { className:
|
|
262
|
+
k && (l.added.length > 0 || l.removed.length > 0) && /* @__PURE__ */ d("ol", { className: "mt-2.5 space-y-2.5", children: [
|
|
263
|
+
l.added.map((e, t) => /* @__PURE__ */ d("li", { children: [
|
|
264
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-baseline gap-x-1.5 text-[11.5px]", children: [
|
|
265
|
+
/* @__PURE__ */ o("span", { className: P("added"), children: "added" }),
|
|
269
266
|
/* @__PURE__ */ o("span", { className: "font-medium text-foreground", children: K(e) }),
|
|
270
|
-
|
|
267
|
+
v(e) && /* @__PURE__ */ d("span", { className: "truncate text-slate-500", children: [
|
|
271
268
|
"— ",
|
|
272
|
-
|
|
269
|
+
v(e)
|
|
273
270
|
] })
|
|
274
271
|
] }),
|
|
275
272
|
/* @__PURE__ */ o("dl", { className: z, children: A(e).slice(0, 6).map((n) => {
|
|
276
|
-
const r =
|
|
277
|
-
return /* @__PURE__ */
|
|
278
|
-
/* @__PURE__ */ o("dt", { className: "truncate text-slate-500 dark:text-slate-400", children:
|
|
279
|
-
/* @__PURE__ */
|
|
273
|
+
const r = D(n, e[n]);
|
|
274
|
+
return /* @__PURE__ */ d(B, { children: [
|
|
275
|
+
/* @__PURE__ */ o("dt", { className: "truncate text-slate-500 dark:text-slate-400", children: L(n) }),
|
|
276
|
+
/* @__PURE__ */ d(
|
|
280
277
|
"dd",
|
|
281
278
|
{
|
|
282
279
|
className: g(
|
|
@@ -292,20 +289,20 @@ function ye({
|
|
|
292
289
|
] }, n);
|
|
293
290
|
}) })
|
|
294
291
|
] }, `a-${String(e.id ?? t)}`)),
|
|
295
|
-
l.removed.map((e) => /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */ o("span", { className:
|
|
292
|
+
l.removed.map((e) => /* @__PURE__ */ d("li", { children: [
|
|
293
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-baseline gap-x-1.5 text-[11.5px]", children: [
|
|
294
|
+
/* @__PURE__ */ o("span", { className: P("removed"), children: "removed" }),
|
|
298
295
|
/* @__PURE__ */ o("span", { className: "font-medium text-foreground", children: K(e) }),
|
|
299
|
-
|
|
296
|
+
v(e) && /* @__PURE__ */ d("span", { className: "truncate text-slate-500", children: [
|
|
300
297
|
"— ",
|
|
301
|
-
|
|
298
|
+
v(e)
|
|
302
299
|
] })
|
|
303
300
|
] }),
|
|
304
301
|
/* @__PURE__ */ o("dl", { className: g(z, "text-slate-500"), children: A(e).slice(0, 4).map((t) => {
|
|
305
|
-
const n =
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */ o("dt", { className: "truncate", children:
|
|
308
|
-
/* @__PURE__ */
|
|
302
|
+
const n = D(t, e[t]);
|
|
303
|
+
return /* @__PURE__ */ d(B, { children: [
|
|
304
|
+
/* @__PURE__ */ o("dt", { className: "truncate", children: L(t) }),
|
|
305
|
+
/* @__PURE__ */ d(
|
|
309
306
|
"dd",
|
|
310
307
|
{
|
|
311
308
|
className: g(
|
|
@@ -325,7 +322,7 @@ function ye({
|
|
|
325
322
|
] });
|
|
326
323
|
}
|
|
327
324
|
export {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
325
|
+
Se as AddendumLinesDiff,
|
|
326
|
+
ce as diffAddendumLines,
|
|
327
|
+
de as lineCellDelta
|
|
331
328
|
};
|