@nivaro/react 0.3.41 → 0.3.43
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/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +733 -15
- package/dist/index.js +820 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/nav-trail.js +107 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Info as
|
|
4
|
-
import { memo as
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as Ve, useQueries as ft, useQuery as oe, useMutation as yt } from "@tanstack/react-query";
|
|
3
|
+
import { Info as bt, Loader2 as gt, Sparkles as vt, Lock as wt, SlidersHorizontal as kt, History as _t, BellRing as Nt, Bell as Ft, Sigma as Ct } from "lucide-react";
|
|
4
|
+
import { memo as Lt, useState as we, useRef as R, useId as St, useEffect as ae, useCallback as Ke } from "react";
|
|
5
5
|
import { toast as U } from "sonner";
|
|
6
|
-
import { useParentDraft as Rt, useNivaroClient as
|
|
7
|
-
import { showsAiButton as
|
|
8
|
-
import { get as H, del as
|
|
9
|
-
import { titleCase as
|
|
10
|
-
import { GlossaryLabel as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
6
|
+
import { useParentDraft as Rt, useNivaroClient as ie } from "../../context.js";
|
|
7
|
+
import { showsAiButton as $t, AUTOFILL_CHECK_KEY as qt, readAiFill as Tt } from "../../lib/ai-fill.js";
|
|
8
|
+
import { get as H, del as At, post as ve } from "../../lib/commands.js";
|
|
9
|
+
import { titleCase as ee, cn as D } from "../../lib/utils.js";
|
|
10
|
+
import { GlossaryLabel as Ue } from "../ai/GlossaryText.js";
|
|
11
|
+
import { useFieldSource as Et, FieldSourceInfo as Pt } from "../ConfigReadBack.js";
|
|
12
|
+
import { Label as jt } from "../ui/label.js";
|
|
13
|
+
import { TooltipProvider as te, Tooltip as ne, TooltipTrigger as re, TooltipContent as le } from "../ui/tooltip.js";
|
|
14
|
+
import { useAddendumFields as Dt } from "./AddendumFieldContext.js";
|
|
15
|
+
import { AutoIdPreviewField as Bt } from "./AutoIdPreviewField.js";
|
|
16
|
+
import { FOCUSABLE as He } from "./entry/entry-keys.js";
|
|
17
|
+
import { useFieldAffordances as Ot, useFieldContextMenu as Mt, usePresenceSoftLock as Kt, LockReasonBadge as Ut, PresenceSoftLockStrip as Ht, RemoteChangeGhost as Wt } from "./FieldAffordances.js";
|
|
18
|
+
import { FieldCommentButton as Vt } from "./FieldComments.js";
|
|
19
|
+
import { FieldRenderer as zt } from "./FieldRenderer.js";
|
|
20
|
+
import { FormHelpVideoButton as Gt } from "./FormHelpVideoButton.js";
|
|
21
|
+
import { getCascadeFilters as Qt, SYSTEM_FIELDS as Yt, parseJson as Jt, buildCascadeFilter as Xt, CascadeEffectController as Zt } from "./helpers.js";
|
|
22
|
+
import { isDerivedForRecord as It } from "./live-rollups.js";
|
|
23
|
+
import { useM2MStaging as en } from "./M2MStagingContext.js";
|
|
24
|
+
import { personalDefaultSlotFor as tn, PersonalDefaultSlot as nn } from "./PersonalDefaultControl.js";
|
|
25
|
+
import { PersonalDefaultHint as rn } from "./PersonalDefaultPill.js";
|
|
26
|
+
import { isDisplayFormulaRow as We, usePlacementTextContext as ln, placementFieldText as on, fieldCounterConfig as an, fieldIsRecommended as sn, RecommendedMarker as cn, RepeatLastButton as dn, DisplayFormulaValue as un, FieldCounter as mn } from "./placement-behaviour.js";
|
|
27
|
+
import { keepIfEqual as pn, jsonEqual as hn } from "./render-stability.js";
|
|
28
|
+
import { usePersonalDefaultsApi as xn } from "./usePersonalDefaults.js";
|
|
29
|
+
import { resolveOptionFilterTokens as fn } from "../../lib/option-filter-tokens.js";
|
|
30
|
+
const yn = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger", "number"]), bn = /* @__PURE__ */ new Set(["string", "text", "richtext", "textarea", "markdown", "json", "csv"]), gn = /* @__PURE__ */ new Set([
|
|
29
31
|
"input",
|
|
30
32
|
"textarea",
|
|
31
33
|
"wysiwyg",
|
|
@@ -33,7 +35,7 @@ const pn = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
|
|
|
33
35
|
"input-rich-text-html",
|
|
34
36
|
"rich_text",
|
|
35
37
|
"extension-editorjs"
|
|
36
|
-
]),
|
|
38
|
+
]), vn = /* @__PURE__ */ new Set([
|
|
37
39
|
"relation-m2o",
|
|
38
40
|
"relation-m2m",
|
|
39
41
|
"select-multiple-m2m",
|
|
@@ -44,108 +46,108 @@ const pn = /* @__PURE__ */ new Set(["integer", "float", "decimal", "bigInteger",
|
|
|
44
46
|
"file",
|
|
45
47
|
"files",
|
|
46
48
|
"image"
|
|
47
|
-
]),
|
|
48
|
-
function
|
|
49
|
-
const e =
|
|
50
|
-
return
|
|
49
|
+
]), wn = /* @__PURE__ */ new Set(["file", "file-image", "files-m2m", "files", "image"]);
|
|
50
|
+
function kn(c) {
|
|
51
|
+
const e = c.interface ?? "";
|
|
52
|
+
return vn.has(e) || e.startsWith("relation-") || e.endsWith("-m2o") || e.endsWith("-m2m") ? !1 : !!(bn.has(c.type ?? "") || gn.has(e) || !e && c.type && !yn.has(c.type));
|
|
51
53
|
}
|
|
52
|
-
function
|
|
53
|
-
const f =
|
|
54
|
-
return
|
|
55
|
-
queryKey: ["field-lineage",
|
|
54
|
+
function _n(c, e, m, p) {
|
|
55
|
+
const f = ie();
|
|
56
|
+
return oe({
|
|
57
|
+
queryKey: ["field-lineage", c, e, m],
|
|
56
58
|
queryFn: () => f.request(
|
|
57
|
-
H(`/lineage/${
|
|
59
|
+
H(`/lineage/${c}/${encodeURIComponent(e)}/${m}`)
|
|
58
60
|
).then((i) => i.data),
|
|
59
61
|
enabled: p,
|
|
60
62
|
staleTime: 3e4
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
function
|
|
65
|
+
function rr(c, e = "rows") {
|
|
64
66
|
var l, N, b;
|
|
65
|
-
if (
|
|
67
|
+
if (c && (c.kind === "write" || c.kind === "read") && c.formula) {
|
|
66
68
|
const u = (y) => typeof y == "number" ? y.toLocaleString(void 0, { maximumFractionDigits: 2 }) : y == null || y === "" ? "∅" : String(y);
|
|
67
|
-
return `= ${
|
|
69
|
+
return `= ${c.formula.replace(/item\.([A-Za-z_][A-Za-z0-9_]*)/g, (y, o) => {
|
|
68
70
|
var x;
|
|
69
|
-
return u((x =
|
|
71
|
+
return u((x = c.inputs) == null ? void 0 : x[o]);
|
|
70
72
|
}).replace(/\s*-\s*/g, " − ").replace(/\s*\*\s*/g, " × ").replace(/\s*\/\s*/g, " ÷ ")}`;
|
|
71
73
|
}
|
|
72
|
-
if (!
|
|
73
|
-
const m = (
|
|
74
|
+
if (!c || c.kind !== "rollup") return null;
|
|
75
|
+
const m = (c.sources ?? []).reduce((u, a) => u + a.rows.length, 0), p = (c.sources ?? []).reduce((u, a) => {
|
|
74
76
|
var y;
|
|
75
|
-
return u + (((y =
|
|
76
|
-
}, 0), f = (b = (N = (l = (
|
|
77
|
-
var
|
|
78
|
-
return (
|
|
77
|
+
return u + (((y = a.excluded) == null ? void 0 : y.length) ?? 0);
|
|
78
|
+
}, 0), f = (b = (N = (l = (c.sources ?? []).find((u) => {
|
|
79
|
+
var a;
|
|
80
|
+
return (a = u.excluded) == null ? void 0 : a.length;
|
|
79
81
|
})) == null ? void 0 : l.excluded) == null ? void 0 : N[0]) == null ? void 0 : b.reason, i = [`= ${m} ${m === 1 ? e.replace(/s$/, "") : e}`];
|
|
80
82
|
return p && i.push(
|
|
81
83
|
`${p} excluded${f ? ` (${f.replace(/^does not match: /, "")})` : ""}`
|
|
82
84
|
), i.join(" · ");
|
|
83
85
|
}
|
|
84
|
-
function
|
|
85
|
-
collection:
|
|
86
|
+
function Nn({
|
|
87
|
+
collection: c,
|
|
86
88
|
itemId: e,
|
|
87
89
|
field: m
|
|
88
90
|
}) {
|
|
89
|
-
const [p, f] = we(!1), i = R(null), { data: l, isLoading: N } =
|
|
91
|
+
const [p, f] = we(!1), i = R(null), { data: l, isLoading: N } = _n(c, e, m, p);
|
|
90
92
|
ae(() => {
|
|
91
93
|
if (!p) return;
|
|
92
|
-
const
|
|
93
|
-
var
|
|
94
|
-
(
|
|
94
|
+
const a = (y) => {
|
|
95
|
+
var o;
|
|
96
|
+
(o = i.current) != null && o.contains(y.target) || f(!1);
|
|
95
97
|
};
|
|
96
|
-
return window.addEventListener("mousedown",
|
|
98
|
+
return window.addEventListener("mousedown", a), () => window.removeEventListener("mousedown", a);
|
|
97
99
|
}, [p]);
|
|
98
|
-
const b = (
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
const b = (a) => a == null ? "—" : Number(a).toLocaleString(void 0, { maximumFractionDigits: 2 }), u = (l == null ? void 0 : l.stored_value) != null ? Number(l.stored_value) : null;
|
|
101
|
+
return /* @__PURE__ */ d("div", { ref: i, className: "relative inline-flex", children: [
|
|
102
|
+
/* @__PURE__ */ n(
|
|
101
103
|
"button",
|
|
102
104
|
{
|
|
103
105
|
type: "button",
|
|
104
|
-
onClick: () => f((
|
|
106
|
+
onClick: () => f((a) => !a),
|
|
105
107
|
title: "Where does this number come from?",
|
|
106
108
|
className: D(
|
|
107
109
|
"inline-flex items-center rounded p-0.5 transition-opacity",
|
|
108
110
|
p ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
|
|
109
111
|
),
|
|
110
112
|
"data-field-lineage": !0,
|
|
111
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ n(Ct, { className: "h-3 w-3" })
|
|
112
114
|
}
|
|
113
115
|
),
|
|
114
|
-
p && /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
N && /* @__PURE__ */
|
|
117
|
-
(l == null ? void 0 : l.kind) === "write" && /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
Object.entries(l.inputs ?? {}).map(([
|
|
120
|
-
/* @__PURE__ */
|
|
116
|
+
p && /* @__PURE__ */ d("div", { className: "absolute left-0 top-full z-40 mt-1 max-h-[340px] w-[360px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
|
|
117
|
+
/* @__PURE__ */ n("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Where this number comes from" }),
|
|
118
|
+
N && /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "Loading…" }),
|
|
119
|
+
(l == null ? void 0 : l.kind) === "write" && /* @__PURE__ */ d("div", { className: "space-y-1 px-1 py-1", children: [
|
|
120
|
+
/* @__PURE__ */ n("p", { className: "font-mono text-[11px] text-slate-600 dark:text-slate-300", children: l.formula }),
|
|
121
|
+
Object.entries(l.inputs ?? {}).map(([a, y]) => /* @__PURE__ */ d("p", { className: "text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
122
|
+
/* @__PURE__ */ n("span", { className: "font-mono", children: a }),
|
|
121
123
|
" = ",
|
|
122
124
|
b(y)
|
|
123
|
-
] },
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
+
] }, a)),
|
|
126
|
+
/* @__PURE__ */ d("p", { className: "pt-1 text-[11.5px] font-medium text-slate-700 dark:text-slate-200", children: [
|
|
125
127
|
"= ",
|
|
126
128
|
b(l.stored_value)
|
|
127
129
|
] })
|
|
128
130
|
] }),
|
|
129
|
-
(l == null ? void 0 : l.kind) === "rollup" && (l.sources ?? []).map((
|
|
130
|
-
var
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
(
|
|
134
|
-
|
|
131
|
+
(l == null ? void 0 : l.kind) === "rollup" && (l.sources ?? []).map((a, y) => {
|
|
132
|
+
var o;
|
|
133
|
+
return /* @__PURE__ */ d("div", { className: "mb-1.5", children: [
|
|
134
|
+
/* @__PURE__ */ d("p", { className: "px-1 text-[10.5px] text-slate-400", children: [
|
|
135
|
+
(a.aggregate ?? "sum").toUpperCase(),
|
|
136
|
+
a.value_field ? ` of ${a.value_field}` : "",
|
|
135
137
|
" across ",
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
a.collection,
|
|
139
|
+
a.filtered ? " (filtered)" : ""
|
|
138
140
|
] }),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
a.error && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-amber-600 dark:text-amber-400", children: a.error }),
|
|
142
|
+
a.note && /* @__PURE__ */ n("p", { className: "px-1 py-1 text-[11.5px] text-slate-400", children: a.note }),
|
|
143
|
+
a.rows.length > 0 && /* @__PURE__ */ n("div", { className: "mt-0.5 space-y-px", children: a.rows.map((x) => /* @__PURE__ */ d(
|
|
142
144
|
"div",
|
|
143
145
|
{
|
|
144
146
|
className: "flex items-baseline gap-2 rounded px-1 py-0.5 text-[11.5px] hover:bg-slate-50 dark:hover:bg-muted",
|
|
145
147
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-slate-600 dark:text-slate-300", children: x.label }),
|
|
149
|
+
/* @__PURE__ */ n("span", { className: "shrink-0 font-mono tabular-nums text-slate-800 dark:text-slate-100", children: b(x.value) }),
|
|
150
|
+
/* @__PURE__ */ n(
|
|
149
151
|
"span",
|
|
150
152
|
{
|
|
151
153
|
className: "w-[88px] shrink-0 truncate text-right text-[10px] text-slate-400",
|
|
@@ -157,121 +159,121 @@ function vn({
|
|
|
157
159
|
},
|
|
158
160
|
x.id
|
|
159
161
|
)) }),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
a.truncated && /* @__PURE__ */ n("p", { className: "px-1 pt-0.5 text-[10.5px] text-amber-600 dark:text-amber-400", children: "Showing the first 200 rows — the subtotal covers only these." }),
|
|
163
|
+
a.subtotal != null && /* @__PURE__ */ d("p", { className: "border-t border-slate-100 px-1 pt-1 text-right text-[11.5px] font-medium text-slate-700 dark:border-border dark:text-slate-200", children: [
|
|
162
164
|
"subtotal ",
|
|
163
|
-
b(
|
|
165
|
+
b(a.subtotal)
|
|
164
166
|
] }),
|
|
165
|
-
(((
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
|
|
167
|
+
(((o = a.excluded) == null ? void 0 : o.length) ?? 0) > 0 && /* @__PURE__ */ d("div", { className: "mt-1 rounded bg-slate-50 px-1 py-1 dark:bg-muted/40", children: [
|
|
168
|
+
/* @__PURE__ */ d("p", { className: "text-[10.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
169
|
+
a.excluded.length,
|
|
168
170
|
" excluded —",
|
|
169
171
|
" ",
|
|
170
|
-
|
|
172
|
+
a.excluded[0].reason.replace(/^does not match: /, "")
|
|
171
173
|
] }),
|
|
172
|
-
|
|
174
|
+
a.excluded.slice(0, 8).map((x) => /* @__PURE__ */ d(
|
|
173
175
|
"div",
|
|
174
176
|
{
|
|
175
177
|
className: "flex items-baseline gap-2 px-0.5 text-[11px] text-slate-400",
|
|
176
178
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate line-through decoration-slate-300", children: x.label }),
|
|
180
|
+
/* @__PURE__ */ n("span", { className: "shrink-0 font-mono tabular-nums", children: b(x.value) })
|
|
179
181
|
]
|
|
180
182
|
},
|
|
181
183
|
x.id
|
|
182
184
|
)),
|
|
183
|
-
|
|
185
|
+
a.excluded.length > 8 && /* @__PURE__ */ d("p", { className: "px-0.5 text-[10.5px] text-slate-400", children: [
|
|
184
186
|
"+",
|
|
185
|
-
|
|
187
|
+
a.excluded.length - 8,
|
|
186
188
|
" more"
|
|
187
189
|
] })
|
|
188
190
|
] })
|
|
189
191
|
] }, y);
|
|
190
192
|
}),
|
|
191
|
-
(l == null ? void 0 : l.kind) === "rollup" && u != null && /* @__PURE__ */
|
|
193
|
+
(l == null ? void 0 : l.kind) === "rollup" && u != null && /* @__PURE__ */ d("p", { className: "px-1 pt-0.5 text-right text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
192
194
|
"stored ",
|
|
193
195
|
b(u),
|
|
194
196
|
(() => {
|
|
195
|
-
const
|
|
196
|
-
return (l.sources ?? []).some((
|
|
197
|
+
const a = (l.sources ?? []).reduce((o, x) => o + (x.subtotal ?? 0), 0);
|
|
198
|
+
return (l.sources ?? []).some((o) => o.truncated) ? null : Math.abs(a - u) < 0.01 ? /* @__PURE__ */ n("span", { className: "ml-1 text-emerald-600 dark:text-emerald-400", children: "✓ matches" }) : /* @__PURE__ */ n("span", { className: "ml-1 text-amber-600 dark:text-amber-400", children: "✕ differs from contributions" });
|
|
197
199
|
})()
|
|
198
200
|
] })
|
|
199
201
|
] })
|
|
200
202
|
] });
|
|
201
203
|
}
|
|
202
|
-
function
|
|
203
|
-
collection:
|
|
204
|
+
function Fn({
|
|
205
|
+
collection: c,
|
|
204
206
|
itemId: e,
|
|
205
207
|
field: m,
|
|
206
208
|
formatValue: p,
|
|
207
209
|
onRestore: f
|
|
208
210
|
}) {
|
|
209
|
-
const i =
|
|
210
|
-
queryKey: ["field-value-history",
|
|
211
|
-
queryFn: () => i.request(H(`/field-history/${
|
|
211
|
+
const i = ie(), [l, N] = we(!1), b = R(null), { data: u, isLoading: a } = oe({
|
|
212
|
+
queryKey: ["field-value-history", c, e, m],
|
|
213
|
+
queryFn: () => i.request(H(`/field-history/${c}/${encodeURIComponent(e)}/${m}`)).then((o) => o.data ?? []),
|
|
212
214
|
enabled: l,
|
|
213
215
|
staleTime: 6e4
|
|
214
216
|
});
|
|
215
217
|
ae(() => {
|
|
216
218
|
if (!l) return;
|
|
217
|
-
const
|
|
219
|
+
const o = (x) => {
|
|
218
220
|
var W;
|
|
219
221
|
(W = b.current) != null && W.contains(x.target) || N(!1);
|
|
220
222
|
};
|
|
221
|
-
return window.addEventListener("mousedown",
|
|
223
|
+
return window.addEventListener("mousedown", o), () => window.removeEventListener("mousedown", o);
|
|
222
224
|
}, [l]);
|
|
223
|
-
const y = (
|
|
224
|
-
return /* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
const y = (o, x) => x || (o == null || o === "" ? "—" : p ? p(o) : typeof o == "boolean" || o === "true" || o === "false" ? o === !0 || o === "true" ? "Yes" : "No" : typeof o == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(o) ? new Date(o).toLocaleString() : typeof o == "object" ? JSON.stringify(o).slice(0, 60) : String(o).slice(0, 80));
|
|
226
|
+
return /* @__PURE__ */ d("div", { ref: b, className: "relative inline-flex", children: [
|
|
227
|
+
/* @__PURE__ */ n(
|
|
226
228
|
"button",
|
|
227
229
|
{
|
|
228
230
|
type: "button",
|
|
229
|
-
onClick: () => N((
|
|
231
|
+
onClick: () => N((o) => !o),
|
|
230
232
|
title: "Value history",
|
|
231
233
|
className: D(
|
|
232
234
|
"inline-flex items-center rounded p-0.5 transition-opacity",
|
|
233
235
|
l ? "text-nvr-cyan opacity-100" : "text-slate-400 hover:text-nvr-cyan dark:text-slate-300 dark:hover:text-nvr-cyan"
|
|
234
236
|
),
|
|
235
237
|
"data-field-history": !0,
|
|
236
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ n(_t, { className: "h-3 w-3" })
|
|
237
239
|
}
|
|
238
240
|
),
|
|
239
|
-
l && /* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
|
|
241
|
+
l && /* @__PURE__ */ d("div", { className: "absolute left-0 top-full z-40 mt-1 max-h-64 w-[300px] overflow-y-auto rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
|
|
242
|
+
/* @__PURE__ */ n("p", { className: "mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: "Value history" }),
|
|
243
|
+
a ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "Loading…" }) : (u ?? []).length === 0 ? /* @__PURE__ */ n("p", { className: "px-1 py-2 text-[11.5px] text-slate-400", children: "No recorded changes for this field." }) : /* @__PURE__ */ n("div", { className: "space-y-1", children: (u ?? []).map((o, x) => /* @__PURE__ */ d(
|
|
242
244
|
"div",
|
|
243
245
|
{
|
|
244
246
|
className: "rounded px-1 py-1 text-[11.5px] leading-snug hover:bg-slate-50 dark:hover:bg-muted",
|
|
245
247
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
-
f && x > 0 && /* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ d("span", { className: "flex items-baseline justify-between gap-2", children: [
|
|
249
|
+
/* @__PURE__ */ n("span", { className: "font-medium text-slate-700 dark:text-slate-200", children: y(o.value, o.display) }),
|
|
250
|
+
f && x > 0 && /* @__PURE__ */ n(
|
|
249
251
|
"button",
|
|
250
252
|
{
|
|
251
253
|
type: "button",
|
|
252
254
|
onClick: () => {
|
|
253
|
-
f(
|
|
255
|
+
f(o.value ?? null), N(!1);
|
|
254
256
|
},
|
|
255
257
|
className: "shrink-0 rounded border border-slate-200 px-1.5 py-px text-[10px] text-slate-500 hover:border-nvr-cyan/60 hover:text-nvr-navy dark:border-border dark:hover:text-nvr-cyan",
|
|
256
258
|
children: "Restore"
|
|
257
259
|
}
|
|
258
260
|
)
|
|
259
261
|
] }),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
/* @__PURE__ */ d("span", { className: "block text-[10.5px] text-slate-400", children: [
|
|
263
|
+
o.action === "create" ? "initial value" : "changed",
|
|
264
|
+
o.timestamp ? ` · ${new Date(o.timestamp).toLocaleString()}` : "",
|
|
265
|
+
o.user_name ? ` · ${o.user_name}` : "",
|
|
266
|
+
o.origin && o.origin.kind !== "user" && /* @__PURE__ */ n(
|
|
265
267
|
"span",
|
|
266
268
|
{
|
|
267
|
-
className:
|
|
268
|
-
children:
|
|
269
|
+
className: o.origin.kind === "integration" ? "ml-1 rounded bg-purple-500/10 px-1 py-px text-[9.5px] font-medium text-purple-700 dark:text-purple-400" : o.origin.kind === "import" ? "ml-1 rounded bg-sky-500/10 px-1 py-px text-[9.5px] font-medium text-sky-700 dark:text-sky-400" : "ml-1 rounded bg-amber-500/10 px-1 py-px text-[9.5px] font-medium text-amber-700 dark:text-amber-400",
|
|
270
|
+
children: o.origin.label ?? o.origin.kind
|
|
269
271
|
}
|
|
270
272
|
)
|
|
271
273
|
] }),
|
|
272
|
-
|
|
274
|
+
o.note && /* @__PURE__ */ d("span", { className: "block text-[10.5px] italic text-slate-500 dark:text-slate-400", children: [
|
|
273
275
|
"“",
|
|
274
|
-
|
|
276
|
+
o.note,
|
|
275
277
|
"”"
|
|
276
278
|
] })
|
|
277
279
|
]
|
|
@@ -281,26 +283,26 @@ function wn({
|
|
|
281
283
|
] })
|
|
282
284
|
] });
|
|
283
285
|
}
|
|
284
|
-
function
|
|
285
|
-
collection:
|
|
286
|
+
function Cn({
|
|
287
|
+
collection: c,
|
|
286
288
|
itemId: e,
|
|
287
289
|
field: m
|
|
288
290
|
}) {
|
|
289
|
-
const p =
|
|
291
|
+
const p = ie(), f = Ve(), { data: i } = oe({
|
|
290
292
|
queryKey: ["field-watch-config"],
|
|
291
|
-
queryFn: () => p.request(H("/field-watches/config")).then((
|
|
293
|
+
queryFn: () => p.request(H("/field-watches/config")).then((a) => a.data).catch(() => ({ enabled: !1 })),
|
|
292
294
|
staleTime: 5 * 6e4
|
|
293
|
-
}), l = ["field-watch-self",
|
|
295
|
+
}), l = ["field-watch-self", c, e], { data: N = [] } = oe({
|
|
294
296
|
queryKey: l,
|
|
295
|
-
queryFn: () => p.request(H("/field-watches/self", { collection:
|
|
297
|
+
queryFn: () => p.request(H("/field-watches/self", { collection: c, item_id: e })).then((a) => a.data ?? []).catch(() => []),
|
|
296
298
|
enabled: !!(i != null && i.enabled),
|
|
297
299
|
staleTime: 6e4
|
|
298
|
-
}), b = N.includes(m), u =
|
|
300
|
+
}), b = N.includes(m), u = yt({
|
|
299
301
|
mutationFn: () => b ? p.request(
|
|
300
|
-
|
|
301
|
-
`/field-watches/self?collection=${encodeURIComponent(
|
|
302
|
+
At(
|
|
303
|
+
`/field-watches/self?collection=${encodeURIComponent(c)}&field=${encodeURIComponent(m)}&item_id=${encodeURIComponent(e)}`
|
|
302
304
|
)
|
|
303
|
-
) : p.request(ve("/field-watches/self", { collection:
|
|
305
|
+
) : p.request(ve("/field-watches/self", { collection: c, field: m, item_id: e })),
|
|
304
306
|
onSuccess: () => {
|
|
305
307
|
f.invalidateQueries({ queryKey: l }), U.success(
|
|
306
308
|
b ? "No longer watching this field" : "Watching — you will be notified when it changes"
|
|
@@ -308,7 +310,7 @@ function kn({
|
|
|
308
310
|
},
|
|
309
311
|
onError: () => U.error("Could not update the watch")
|
|
310
312
|
});
|
|
311
|
-
return i != null && i.enabled ? /* @__PURE__ */
|
|
313
|
+
return i != null && i.enabled ? /* @__PURE__ */ n(
|
|
312
314
|
"button",
|
|
313
315
|
{
|
|
314
316
|
type: "button",
|
|
@@ -316,16 +318,16 @@ function kn({
|
|
|
316
318
|
title: b ? "Stop watching this field on this record" : "Watch this field on this record",
|
|
317
319
|
"data-field-watch": m,
|
|
318
320
|
className: `rounded p-0.5 transition-colors ${b ? "text-nvr-navy dark:text-nvr-cyan" : "text-slate-300 hover:text-slate-500"}`,
|
|
319
|
-
children: b ? /* @__PURE__ */
|
|
321
|
+
children: b ? /* @__PURE__ */ n(Nt, { className: "h-3 w-3" }) : /* @__PURE__ */ n(Ft, { className: "h-3 w-3" })
|
|
320
322
|
}
|
|
321
323
|
) : null;
|
|
322
324
|
}
|
|
323
|
-
function
|
|
324
|
-
return
|
|
325
|
+
function Ln(c) {
|
|
326
|
+
return c ? c.querySelector(
|
|
325
327
|
'input:not([type=hidden]), textarea, [role="combobox"], [contenteditable="true"]'
|
|
326
|
-
) ??
|
|
328
|
+
) ?? c.querySelector("button") : null;
|
|
327
329
|
}
|
|
328
|
-
const
|
|
330
|
+
const lr = Lt(function({
|
|
329
331
|
field: e,
|
|
330
332
|
draft: m,
|
|
331
333
|
onChange: p,
|
|
@@ -335,49 +337,49 @@ const Zn = Ct(function({
|
|
|
335
337
|
error: N,
|
|
336
338
|
visible: b,
|
|
337
339
|
locked: u,
|
|
338
|
-
layoutAiEnabled:
|
|
340
|
+
layoutAiEnabled: a,
|
|
339
341
|
renderField: y,
|
|
340
|
-
onCountChange:
|
|
342
|
+
onCountChange: o,
|
|
341
343
|
swapButton: x,
|
|
342
344
|
swapContent: W,
|
|
343
|
-
forceVisible:
|
|
344
|
-
autoFillTick:
|
|
345
|
+
forceVisible: ze,
|
|
346
|
+
autoFillTick: se
|
|
345
347
|
}) {
|
|
346
|
-
var
|
|
347
|
-
const V =
|
|
348
|
+
var Be, Oe, Me;
|
|
349
|
+
const V = wn.has(e.interface ?? ""), C = Rt(), g = en(), ke = Ve(), ce = ie(), [_e, z] = we(!1), s = Ot(), Ne = Et(e.field), G = R(null), Q = St(), de = R(null), Fe = R(!1);
|
|
348
350
|
ae(() => {
|
|
349
|
-
const t =
|
|
351
|
+
const t = Fe.current ? Ln(de.current) : null;
|
|
350
352
|
if (!t || t.hasAttribute("aria-label")) return;
|
|
351
353
|
t.id || (t.id = `${Q}-control`);
|
|
352
|
-
const
|
|
353
|
-
t.getAttribute("aria-labelledby") !==
|
|
354
|
+
const r = t.tagName === "BUTTON" ? `${Q} ${t.id}` : Q;
|
|
355
|
+
t.getAttribute("aria-labelledby") !== r && t.setAttribute("aria-labelledby", r);
|
|
354
356
|
});
|
|
355
|
-
const
|
|
357
|
+
const Ce = u && !V, Le = R(null);
|
|
356
358
|
ae(() => {
|
|
357
|
-
const t =
|
|
359
|
+
const t = Le.current;
|
|
358
360
|
if (!t) return;
|
|
359
|
-
if (!
|
|
361
|
+
if (!Ce) {
|
|
360
362
|
t.removeAttribute("inert");
|
|
361
363
|
return;
|
|
362
364
|
}
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
}, [
|
|
366
|
-
const Y = e.field,
|
|
365
|
+
const r = typeof document < "u" ? document.activeElement : null;
|
|
366
|
+
r instanceof HTMLElement && t.contains(r) && r.blur(), t.setAttribute("inert", "");
|
|
367
|
+
}, [Ce, se]);
|
|
368
|
+
const Y = e.field, Se = Ke(
|
|
367
369
|
(t) => {
|
|
368
370
|
u || p(Y, t);
|
|
369
371
|
},
|
|
370
372
|
[u, p, Y]
|
|
371
|
-
),
|
|
372
|
-
(t) =>
|
|
373
|
-
[
|
|
374
|
-
),
|
|
375
|
-
onContextMenu:
|
|
376
|
-
onKeyDown:
|
|
377
|
-
menu:
|
|
378
|
-
confirmSaveFrom:
|
|
379
|
-
openedBy:
|
|
380
|
-
} =
|
|
373
|
+
), Ge = Ke(
|
|
374
|
+
(t) => o == null ? void 0 : o(Y, t),
|
|
375
|
+
[o, Y]
|
|
376
|
+
), Qe = R(void 0), Re = R(void 0), $e = R(void 0), qe = !u && !e.readonly && !e.computed_formula && !(e.hidden && !e.layout_assigned) && !We(e), {
|
|
377
|
+
onContextMenu: Ye,
|
|
378
|
+
onKeyDown: Je,
|
|
379
|
+
menu: Xe,
|
|
380
|
+
confirmSaveFrom: Ze,
|
|
381
|
+
openedBy: ue
|
|
382
|
+
} = Mt({
|
|
381
383
|
wrapperRef: G,
|
|
382
384
|
field: e,
|
|
383
385
|
value: m[e.field],
|
|
@@ -385,36 +387,36 @@ const Zn = Ct(function({
|
|
|
385
387
|
collection: i,
|
|
386
388
|
itemId: l,
|
|
387
389
|
openRelated: s == null ? void 0 : s.openRelated,
|
|
388
|
-
editable:
|
|
389
|
-
}),
|
|
390
|
-
var t,
|
|
391
|
-
return ((t = de.current) == null ? void 0 : t.querySelector(
|
|
392
|
-
}, J =
|
|
393
|
-
async function
|
|
390
|
+
editable: qe
|
|
391
|
+
}), E = Kt(G), Ie = ln(), Te = s == null ? void 0 : s.remoteChanges[e.field], B = s == null ? void 0 : s.lockReasons[e.field], q = s == null ? void 0 : s.applyToLines[e.field], L = xn(), et = (L == null ? void 0 : L.applied(e.field)) ?? !1, Ae = (L == null ? void 0 : L.hintFor(e.field)) ?? null, me = tn(L, e.field, qe), pe = () => {
|
|
392
|
+
var t, r;
|
|
393
|
+
return ((t = de.current) == null ? void 0 : t.querySelector(He)) ?? ((r = G.current) == null ? void 0 : r.querySelector(He));
|
|
394
|
+
}, J = $t(e._overrides, a, kn(e)), he = !!(s != null && s.fromAutofill) && !!e._overrides && e._overrides[qt] === !0;
|
|
395
|
+
async function tt() {
|
|
394
396
|
var t;
|
|
395
|
-
if (J.perField) return
|
|
397
|
+
if (J.perField) return nt();
|
|
396
398
|
z(!0);
|
|
397
399
|
try {
|
|
398
|
-
const
|
|
400
|
+
const r = await ce.request(
|
|
399
401
|
ve("/ai/generate", {
|
|
400
402
|
collection: i,
|
|
401
403
|
item_id: l !== "new" ? l : void 0,
|
|
402
404
|
field: e.field
|
|
403
405
|
})
|
|
404
406
|
);
|
|
405
|
-
((t =
|
|
407
|
+
((t = r.data) == null ? void 0 : t.value) != null && p(e.field, r.data.value);
|
|
406
408
|
} catch {
|
|
407
409
|
} finally {
|
|
408
410
|
z(!1);
|
|
409
411
|
}
|
|
410
412
|
}
|
|
411
|
-
async function
|
|
412
|
-
var
|
|
413
|
+
async function nt() {
|
|
414
|
+
var r, h, k, j, A, F;
|
|
413
415
|
const t = {};
|
|
414
|
-
for (const v of ((
|
|
416
|
+
for (const v of ((r = Tt(e._overrides)) == null ? void 0 : r.tokens) ?? []) v in m && (t[v] = m[v]);
|
|
415
417
|
z(!0);
|
|
416
418
|
try {
|
|
417
|
-
const v = await
|
|
419
|
+
const v = await ce.request(
|
|
418
420
|
ve("/ai/field-fill", {
|
|
419
421
|
collection: i,
|
|
420
422
|
layout_id: (s == null ? void 0 : s.layoutId) ?? null,
|
|
@@ -426,185 +428,186 @@ const Zn = Ct(function({
|
|
|
426
428
|
typeof _ == "string" && _ !== "" ? p(e.field, _) : U.info("The AI had nothing to write here"), (j = (k = v.data) == null ? void 0 : k.missing) != null && j.length && U.info(`Filled without ${v.data.missing.join(", ")} (empty or not visible to you)`);
|
|
427
429
|
} catch (v) {
|
|
428
430
|
const _ = v;
|
|
429
|
-
U.error(((F = (
|
|
431
|
+
U.error(((F = (A = _ == null ? void 0 : _.response) == null ? void 0 : A.data) == null ? void 0 : F.error) ?? (_ == null ? void 0 : _.message) ?? "AI fill failed");
|
|
430
432
|
} finally {
|
|
431
433
|
z(!1);
|
|
432
434
|
}
|
|
433
435
|
}
|
|
434
|
-
const
|
|
435
|
-
const
|
|
436
|
+
const P = Qt(e.dependency_config), Ee = P.flatMap((t) => {
|
|
437
|
+
const r = f.find(
|
|
436
438
|
(k) => k.one_collection === i && k.one_field === t.parent_field
|
|
437
439
|
);
|
|
438
|
-
if (!
|
|
439
|
-
if (
|
|
440
|
+
if (!r) return [];
|
|
441
|
+
if (r.junction_field) return [{ rule: t, rel: r }];
|
|
440
442
|
const h = f.find(
|
|
441
|
-
(k) => k.many_collection ===
|
|
443
|
+
(k) => k.many_collection === r.many_collection && k.id !== r.id
|
|
442
444
|
);
|
|
443
|
-
return h != null && h.many_field ? [{ rule: t, rel: { ...
|
|
444
|
-
}),
|
|
445
|
-
queries:
|
|
445
|
+
return h != null && h.many_field ? [{ rule: t, rel: { ...r, junction_field: h.many_field } }] : [];
|
|
446
|
+
}), rt = ft({
|
|
447
|
+
queries: Ee.map(({ rel: t }) => ({
|
|
446
448
|
queryKey: ["m2m-items", t.many_collection, t.many_field, l],
|
|
447
|
-
queryFn: () =>
|
|
449
|
+
queryFn: () => ce.request(
|
|
448
450
|
H(`/items/${t.many_collection}`, {
|
|
449
451
|
filter: JSON.stringify({ [t.many_field]: { _eq: l } }),
|
|
450
452
|
limit: 200,
|
|
451
453
|
fields: `id,${t.junction_field}`
|
|
452
454
|
})
|
|
453
|
-
).then((
|
|
455
|
+
).then((r) => r.data ?? []),
|
|
454
456
|
enabled: !!l && l !== "new",
|
|
455
457
|
staleTime: 3e4
|
|
456
458
|
}))
|
|
457
|
-
}),
|
|
458
|
-
|
|
459
|
-
var
|
|
460
|
-
const k =
|
|
459
|
+
}), lt = Object.fromEntries(
|
|
460
|
+
Ee.map(({ rule: t, rel: r }, h) => {
|
|
461
|
+
var A;
|
|
462
|
+
const k = r.one_field ?? `${r.many_collection}.${r.junction_field}`, j = (g == null ? void 0 : g.getStagedUnlinks(k)) ?? /* @__PURE__ */ new Set();
|
|
461
463
|
return [
|
|
462
464
|
t.parent_field,
|
|
463
|
-
(((
|
|
465
|
+
(((A = rt[h]) == null ? void 0 : A.data) ?? []).filter((F) => !j.has(F.id)).map((F) => F[r.junction_field])
|
|
464
466
|
];
|
|
465
467
|
})
|
|
466
|
-
), X =
|
|
467
|
-
if (!
|
|
468
|
+
), X = Dt()[e.field] ?? [];
|
|
469
|
+
if (!ze && (!b || !e.layout_assigned && (e.hidden || Yt.has(e.field))))
|
|
468
470
|
return null;
|
|
469
|
-
const
|
|
470
|
-
|
|
471
|
-
const
|
|
471
|
+
const xe = m[e.field] ?? null, Z = on(e, Ie), S = Z.label ?? ee(e.field);
|
|
472
|
+
Fe.current = S !== "";
|
|
473
|
+
const T = We(e), Pe = T ? null : an(e), ot = !T && !u && !e.readonly && ((Be = e._overrides) == null ? void 0 : Be.repeat_last) === !0, at = It(e, m), it = (Me = (Oe = Jt(e.options)) == null ? void 0 : Oe.auto_id) == null ? void 0 : Me.pattern, w = (() => {
|
|
472
474
|
const t = f.find(
|
|
473
475
|
(h) => h.one_collection === i && h.one_field === e.field
|
|
474
476
|
);
|
|
475
477
|
if (!t) return null;
|
|
476
478
|
if (t.junction_field) return t;
|
|
477
|
-
const
|
|
479
|
+
const r = f.find(
|
|
478
480
|
(h) => h.many_collection === t.many_collection && h.id !== t.id
|
|
479
481
|
);
|
|
480
|
-
return
|
|
481
|
-
})(),
|
|
482
|
+
return r ? { ...t, junction_field: r.many_field } : null;
|
|
483
|
+
})(), fe = w ? null : f.find((t) => t.many_collection === i && t.many_field === e.field) ?? null, ye = w ? f.find(
|
|
482
484
|
(t) => t.many_collection === w.many_collection && t.many_field === w.junction_field && t.id !== w.id
|
|
483
|
-
) ?? null : null,
|
|
485
|
+
) ?? null : null, O = w ? w.one_field ?? `${w.many_collection}.${w.junction_field}` : null, je = O ? (g == null ? void 0 : g.getStagedLinks(O)) ?? [] : [], st = w ? (ke.getQueryData([
|
|
484
486
|
"m2m-items",
|
|
485
487
|
w.many_collection,
|
|
486
488
|
w.many_field,
|
|
487
489
|
l
|
|
488
|
-
]) ?? []).map((t) => t[w.junction_field]) : [],
|
|
489
|
-
var
|
|
490
|
-
return ((C == null ? void 0 : C.collection) === i ? (
|
|
491
|
-
}, $ =
|
|
492
|
-
rules:
|
|
490
|
+
]) ?? []).map((t) => t[w.junction_field]) : [], ct = w ? je[0] ?? st[0] ?? null : xe, dt = (ye == null ? void 0 : ye.one_collection) ?? (fe == null ? void 0 : fe.one_collection) ?? void 0, I = (t) => {
|
|
491
|
+
var r;
|
|
492
|
+
return ((C == null ? void 0 : C.collection) === i ? (r = C == null ? void 0 : C.fieldLabels) == null ? void 0 : r[t] : void 0) ?? ee(String(t));
|
|
493
|
+
}, $ = Xt({
|
|
494
|
+
rules: P,
|
|
493
495
|
// A parent whose value THIS field's own pick derived must not narrow this
|
|
494
496
|
// field's options — otherwise picking a region locks the region picker
|
|
495
497
|
// into the zone the pick itself filled, and cross-zone changes read as
|
|
496
498
|
// "No results".
|
|
497
499
|
skipParent: (t) => {
|
|
498
|
-
var
|
|
499
|
-
return ((
|
|
500
|
+
var r;
|
|
501
|
+
return ((r = g == null ? void 0 : g.getDerivedOrigin) == null ? void 0 : r.call(g, t)) === e.field;
|
|
500
502
|
},
|
|
501
503
|
parentValue: (t) => {
|
|
502
504
|
if (m[t] != null) return m[t];
|
|
503
|
-
const
|
|
504
|
-
if (!
|
|
505
|
-
let h =
|
|
505
|
+
const r = f.find((v) => v.one_collection === i && v.one_field === t);
|
|
506
|
+
if (!r) return null;
|
|
507
|
+
let h = r;
|
|
506
508
|
if (!h.junction_field) {
|
|
507
509
|
const v = f.find(
|
|
508
|
-
(_) => _.many_collection ===
|
|
510
|
+
(_) => _.many_collection === r.many_collection && _.id !== r.id
|
|
509
511
|
);
|
|
510
|
-
if (v != null && v.many_field) h = { ...
|
|
512
|
+
if (v != null && v.many_field) h = { ...r, junction_field: v.many_field };
|
|
511
513
|
else return null;
|
|
512
514
|
}
|
|
513
|
-
const k = h.one_field ?? `${h.many_collection}.${h.junction_field}`, j = (g == null ? void 0 : g.getStagedLinks(k)) ?? [],
|
|
515
|
+
const k = h.one_field ?? `${h.many_collection}.${h.junction_field}`, j = (g == null ? void 0 : g.getStagedLinks(k)) ?? [], A = lt[t] ?? [], F = [...new Set([...j, ...A].map((v) => String(v)))];
|
|
514
516
|
return F.length === 0 ? null : F.length === 1 ? F[0] : F;
|
|
515
517
|
},
|
|
516
518
|
parentOptionFilter: (t) => {
|
|
517
519
|
var h;
|
|
518
|
-
const
|
|
519
|
-
return
|
|
520
|
+
const r = (C == null ? void 0 : C.collection) === i ? (h = C.fieldOptionFilters) == null ? void 0 : h[t] : void 0;
|
|
521
|
+
return r ? fn(r, m, l) : void 0;
|
|
520
522
|
}
|
|
521
|
-
}), M = $.filter ?
|
|
522
|
-
function
|
|
523
|
-
const t =
|
|
523
|
+
}), M = $.filter ? pn(Qe, $.filter, hn) : $.filter, K = $.satisfiedParents.map(I), be = $.satisfiedParents, ut = $.unsatisfiedParents.length ? I($.unsatisfiedParents[0]) : null, ge = $.missingRequiredParents, De = ge.length ? I(ge[0]) : null;
|
|
524
|
+
function mt() {
|
|
525
|
+
const t = $e.current;
|
|
524
526
|
if (t && t.src === e) return t.value;
|
|
525
|
-
const
|
|
526
|
-
return
|
|
527
|
+
const r = { ...e, readonly: !0 };
|
|
528
|
+
return $e.current = { src: e, value: r }, r;
|
|
527
529
|
}
|
|
528
|
-
function
|
|
529
|
-
const t = JSON.stringify([K,
|
|
530
|
-
if (
|
|
530
|
+
function pt() {
|
|
531
|
+
const t = JSON.stringify([K, be]), r = Re.current;
|
|
532
|
+
if (r && r.sig === t && r.onChange === p) return r.value;
|
|
531
533
|
const h = {
|
|
532
534
|
labels: K,
|
|
533
|
-
keys:
|
|
535
|
+
keys: be,
|
|
534
536
|
onClear: (k) => p(k, null)
|
|
535
537
|
};
|
|
536
538
|
return Re.current = { sig: t, onChange: p, value: h }, h;
|
|
537
539
|
}
|
|
538
|
-
function
|
|
539
|
-
for (const t of
|
|
540
|
-
const
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
function ht() {
|
|
541
|
+
for (const t of be) {
|
|
542
|
+
const r = document.querySelector(`[data-field="${t}"]`);
|
|
543
|
+
r && (r.scrollIntoView({ behavior: "smooth", block: "center" }), r.style.transition = "box-shadow 0.15s ease", r.style.boxShadow = "0 0 0 2px rgb(var(--nvr-cyan-rgb, 0 206 255)), 0 0 0 5px rgb(var(--nvr-cyan-rgb, 0 206 255) / 0.25)", r.style.borderRadius = "12px", setTimeout(() => {
|
|
544
|
+
r.style.boxShadow = "none", setTimeout(() => {
|
|
545
|
+
r.style.transition = "", r.style.borderRadius = "";
|
|
544
546
|
}, 300);
|
|
545
547
|
}, 900));
|
|
546
548
|
}
|
|
547
549
|
}
|
|
548
|
-
const
|
|
549
|
-
if (w &&
|
|
550
|
-
for (const
|
|
550
|
+
const xt = () => {
|
|
551
|
+
if (w && O) {
|
|
552
|
+
for (const r of je) g == null || g.unstageLink(O, r);
|
|
551
553
|
const t = ke.getQueryData([
|
|
552
554
|
"m2m-items",
|
|
553
555
|
w.many_collection,
|
|
554
556
|
w.many_field,
|
|
555
557
|
l
|
|
556
558
|
]) ?? [];
|
|
557
|
-
for (const
|
|
559
|
+
for (const r of t) g == null || g.stageUnlink(O, r.id);
|
|
558
560
|
} else
|
|
559
561
|
p(e.field, null);
|
|
560
562
|
};
|
|
561
563
|
return (
|
|
562
564
|
// biome-ignore lint/a11y/noStaticElementInteractions: the wrapper only hosts the field context menu (right-click / Shift+F10); the inputs inside stay the controls
|
|
563
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ d(
|
|
564
566
|
"div",
|
|
565
567
|
{
|
|
566
568
|
ref: G,
|
|
567
569
|
"data-field": e.field,
|
|
568
570
|
"data-field-collection": i,
|
|
569
571
|
"data-field-interface": e.interface ?? void 0,
|
|
570
|
-
"data-autofill-check":
|
|
572
|
+
"data-autofill-check": he ? "" : void 0,
|
|
571
573
|
className: D(
|
|
572
574
|
"group/fieldrow space-y-1.5",
|
|
573
|
-
|
|
575
|
+
he && "rounded-md bg-amber-50/60 p-1.5 ring-1 ring-amber-300 dark:bg-amber-500/10 dark:ring-amber-500/40"
|
|
574
576
|
),
|
|
575
|
-
onContextMenu:
|
|
576
|
-
onKeyDown:
|
|
577
|
-
onFocusCapture:
|
|
577
|
+
onContextMenu: Ye,
|
|
578
|
+
onKeyDown: Je,
|
|
579
|
+
onFocusCapture: E.onFocusCapture,
|
|
578
580
|
children: [
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
Xe,
|
|
582
|
+
P.length > 0 && /* @__PURE__ */ n(
|
|
583
|
+
Zt,
|
|
582
584
|
{
|
|
583
|
-
cascadeRules:
|
|
585
|
+
cascadeRules: P,
|
|
584
586
|
cascadeFilter: M,
|
|
585
|
-
currentValue:
|
|
587
|
+
currentValue: ct,
|
|
586
588
|
relatedCollection: dt,
|
|
587
|
-
missingRequiredParents:
|
|
588
|
-
onClear:
|
|
589
|
+
missingRequiredParents: ge,
|
|
590
|
+
onClear: xt
|
|
589
591
|
}
|
|
590
592
|
),
|
|
591
|
-
(S !== "" || X.length > 0) && /* @__PURE__ */
|
|
593
|
+
(S !== "" || X.length > 0) && /* @__PURE__ */ d(
|
|
592
594
|
"div",
|
|
593
595
|
{
|
|
594
596
|
className: "flex flex-wrap items-center gap-1.5 min-h-[1.5rem]",
|
|
595
|
-
"data-pd-row":
|
|
597
|
+
"data-pd-row": me ? "" : void 0,
|
|
596
598
|
children: [
|
|
597
|
-
S !== "" && /* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
e.required && /* @__PURE__ */
|
|
600
|
-
|
|
599
|
+
S !== "" && /* @__PURE__ */ d(jt, { id: Q, "data-field-label": !0, className: "text-sm font-medium", children: [
|
|
600
|
+
/* @__PURE__ */ n(Ue, { text: S, collection: i }),
|
|
601
|
+
e.required && /* @__PURE__ */ n("span", { className: "ml-0.5 text-destructive", children: "*" }),
|
|
602
|
+
sn(e) && /* @__PURE__ */ n(cn, {})
|
|
601
603
|
] }),
|
|
602
|
-
Z.note && /* @__PURE__ */
|
|
603
|
-
/* @__PURE__ */
|
|
604
|
-
/* @__PURE__ */
|
|
604
|
+
Z.note && /* @__PURE__ */ n(te, { delayDuration: 100, children: /* @__PURE__ */ d(ne, { children: [
|
|
605
|
+
/* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ n(bt, { className: "h-3.5 w-3.5 shrink-0 cursor-help text-slate-400 hover:text-slate-600" }) }),
|
|
606
|
+
/* @__PURE__ */ n(le, { side: "top", className: "max-w-[240px] text-[12px]", children: (s == null ? void 0 : s.glossaryHelp) === !1 ? Z.note : /* @__PURE__ */ n(Ue, { text: Z.note, collection: i }) })
|
|
605
607
|
] }) }),
|
|
606
|
-
|
|
607
|
-
|
|
608
|
+
Ne && /* @__PURE__ */ n(Pt, { source: Ne, label: S }),
|
|
609
|
+
!T && l && l !== "new" && /* @__PURE__ */ n(
|
|
610
|
+
Fn,
|
|
608
611
|
{
|
|
609
612
|
collection: i,
|
|
610
613
|
itemId: l,
|
|
@@ -612,34 +615,35 @@ const Zn = Ct(function({
|
|
|
612
615
|
onRestore: e.readonly ? void 0 : (t) => p(e.field, t)
|
|
613
616
|
}
|
|
614
617
|
),
|
|
615
|
-
!
|
|
616
|
-
l && l !== "new" &&
|
|
617
|
-
|
|
618
|
-
|
|
618
|
+
!T && l && l !== "new" && /* @__PURE__ */ n(Cn, { collection: i, itemId: l, field: e.field }),
|
|
619
|
+
!T && l && l !== "new" && /* @__PURE__ */ n(Vt, { field: e.field, label: S || ee(e.field) }),
|
|
620
|
+
l && l !== "new" && at && /* @__PURE__ */ n(Nn, { collection: i, itemId: l, field: e.field }),
|
|
621
|
+
ot && /* @__PURE__ */ n(
|
|
622
|
+
dn,
|
|
619
623
|
{
|
|
620
624
|
collection: i,
|
|
621
625
|
itemId: l,
|
|
622
626
|
field: e.field,
|
|
623
|
-
label: S ||
|
|
627
|
+
label: S || ee(e.field),
|
|
624
628
|
onFill: (t) => p(e.field, t)
|
|
625
629
|
}
|
|
626
630
|
),
|
|
627
|
-
!
|
|
631
|
+
!T && J.show && !(J.perField && (u || e.readonly)) && /* @__PURE__ */ d(
|
|
628
632
|
"button",
|
|
629
633
|
{
|
|
630
634
|
type: "button",
|
|
631
|
-
onClick:
|
|
635
|
+
onClick: tt,
|
|
632
636
|
disabled: _e,
|
|
633
637
|
"data-ai-fill": J.perField ? e.field : void 0,
|
|
634
638
|
className: "inline-flex items-center gap-0.5 rounded px-1 py-0.5 text-[10px] font-medium text-nvr-cyan hover:bg-nvr-cyan/10 disabled:opacity-50 transition-colors",
|
|
635
639
|
title: "Generate with AI",
|
|
636
640
|
children: [
|
|
637
|
-
_e ? /* @__PURE__ */
|
|
641
|
+
_e ? /* @__PURE__ */ n(gt, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ n(vt, { className: "h-3 w-3" }),
|
|
638
642
|
"AI"
|
|
639
643
|
]
|
|
640
644
|
}
|
|
641
645
|
),
|
|
642
|
-
|
|
646
|
+
he && /* @__PURE__ */ n(
|
|
643
647
|
"span",
|
|
644
648
|
{
|
|
645
649
|
"data-tip": "People often change what the AI read from the document here — check it",
|
|
@@ -648,7 +652,7 @@ const Zn = Ct(function({
|
|
|
648
652
|
}
|
|
649
653
|
),
|
|
650
654
|
x,
|
|
651
|
-
q && !u && !e.readonly && /* @__PURE__ */
|
|
655
|
+
q && !u && !e.readonly && /* @__PURE__ */ d(
|
|
652
656
|
"button",
|
|
653
657
|
{
|
|
654
658
|
type: "button",
|
|
@@ -663,21 +667,21 @@ const Zn = Ct(function({
|
|
|
663
667
|
]
|
|
664
668
|
}
|
|
665
669
|
),
|
|
666
|
-
X.length > 0 && /* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
/* @__PURE__ */
|
|
670
|
+
X.length > 0 && /* @__PURE__ */ n(te, { delayDuration: 100, children: /* @__PURE__ */ d(ne, { children: [
|
|
671
|
+
/* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-1 rounded-full bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 border border-amber-200 dark:bg-amber-500/10 dark:text-amber-400 dark:border-amber-500/20 cursor-default", children: [
|
|
672
|
+
/* @__PURE__ */ n("span", { className: "h-1.5 w-1.5 rounded-full bg-amber-400 shrink-0" }),
|
|
669
673
|
"addendum"
|
|
670
674
|
] }) }),
|
|
671
|
-
/* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ d(le, { side: "top", className: "max-w-[220px] text-[12px]", children: [
|
|
676
|
+
/* @__PURE__ */ d("p", { className: "font-medium mb-1", children: [
|
|
673
677
|
"In active addendum",
|
|
674
678
|
X.length > 1 ? "s" : "",
|
|
675
679
|
":"
|
|
676
680
|
] }),
|
|
677
|
-
X.map((t) => /* @__PURE__ */
|
|
681
|
+
X.map((t) => /* @__PURE__ */ d("p", { className: "text-slate-400", children: [
|
|
678
682
|
t.title,
|
|
679
683
|
" ",
|
|
680
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ d("span", { className: "capitalize", children: [
|
|
681
685
|
"(",
|
|
682
686
|
t.status,
|
|
683
687
|
")"
|
|
@@ -685,8 +689,8 @@ const Zn = Ct(function({
|
|
|
685
689
|
] }, t.id))
|
|
686
690
|
] })
|
|
687
691
|
] }) }),
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
|
|
692
|
+
/* @__PURE__ */ n(
|
|
693
|
+
Gt,
|
|
690
694
|
{
|
|
691
695
|
collection: i,
|
|
692
696
|
kind: "field",
|
|
@@ -694,57 +698,57 @@ const Zn = Ct(function({
|
|
|
694
698
|
label: S
|
|
695
699
|
}
|
|
696
700
|
),
|
|
697
|
-
(u || e.readonly) &&
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
701
|
+
(u || e.readonly) && B ? /* @__PURE__ */ n(Ut, { reason: B, onHover: s == null ? void 0 : s.onLockHover }) : u ? /* @__PURE__ */ n(te, { delayDuration: 200, children: /* @__PURE__ */ d(ne, { children: [
|
|
702
|
+
/* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ n("span", { className: "inline-flex items-center text-amber-400 dark:text-amber-500", children: /* @__PURE__ */ n(wt, { className: "h-3 w-3" }) }) }),
|
|
703
|
+
/* @__PURE__ */ n(le, { side: "top", className: "text-[12px]", children: "This field is locked" })
|
|
700
704
|
] }) }) : null,
|
|
701
|
-
|
|
702
|
-
const t = !!M && Object.keys(M).length > 0 && K.length > 0,
|
|
705
|
+
P.length > 0 && (() => {
|
|
706
|
+
const t = !!M && Object.keys(M).length > 0 && K.length > 0, r = P.map(
|
|
703
707
|
(h) => I(String(h.parent_field))
|
|
704
708
|
);
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
709
|
+
return /* @__PURE__ */ n(te, { delayDuration: 100, children: /* @__PURE__ */ d(ne, { children: [
|
|
710
|
+
/* @__PURE__ */ n(re, { asChild: !0, children: /* @__PURE__ */ n(
|
|
707
711
|
"button",
|
|
708
712
|
{
|
|
709
713
|
type: "button",
|
|
710
714
|
"aria-label": `Show the fields that narrow ${S || "this list"}`,
|
|
711
|
-
onClick:
|
|
715
|
+
onClick: ht,
|
|
712
716
|
className: D(
|
|
713
717
|
"inline-flex items-center transition-colors",
|
|
714
718
|
t ? "text-nvr-cyan hover:text-nvr-cyan" : "text-slate-300 hover:text-nvr-cyan dark:text-slate-600 dark:hover:text-nvr-cyan"
|
|
715
719
|
),
|
|
716
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ n(kt, { className: "h-3 w-3" })
|
|
717
721
|
}
|
|
718
722
|
) }),
|
|
719
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ n(le, { side: "top", className: "text-[12px]", children: t ? `Filtered by ${K.join(", ")} — click to highlight` : `Options filter by ${r.join(", ")} once set` })
|
|
720
724
|
] }) });
|
|
721
725
|
})(),
|
|
722
|
-
|
|
726
|
+
me && // Right-anchored: the personal-default control flush with the field's right edge
|
|
723
727
|
// (it carries Make / Update / Clear itself — no ⋯ button; right-click and
|
|
724
728
|
// Shift+F10 still open the field menu). The slot keeps one box whatever it shows,
|
|
725
729
|
// so nothing to its left moves.
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
|
|
730
|
+
/* @__PURE__ */ n("span", { className: "ml-auto inline-flex shrink-0 items-center gap-1", children: /* @__PURE__ */ n(
|
|
731
|
+
nn,
|
|
728
732
|
{
|
|
729
733
|
field: e.field,
|
|
730
734
|
label: S,
|
|
731
|
-
state:
|
|
732
|
-
confirmOpen:
|
|
733
|
-
onConfirm: (t,
|
|
735
|
+
state: me,
|
|
736
|
+
confirmOpen: ue === "make" || ue === "update" ? ue : null,
|
|
737
|
+
onConfirm: (t, r) => (
|
|
734
738
|
// After a save the button becomes "Your default": focus goes to the field.
|
|
735
|
-
|
|
739
|
+
Ze(t, pe, r)
|
|
736
740
|
),
|
|
737
741
|
onUndo: () => {
|
|
738
742
|
L == null || L.undo(e.field), requestAnimationFrame(() => {
|
|
739
743
|
var t;
|
|
740
|
-
return (t =
|
|
744
|
+
return (t = pe()) == null ? void 0 : t.focus();
|
|
741
745
|
});
|
|
742
746
|
},
|
|
743
747
|
onCleared: () => (
|
|
744
748
|
// The Clear button is gone (and not a tab stop): focus goes to the field.
|
|
745
749
|
requestAnimationFrame(() => {
|
|
746
750
|
var t;
|
|
747
|
-
return (t =
|
|
751
|
+
return (t = pe()) == null ? void 0 : t.focus();
|
|
748
752
|
})
|
|
749
753
|
)
|
|
750
754
|
}
|
|
@@ -752,26 +756,26 @@ const Zn = Ct(function({
|
|
|
752
756
|
]
|
|
753
757
|
}
|
|
754
758
|
),
|
|
755
|
-
|
|
756
|
-
|
|
759
|
+
E.editor && !u && /* @__PURE__ */ n(
|
|
760
|
+
Ht,
|
|
757
761
|
{
|
|
758
|
-
editor:
|
|
759
|
-
confirming:
|
|
760
|
-
onConfirm:
|
|
761
|
-
onCancel:
|
|
762
|
+
editor: E.editor,
|
|
763
|
+
confirming: E.confirming,
|
|
764
|
+
onConfirm: E.confirm,
|
|
765
|
+
onCancel: E.cancel
|
|
762
766
|
}
|
|
763
767
|
),
|
|
764
|
-
W ?? /* @__PURE__ */
|
|
768
|
+
W ?? /* @__PURE__ */ n(
|
|
765
769
|
"div",
|
|
766
770
|
{
|
|
767
771
|
ref: de,
|
|
768
772
|
className: D(u && !V && "cursor-not-allowed"),
|
|
769
|
-
"data-tip": (u || e.readonly) &&
|
|
770
|
-
onPointerEnter: (u || e.readonly) &&
|
|
771
|
-
children: /* @__PURE__ */
|
|
773
|
+
"data-tip": (u || e.readonly) && B ? B : void 0,
|
|
774
|
+
onPointerEnter: (u || e.readonly) && B ? s == null ? void 0 : s.onLockHover : void 0,
|
|
775
|
+
children: /* @__PURE__ */ n(
|
|
772
776
|
"div",
|
|
773
777
|
{
|
|
774
|
-
ref:
|
|
778
|
+
ref: Le,
|
|
775
779
|
className: D(
|
|
776
780
|
// A locked FILE field stays interactive: its chips keep the
|
|
777
781
|
// download link and preview click (the component itself hides
|
|
@@ -782,10 +786,10 @@ const Zn = Ct(function({
|
|
|
782
786
|
// The ring lands with a 2px shake so the eye finds the field;
|
|
783
787
|
// the animation runs once when the class is added.
|
|
784
788
|
N && "nvr-shake ring-1 ring-red-400 rounded-md",
|
|
785
|
-
|
|
789
|
+
se && "nvr-autofill-glow"
|
|
786
790
|
),
|
|
787
|
-
children:
|
|
788
|
-
|
|
791
|
+
children: T ? /* @__PURE__ */ n(un, { field: e, values: m }) : it ? /* @__PURE__ */ n(
|
|
792
|
+
Bt,
|
|
789
793
|
{
|
|
790
794
|
collection: i,
|
|
791
795
|
field: e,
|
|
@@ -794,41 +798,41 @@ const Zn = Ct(function({
|
|
|
794
798
|
}
|
|
795
799
|
) : y ? y({
|
|
796
800
|
field: e,
|
|
797
|
-
value:
|
|
798
|
-
onChange:
|
|
801
|
+
value: xe,
|
|
802
|
+
onChange: Se,
|
|
799
803
|
disabled: u,
|
|
800
804
|
collection: i,
|
|
801
805
|
itemId: l,
|
|
802
806
|
relations: f,
|
|
803
807
|
cascadeFilter: M,
|
|
804
|
-
unsatisfiedParentLabel:
|
|
805
|
-
requiredParentLabel:
|
|
806
|
-
}) : /* @__PURE__ */
|
|
807
|
-
|
|
808
|
+
unsatisfiedParentLabel: ut,
|
|
809
|
+
requiredParentLabel: De
|
|
810
|
+
}) : /* @__PURE__ */ n(
|
|
811
|
+
zt,
|
|
808
812
|
{
|
|
809
|
-
field: u && V ?
|
|
810
|
-
value:
|
|
811
|
-
onChange:
|
|
813
|
+
field: u && V ? mt() : e,
|
|
814
|
+
value: xe,
|
|
815
|
+
onChange: Se,
|
|
812
816
|
relations: f,
|
|
813
817
|
collection: i,
|
|
814
818
|
itemId: l,
|
|
815
819
|
cascadeFilter: M,
|
|
816
|
-
requiredParentLabel:
|
|
817
|
-
narrowedBy: K.length > 0 ?
|
|
818
|
-
onCountChange:
|
|
820
|
+
requiredParentLabel: De,
|
|
821
|
+
narrowedBy: K.length > 0 ? pt() : void 0,
|
|
822
|
+
onCountChange: o ? Ge : void 0
|
|
819
823
|
}
|
|
820
824
|
)
|
|
821
825
|
},
|
|
822
|
-
|
|
826
|
+
se ?? 0
|
|
823
827
|
)
|
|
824
828
|
}
|
|
825
829
|
),
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
+
Pe && /* @__PURE__ */ n(mn, { value: m[e.field], config: Pe }),
|
|
831
|
+
Ae && !et && /* @__PURE__ */ n(rn, { field: e.field, text: Ae }),
|
|
832
|
+
Te && /* @__PURE__ */ n(
|
|
833
|
+
Wt,
|
|
830
834
|
{
|
|
831
|
-
change:
|
|
835
|
+
change: Te,
|
|
832
836
|
onDismiss: () => s == null ? void 0 : s.dismissRemoteChange(e.field),
|
|
833
837
|
onTakeTheirs: s != null && s.takeRemoteChange ? () => {
|
|
834
838
|
var t;
|
|
@@ -842,7 +846,7 @@ const Zn = Ct(function({
|
|
|
842
846
|
);
|
|
843
847
|
});
|
|
844
848
|
export {
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
849
|
+
lr as FieldRow,
|
|
850
|
+
rr as lineageSummary,
|
|
851
|
+
_n as useFieldLineage
|
|
848
852
|
};
|