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