@nivaro/react 0.3.34 → 0.3.36
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 +5 -4
- package/dist/shared/components/ItemEditForm.js +2009 -1996
- package/dist/shared/components/RecordReadView.js +88 -85
- package/dist/shared/components/item-edit/FieldAffordances.js +351 -307
- package/dist/shared/components/item-edit/FieldRow.js +453 -447
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +228 -0
- package/dist/shared/components/item-edit/PersonalDefaultPill.js +9 -39
- package/dist/shared/components/item-edit/RecordLiveSync.js +115 -110
- package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +27 -27
- package/dist/shared/components/item-edit/live-record-marks.js +13 -0
- package/dist/shared/components/item-edit/usePersonalDefaults.js +314 -230
- package/dist/shared/components/layout-editor/DesignNode.js +79 -78
- package/dist/shared/components/layout-editor/EditorCanvas.js +25 -17
- package/dist/shared/components/layout-editor/EditorTopBar.js +230 -188
- package/dist/shared/components/layout-editor/LayoutEditor.js +370 -369
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +218 -182
- package/dist/shared/components/layout-editor/dnd/TrashZone.js +68 -0
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +4 -4
- package/dist/shared/components/layout-editor/dnd/trash-drop.js +52 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +1 -1
- package/dist/shared/components/layout-editor/panel-frame.js +1 -1
- package/dist/shared/components/layout-editor/personal-default-marks.js +40 -0
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as o, Fragment as se } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as rr, useQuery as or } from "@tanstack/react-query";
|
|
3
3
|
import { Percent as nr, ListOrdered as ar, AlertTriangle as vt, Lock as sr, Plus as ir, BarChart3 as lr, LayoutGrid as dr, Table2 as cr, Grid3x3 as ur, Users as pr } from "lucide-react";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as L, useEffect as q, useMemo as b, useRef as j, useCallback as C } from "react";
|
|
5
5
|
import { createPortal as mr } from "react-dom";
|
|
6
6
|
import { toast as gt } from "sonner";
|
|
7
7
|
import { useNivaroClient as fr } from "../../context.js";
|
|
@@ -31,63 +31,64 @@ import { changeNotePolicyOf as xt, changeNoteMeta as Ur, changeNoteReady as $r,
|
|
|
31
31
|
import { PresenceAvatars as Wr, DroppedBanner as Hr, RecoveryBanner as jr, UnsavedList as Gr } from "./CollabParts.js";
|
|
32
32
|
import { CommandPalette as Qr } from "./commands/CommandPalette.js";
|
|
33
33
|
import { nextSelection as Yr, targetKey as z } from "./design-context.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { notesOf as so, noteKey as io } from "./editor-notes.js";
|
|
34
|
+
import { LayoutDndProvider as Jr, useLayoutDnd as Zr } from "./dnd/LayoutDndProvider.js";
|
|
35
|
+
import { NO_DND as Xr } from "./dnd/node.js";
|
|
36
|
+
import { useDraftRecovery as eo, stagedTip as to } from "./draft-recovery.js";
|
|
37
|
+
import { canvasRenderer as ro, EditorCanvas as oo } from "./EditorCanvas.js";
|
|
38
|
+
import { EditorTopBar as no } from "./EditorTopBar.js";
|
|
39
|
+
import { notesOf as ao, noteKey as so } from "./editor-notes.js";
|
|
41
40
|
import { EntryEditorContext as St } from "./entry/entry-editor-context.js";
|
|
42
|
-
import { useTabOrderEditor as
|
|
43
|
-
import { useAppIsDark as
|
|
44
|
-
import { useRulesView as
|
|
45
|
-
import { useDriverHover as
|
|
46
|
-
import { useCanvasExplain as
|
|
47
|
-
import { FindReplaceButton as
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import { useSectionChanges as
|
|
51
|
-
import { useLayoutEditorHost as
|
|
52
|
-
import { overriddenTargets as
|
|
53
|
-
import { BulkInspector as
|
|
54
|
-
import { requestInspectorTab as
|
|
41
|
+
import { useTabOrderEditor as io, TabOrderBar as lo } from "./entry/tab-order.js";
|
|
42
|
+
import { useAppIsDark as co, ThemePreviewTool as uo, previewThemeClass as po } from "./entry/theme-preview.js";
|
|
43
|
+
import { useRulesView as mo, explainMarks as fo, RulesToggle as yo, RuleLoopsBanner as ho } from "./explain/CanvasRules.js";
|
|
44
|
+
import { useDriverHover as vo } from "./explain/driver-hover.js";
|
|
45
|
+
import { useCanvasExplain as go, useDefaultGhosts as ko } from "./explain/use-explain.js";
|
|
46
|
+
import { FindReplaceButton as wo } from "./FindReplace.js";
|
|
47
|
+
import { FormMapButton as bo } from "./FormMapButton.js";
|
|
48
|
+
import { WIDTH_LABELS as xo } from "./field-zones.js";
|
|
49
|
+
import { useSectionChanges as So } from "./history-api.js";
|
|
50
|
+
import { useLayoutEditorHost as Co } from "./host.js";
|
|
51
|
+
import { overriddenTargets as To, overrideMark as Oo } from "./inheritance.js";
|
|
52
|
+
import { BulkInspector as Ao } from "./inspector/BulkInspector.js";
|
|
53
|
+
import { requestInspectorTab as Po } from "./inspector/tab-request.js";
|
|
55
54
|
import { isTyping as $e } from "./is-typing.js";
|
|
56
|
-
import { ARROW_DIRS as
|
|
57
|
-
import { LayoutsRail as
|
|
58
|
-
import { LintButton as
|
|
59
|
-
import { useLayoutLint as
|
|
60
|
-
import { FieldStateMatrix as
|
|
61
|
-
import { RoleSectionMatrix as
|
|
62
|
-
import { FindTool as
|
|
63
|
-
import { OutlinePanel as
|
|
64
|
-
import { useEditorNav as
|
|
65
|
-
import { COMPACT_ZOOM as
|
|
55
|
+
import { ARROW_DIRS as Lo, altArrowMove as No } from "./keyboard-move.js";
|
|
56
|
+
import { LayoutsRail as Ro } from "./LayoutsRail.js";
|
|
57
|
+
import { LintButton as Eo, LintPanel as Do } from "./lint/LintPanel.js";
|
|
58
|
+
import { useLayoutLint as Fo } from "./lint/lint-api.js";
|
|
59
|
+
import { FieldStateMatrix as Io } from "./matrix/FieldStateMatrix.js";
|
|
60
|
+
import { RoleSectionMatrix as Ko } from "./matrix/RoleSectionMatrix.js";
|
|
61
|
+
import { FindTool as _o, OutlineTool as Mo, ViewTools as Bo, ShortcutsTool as qo } from "./nav/NavTools.js";
|
|
62
|
+
import { OutlinePanel as Uo } from "./nav/OutlinePanel.js";
|
|
63
|
+
import { useEditorNav as $o } from "./nav/useEditorNav.js";
|
|
64
|
+
import { COMPACT_ZOOM as zo } from "./nav/view-prefs.js";
|
|
65
|
+
import { OutputsButton as Vo } from "./outputs/OutputsButton.js";
|
|
66
66
|
import { useLayoutOverview as Wo, useOverviewFields as Ho, useInvalidateLayouts as Nt, useRuleChoiceLabels as jo, useApproxRecordCount as Go } from "./overview/overview-api.js";
|
|
67
67
|
import { purposeSegments as Qo, Sentence as Yo } from "./overview/purpose.js";
|
|
68
68
|
import { PlacementsTable as Jo } from "./PlacementsTable.js";
|
|
69
69
|
import { segTrack as Zo, amberStrip as Me, segOption as Xo } from "./panel-style.js";
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
70
|
+
import { usePersonalDefaultMarks as en } from "./personal-default-marks.js";
|
|
71
|
+
import { useLayoutPresence as tn, peersByTarget as rn } from "./presence.js";
|
|
72
|
+
import { PreviewModes as on } from "./preview/PreviewModes.js";
|
|
73
|
+
import { PreviewPanes as nn } from "./preview/PreviewPanes.js";
|
|
74
|
+
import { FormMoreMenu as an } from "./reuse/FormMoreMenu.js";
|
|
75
|
+
import { useRailCopy as sn } from "./reuse/useRailCopy.js";
|
|
76
|
+
import { StagedByOthers as ln } from "./StagedChip.js";
|
|
77
|
+
import { StructureActions as dn, usePinMarks as cn } from "./StructureMenu.js";
|
|
78
|
+
import { useRolePreview as un } from "./settings/settings-api.js";
|
|
79
|
+
import { layoutKindOf as pn } from "./settings/settings-registry.js";
|
|
80
|
+
import { useStagedDraft as mn, useStagedWriter as fn } from "./staged-api.js";
|
|
81
|
+
import { ImpactButton as yn, TestingButton as hn } from "./testing/TestingPanels.js";
|
|
81
82
|
import { MenuSeparator as Ce, ToolButton as Ct } from "./toolbar-kit.js";
|
|
82
|
-
import { unsavedText as
|
|
83
|
-
import { unsavedKeys as
|
|
84
|
-
import { UsagePanel as
|
|
85
|
-
import { useShowFillRates as
|
|
86
|
-
import { useLayoutDraft as
|
|
87
|
-
import { FormSettings as
|
|
88
|
-
import { Inspector as
|
|
89
|
-
function
|
|
90
|
-
|
|
83
|
+
import { unsavedText as vn, UnsavedConfirm as gn } from "./UnsavedConfirm.js";
|
|
84
|
+
import { unsavedKeys as kn, targetFromKey as Tt, describeTarget as Ot } from "./unsaved-marks.js";
|
|
85
|
+
import { UsagePanel as wn } from "./usage/UsagePanel.js";
|
|
86
|
+
import { useShowFillRates as bn, useFieldFillRates as xn, usageTodayText as Sn, useLayoutUsageToday as Cn } from "./usage/usage-api.js";
|
|
87
|
+
import { useLayoutDraft as Tn, useLayoutBundle as Be, layoutDraftKeys as On, touchesOverview as An } from "./useLayoutDraft.js";
|
|
88
|
+
import { FormSettings as Pn } from "./settings/FormSettings.js";
|
|
89
|
+
import { Inspector as Ln } from "./inspector/Inspector.js";
|
|
90
|
+
function Nn(r) {
|
|
91
|
+
q(() => {
|
|
91
92
|
const i = (s) => {
|
|
92
93
|
if (!(s.metaKey || s.ctrlKey) || s.altKey) return;
|
|
93
94
|
const l = s.key.toLowerCase();
|
|
@@ -101,51 +102,51 @@ function Ln(r) {
|
|
|
101
102
|
return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
|
|
102
103
|
}, [r.undo, r.redo, r.autosave, r.flush, r.save]);
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
105
|
+
function Rn(r, i, s, l, m) {
|
|
106
|
+
q(() => {
|
|
106
107
|
const d = (c) => {
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
108
|
+
const g = Lo[c.key];
|
|
109
|
+
if (!g || !c.altKey || c.metaKey || c.ctrlKey || c.shiftKey || c.defaultPrevented || !r || i.length !== 1 || l.current || $e(c.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) return;
|
|
109
110
|
c.preventDefault();
|
|
110
|
-
const p =
|
|
111
|
+
const p = No(r, i[0], g);
|
|
111
112
|
if (!p) return;
|
|
112
113
|
s(p.ops, { label: p.label }), m(p.next);
|
|
113
114
|
const u = z(p.next);
|
|
114
115
|
requestAnimationFrame(() => {
|
|
115
116
|
var Q;
|
|
116
|
-
const
|
|
117
|
+
const k = document.querySelector(
|
|
117
118
|
`[data-layout-editor] [data-design-target="${CSS.escape(u)}"]`
|
|
118
119
|
);
|
|
119
|
-
|
|
120
|
+
k == null || k.focus({ preventScroll: !0 }), (Q = k == null ? void 0 : k.scrollIntoView) == null || Q.call(k, { block: "nearest" });
|
|
120
121
|
});
|
|
121
122
|
};
|
|
122
123
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
123
124
|
}, [r, i, s, l, m]);
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
+
function En(r) {
|
|
126
127
|
const i = r.status === "saving" || r.dirty;
|
|
127
|
-
wr(i, "Layout changes"),
|
|
128
|
+
wr(i, "Layout changes"), q(() => {
|
|
128
129
|
if (!i) return;
|
|
129
130
|
const s = (l) => {
|
|
130
131
|
r.flush(), l.preventDefault(), l.returnValue = "";
|
|
131
132
|
};
|
|
132
133
|
return window.addEventListener("beforeunload", s), () => window.removeEventListener("beforeunload", s);
|
|
133
|
-
}, [i, r.flush]),
|
|
134
|
+
}, [i, r.flush]), q(() => {
|
|
134
135
|
const s = () => r.flush();
|
|
135
136
|
return window.addEventListener("pagehide", s), () => window.removeEventListener("pagehide", s);
|
|
136
137
|
}, [r.flush]);
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function Dn(r) {
|
|
139
140
|
const i = rr(), s = Nt(r);
|
|
140
141
|
return C(
|
|
141
142
|
(l, m) => {
|
|
142
143
|
const d = Number(l.layout.id);
|
|
143
|
-
Number.isFinite(d) && i.invalidateQueries({ queryKey:
|
|
144
|
+
Number.isFinite(d) && i.invalidateQueries({ queryKey: On.versions(d) }), s({ lazy: !An(m) });
|
|
144
145
|
},
|
|
145
146
|
[i, s]
|
|
146
147
|
);
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function Fn(r, i) {
|
|
149
150
|
const s = fr();
|
|
150
151
|
return or({
|
|
151
152
|
queryKey: ["layout-editor", "preview-record", r, i],
|
|
@@ -156,9 +157,9 @@ function Dn(r, i) {
|
|
|
156
157
|
staleTime: 3e4
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function In(r, i) {
|
|
160
161
|
const s = j(i);
|
|
161
|
-
s.current = i,
|
|
162
|
+
s.current = i, q(() => {
|
|
162
163
|
if (!r) return;
|
|
163
164
|
let l = !1;
|
|
164
165
|
const m = (d) => {
|
|
@@ -166,13 +167,13 @@ function Fn(r, i) {
|
|
|
166
167
|
if (l || d.defaultPrevented || d.button !== 0 || d.metaKey || d.ctrlKey || d.shiftKey || d.altKey) return;
|
|
167
168
|
const c = (u = (p = d.target) == null ? void 0 : p.closest) == null ? void 0 : u.call(p, "a[href]");
|
|
168
169
|
if (!c || c.target && c.target !== "_self" || c.hasAttribute("download")) return;
|
|
169
|
-
let
|
|
170
|
+
let g;
|
|
170
171
|
try {
|
|
171
|
-
|
|
172
|
+
g = new URL(c.href, window.location.href);
|
|
172
173
|
} catch {
|
|
173
174
|
return;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
+
g.origin === window.location.origin && g.pathname + g.search !== window.location.pathname + window.location.search && (d.preventDefault(), d.stopPropagation(), s.current(() => {
|
|
176
177
|
l = !0;
|
|
177
178
|
try {
|
|
178
179
|
c.click();
|
|
@@ -192,13 +193,13 @@ function qe(r, i, s = null) {
|
|
|
192
193
|
};
|
|
193
194
|
return l(i) || s != null && l(s);
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
+
function Kn(r, i, s) {
|
|
196
197
|
const l = j(null), m = j(i);
|
|
197
|
-
return m.current = i,
|
|
198
|
-
var
|
|
198
|
+
return m.current = i, q(() => {
|
|
199
|
+
var g;
|
|
199
200
|
if (!r) return;
|
|
200
201
|
const d = document.activeElement;
|
|
201
|
-
(
|
|
202
|
+
(g = l.current) == null || g.focus();
|
|
202
203
|
const c = (p) => {
|
|
203
204
|
p.key !== "Escape" || p.defaultPrevented || s.current || $e(p.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]') || (p.preventDefault(), m.current());
|
|
204
205
|
};
|
|
@@ -207,7 +208,7 @@ function In(r, i, s) {
|
|
|
207
208
|
};
|
|
208
209
|
}, [r, s]), l;
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
+
function _n({
|
|
211
212
|
collection: r,
|
|
212
213
|
bundle: i,
|
|
213
214
|
parent: s,
|
|
@@ -215,115 +216,115 @@ function Kn({
|
|
|
215
216
|
stateKey: m = null,
|
|
216
217
|
marks: d,
|
|
217
218
|
overlay: c,
|
|
218
|
-
ruleMarks:
|
|
219
|
+
ruleMarks: g,
|
|
219
220
|
ghost: p,
|
|
220
221
|
deps: u,
|
|
221
|
-
noDnd:
|
|
222
|
+
noDnd: k = !1,
|
|
222
223
|
record: Q,
|
|
223
224
|
selected: n,
|
|
224
|
-
selection:
|
|
225
|
+
selection: ye,
|
|
225
226
|
onSelect: t,
|
|
226
|
-
showHidden:
|
|
227
|
+
showHidden: R,
|
|
227
228
|
fold: te = null,
|
|
228
229
|
reveal: V = null,
|
|
229
|
-
apply:
|
|
230
|
+
apply: A,
|
|
230
231
|
whenIdle: Te,
|
|
231
|
-
fillRate:
|
|
232
|
-
unsaved:
|
|
233
|
-
peers:
|
|
234
|
-
compare:
|
|
235
|
-
lastChanges:
|
|
232
|
+
fillRate: he,
|
|
233
|
+
unsaved: ve,
|
|
234
|
+
peers: ce,
|
|
235
|
+
compare: v,
|
|
236
|
+
lastChanges: N
|
|
236
237
|
}) {
|
|
237
|
-
const re =
|
|
238
|
-
() => s ?
|
|
238
|
+
const re = Zr(), F = k ? Xr : re, ie = ro(String(i.layout.layout_type ?? "grouped")), le = (ie === "item-edit-form" || ie === "read-view") && (v == null ? void 0 : v.diff.bundle) || i, M = b(() => Lt(le, s), [le, s]), Y = b(
|
|
239
|
+
() => s ? To(i, s) : null,
|
|
239
240
|
[i, s]
|
|
240
|
-
), W = b(() => Y != null && Y.size ? (
|
|
241
|
-
const
|
|
242
|
-
return
|
|
241
|
+
), W = b(() => Y != null && Y.size ? (y) => {
|
|
242
|
+
const _ = Y.get(z(y)), oe = (d == null ? void 0 : d(y)) ?? [];
|
|
243
|
+
return _ ? [...oe, Oo(_)] : oe;
|
|
243
244
|
} : d, [Y, d]), Oe = b(
|
|
244
|
-
() => _r(M.active, l,
|
|
245
|
-
[M.active, l,
|
|
246
|
-
), { data:
|
|
247
|
-
() => l ? Mr(
|
|
248
|
-
[l,
|
|
249
|
-
),
|
|
250
|
-
() => W &&
|
|
251
|
-
[W,
|
|
252
|
-
),
|
|
245
|
+
() => _r(M.active, l, R),
|
|
246
|
+
[M.active, l, R]
|
|
247
|
+
), { data: I = null } = un(r, l), J = b(
|
|
248
|
+
() => l ? Mr(I) : void 0,
|
|
249
|
+
[l, I]
|
|
250
|
+
), P = b(() => ao(i), [i]), K = b(
|
|
251
|
+
() => W && g ? (y) => [...W(y), ...g(y)] : W ?? g,
|
|
252
|
+
[W, g]
|
|
253
|
+
), U = en(i, K), ke = cn(i, U), T = b(
|
|
253
254
|
() => ({
|
|
254
255
|
selected: n,
|
|
255
|
-
selection:
|
|
256
|
+
selection: ye,
|
|
256
257
|
onSelect: t,
|
|
257
|
-
showHidden:
|
|
258
|
-
inheritedFrom: (
|
|
259
|
-
dnd:
|
|
258
|
+
showHidden: R,
|
|
259
|
+
inheritedFrom: (y) => M.inherited.get(z(y)) ?? null,
|
|
260
|
+
dnd: F,
|
|
260
261
|
roleMark: J,
|
|
261
|
-
marks:
|
|
262
|
+
marks: ke,
|
|
262
263
|
overlay: c,
|
|
263
|
-
fillRate:
|
|
264
|
-
note: (
|
|
265
|
-
const
|
|
266
|
-
return
|
|
264
|
+
fillRate: he,
|
|
265
|
+
note: (y) => {
|
|
266
|
+
const _ = so(y);
|
|
267
|
+
return _ ? P.get(_) ?? null : null;
|
|
267
268
|
},
|
|
268
269
|
fold: te,
|
|
269
270
|
reveal: V,
|
|
270
|
-
unsaved:
|
|
271
|
-
peers:
|
|
272
|
-
diffMark:
|
|
273
|
-
lastChange:
|
|
271
|
+
unsaved: ve,
|
|
272
|
+
peers: ce,
|
|
273
|
+
diffMark: v ? (y) => v.diff.marks.get(z(y)) ?? null : void 0,
|
|
274
|
+
lastChange: N ? (y) => y.kind === "group" ? N[y.key] ?? null : null : void 0,
|
|
274
275
|
ghost: p,
|
|
275
|
-
resizeWidth:
|
|
276
|
-
|
|
276
|
+
resizeWidth: k ? void 0 : (y, _) => {
|
|
277
|
+
y.kind !== "field" && y.kind !== "slot" || A(
|
|
277
278
|
[
|
|
278
279
|
{
|
|
279
280
|
op: "update_placement",
|
|
280
|
-
at: { field:
|
|
281
|
-
patch: { col_span:
|
|
281
|
+
at: { field: y.field, group_key: y.group_key },
|
|
282
|
+
patch: { col_span: _ === 12 ? null : _ }
|
|
282
283
|
}
|
|
283
284
|
],
|
|
284
|
-
{ label: `Set the width to ${
|
|
285
|
+
{ label: `Set the width to ${xo[_] ?? _}` }
|
|
285
286
|
);
|
|
286
287
|
}
|
|
287
288
|
}),
|
|
288
289
|
[
|
|
289
290
|
n,
|
|
290
|
-
|
|
291
|
+
ye,
|
|
291
292
|
t,
|
|
292
|
-
|
|
293
|
+
R,
|
|
293
294
|
M.inherited,
|
|
294
|
-
|
|
295
|
+
F,
|
|
295
296
|
J,
|
|
296
|
-
|
|
297
|
+
ke,
|
|
297
298
|
c,
|
|
298
|
-
|
|
299
|
-
|
|
299
|
+
he,
|
|
300
|
+
P,
|
|
300
301
|
te,
|
|
301
302
|
V,
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
ve,
|
|
304
|
+
ce,
|
|
305
|
+
v,
|
|
306
|
+
N,
|
|
306
307
|
p,
|
|
307
|
-
|
|
308
|
-
|
|
308
|
+
A,
|
|
309
|
+
k
|
|
309
310
|
]
|
|
310
|
-
),
|
|
311
|
-
return /* @__PURE__ */ o("div", { ref:
|
|
312
|
-
|
|
311
|
+
), Ae = vo(u);
|
|
312
|
+
return /* @__PURE__ */ o("div", { ref: Ae, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ o(
|
|
313
|
+
oo,
|
|
313
314
|
{
|
|
314
315
|
collection: r,
|
|
315
|
-
bundle:
|
|
316
|
+
bundle: le,
|
|
316
317
|
layout: Oe,
|
|
317
318
|
record: Q,
|
|
318
319
|
stateKey: m,
|
|
319
320
|
roleId: l,
|
|
320
|
-
design:
|
|
321
|
-
apply:
|
|
321
|
+
design: T,
|
|
322
|
+
apply: A,
|
|
322
323
|
whenIdle: Te
|
|
323
324
|
}
|
|
324
325
|
) });
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function Mn({
|
|
327
328
|
collection: r,
|
|
328
329
|
name: i,
|
|
329
330
|
row: s,
|
|
@@ -332,19 +333,19 @@ function _n({
|
|
|
332
333
|
fields: d,
|
|
333
334
|
onDone: c
|
|
334
335
|
}) {
|
|
335
|
-
const
|
|
336
|
-
return
|
|
336
|
+
const g = jo(r, d, m), { data: p } = Go(r, s, m), u = Sn(Cn(l).data), k = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Qo(s, d, g) : [];
|
|
337
|
+
return k.length > 0 && typeof p == "number" && k.push({ text: ` (≈ ${p.toLocaleString()} ${p === 1 ? "record" : "records"})` }), u && k.push({ text: k.length > 0 ? `; ${u}` : u }), /* @__PURE__ */ h(
|
|
337
338
|
"div",
|
|
338
339
|
{
|
|
339
340
|
"data-editing-banner": "",
|
|
340
341
|
className: "flex shrink-0 items-center gap-3 border-b border-nvr-cyan/30 bg-nvr-cyan/10 px-4 py-1.5 text-[12.5px] text-slate-700 dark:text-slate-200",
|
|
341
342
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1 truncate", children: [
|
|
343
344
|
"Editing ",
|
|
344
345
|
/* @__PURE__ */ o("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: i }),
|
|
345
|
-
|
|
346
|
+
k.length > 0 && /* @__PURE__ */ h(se, { children: [
|
|
346
347
|
" — ",
|
|
347
|
-
/* @__PURE__ */ o(Yo, { segs:
|
|
348
|
+
/* @__PURE__ */ o(Yo, { segs: k, muted: !0 })
|
|
348
349
|
] })
|
|
349
350
|
] }),
|
|
350
351
|
/* @__PURE__ */ o(
|
|
@@ -360,8 +361,8 @@ function _n({
|
|
|
360
361
|
}
|
|
361
362
|
);
|
|
362
363
|
}
|
|
363
|
-
function
|
|
364
|
-
const s = (l, m, d, c) => /* @__PURE__ */
|
|
364
|
+
function Bn({ view: r, onView: i }) {
|
|
365
|
+
const s = (l, m, d, c) => /* @__PURE__ */ h(
|
|
365
366
|
"button",
|
|
366
367
|
{
|
|
367
368
|
type: "button",
|
|
@@ -377,7 +378,7 @@ function Mn({ view: r, onView: i }) {
|
|
|
377
378
|
]
|
|
378
379
|
}
|
|
379
380
|
);
|
|
380
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ h(
|
|
381
382
|
"fieldset",
|
|
382
383
|
{
|
|
383
384
|
"aria-label": "Show the form as",
|
|
@@ -400,7 +401,7 @@ const Ue = (r) => G(
|
|
|
400
401
|
"inline-flex h-7 items-center gap-1 rounded-md px-2.5 text-[12px] font-medium transition-colors",
|
|
401
402
|
r ? "bg-accent text-slate-900 dark:text-foreground" : "text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground"
|
|
402
403
|
);
|
|
403
|
-
function
|
|
404
|
+
function bs({
|
|
404
405
|
collection: r,
|
|
405
406
|
layoutId: i,
|
|
406
407
|
onBack: s,
|
|
@@ -408,65 +409,65 @@ function ks({
|
|
|
408
409
|
onLayoutChange: m,
|
|
409
410
|
previewRecordId: d = null,
|
|
410
411
|
portalContainer: c,
|
|
411
|
-
onDirtyChange:
|
|
412
|
+
onDirtyChange: g
|
|
412
413
|
}) {
|
|
413
414
|
var ut, pt, mt, ft, yt, ht;
|
|
414
|
-
const p =
|
|
415
|
-
|
|
416
|
-
const Q =
|
|
415
|
+
const p = Co(), [u, k] = L(i);
|
|
416
|
+
q(() => k(i), [i]);
|
|
417
|
+
const Q = Dn(r), { draft: n, recorder: ye } = Kr(Tn(u, { onSaved: Q })), t = n.bundle, [R, te] = L("layouts"), [V, A] = L("inspector"), [Te, he] = Er(), [ve, ce] = L(null), [v, N] = L([]), re = v.length > 0 ? v[v.length - 1] : null, [F, ie] = L("canvas"), [ge, le] = L(!1), [M, Y] = bn(), { data: W } = xn(r, M), Oe = b(
|
|
417
418
|
() => M && W && W.total > 0 ? (e) => W.pct.get(e) ?? null : void 0,
|
|
418
419
|
[M, W]
|
|
419
|
-
), [
|
|
420
|
+
), [I, J] = L({
|
|
420
421
|
record: d ? { id: d, label: `#${d}` } : null,
|
|
421
422
|
roleId: null
|
|
422
|
-
}), { data:
|
|
423
|
+
}), { data: P } = Wo(r), { data: K = [] } = Ho(r), U = P == null ? void 0 : P.rows.find((e) => e.layout_id === u), ke = (t == null ? void 0 : t.layout.parent_layout_id) != null ? Number(t.layout.parent_layout_id) : null, { data: T = null } = Be(ke), { data: Ae = null } = Fn(r, ((ut = I.record) == null ? void 0 : ut.id) ?? null), y = b(
|
|
423
424
|
() => t ? Lt(t, T).active : null,
|
|
424
425
|
[t, T]
|
|
425
426
|
);
|
|
426
427
|
br(kt);
|
|
427
|
-
const
|
|
428
|
+
const _ = b(() => xr(y), [y]), oe = Fo(r, t, T), { data: Rt } = Be(u), Z = Br(t, Rt ?? null, n.unsavedCount, u), { data: Et } = So(u, t != null), [ze, Dt] = L([]), Ft = b(() => {
|
|
428
429
|
const e = Pr(ze), a = /* @__PURE__ */ new WeakMap();
|
|
429
430
|
return (f) => {
|
|
430
431
|
if (!f || !e) return bt(f, e);
|
|
431
432
|
const w = a.get(f);
|
|
432
433
|
if (w) return w;
|
|
433
|
-
const
|
|
434
|
-
return a.set(f,
|
|
434
|
+
const D = bt(f, e);
|
|
435
|
+
return a.set(f, D), D;
|
|
435
436
|
};
|
|
436
|
-
}, [ze]), [
|
|
437
|
-
Le.current =
|
|
437
|
+
}, [ze]), [ue, It] = mo(), we = go(r, y, ue), pe = ko(r, y, ue && !I.record), { data: de } = Be(u), X = vr(((pt = de == null ? void 0 : de.layout) == null ? void 0 : pt.conditions) ?? ((mt = t == null ? void 0 : t.layout) == null ? void 0 : mt.conditions)), E = xt(de == null ? void 0 : de.layout) ?? xt(t == null ? void 0 : t.layout) ?? (X ? "note" : null), [me, Pe] = L({ reason: "", ticket: "" }), [Ve, We] = L(null), Le = j(me);
|
|
438
|
+
Le.current = me;
|
|
438
439
|
const He = C(async () => {
|
|
439
|
-
const e =
|
|
440
|
+
const e = E ? {
|
|
440
441
|
...Ur(Le.current),
|
|
441
442
|
...X ? { freeze_override: Le.current.reason.trim() } : {}
|
|
442
443
|
} : void 0;
|
|
443
444
|
await n.save(e);
|
|
444
445
|
const a = n.unsavedOps().length === 0;
|
|
445
446
|
return a && e && Pe((f) => ({ ...f, reason: "" })), a;
|
|
446
|
-
}, [n.save, n.unsavedOps,
|
|
447
|
+
}, [n.save, n.unsavedOps, E, X]), je = C(() => {
|
|
447
448
|
var e, a;
|
|
448
|
-
return
|
|
449
|
+
return E ? (n.unsavedOps().length > 0 && We(
|
|
449
450
|
((e = $.current) == null ? void 0 : e.querySelector("[data-editor-save]")) ?? ((a = $.current) == null ? void 0 : a.querySelector("[data-editor-topbar]")) ?? null
|
|
450
451
|
), Promise.resolve()) : n.save();
|
|
451
|
-
}, [
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}, [
|
|
455
|
-
const Kt =
|
|
456
|
-
|
|
457
|
-
const $ = j(null), [_t, Ge] =
|
|
452
|
+
}, [E, n.save, n.unsavedOps]);
|
|
453
|
+
q(() => {
|
|
454
|
+
E && n.autosave && n.setAutosave(!1);
|
|
455
|
+
}, [E, n.autosave, n.setAutosave]);
|
|
456
|
+
const Kt = E ? { ...n, save: je, setAutosave: void 0 } : n;
|
|
457
|
+
Nn(E ? { ...n, save: je } : n), En(n);
|
|
458
|
+
const $ = j(null), [_t, Ge] = L(null), Qe = j(n.dirty);
|
|
458
459
|
Qe.current = n.dirty;
|
|
459
|
-
const
|
|
460
|
-
var
|
|
460
|
+
const ne = C((e, a, f) => {
|
|
461
|
+
var D, fe;
|
|
461
462
|
if (!Qe.current) return a();
|
|
462
|
-
const w = ((
|
|
463
|
+
const w = ((D = $.current) == null ? void 0 : D.querySelector("[data-editor-save]")) ?? ((fe = $.current) == null ? void 0 : fe.querySelector("[data-editor-topbar]")) ?? null;
|
|
463
464
|
Ge({ what: e, go: a, anchor: f ?? w });
|
|
464
465
|
}, []), Mt = He;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
}, [n.dirty,
|
|
466
|
+
In(n.dirty, (e, a) => ne("leave this page", e, a)), q(() => {
|
|
467
|
+
g == null || g(n.dirty);
|
|
468
|
+
}, [n.dirty, g]);
|
|
468
469
|
const Ye = j(n.unsavedOps);
|
|
469
|
-
Ye.current = n.unsavedOps,
|
|
470
|
+
Ye.current = n.unsavedOps, q(
|
|
470
471
|
() => () => {
|
|
471
472
|
Ye.current().length > 0 && gt.warning("Unsaved form changes kept — open the form again to save or discard them");
|
|
472
473
|
},
|
|
@@ -476,71 +477,71 @@ function ks({
|
|
|
476
477
|
const e = n.whenIdle();
|
|
477
478
|
e.then(() => Je()), s(e);
|
|
478
479
|
}, [n.whenIdle, Je, s]), Ne = C(
|
|
479
|
-
(e) =>
|
|
480
|
-
[
|
|
480
|
+
(e) => ne(l === "overlay" ? "go back to the record" : "leave this form", Ze, e),
|
|
481
|
+
[ne, Ze, l]
|
|
481
482
|
);
|
|
482
|
-
|
|
483
|
-
if (!t ||
|
|
484
|
-
const e =
|
|
485
|
-
e.length !==
|
|
486
|
-
}, [
|
|
487
|
-
const
|
|
483
|
+
q(() => {
|
|
484
|
+
if (!t || v.length === 0) return;
|
|
485
|
+
const e = v.filter((a) => qe(a, t, T));
|
|
486
|
+
e.length !== v.length && N(e);
|
|
487
|
+
}, [v, t, T]);
|
|
488
|
+
const ae = l === "overlay", [Re, Bt] = L(null), Ee = j(!1), qt = C((e) => {
|
|
488
489
|
Ee.current = e;
|
|
489
|
-
}, []), Ut =
|
|
490
|
-
|
|
491
|
-
}, []), Xe = C((e) =>
|
|
490
|
+
}, []), Ut = Kn(ae && Re != null, () => Ne(), Ee), O = C((e, a) => {
|
|
491
|
+
N((f) => Yr(f, e, a)), A("inspector");
|
|
492
|
+
}, []), Xe = C((e) => N([e]), []), B = io(t, n.apply), $t = b(() => B.intercept(O), [B.intercept, O]), [De, zt] = L(!1), Fe = co(), Ie = b(
|
|
492
493
|
() => ({
|
|
493
|
-
tabOrderActive:
|
|
494
|
+
tabOrderActive: B.active,
|
|
494
495
|
startTabOrder: () => {
|
|
495
|
-
|
|
496
|
+
ie("canvas"), B.start();
|
|
496
497
|
}
|
|
497
498
|
}),
|
|
498
|
-
[
|
|
499
|
+
[B.active, B.start]
|
|
499
500
|
), et = C(
|
|
500
501
|
(e, a) => {
|
|
501
|
-
if (e.kind === "group") return
|
|
502
|
+
if (e.kind === "group") return O({ kind: "group", key: e.key });
|
|
502
503
|
if (e.kind === "tab") {
|
|
503
|
-
|
|
504
|
+
O(a), (a.kind === "field" || a.kind === "header") && Po(a.field, e.tab);
|
|
504
505
|
return;
|
|
505
506
|
}
|
|
506
507
|
if (e.kind === "pipeline")
|
|
507
|
-
return
|
|
508
|
+
return ne(
|
|
508
509
|
"open the pipeline",
|
|
509
510
|
() => p.navigate(`/pipelines/${encodeURIComponent(e.id)}`)
|
|
510
511
|
);
|
|
511
|
-
|
|
512
|
+
ne(
|
|
512
513
|
"open the field rules",
|
|
513
514
|
() => p.navigate(`/data-model/${encodeURIComponent(r)}?tab=rules`)
|
|
514
515
|
);
|
|
515
516
|
},
|
|
516
|
-
[
|
|
517
|
+
[O, ne, p, r]
|
|
517
518
|
), Vt = b(() => {
|
|
518
519
|
const e = /* @__PURE__ */ new Map();
|
|
519
|
-
for (const [a, f] of
|
|
520
|
+
for (const [a, f] of pe)
|
|
520
521
|
(f.type === "boolean" || f.text.endsWith(" linked")) && e.set(a, f.text);
|
|
521
|
-
return
|
|
522
|
-
}, [we,
|
|
523
|
-
() =>
|
|
522
|
+
return fo(we, { chips: ue, ghostTags: e, open: et });
|
|
523
|
+
}, [we, ue, pe, et]), Wt = b(
|
|
524
|
+
() => pe.size > 0 ? (e) => {
|
|
524
525
|
var a;
|
|
525
|
-
return ((a =
|
|
526
|
+
return ((a = pe.get(e)) == null ? void 0 : a.text) ?? null;
|
|
526
527
|
} : void 0,
|
|
527
|
-
[
|
|
528
|
+
[pe]
|
|
528
529
|
), Ht = C(
|
|
529
530
|
(e) => {
|
|
530
531
|
const a = t == null ? void 0 : t.placements.find((w) => w.field === e);
|
|
531
532
|
if (!a) return;
|
|
532
533
|
const f = a.group_key === Pt ? { kind: "header", field: e } : { kind: "field", field: e, group_key: a.group_key };
|
|
533
|
-
|
|
534
|
+
O(f), requestAnimationFrame(
|
|
534
535
|
() => {
|
|
535
|
-
var w,
|
|
536
|
-
return (
|
|
536
|
+
var w, D;
|
|
537
|
+
return (D = (w = document.querySelector(`[data-layout-editor] [data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : w.scrollIntoView) == null ? void 0 : D.call(w, { block: "center" });
|
|
537
538
|
}
|
|
538
539
|
);
|
|
539
540
|
},
|
|
540
|
-
[t,
|
|
541
|
+
[t, O]
|
|
541
542
|
);
|
|
542
|
-
|
|
543
|
-
const Ke =
|
|
543
|
+
Rn(t, v, n.apply, Ee, Xe);
|
|
544
|
+
const Ke = tn(u, re ? z(re) : null), tt = b(() => rn(Ke), [Ke]), jt = C(
|
|
544
545
|
(e) => (tt.get(z(e)) ?? []).map((a) => ({
|
|
545
546
|
id: a.id,
|
|
546
547
|
name: a.name,
|
|
@@ -548,15 +549,15 @@ function ks({
|
|
|
548
549
|
chip: a.tone.chip
|
|
549
550
|
})),
|
|
550
551
|
[tt]
|
|
551
|
-
), rt = b(() =>
|
|
552
|
-
|
|
552
|
+
), rt = b(() => kn(n.unsavedSteps), [n.unsavedSteps]), Gt = C((e) => rt.has(z(e)), [rt]), [ot, be] = L(null), nt = C((e) => {
|
|
553
|
+
ie("canvas"), N([e]), A("inspector"), requestAnimationFrame(() => {
|
|
553
554
|
var f;
|
|
554
555
|
const a = document.querySelector(
|
|
555
556
|
`[data-layout-editor] [data-design-target="${CSS.escape(z(e))}"]`
|
|
556
557
|
);
|
|
557
558
|
(f = a == null ? void 0 : a.scrollIntoView) == null || f.call(a, { block: "center" }), a == null || a.focus({ preventScroll: !0 });
|
|
558
559
|
});
|
|
559
|
-
}, []), Qt = kr(), H =
|
|
560
|
+
}, []), Qt = kr(), H = mn(u), at = fn(), Yt = b(
|
|
560
561
|
() => {
|
|
561
562
|
var e, a;
|
|
562
563
|
return {
|
|
@@ -567,32 +568,32 @@ function ks({
|
|
|
567
568
|
};
|
|
568
569
|
},
|
|
569
570
|
[H.isFetched, H.isError, H.data, at]
|
|
570
|
-
), xe =
|
|
571
|
+
), xe = eo(n, u, Qt, Yt), Jt = C(
|
|
571
572
|
(e) => J((a) => a.roleId === e ? a : { ...a, roleId: e }),
|
|
572
573
|
[]
|
|
573
574
|
), ee = (e) => {
|
|
574
575
|
var w;
|
|
575
|
-
if (
|
|
576
|
+
if (A("inspector"), e === u) return;
|
|
576
577
|
const a = document.activeElement, f = a instanceof HTMLElement && ((w = $.current) != null && w.contains(a)) ? a : null;
|
|
577
|
-
|
|
578
|
+
ne(
|
|
578
579
|
"open another form",
|
|
579
580
|
() => {
|
|
580
|
-
n.flush(),
|
|
581
|
+
n.flush(), N([]), k(e), m == null || m(e);
|
|
581
582
|
},
|
|
582
583
|
f
|
|
583
584
|
);
|
|
584
|
-
}, Zt =
|
|
585
|
+
}, Zt = sn(r, t, (P == null ? void 0 : P.rows) ?? [], ee), Xt = C(
|
|
585
586
|
(e) => t ? Dr(e, {
|
|
586
587
|
bundle: t,
|
|
587
|
-
selection:
|
|
588
|
+
selection: v,
|
|
588
589
|
select: (a) => {
|
|
589
|
-
|
|
590
|
+
N([a]), A("inspector");
|
|
590
591
|
},
|
|
591
|
-
openSettings: () =>
|
|
592
|
+
openSettings: () => A("settings"),
|
|
592
593
|
openAddPanel: () => te("add"),
|
|
593
594
|
root: $.current
|
|
594
595
|
}) : Promise.resolve({ ok: !1, message: "The form is still loading" }),
|
|
595
|
-
[t,
|
|
596
|
+
[t, v]
|
|
596
597
|
), st = j(ee);
|
|
597
598
|
st.current = ee;
|
|
598
599
|
const er = C(
|
|
@@ -604,72 +605,72 @@ function ks({
|
|
|
604
605
|
const a = t == null ? void 0 : t.placements.find((w) => w.field === e.field);
|
|
605
606
|
if (!a) return gt.info(`${e.label} is not on this form`);
|
|
606
607
|
const f = { kind: "field", field: a.field, group_key: a.group_key };
|
|
607
|
-
|
|
608
|
+
O(f), requestAnimationFrame(
|
|
608
609
|
() => {
|
|
609
|
-
var w,
|
|
610
|
-
return (
|
|
610
|
+
var w, D, fe;
|
|
611
|
+
return (fe = (D = (w = $.current) == null ? void 0 : w.querySelector(`[data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : D.scrollIntoView) == null ? void 0 : fe.call(D, { block: "center" });
|
|
611
612
|
}
|
|
612
613
|
);
|
|
613
614
|
}
|
|
614
615
|
},
|
|
615
|
-
[t,
|
|
616
|
-
), Se = String((t == null ? void 0 : t.layout.name) ?? (
|
|
616
|
+
[t, O]
|
|
617
|
+
), Se = String((t == null ? void 0 : t.layout.name) ?? (U == null ? void 0 : U.name) ?? ""), _e = String((t == null ? void 0 : t.layout.layout_type) ?? (U == null ? void 0 : U.layout_type) ?? "grouped"), x = _e !== "table" && _e !== "file", S = $o({
|
|
617
618
|
bodyRef: $,
|
|
618
619
|
bundle: t,
|
|
619
620
|
parent: T,
|
|
620
|
-
fields:
|
|
621
|
-
onSelect:
|
|
622
|
-
showHidden:
|
|
623
|
-
setShowHidden:
|
|
624
|
-
canvasShown: !(x &&
|
|
625
|
-
}), it = S.outlineOpen && !!t && x, lt = p.warning ?? (
|
|
621
|
+
fields: K,
|
|
622
|
+
onSelect: O,
|
|
623
|
+
showHidden: ge,
|
|
624
|
+
setShowHidden: le,
|
|
625
|
+
canvasShown: !(x && F === "table")
|
|
626
|
+
}), it = S.outlineOpen && !!t && x, lt = p.warning ?? (P == null ? void 0 : P.warning) ?? null, tr = ae ? {
|
|
626
627
|
role: "dialog",
|
|
627
628
|
"aria-modal": !0,
|
|
628
629
|
"aria-label": `Edit form ${Se}`,
|
|
629
630
|
tabIndex: -1
|
|
630
|
-
} : {}, dt = /* @__PURE__ */
|
|
631
|
+
} : {}, dt = /* @__PURE__ */ h(
|
|
631
632
|
"div",
|
|
632
633
|
{
|
|
633
634
|
ref: (e) => {
|
|
634
|
-
$.current = e,
|
|
635
|
+
$.current = e, ae && (Ut.current = e);
|
|
635
636
|
},
|
|
636
637
|
"data-layout-editor": "",
|
|
637
638
|
"data-mode": l,
|
|
638
639
|
...tr,
|
|
639
640
|
className: G(
|
|
640
641
|
"flex min-h-0 flex-col bg-slate-50 outline-none dark:bg-background",
|
|
641
|
-
|
|
642
|
+
ae ? "fixed inset-0 z-[90]" : "flex-1"
|
|
642
643
|
),
|
|
643
644
|
children: [
|
|
644
645
|
/* @__PURE__ */ o(
|
|
645
|
-
|
|
646
|
+
no,
|
|
646
647
|
{
|
|
647
648
|
collection: r,
|
|
648
649
|
layoutId: u,
|
|
649
650
|
layoutName: Se,
|
|
650
651
|
layoutType: _e,
|
|
651
|
-
row:
|
|
652
|
-
fields:
|
|
652
|
+
row: U,
|
|
653
|
+
fields: K,
|
|
653
654
|
draft: Kt,
|
|
654
|
-
preview:
|
|
655
|
+
preview: I,
|
|
655
656
|
onPreview: J,
|
|
656
|
-
showHidden:
|
|
657
|
-
onShowHidden:
|
|
657
|
+
showHidden: ge,
|
|
658
|
+
onShowHidden: le,
|
|
658
659
|
onBack: Ne,
|
|
659
|
-
backLabel:
|
|
660
|
+
backLabel: ae ? "Back to record" : "Forms",
|
|
660
661
|
onShowOnCanvas: Z.showVersion,
|
|
661
662
|
onReviewChanges: Z.toggleReview,
|
|
662
663
|
reviewing: ((ft = Z.compare) == null ? void 0 : ft.kind) === "unsaved",
|
|
663
664
|
onOpenUnsaved: be,
|
|
664
|
-
pendingTip:
|
|
665
|
-
presence: /* @__PURE__ */
|
|
665
|
+
pendingTip: to(xe.sync),
|
|
666
|
+
presence: /* @__PURE__ */ h(se, { children: [
|
|
666
667
|
/* @__PURE__ */ o(
|
|
667
668
|
Wr,
|
|
668
669
|
{
|
|
669
670
|
peers: Ke,
|
|
670
671
|
describe: (e) => {
|
|
671
672
|
const a = Tt(e);
|
|
672
|
-
return a && t && qe(a, t, T) ? Ot(a, t,
|
|
673
|
+
return a && t && qe(a, t, T) ? Ot(a, t, K) : null;
|
|
673
674
|
},
|
|
674
675
|
onJump: (e) => {
|
|
675
676
|
const a = Tt(e);
|
|
@@ -677,28 +678,28 @@ function ks({
|
|
|
677
678
|
}
|
|
678
679
|
}
|
|
679
680
|
),
|
|
680
|
-
/* @__PURE__ */ o(
|
|
681
|
+
/* @__PURE__ */ o(ln, { others: ((yt = H.data) == null ? void 0 : yt.others) ?? [] })
|
|
681
682
|
] }),
|
|
682
683
|
onSelectField: (e) => {
|
|
683
684
|
var a;
|
|
684
|
-
return
|
|
685
|
+
return O({
|
|
685
686
|
kind: "field",
|
|
686
687
|
field: e,
|
|
687
688
|
group_key: ((a = t == null ? void 0 : t.placements.find((f) => f.field === e)) == null ? void 0 : a.group_key) ?? null
|
|
688
689
|
});
|
|
689
690
|
},
|
|
690
|
-
view: t && x ? /* @__PURE__ */
|
|
691
|
-
/* @__PURE__ */ o(
|
|
692
|
-
/* @__PURE__ */ o(
|
|
691
|
+
view: t && x ? /* @__PURE__ */ h(se, { children: [
|
|
692
|
+
/* @__PURE__ */ o(Bn, { view: F, onView: ie }),
|
|
693
|
+
/* @__PURE__ */ o(yo, { on: ue, onChange: It })
|
|
693
694
|
] }) : null,
|
|
694
|
-
tools: /* @__PURE__ */
|
|
695
|
+
tools: /* @__PURE__ */ h(se, { children: [
|
|
695
696
|
t && x && /* @__PURE__ */ o(Or, { bundle: t, apply: n.apply }),
|
|
696
|
-
t && /* @__PURE__ */ o(
|
|
697
|
-
t && x && /* @__PURE__ */ o(
|
|
698
|
-
t && x && /* @__PURE__ */ o(
|
|
697
|
+
t && /* @__PURE__ */ o(_o, { find: S.find }),
|
|
698
|
+
t && x && /* @__PURE__ */ o(wo, { bundle: t, apply: n.apply, collection: r }),
|
|
699
|
+
t && x && /* @__PURE__ */ o(Vo, { bundle: t, apply: n.apply, collection: r }),
|
|
699
700
|
/* @__PURE__ */ o(Ce, {}),
|
|
700
701
|
t && /* @__PURE__ */ o(
|
|
701
|
-
|
|
702
|
+
Mo,
|
|
702
703
|
{
|
|
703
704
|
outline: x ? {
|
|
704
705
|
open: S.outlineOpen,
|
|
@@ -707,9 +708,9 @@ function ks({
|
|
|
707
708
|
}
|
|
708
709
|
),
|
|
709
710
|
t && /* @__PURE__ */ o(
|
|
710
|
-
|
|
711
|
+
Bo,
|
|
711
712
|
{
|
|
712
|
-
view: x &&
|
|
713
|
+
view: x && F === "canvas" ? {
|
|
713
714
|
compact: S.compact,
|
|
714
715
|
onCompact: S.setCompact,
|
|
715
716
|
onExpandAll: S.expandAll,
|
|
@@ -734,18 +735,18 @@ function ks({
|
|
|
734
735
|
label: "Set the tab order",
|
|
735
736
|
icon: /* @__PURE__ */ o(ar, { className: "h-3.5 w-3.5" }),
|
|
736
737
|
hint: "Click fields in the order Tab should visit them",
|
|
737
|
-
checked:
|
|
738
|
-
onClick: () =>
|
|
738
|
+
checked: B.active,
|
|
739
|
+
onClick: () => B.active ? B.cancel() : Ie.startTabOrder(),
|
|
739
740
|
data: { "data-editor-tab-order-toggle": "" }
|
|
740
741
|
}
|
|
741
742
|
),
|
|
742
743
|
t && x && /* @__PURE__ */ o(
|
|
743
|
-
|
|
744
|
+
uo,
|
|
744
745
|
{
|
|
745
746
|
on: De,
|
|
746
747
|
onChange: zt,
|
|
747
748
|
appDark: Fe,
|
|
748
|
-
disabled:
|
|
749
|
+
disabled: F !== "canvas"
|
|
749
750
|
}
|
|
750
751
|
),
|
|
751
752
|
/* @__PURE__ */ o(Ce, {}),
|
|
@@ -755,14 +756,14 @@ function ks({
|
|
|
755
756
|
collection: r,
|
|
756
757
|
layoutId: u,
|
|
757
758
|
dirty: n.dirty,
|
|
758
|
-
recorder:
|
|
759
|
+
recorder: ye
|
|
759
760
|
}
|
|
760
761
|
),
|
|
761
|
-
/* @__PURE__ */ o(
|
|
762
|
+
/* @__PURE__ */ o(bo, { bundle: t, collection: r }),
|
|
762
763
|
/* @__PURE__ */ o(Ce, {}),
|
|
763
|
-
t && /* @__PURE__ */ o(
|
|
764
|
+
t && /* @__PURE__ */ o(qo, { shortcuts: S.shortcuts })
|
|
764
765
|
] }),
|
|
765
|
-
ai: /* @__PURE__ */
|
|
766
|
+
ai: /* @__PURE__ */ h(se, { children: [
|
|
766
767
|
t && x && /* @__PURE__ */ o(
|
|
767
768
|
Lr,
|
|
768
769
|
{
|
|
@@ -779,9 +780,9 @@ function ks({
|
|
|
779
780
|
layoutId: u,
|
|
780
781
|
bundle: t,
|
|
781
782
|
apply: n.apply,
|
|
782
|
-
previewRecordShown:
|
|
783
|
+
previewRecordShown: I.record != null,
|
|
783
784
|
onPins: Dt,
|
|
784
|
-
onSelect:
|
|
785
|
+
onSelect: O
|
|
785
786
|
}
|
|
786
787
|
),
|
|
787
788
|
/* @__PURE__ */ o(Ce, {}),
|
|
@@ -789,14 +790,14 @@ function ks({
|
|
|
789
790
|
Nr,
|
|
790
791
|
{
|
|
791
792
|
active: V === "ask",
|
|
792
|
-
onClick: () =>
|
|
793
|
+
onClick: () => A((e) => e === "ask" ? "inspector" : "ask")
|
|
793
794
|
}
|
|
794
795
|
),
|
|
795
796
|
/* @__PURE__ */ o(Qr, { collection: r, layoutId: u, draft: n }),
|
|
796
797
|
t && /* @__PURE__ */ o(Fr, { layoutId: u, draft: n })
|
|
797
798
|
] }),
|
|
798
799
|
testing: t ? /* @__PURE__ */ o(
|
|
799
|
-
|
|
800
|
+
hn,
|
|
800
801
|
{
|
|
801
802
|
collection: r,
|
|
802
803
|
layoutId: u,
|
|
@@ -804,11 +805,11 @@ function ks({
|
|
|
804
805
|
parent: T,
|
|
805
806
|
apply: n.apply,
|
|
806
807
|
dirty: n.dirty,
|
|
807
|
-
fields:
|
|
808
|
+
fields: K
|
|
808
809
|
}
|
|
809
810
|
) : null,
|
|
810
811
|
beforeSave: t ? /* @__PURE__ */ o(
|
|
811
|
-
|
|
812
|
+
yn,
|
|
812
813
|
{
|
|
813
814
|
collection: r,
|
|
814
815
|
layoutId: u,
|
|
@@ -816,54 +817,54 @@ function ks({
|
|
|
816
817
|
parent: T,
|
|
817
818
|
apply: n.apply,
|
|
818
819
|
dirty: n.dirty,
|
|
819
|
-
fields:
|
|
820
|
+
fields: K
|
|
820
821
|
}
|
|
821
822
|
) : null,
|
|
822
|
-
previewExtra: /* @__PURE__ */
|
|
823
|
+
previewExtra: /* @__PURE__ */ h(se, { children: [
|
|
823
824
|
/* @__PURE__ */ o(
|
|
824
|
-
|
|
825
|
+
on,
|
|
825
826
|
{
|
|
826
827
|
collection: r,
|
|
827
|
-
value:
|
|
828
|
+
value: I,
|
|
828
829
|
onChange: J,
|
|
829
|
-
layout:
|
|
830
|
-
fields:
|
|
830
|
+
layout: y,
|
|
831
|
+
fields: K
|
|
831
832
|
}
|
|
832
833
|
),
|
|
833
|
-
/* @__PURE__ */ o(Sr, { scope: kt, options:
|
|
834
|
+
/* @__PURE__ */ o(Sr, { scope: kt, options: _ })
|
|
834
835
|
] }),
|
|
835
836
|
problems: t && /* @__PURE__ */ o(
|
|
836
|
-
|
|
837
|
+
Eo,
|
|
837
838
|
{
|
|
838
|
-
findings:
|
|
839
|
+
findings: oe.findings,
|
|
839
840
|
active: V === "checks",
|
|
840
|
-
onClick: () =>
|
|
841
|
+
onClick: () => A((e) => e === "checks" ? "inspector" : "checks")
|
|
841
842
|
}
|
|
842
843
|
),
|
|
843
844
|
more: /* @__PURE__ */ o(
|
|
844
|
-
|
|
845
|
+
an,
|
|
845
846
|
{
|
|
846
847
|
collection: r,
|
|
847
848
|
bundle: t,
|
|
848
|
-
previewRecord:
|
|
849
|
+
previewRecord: I.record,
|
|
849
850
|
onOpenLayout: ee
|
|
850
851
|
}
|
|
851
852
|
)
|
|
852
853
|
}
|
|
853
854
|
),
|
|
854
|
-
|
|
855
|
-
|
|
855
|
+
ae && /* @__PURE__ */ o(
|
|
856
|
+
Mn,
|
|
856
857
|
{
|
|
857
858
|
collection: r,
|
|
858
859
|
layoutId: u,
|
|
859
860
|
name: Se,
|
|
860
|
-
row:
|
|
861
|
-
rows: (
|
|
862
|
-
fields:
|
|
861
|
+
row: U,
|
|
862
|
+
rows: (P == null ? void 0 : P.rows) ?? [],
|
|
863
|
+
fields: K,
|
|
863
864
|
onDone: Ne
|
|
864
865
|
}
|
|
865
866
|
),
|
|
866
|
-
n.status === "conflict" && n.dirty && /* @__PURE__ */
|
|
867
|
+
n.status === "conflict" && n.dirty && /* @__PURE__ */ h(
|
|
867
868
|
"div",
|
|
868
869
|
{
|
|
869
870
|
role: "alert",
|
|
@@ -874,11 +875,11 @@ function ks({
|
|
|
874
875
|
),
|
|
875
876
|
children: [
|
|
876
877
|
/* @__PURE__ */ o(vt, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1", children: [
|
|
878
879
|
n.error ?? "Someone else saved this form",
|
|
879
880
|
". Save again to try once more, or reload their version."
|
|
880
881
|
] }),
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ h(
|
|
882
883
|
"button",
|
|
883
884
|
{
|
|
884
885
|
type: "button",
|
|
@@ -887,7 +888,7 @@ function ks({
|
|
|
887
888
|
className: "inline-flex h-7 shrink-0 items-center rounded-md border border-amber-300 px-2.5 text-[12px] font-medium hover:bg-amber-100 dark:border-amber-500/40 dark:hover:bg-amber-500/15",
|
|
888
889
|
children: [
|
|
889
890
|
"Reload (discard my ",
|
|
890
|
-
|
|
891
|
+
vn(n.unsavedCount),
|
|
891
892
|
")"
|
|
892
893
|
]
|
|
893
894
|
}
|
|
@@ -904,7 +905,7 @@ function ks({
|
|
|
904
905
|
onDismiss: xe.dismiss
|
|
905
906
|
}
|
|
906
907
|
),
|
|
907
|
-
lt && /* @__PURE__ */
|
|
908
|
+
lt && /* @__PURE__ */ h(
|
|
908
909
|
"div",
|
|
909
910
|
{
|
|
910
911
|
role: "note",
|
|
@@ -918,7 +919,7 @@ function ks({
|
|
|
918
919
|
]
|
|
919
920
|
}
|
|
920
921
|
),
|
|
921
|
-
X && /* @__PURE__ */
|
|
922
|
+
X && /* @__PURE__ */ h(
|
|
922
923
|
"div",
|
|
923
924
|
{
|
|
924
925
|
role: "note",
|
|
@@ -933,16 +934,16 @@ function ks({
|
|
|
933
934
|
]
|
|
934
935
|
}
|
|
935
936
|
),
|
|
936
|
-
/* @__PURE__ */ o(
|
|
937
|
+
/* @__PURE__ */ o(ho, { explain: we, onShow: Ht }),
|
|
937
938
|
/* @__PURE__ */ o(
|
|
938
|
-
|
|
939
|
+
Jr,
|
|
939
940
|
{
|
|
940
941
|
bundle: t,
|
|
941
942
|
apply: n.apply,
|
|
942
943
|
onDragActive: qt,
|
|
943
944
|
onDropOnLayout: Zt,
|
|
944
|
-
children: /* @__PURE__ */
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
946
|
+
/* @__PURE__ */ h(
|
|
946
947
|
"aside",
|
|
947
948
|
{
|
|
948
949
|
className: G(
|
|
@@ -950,7 +951,7 @@ function ks({
|
|
|
950
951
|
it && "hidden"
|
|
951
952
|
),
|
|
952
953
|
children: [
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ h(
|
|
954
955
|
"div",
|
|
955
956
|
{
|
|
956
957
|
role: "tablist",
|
|
@@ -962,21 +963,21 @@ function ks({
|
|
|
962
963
|
{
|
|
963
964
|
type: "button",
|
|
964
965
|
role: "tab",
|
|
965
|
-
"aria-selected":
|
|
966
|
+
"aria-selected": R === "layouts",
|
|
966
967
|
"data-editor-tab": "layouts",
|
|
967
|
-
className: Ue(
|
|
968
|
+
className: Ue(R === "layouts"),
|
|
968
969
|
onClick: () => te("layouts"),
|
|
969
970
|
children: "Forms"
|
|
970
971
|
}
|
|
971
972
|
),
|
|
972
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ h(
|
|
973
974
|
"button",
|
|
974
975
|
{
|
|
975
976
|
type: "button",
|
|
976
977
|
role: "tab",
|
|
977
|
-
"aria-selected":
|
|
978
|
+
"aria-selected": R === "add",
|
|
978
979
|
"data-editor-tab": "add",
|
|
979
|
-
className: Ue(
|
|
980
|
+
className: Ue(R === "add"),
|
|
980
981
|
onClick: () => te("add"),
|
|
981
982
|
disabled: !t,
|
|
982
983
|
"data-tip": "Add a field, section, panel or widget after the selection",
|
|
@@ -986,14 +987,14 @@ function ks({
|
|
|
986
987
|
]
|
|
987
988
|
}
|
|
988
989
|
),
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ h(
|
|
990
991
|
"button",
|
|
991
992
|
{
|
|
992
993
|
type: "button",
|
|
993
994
|
role: "tab",
|
|
994
|
-
"aria-selected":
|
|
995
|
+
"aria-selected": R === "usage",
|
|
995
996
|
"data-editor-tab": "usage",
|
|
996
|
-
className: Ue(
|
|
997
|
+
className: Ue(R === "usage"),
|
|
997
998
|
onClick: () => te("usage"),
|
|
998
999
|
disabled: !t,
|
|
999
1000
|
"data-tip": "How this form is used and where it slows people down",
|
|
@@ -1006,34 +1007,34 @@ function ks({
|
|
|
1006
1007
|
]
|
|
1007
1008
|
}
|
|
1008
1009
|
),
|
|
1009
|
-
/* @__PURE__ */ o("div", { className: "min-h-0 flex-1 overflow-y-auto", children:
|
|
1010
|
+
/* @__PURE__ */ o("div", { className: "min-h-0 flex-1 overflow-y-auto", children: R === "add" && t ? /* @__PURE__ */ o(
|
|
1010
1011
|
Tr,
|
|
1011
1012
|
{
|
|
1012
1013
|
bundle: t,
|
|
1013
1014
|
collection: r,
|
|
1014
1015
|
selected: re,
|
|
1015
1016
|
apply: n.apply,
|
|
1016
|
-
onSelect:
|
|
1017
|
+
onSelect: O
|
|
1017
1018
|
}
|
|
1018
|
-
) :
|
|
1019
|
-
|
|
1019
|
+
) : R === "usage" && t ? /* @__PURE__ */ o(
|
|
1020
|
+
wn,
|
|
1020
1021
|
{
|
|
1021
1022
|
bundle: t,
|
|
1022
1023
|
collection: r,
|
|
1023
|
-
fields:
|
|
1024
|
+
fields: K,
|
|
1024
1025
|
apply: n.apply,
|
|
1025
1026
|
showFill: M,
|
|
1026
1027
|
onShowFill: Y,
|
|
1027
1028
|
onOpenLayout: ee
|
|
1028
1029
|
}
|
|
1029
1030
|
) : /* @__PURE__ */ o(
|
|
1030
|
-
|
|
1031
|
+
Ro,
|
|
1031
1032
|
{
|
|
1032
1033
|
collection: r,
|
|
1033
1034
|
currentId: u,
|
|
1034
1035
|
onOpen: ee,
|
|
1035
1036
|
settingsOpen: V === "settings",
|
|
1036
|
-
onSettings: () =>
|
|
1037
|
+
onSettings: () => A("settings"),
|
|
1037
1038
|
dropTargets: !0
|
|
1038
1039
|
}
|
|
1039
1040
|
) })
|
|
@@ -1046,11 +1047,11 @@ function ks({
|
|
|
1046
1047
|
"data-editor-outline-panel": "",
|
|
1047
1048
|
className: "flex w-[260px] shrink-0 flex-col border-r border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
1048
1049
|
children: /* @__PURE__ */ o(
|
|
1049
|
-
|
|
1050
|
+
Uo,
|
|
1050
1051
|
{
|
|
1051
1052
|
bundle: t,
|
|
1052
1053
|
nodes: S.nodes,
|
|
1053
|
-
selection:
|
|
1054
|
+
selection: v,
|
|
1054
1055
|
onPick: S.selectAndReveal,
|
|
1055
1056
|
onMoved: Xe,
|
|
1056
1057
|
apply: n.apply,
|
|
@@ -1059,59 +1060,59 @@ function ks({
|
|
|
1059
1060
|
)
|
|
1060
1061
|
}
|
|
1061
1062
|
),
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
|
|
1064
|
-
Z.compare && (
|
|
1065
|
-
t && x &&
|
|
1066
|
-
|
|
1063
|
+
/* @__PURE__ */ h("main", { className: "flex min-w-0 flex-1 flex-col overflow-y-auto", children: [
|
|
1064
|
+
F === "canvas" && /* @__PURE__ */ o(lo, { editor: B }),
|
|
1065
|
+
Z.compare && (F === "canvas" || !x) && /* @__PURE__ */ o(qr, { compare: Z.compare, onClose: Z.close }),
|
|
1066
|
+
t && x && F === "states" ? /* @__PURE__ */ o(
|
|
1067
|
+
Io,
|
|
1067
1068
|
{
|
|
1068
1069
|
bundle: t,
|
|
1069
1070
|
parent: T,
|
|
1070
1071
|
collection: r,
|
|
1071
1072
|
apply: n.apply,
|
|
1072
|
-
onSelect:
|
|
1073
|
+
onSelect: O
|
|
1073
1074
|
}
|
|
1074
|
-
) : t && x &&
|
|
1075
|
-
|
|
1075
|
+
) : t && x && F === "roles" ? /* @__PURE__ */ o(
|
|
1076
|
+
Ko,
|
|
1076
1077
|
{
|
|
1077
1078
|
bundle: t,
|
|
1078
1079
|
parent: T,
|
|
1079
1080
|
apply: n.apply,
|
|
1080
|
-
onSelect:
|
|
1081
|
+
onSelect: O
|
|
1081
1082
|
}
|
|
1082
|
-
) : t && x &&
|
|
1083
|
+
) : t && x && F === "table" ? /* @__PURE__ */ o(
|
|
1083
1084
|
Jo,
|
|
1084
1085
|
{
|
|
1085
1086
|
bundle: t,
|
|
1086
1087
|
collection: r,
|
|
1087
1088
|
apply: n.apply,
|
|
1088
1089
|
flush: n.flush,
|
|
1089
|
-
selection:
|
|
1090
|
-
onSelect:
|
|
1091
|
-
onSelection:
|
|
1090
|
+
selection: v,
|
|
1091
|
+
onSelect: O,
|
|
1092
|
+
onSelection: N
|
|
1092
1093
|
}
|
|
1093
1094
|
) : t ? /* @__PURE__ */ o(
|
|
1094
1095
|
"div",
|
|
1095
1096
|
{
|
|
1096
1097
|
"data-canvas-density": S.compact && x ? "compact" : "normal",
|
|
1097
|
-
style: S.compact && x ? { zoom:
|
|
1098
|
+
style: S.compact && x ? { zoom: zo } : void 0,
|
|
1098
1099
|
className: G(
|
|
1099
|
-
"min-h-
|
|
1100
|
-
|
|
1100
|
+
"flex min-h-0 flex-1 flex-col",
|
|
1101
|
+
po(De, Fe),
|
|
1101
1102
|
De && !Fe && "bg-background text-foreground"
|
|
1102
1103
|
),
|
|
1103
1104
|
children: /* @__PURE__ */ o(
|
|
1104
|
-
|
|
1105
|
+
nn,
|
|
1105
1106
|
{
|
|
1106
1107
|
collection: r,
|
|
1107
1108
|
bundle: t,
|
|
1108
1109
|
parent: T,
|
|
1109
|
-
preview:
|
|
1110
|
+
preview: I,
|
|
1110
1111
|
onPreview: J,
|
|
1111
|
-
record:
|
|
1112
|
-
fields:
|
|
1112
|
+
record: Ae,
|
|
1113
|
+
fields: K,
|
|
1113
1114
|
renderPane: (e) => /* @__PURE__ */ o(
|
|
1114
|
-
|
|
1115
|
+
_n,
|
|
1115
1116
|
{
|
|
1116
1117
|
collection: r,
|
|
1117
1118
|
bundle: t,
|
|
@@ -1119,16 +1120,16 @@ function ks({
|
|
|
1119
1120
|
roleId: e.roleId,
|
|
1120
1121
|
stateKey: e.stateKey,
|
|
1121
1122
|
marks: Ft(e.marks),
|
|
1122
|
-
overlay:
|
|
1123
|
+
overlay: B.overlay(e.overlay),
|
|
1123
1124
|
ruleMarks: Vt,
|
|
1124
1125
|
ghost: Wt,
|
|
1125
1126
|
deps: we.deps,
|
|
1126
1127
|
noDnd: e.noDnd,
|
|
1127
1128
|
record: e.record,
|
|
1128
1129
|
selected: re,
|
|
1129
|
-
selection:
|
|
1130
|
+
selection: v,
|
|
1130
1131
|
onSelect: $t,
|
|
1131
|
-
showHidden:
|
|
1132
|
+
showHidden: ge,
|
|
1132
1133
|
fold: S.fold,
|
|
1133
1134
|
reveal: S.reveal,
|
|
1134
1135
|
apply: n.apply,
|
|
@@ -1143,7 +1144,7 @@ function ks({
|
|
|
1143
1144
|
}
|
|
1144
1145
|
)
|
|
1145
1146
|
}
|
|
1146
|
-
) : n.error ? /* @__PURE__ */ o("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */
|
|
1147
|
+
) : n.error ? /* @__PURE__ */ o("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-3 p-6", children: [
|
|
1147
1148
|
/* @__PURE__ */ o(wt, { className: "h-10 w-full rounded-lg" }),
|
|
1148
1149
|
/* @__PURE__ */ o(wt, { className: "h-48 w-full rounded-lg" })
|
|
1149
1150
|
] })
|
|
@@ -1158,50 +1159,50 @@ function ks({
|
|
|
1158
1159
|
{
|
|
1159
1160
|
layoutId: u,
|
|
1160
1161
|
layoutName: Se,
|
|
1161
|
-
kind:
|
|
1162
|
+
kind: pn(t.layout),
|
|
1162
1163
|
bundle: t,
|
|
1163
1164
|
thread: Te,
|
|
1164
|
-
setThread:
|
|
1165
|
-
pending:
|
|
1166
|
-
onPendingTaken: () =>
|
|
1165
|
+
setThread: he,
|
|
1166
|
+
pending: ve,
|
|
1167
|
+
onPendingTaken: () => ce(null),
|
|
1167
1168
|
jump: Xt,
|
|
1168
1169
|
onCite: er,
|
|
1169
|
-
recordId: ((ht =
|
|
1170
|
+
recordId: ((ht = I.record) == null ? void 0 : ht.id) ?? null
|
|
1170
1171
|
}
|
|
1171
1172
|
) : V === "checks" ? /* @__PURE__ */ o(
|
|
1172
|
-
|
|
1173
|
+
Do,
|
|
1173
1174
|
{
|
|
1174
|
-
findings:
|
|
1175
|
-
health:
|
|
1176
|
-
ready:
|
|
1177
|
-
onSelect: (e) =>
|
|
1175
|
+
findings: oe.findings,
|
|
1176
|
+
health: oe.health,
|
|
1177
|
+
ready: oe.ready,
|
|
1178
|
+
onSelect: (e) => N([e]),
|
|
1178
1179
|
apply: n.apply,
|
|
1179
|
-
onOpenAiReview: p.aiReviewSlot ? () =>
|
|
1180
|
+
onOpenAiReview: p.aiReviewSlot ? () => A("settings") : void 0
|
|
1180
1181
|
}
|
|
1181
1182
|
) : V === "settings" ? /* @__PURE__ */ o(
|
|
1182
|
-
|
|
1183
|
+
Pn,
|
|
1183
1184
|
{
|
|
1184
1185
|
bundle: t,
|
|
1185
1186
|
apply: n.apply,
|
|
1186
1187
|
flush: n.flush,
|
|
1187
1188
|
collection: r,
|
|
1188
|
-
previewRoleId:
|
|
1189
|
+
previewRoleId: I.roleId,
|
|
1189
1190
|
onPreviewRoleChange: Jt,
|
|
1190
1191
|
onAskWhere: p.isAdmin ? (e) => {
|
|
1191
|
-
|
|
1192
|
+
ce(e), A("ask");
|
|
1192
1193
|
} : void 0
|
|
1193
1194
|
}
|
|
1194
|
-
) :
|
|
1195
|
-
|
|
1195
|
+
) : v.length > 1 ? /* @__PURE__ */ o(
|
|
1196
|
+
Ao,
|
|
1196
1197
|
{
|
|
1197
1198
|
bundle: t,
|
|
1198
|
-
selection:
|
|
1199
|
+
selection: v,
|
|
1199
1200
|
apply: n.apply,
|
|
1200
1201
|
collection: r,
|
|
1201
|
-
onSelection:
|
|
1202
|
+
onSelection: N
|
|
1202
1203
|
}
|
|
1203
1204
|
) : /* @__PURE__ */ o(
|
|
1204
|
-
|
|
1205
|
+
Ln,
|
|
1205
1206
|
{
|
|
1206
1207
|
bundle: t,
|
|
1207
1208
|
target: re,
|
|
@@ -1218,36 +1219,36 @@ function ks({
|
|
|
1218
1219
|
}
|
|
1219
1220
|
),
|
|
1220
1221
|
/* @__PURE__ */ o(
|
|
1221
|
-
|
|
1222
|
+
dn,
|
|
1222
1223
|
{
|
|
1223
1224
|
bundle: t,
|
|
1224
|
-
selection:
|
|
1225
|
+
selection: v,
|
|
1225
1226
|
apply: n.apply,
|
|
1226
|
-
onSelection:
|
|
1227
|
+
onSelection: N,
|
|
1227
1228
|
rootRef: $
|
|
1228
1229
|
}
|
|
1229
1230
|
),
|
|
1230
1231
|
/* @__PURE__ */ o(
|
|
1231
|
-
|
|
1232
|
+
gn,
|
|
1232
1233
|
{
|
|
1233
1234
|
request: _t,
|
|
1234
1235
|
count: n.unsavedCount,
|
|
1235
1236
|
onSave: Mt,
|
|
1236
1237
|
onDiscard: n.discard,
|
|
1237
1238
|
onKeep: () => Ge(null),
|
|
1238
|
-
note:
|
|
1239
|
-
canSave: $r(
|
|
1239
|
+
note: E ? /* @__PURE__ */ o(zr, { policy: E, value: me, onChange: Pe }) : void 0,
|
|
1240
|
+
canSave: $r(E, me)
|
|
1240
1241
|
}
|
|
1241
1242
|
),
|
|
1242
|
-
|
|
1243
|
+
E && Ve && /* @__PURE__ */ o(
|
|
1243
1244
|
Vr,
|
|
1244
1245
|
{
|
|
1245
1246
|
open: !0,
|
|
1246
1247
|
anchor: Ve,
|
|
1247
|
-
policy:
|
|
1248
|
+
policy: E,
|
|
1248
1249
|
intro: X ? At(X) : void 0,
|
|
1249
1250
|
count: n.unsavedCount,
|
|
1250
|
-
value:
|
|
1251
|
+
value: me,
|
|
1251
1252
|
onChange: Pe,
|
|
1252
1253
|
onSave: He,
|
|
1253
1254
|
onClose: () => We(null)
|
|
@@ -1259,12 +1260,12 @@ function ks({
|
|
|
1259
1260
|
anchor: ot,
|
|
1260
1261
|
steps: n.unsavedSteps,
|
|
1261
1262
|
exists: (e) => !!t && qe(e, t, T),
|
|
1262
|
-
describe: (e) => Ot(e, t,
|
|
1263
|
+
describe: (e) => Ot(e, t, K),
|
|
1263
1264
|
onJump: (e) => {
|
|
1264
1265
|
be(null), nt(e);
|
|
1265
1266
|
},
|
|
1266
1267
|
onSettings: () => {
|
|
1267
|
-
be(null),
|
|
1268
|
+
be(null), A("settings");
|
|
1268
1269
|
},
|
|
1269
1270
|
onClose: () => be(null)
|
|
1270
1271
|
}
|
|
@@ -1272,10 +1273,10 @@ function ks({
|
|
|
1272
1273
|
]
|
|
1273
1274
|
}
|
|
1274
1275
|
);
|
|
1275
|
-
if (!
|
|
1276
|
+
if (!ae)
|
|
1276
1277
|
return /* @__PURE__ */ o(St.Provider, { value: Ie, children: dt });
|
|
1277
1278
|
const ct = c ?? (Re ? Cr(Re) ?? document.body : null);
|
|
1278
|
-
return /* @__PURE__ */
|
|
1279
|
+
return /* @__PURE__ */ h(se, { children: [
|
|
1279
1280
|
/* @__PURE__ */ o("span", { ref: Bt, hidden: !0, "data-layout-editor-marker": "" }),
|
|
1280
1281
|
/* @__PURE__ */ o(St.Provider, { value: Ie, children: ct && mr(dt, ct) })
|
|
1281
1282
|
] });
|
|
@@ -1285,7 +1286,7 @@ function At(r) {
|
|
|
1285
1286
|
return `Frozen until ${gr(r.until)}${i}. Saving asks for an override note, kept in History.`;
|
|
1286
1287
|
}
|
|
1287
1288
|
export {
|
|
1288
|
-
|
|
1289
|
+
bs as LayoutEditor,
|
|
1289
1290
|
$e as isTyping,
|
|
1290
1291
|
qe as targetExists
|
|
1291
1292
|
};
|