@nivaro/react 0.3.142 → 0.3.144
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 -1
- package/dist/shared/components/CollectionBrowserView.js +1304 -1295
- package/dist/shared/components/layout-editor/DesignNode.js +181 -169
- package/dist/shared/components/layout-editor/LayoutEditor.js +334 -326
- package/dist/shared/components/layout-editor/explain/CanvasRules.js +72 -61
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as r, Fragment as ie } from "react/jsx-runtime";
|
|
2
2
|
import { useQueryClient as To, useQuery as Lo } from "@tanstack/react-query";
|
|
3
|
-
import { Percent as Co, OctagonAlert as
|
|
4
|
-
import { useState as P, useEffect as B, useMemo as
|
|
3
|
+
import { Percent as Co, OctagonAlert as Oo, ListOrdered as Ro, AlertTriangle as Et, Lock as Po, Plus as No, BarChart3 as Ao, LayoutGrid as Eo, Table2 as Io, Grid3x3 as Do, Users as Fo } from "lucide-react";
|
|
4
|
+
import { useState as P, useEffect as B, useMemo as b, useRef as z, useCallback as L } from "react";
|
|
5
5
|
import { createPortal as Ko } from "react-dom";
|
|
6
6
|
import { toast as It } from "sonner";
|
|
7
|
-
import { useNivaroClient as
|
|
8
|
-
import { get as
|
|
7
|
+
import { useNivaroClient as _o } from "../../context.js";
|
|
8
|
+
import { get as Mo } from "../../lib/commands.js";
|
|
9
9
|
import { HEADER_GROUP_KEY as Wt, UNGROUPED_KEY as Bo } from "../../lib/layout-ops.js";
|
|
10
10
|
import { activeFreeze as qo, dayWords as Uo } from "../../lib/layout-resolve.js";
|
|
11
11
|
import { withAutoOwnersTile as zo } from "../../lib/owners-header-tile.js";
|
|
@@ -19,7 +19,7 @@ import { Skeleton as Kt } from "../ui/skeleton.js";
|
|
|
19
19
|
import { AddPanel as Zo } from "./AddPanel.js";
|
|
20
20
|
import { AutoArrangeButton as Qo } from "./AutoArrange.js";
|
|
21
21
|
import { AiToolsButton as Yo } from "./ai/AiToolsButton.js";
|
|
22
|
-
import { pinsToMarks as Jo, mergeMarks as
|
|
22
|
+
import { pinsToMarks as Jo, mergeMarks as _t } from "./ai/ai-tools-api.js";
|
|
23
23
|
import { AiFormsButton as Xo } from "./ai-forms/AiFormsButton.js";
|
|
24
24
|
import { AskButton as er, AskPanel as tr } from "./assist/AskPanel.js";
|
|
25
25
|
import { useAskThread as or } from "./assist/assist-api.js";
|
|
@@ -29,21 +29,21 @@ import { BulkChangesButton as ar } from "./bulk/BulkChangesButton.js";
|
|
|
29
29
|
import { useMacroRecorder as sr } from "./bulk/useMacroRecorder.js";
|
|
30
30
|
import { bundleToActiveLayout as Vt, previewForRole as ir, roleMarker as lr } from "./bundle-to-active.js";
|
|
31
31
|
import { useCanvasCompare as dr, CompareBanner as cr } from "./CanvasCompare.js";
|
|
32
|
-
import { changeNotePolicyOf as
|
|
33
|
-
import { PresenceAvatars as
|
|
32
|
+
import { changeNotePolicyOf as Mt, changeNoteMeta as ur, changeNoteReady as pr, ChangeNoteFields as mr, ChangeNoteSave as fr } from "./ChangeNote.js";
|
|
33
|
+
import { PresenceAvatars as yr, DroppedBanner as hr, RecoveryBanner as vr, UnsavedList as gr } from "./CollabParts.js";
|
|
34
34
|
import { CommandPalette as kr } from "./commands/CommandPalette.js";
|
|
35
35
|
import { nextSelection as wr, targetKey as $ } from "./design-context.js";
|
|
36
36
|
import { LayoutDndProvider as br, useLayoutDnd as xr } from "./dnd/LayoutDndProvider.js";
|
|
37
37
|
import { NO_DND as Sr } from "./dnd/node.js";
|
|
38
38
|
import { useTrashWarning as Tr } from "./dnd/trash-links.js";
|
|
39
39
|
import { useDraftRecovery as Lr, stagedTip as Cr } from "./draft-recovery.js";
|
|
40
|
-
import { canvasRenderer as
|
|
40
|
+
import { canvasRenderer as Or, EditorCanvas as Rr } from "./EditorCanvas.js";
|
|
41
41
|
import { EditorTopBar as Pr } from "./EditorTopBar.js";
|
|
42
42
|
import { notesOf as Nr, noteKey as Ar } from "./editor-notes.js";
|
|
43
43
|
import { EntryEditorContext as Bt } from "./entry/entry-editor-context.js";
|
|
44
44
|
import { useTabOrderEditor as Er, TabOrderBar as Ir } from "./entry/tab-order.js";
|
|
45
45
|
import { useAppIsDark as Dr, ThemePreviewTool as Fr, previewThemeClass as Kr } from "./entry/theme-preview.js";
|
|
46
|
-
import { useRulesView as
|
|
46
|
+
import { useRulesView as _r, explainMarks as Mr, RulesToggle as Br, RuleLoopsBanner as qr } from "./explain/CanvasRules.js";
|
|
47
47
|
import { useDriverHover as Ur } from "./explain/driver-hover.js";
|
|
48
48
|
import { fieldLabel as zr } from "./explain/field-sources.js";
|
|
49
49
|
import { useCanvasExplain as $r, useDefaultGhosts as Wr } from "./explain/use-explain.js";
|
|
@@ -65,23 +65,23 @@ import { FieldStateMatrix as ln } from "./matrix/FieldStateMatrix.js";
|
|
|
65
65
|
import { RoleSectionMatrix as dn } from "./matrix/RoleSectionMatrix.js";
|
|
66
66
|
import { FindTool as cn, OutlineTool as un, ViewTools as pn, ShortcutsTool as mn } from "./nav/NavTools.js";
|
|
67
67
|
import { OutlinePanel as fn } from "./nav/OutlinePanel.js";
|
|
68
|
-
import { useEditorNav as
|
|
69
|
-
import { fitZoom as
|
|
68
|
+
import { useEditorNav as yn } from "./nav/useEditorNav.js";
|
|
69
|
+
import { fitZoom as hn, effectiveZoom as vn } from "./nav/view-prefs.js";
|
|
70
70
|
import { ZoomChip as gn } from "./nav/ZoomControls.js";
|
|
71
71
|
import { OutputsButton as kn } from "./outputs/OutputsButton.js";
|
|
72
72
|
import { useLayoutOverview as wn, useOverviewFields as bn, useInvalidateLayouts as Ht, useRuleChoiceLabels as xn, useApproxRecordCount as Sn } from "./overview/overview-api.js";
|
|
73
73
|
import { purposeSegments as Tn, Sentence as Ln } from "./overview/purpose.js";
|
|
74
74
|
import { PlacementsTable as Cn } from "./PlacementsTable.js";
|
|
75
|
-
import { usePlaceTools as
|
|
76
|
-
import { segTrack as
|
|
75
|
+
import { usePlaceTools as On, PlaceToolsProvider as qt } from "./PlaceTools.js";
|
|
76
|
+
import { segTrack as Rn, segOption as Pn, amberStrip as Ve } from "./panel-style.js";
|
|
77
77
|
import { usePersonalDefaultMarks as Nn } from "./personal-default-marks.js";
|
|
78
78
|
import { useLayoutPresence as An, peersByTarget as En } from "./presence.js";
|
|
79
79
|
import { PreviewModes as In } from "./preview/PreviewModes.js";
|
|
80
80
|
import { PreviewPanes as Dn } from "./preview/PreviewPanes.js";
|
|
81
81
|
import { previewNaturalWidth as Fn } from "./preview/preview-model.js";
|
|
82
82
|
import { useRemovalLog as Kn } from "./removed-log.js";
|
|
83
|
-
import { FormMoreMenu as
|
|
84
|
-
import { useLinkedSections as
|
|
83
|
+
import { FormMoreMenu as _n } from "./reuse/FormMoreMenu.js";
|
|
84
|
+
import { useLinkedSections as Mn, useLinkedSectionMarks as Bn, LinkedSectionsProvider as qn } from "./reuse/linked-sections.js";
|
|
85
85
|
import { useRailCopy as Un } from "./reuse/useRailCopy.js";
|
|
86
86
|
import { SlashInsert as zn } from "./SlashInsert.js";
|
|
87
87
|
import { StagedByOthers as $n } from "./StagedChip.js";
|
|
@@ -90,7 +90,7 @@ import { useRolePreview as Hn } from "./settings/settings-api.js";
|
|
|
90
90
|
import { layoutKindOf as jn } from "./settings/settings-registry.js";
|
|
91
91
|
import { useStagedDraft as Gn, useStagedWriter as Zn } from "./staged-api.js";
|
|
92
92
|
import { ImpactButton as Qn, TestingButton as Yn } from "./testing/TestingPanels.js";
|
|
93
|
-
import { MenuSeparator as
|
|
93
|
+
import { MenuSeparator as Re, ToolButton as He } from "./toolbar-kit.js";
|
|
94
94
|
import { unsavedText as Jn, UnsavedConfirm as Xn } from "./UnsavedConfirm.js";
|
|
95
95
|
import { unsavedKeys as ea, targetFromKey as Ut, describeTarget as zt } from "./unsaved-marks.js";
|
|
96
96
|
import { useRefusalLens as ta } from "./usage/refusal-lens.js";
|
|
@@ -117,19 +117,19 @@ function pa(o) {
|
|
|
117
117
|
function ma(o, i, s, l, m) {
|
|
118
118
|
B(() => {
|
|
119
119
|
const d = (u) => {
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
120
|
+
const g = en[u.key];
|
|
121
|
+
if (!g || !u.altKey || u.metaKey || u.ctrlKey || u.shiftKey || u.defaultPrevented || !o || i.length !== 1 || l.current || Qe(u.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) return;
|
|
122
122
|
u.preventDefault();
|
|
123
|
-
const p = tn(o, i[0],
|
|
123
|
+
const p = tn(o, i[0], g);
|
|
124
124
|
if (!p) return;
|
|
125
125
|
s(p.ops, { label: p.label }), m(p.next);
|
|
126
126
|
const c = $(p.next);
|
|
127
127
|
requestAnimationFrame(() => {
|
|
128
128
|
var Z;
|
|
129
|
-
const
|
|
129
|
+
const k = document.querySelector(
|
|
130
130
|
`[data-layout-editor] [data-design-target="${CSS.escape(c)}"]`
|
|
131
131
|
);
|
|
132
|
-
|
|
132
|
+
k == null || k.focus({ preventScroll: !0 }), (Z = k == null ? void 0 : k.scrollIntoView) == null || Z.call(k, { block: "nearest" });
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
@@ -148,7 +148,7 @@ function fa(o) {
|
|
|
148
148
|
return window.addEventListener("pagehide", s), () => window.removeEventListener("pagehide", s);
|
|
149
149
|
}, [o.flush]);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function ya(o) {
|
|
152
152
|
const i = To(), s = Ht(o);
|
|
153
153
|
return L(
|
|
154
154
|
(l, m) => {
|
|
@@ -158,12 +158,12 @@ function ha(o) {
|
|
|
158
158
|
[i, s]
|
|
159
159
|
);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const s =
|
|
161
|
+
function ha(o, i) {
|
|
162
|
+
const s = _o();
|
|
163
163
|
return Lo({
|
|
164
164
|
queryKey: ["layout-editor", "preview-record", o, i],
|
|
165
165
|
queryFn: () => s.request(
|
|
166
|
-
|
|
166
|
+
Mo(`/items/${encodeURIComponent(o)}/${encodeURIComponent(String(i))}`)
|
|
167
167
|
).then((l) => l.data ?? null),
|
|
168
168
|
enabled: i != null,
|
|
169
169
|
staleTime: 3e4
|
|
@@ -179,13 +179,13 @@ function va(o, i) {
|
|
|
179
179
|
if (l || d.defaultPrevented || d.button !== 0 || d.metaKey || d.ctrlKey || d.shiftKey || d.altKey) return;
|
|
180
180
|
const u = (c = (p = d.target) == null ? void 0 : p.closest) == null ? void 0 : c.call(p, "a[href]");
|
|
181
181
|
if (!u || u.target && u.target !== "_self" || u.hasAttribute("download")) return;
|
|
182
|
-
let
|
|
182
|
+
let g;
|
|
183
183
|
try {
|
|
184
|
-
|
|
184
|
+
g = new URL(u.href, window.location.href);
|
|
185
185
|
} catch {
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
|
-
|
|
188
|
+
g.origin === window.location.origin && g.pathname + g.search !== window.location.pathname + window.location.search && (d.preventDefault(), d.stopPropagation(), s.current(() => {
|
|
189
189
|
l = !0;
|
|
190
190
|
try {
|
|
191
191
|
u.click();
|
|
@@ -208,10 +208,10 @@ function Ge(o, i, s = null) {
|
|
|
208
208
|
function ga(o, i, s) {
|
|
209
209
|
const l = z(null), m = z(i);
|
|
210
210
|
return m.current = i, B(() => {
|
|
211
|
-
var
|
|
211
|
+
var g;
|
|
212
212
|
if (!o) return;
|
|
213
213
|
const d = document.activeElement;
|
|
214
|
-
(
|
|
214
|
+
(g = l.current) == null || g.focus();
|
|
215
215
|
const u = (p) => {
|
|
216
216
|
p.key !== "Escape" || p.defaultPrevented || s.current || Qe(p.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]') || (p.preventDefault(), m.current());
|
|
217
217
|
};
|
|
@@ -228,10 +228,10 @@ function ka({
|
|
|
228
228
|
stateKey: m = null,
|
|
229
229
|
marks: d,
|
|
230
230
|
overlay: u,
|
|
231
|
-
ruleMarks:
|
|
231
|
+
ruleMarks: g,
|
|
232
232
|
ghost: p,
|
|
233
233
|
deps: c,
|
|
234
|
-
noDnd:
|
|
234
|
+
noDnd: k = !1,
|
|
235
235
|
record: Z,
|
|
236
236
|
selected: we,
|
|
237
237
|
selection: be,
|
|
@@ -239,7 +239,7 @@ function ka({
|
|
|
239
239
|
showHidden: le,
|
|
240
240
|
fold: n = null,
|
|
241
241
|
reveal: Se = null,
|
|
242
|
-
apply:
|
|
242
|
+
apply: e,
|
|
243
243
|
whenIdle: q,
|
|
244
244
|
fillRate: re,
|
|
245
245
|
unsaved: U,
|
|
@@ -247,28 +247,28 @@ function ka({
|
|
|
247
247
|
compare: Q,
|
|
248
248
|
lastChanges: ue
|
|
249
249
|
}) {
|
|
250
|
-
const Pe = xr(), pe =
|
|
250
|
+
const Pe = xr(), pe = k ? Sr : Pe, v = Or(String(i.layout.layout_type ?? "grouped")), W = (v === "item-edit-form" || v === "read-view") && (Q == null ? void 0 : Q.diff.bundle) || i, R = b(() => Vt(W, s), [W, s]), V = b(
|
|
251
251
|
() => s ? Qr(i, s) : null,
|
|
252
252
|
[i, s]
|
|
253
|
-
), Y =
|
|
253
|
+
), Y = b(() => V != null && V.size ? (f) => {
|
|
254
254
|
const K = V.get($(f)), C = (d == null ? void 0 : d(f)) ?? [];
|
|
255
255
|
return K ? [...C, Yr(K)] : C;
|
|
256
|
-
} : d, [V, d]), Te =
|
|
257
|
-
() => ir(
|
|
258
|
-
[
|
|
259
|
-
), { data: H = null } = Hn(o, l), me =
|
|
256
|
+
} : d, [V, d]), Te = b(
|
|
257
|
+
() => ir(R.active, l, le),
|
|
258
|
+
[R.active, l, le]
|
|
259
|
+
), { data: H = null } = Hn(o, l), me = b(
|
|
260
260
|
() => l ? lr(H) : void 0,
|
|
261
261
|
[l, H]
|
|
262
|
-
), ne =
|
|
263
|
-
() => Y &&
|
|
264
|
-
[Y,
|
|
265
|
-
), de = Nn(i, Ne), T = Bn(de), J = Vn(i, T.marks), A =
|
|
262
|
+
), ne = b(() => Nr(i), [i]), Ne = b(
|
|
263
|
+
() => Y && g ? (f) => [...Y(f), ...g(f)] : Y ?? g,
|
|
264
|
+
[Y, g]
|
|
265
|
+
), de = Nn(i, Ne), T = Bn(de), J = Vn(i, T.marks), A = b(
|
|
266
266
|
() => ({
|
|
267
267
|
selected: we,
|
|
268
268
|
selection: be,
|
|
269
269
|
onSelect: xe,
|
|
270
270
|
showHidden: le,
|
|
271
|
-
inheritedFrom: (f) =>
|
|
271
|
+
inheritedFrom: (f) => R.inherited.get($(f)) ?? null,
|
|
272
272
|
dnd: pe,
|
|
273
273
|
roleMark: me,
|
|
274
274
|
marks: J,
|
|
@@ -285,9 +285,11 @@ function ka({
|
|
|
285
285
|
diffMark: Q ? (f) => Q.diff.marks.get($(f)) ?? null : void 0,
|
|
286
286
|
lastChange: ue ? (f) => f.kind === "group" ? ue[f.key] ?? null : null : void 0,
|
|
287
287
|
ghost: p,
|
|
288
|
+
// A read view draws its fields as bare text: dotted edges show where each one is.
|
|
289
|
+
fieldOutline: v === "read-view",
|
|
288
290
|
locked: T.locked,
|
|
289
|
-
resizeWidth:
|
|
290
|
-
f.kind !== "field" && f.kind !== "slot" ||
|
|
291
|
+
resizeWidth: k ? void 0 : (f, K) => {
|
|
292
|
+
f.kind !== "field" && f.kind !== "slot" || e(
|
|
291
293
|
[
|
|
292
294
|
{
|
|
293
295
|
op: "update_placement",
|
|
@@ -304,7 +306,7 @@ function ka({
|
|
|
304
306
|
be,
|
|
305
307
|
xe,
|
|
306
308
|
le,
|
|
307
|
-
|
|
309
|
+
R.inherited,
|
|
308
310
|
pe,
|
|
309
311
|
me,
|
|
310
312
|
J,
|
|
@@ -319,12 +321,13 @@ function ka({
|
|
|
319
321
|
ue,
|
|
320
322
|
p,
|
|
321
323
|
T.locked,
|
|
322
|
-
|
|
323
|
-
|
|
324
|
+
e,
|
|
325
|
+
k,
|
|
326
|
+
v
|
|
324
327
|
]
|
|
325
328
|
), E = Ur(c);
|
|
326
329
|
return /* @__PURE__ */ r("div", { ref: E, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ r(
|
|
327
|
-
|
|
330
|
+
Rr,
|
|
328
331
|
{
|
|
329
332
|
collection: o,
|
|
330
333
|
bundle: W,
|
|
@@ -333,7 +336,7 @@ function ka({
|
|
|
333
336
|
stateKey: m,
|
|
334
337
|
roleId: l,
|
|
335
338
|
design: A,
|
|
336
|
-
apply:
|
|
339
|
+
apply: e,
|
|
337
340
|
whenIdle: q
|
|
338
341
|
}
|
|
339
342
|
) });
|
|
@@ -347,19 +350,19 @@ function wa({
|
|
|
347
350
|
fields: d,
|
|
348
351
|
onDone: u
|
|
349
352
|
}) {
|
|
350
|
-
const
|
|
351
|
-
return
|
|
353
|
+
const g = xn(o, d, m), { data: p } = Sn(o, s, m), c = aa(sa(l).data), k = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Tn(s, d, g) : [];
|
|
354
|
+
return k.length > 0 && typeof p == "number" && k.push({ text: ` (≈ ${p.toLocaleString()} ${p === 1 ? "record" : "records"})` }), c && k.push({ text: k.length > 0 ? `; ${c}` : c }), /* @__PURE__ */ h(
|
|
352
355
|
"div",
|
|
353
356
|
{
|
|
354
357
|
"data-editing-banner": "",
|
|
355
358
|
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",
|
|
356
359
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1 truncate", children: [
|
|
358
361
|
"Editing ",
|
|
359
362
|
/* @__PURE__ */ r("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: i }),
|
|
360
|
-
|
|
363
|
+
k.length > 0 && /* @__PURE__ */ h(ie, { children: [
|
|
361
364
|
" — ",
|
|
362
|
-
/* @__PURE__ */ r(Ln, { segs:
|
|
365
|
+
/* @__PURE__ */ r(Ln, { segs: k, muted: !0 })
|
|
363
366
|
] })
|
|
364
367
|
] }),
|
|
365
368
|
/* @__PURE__ */ r(
|
|
@@ -376,7 +379,7 @@ function wa({
|
|
|
376
379
|
);
|
|
377
380
|
}
|
|
378
381
|
function ba({ view: o, onView: i }) {
|
|
379
|
-
const s = (l, m, d, u) => /* @__PURE__ */
|
|
382
|
+
const s = (l, m, d, u) => /* @__PURE__ */ h(
|
|
380
383
|
"button",
|
|
381
384
|
{
|
|
382
385
|
type: "button",
|
|
@@ -392,11 +395,11 @@ function ba({ view: o, onView: i }) {
|
|
|
392
395
|
]
|
|
393
396
|
}
|
|
394
397
|
);
|
|
395
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ h(
|
|
396
399
|
"fieldset",
|
|
397
400
|
{
|
|
398
401
|
"aria-label": "Show the form as",
|
|
399
|
-
className: G("m-0 min-w-0 shrink-0 border-0",
|
|
402
|
+
className: G("m-0 min-w-0 shrink-0 border-0", Rn(4)),
|
|
400
403
|
children: [
|
|
401
404
|
s("canvas", "Canvas", Eo, "The form as people see it"),
|
|
402
405
|
s("table", "Table", Io, "Every field as a row: label, section, width, rules"),
|
|
@@ -415,7 +418,7 @@ const Ze = (o) => G(
|
|
|
415
418
|
"inline-flex h-7 items-center gap-1 rounded-md px-2.5 text-[12px] font-medium transition-colors",
|
|
416
419
|
o ? "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"
|
|
417
420
|
);
|
|
418
|
-
function
|
|
421
|
+
function yi({
|
|
419
422
|
collection: o,
|
|
420
423
|
layoutId: i,
|
|
421
424
|
onBack: s,
|
|
@@ -423,52 +426,52 @@ function hi({
|
|
|
423
426
|
onLayoutChange: m,
|
|
424
427
|
previewRecordId: d = null,
|
|
425
428
|
portalContainer: u,
|
|
426
|
-
onDirtyChange:
|
|
429
|
+
onDirtyChange: g
|
|
427
430
|
}) {
|
|
428
|
-
var Ct,
|
|
429
|
-
const p = Zr(), [c,
|
|
430
|
-
B(() =>
|
|
431
|
-
const Z =
|
|
431
|
+
var Ct, Ot, Rt, Pt, Nt, At;
|
|
432
|
+
const p = Zr(), [c, k] = P(i);
|
|
433
|
+
B(() => k(i), [i]);
|
|
434
|
+
const Z = ya(o), { draft: we, recorder: be } = sr(
|
|
432
435
|
// The record page's automatic Owners tile is listed like any header tile (Rob 2026-11-13).
|
|
433
436
|
ia(c, { onSaved: Z, autoOwnersTile: !0 })
|
|
434
|
-
), { draft: xe, removed: le } = Kn(we, c), { draft: n, value: Se } =
|
|
435
|
-
() => H && ne && ne.total > 0 ? (
|
|
437
|
+
), { draft: xe, removed: le } = Kn(we, c), { draft: n, value: Se } = Mn(c, xe), e = n.bundle, [q, re] = P("layouts"), [U, N] = P("inspector"), [Q, ue] = or(), [Pe, pe] = P(null), [v, F] = P([]), W = v.length > 0 ? v[v.length - 1] : null, [R, V] = P("canvas"), [Y, Te] = P(!1), [H, me] = ra(), { data: ne } = na(o, H), Ne = b(
|
|
438
|
+
() => H && ne && ne.total > 0 ? (t) => ne.pct.get(t) ?? null : void 0,
|
|
436
439
|
[H, ne]
|
|
437
440
|
), de = ta(c), [T, J] = P({
|
|
438
441
|
record: d ? { id: d, label: `#${d}` } : null,
|
|
439
442
|
roleId: null
|
|
440
|
-
}), { data: A } = wn(o), { data: E = [] } = bn(o), f = A == null ? void 0 : A.rows.find((
|
|
441
|
-
() =>
|
|
442
|
-
[
|
|
443
|
+
}), { data: A } = wn(o), { data: E = [] } = bn(o), f = A == null ? void 0 : A.rows.find((t) => t.layout_id === c), K = (e == null ? void 0 : e.layout.parent_layout_id) != null ? Number(e.layout.parent_layout_id) : null, { data: C = null } = je(K), { data: jt = null } = ha(o, ((Ct = T.record) == null ? void 0 : Ct.id) ?? null), fe = b(
|
|
444
|
+
() => e ? Vt(e, C).active : null,
|
|
445
|
+
[e, C]
|
|
443
446
|
);
|
|
444
447
|
Vo(Ft);
|
|
445
|
-
const Gt =
|
|
446
|
-
const
|
|
447
|
-
return (
|
|
448
|
-
if (!
|
|
449
|
-
const S = a.get(
|
|
448
|
+
const Gt = b(() => Ho(fe), [fe]), Le = sn(o, e, C), Ye = rn(U === "checks"), { data: Ae } = je(c), Je = b(() => Ae ? zo(Ae) : null, [Ae]), X = dr(e, Je, n.unsavedCount, c), { data: Zt } = Gr(c, e != null), [Xe, Qt] = P([]), Yt = b(() => {
|
|
449
|
+
const t = Jo(Xe), a = /* @__PURE__ */ new WeakMap();
|
|
450
|
+
return (y) => {
|
|
451
|
+
if (!y || !t) return _t(y, t);
|
|
452
|
+
const S = a.get(y);
|
|
450
453
|
if (S) return S;
|
|
451
|
-
const D =
|
|
452
|
-
return a.set(
|
|
454
|
+
const D = _t(y, t);
|
|
455
|
+
return a.set(y, D), D;
|
|
453
456
|
};
|
|
454
|
-
}, [Xe]), [
|
|
457
|
+
}, [Xe]), [ye, Jt] = _r(), ee = $r(o, fe, ye), he = Wr(
|
|
455
458
|
o,
|
|
456
459
|
fe,
|
|
457
|
-
|
|
458
|
-
), { data: ce } = je(c), te = qo(((
|
|
460
|
+
ye && !T.record && !T.sample
|
|
461
|
+
), { data: ce } = je(c), te = qo(((Ot = ce == null ? void 0 : ce.layout) == null ? void 0 : Ot.conditions) ?? ((Rt = e == null ? void 0 : e.layout) == null ? void 0 : Rt.conditions)), I = Mt(ce == null ? void 0 : ce.layout) ?? Mt(e == null ? void 0 : e.layout) ?? (te ? "note" : null), [ve, Ee] = P({ reason: "", ticket: "" }), [et, tt] = P(null), Ie = z(ve);
|
|
459
462
|
Ie.current = ve;
|
|
460
463
|
const ot = L(async () => {
|
|
461
|
-
const
|
|
464
|
+
const t = I ? {
|
|
462
465
|
...ur(Ie.current),
|
|
463
466
|
...te ? { freeze_override: Ie.current.reason.trim() } : {}
|
|
464
467
|
} : void 0;
|
|
465
|
-
await n.save(
|
|
468
|
+
await n.save(t);
|
|
466
469
|
const a = n.unsavedOps().length === 0;
|
|
467
|
-
return a &&
|
|
470
|
+
return a && t && Ee((y) => ({ ...y, reason: "" })), a;
|
|
468
471
|
}, [n.save, n.unsavedOps, I, te]), rt = L(() => {
|
|
469
|
-
var
|
|
472
|
+
var t, a;
|
|
470
473
|
return I ? (n.unsavedOps().length > 0 && tt(
|
|
471
|
-
((
|
|
474
|
+
((t = _.current) == null ? void 0 : t.querySelector("[data-editor-save]")) ?? ((a = _.current) == null ? void 0 : a.querySelector("[data-editor-topbar]")) ?? null
|
|
472
475
|
), Promise.resolve()) : n.save();
|
|
473
476
|
}, [I, n.save, n.unsavedOps]);
|
|
474
477
|
B(() => {
|
|
@@ -476,17 +479,17 @@ function hi({
|
|
|
476
479
|
}, [I, n.autosave, n.setAutosave]);
|
|
477
480
|
const Xt = I ? { ...n, save: rt, setAutosave: void 0 } : n;
|
|
478
481
|
pa(I ? { ...n, save: rt } : n), fa(n);
|
|
479
|
-
const
|
|
482
|
+
const _ = z(null), [eo, nt] = P(null), at = z(n.dirty);
|
|
480
483
|
at.current = n.dirty;
|
|
481
|
-
const ae = L((
|
|
484
|
+
const ae = L((t, a, y) => {
|
|
482
485
|
var D, ke;
|
|
483
486
|
if (!at.current) return a();
|
|
484
|
-
const S = ((D =
|
|
485
|
-
nt({ what:
|
|
487
|
+
const S = ((D = _.current) == null ? void 0 : D.querySelector("[data-editor-save]")) ?? ((ke = _.current) == null ? void 0 : ke.querySelector("[data-editor-topbar]")) ?? null;
|
|
488
|
+
nt({ what: t, go: a, anchor: y ?? S });
|
|
486
489
|
}, []), to = ot;
|
|
487
|
-
va(n.dirty, (
|
|
488
|
-
|
|
489
|
-
}, [n.dirty,
|
|
490
|
+
va(n.dirty, (t, a) => ae("leave this page", t, a)), B(() => {
|
|
491
|
+
g == null || g(n.dirty);
|
|
492
|
+
}, [n.dirty, g]);
|
|
490
493
|
const st = z(n.unsavedOps);
|
|
491
494
|
st.current = n.unsavedOps, B(
|
|
492
495
|
() => () => {
|
|
@@ -495,195 +498,200 @@ function hi({
|
|
|
495
498
|
[]
|
|
496
499
|
);
|
|
497
500
|
const it = Ht(o), lt = L(() => {
|
|
498
|
-
const
|
|
499
|
-
|
|
501
|
+
const t = n.whenIdle();
|
|
502
|
+
t.then(() => it()), s(t);
|
|
500
503
|
}, [n.whenIdle, it, s]), De = L(
|
|
501
|
-
(
|
|
504
|
+
(t) => ae(l === "overlay" ? "go back to the record" : "leave this form", lt, t),
|
|
502
505
|
[ae, lt, l]
|
|
503
506
|
);
|
|
504
507
|
B(() => {
|
|
505
|
-
if (!
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
}, [
|
|
509
|
-
const se = l === "overlay", [Fe, oo] = P(null), Ke = z(!1), ro = L((
|
|
510
|
-
Ke.current =
|
|
511
|
-
}, []), no = ga(se && Fe != null, () => De(), Ke),
|
|
512
|
-
F((
|
|
513
|
-
}, []), dt = L((
|
|
508
|
+
if (!e || v.length === 0) return;
|
|
509
|
+
const t = v.filter((a) => Ge(a, e, C));
|
|
510
|
+
t.length !== v.length && F(t);
|
|
511
|
+
}, [v, e, C]);
|
|
512
|
+
const se = l === "overlay", [Fe, oo] = P(null), Ke = z(!1), ro = L((t) => {
|
|
513
|
+
Ke.current = t;
|
|
514
|
+
}, []), no = ga(se && Fe != null, () => De(), Ke), O = L((t, a) => {
|
|
515
|
+
F((y) => wr(y, t, a)), N("inspector");
|
|
516
|
+
}, []), dt = L((t) => F([t]), []), M = Er(e, n.apply), ao = b(() => M.intercept(O), [M.intercept, O]), [_e, so] = P(!1), Me = Dr(), Be = b(
|
|
514
517
|
() => ({
|
|
515
|
-
tabOrderActive:
|
|
518
|
+
tabOrderActive: M.active,
|
|
516
519
|
startTabOrder: () => {
|
|
517
|
-
V("canvas"),
|
|
520
|
+
V("canvas"), M.start();
|
|
518
521
|
}
|
|
519
522
|
}),
|
|
520
|
-
[
|
|
523
|
+
[M.active, M.start]
|
|
521
524
|
), ct = L(
|
|
522
|
-
(
|
|
523
|
-
if (
|
|
524
|
-
if (
|
|
525
|
-
|
|
525
|
+
(t, a) => {
|
|
526
|
+
if (t.kind === "group") return O({ kind: "group", key: t.key });
|
|
527
|
+
if (t.kind === "tab") {
|
|
528
|
+
O(a), (a.kind === "field" || a.kind === "header") && Xr(a.field, t.tab);
|
|
526
529
|
return;
|
|
527
530
|
}
|
|
528
|
-
if (
|
|
531
|
+
if (t.kind === "pipeline")
|
|
529
532
|
return ae(
|
|
530
533
|
"open the pipeline",
|
|
531
|
-
() => p.navigate(`/pipelines/${encodeURIComponent(
|
|
534
|
+
() => p.navigate(`/pipelines/${encodeURIComponent(t.id)}`)
|
|
532
535
|
);
|
|
533
536
|
ae(
|
|
534
537
|
"open the field rules",
|
|
535
538
|
() => p.navigate(`/data-model/${encodeURIComponent(o)}?tab=rules`)
|
|
536
539
|
);
|
|
537
540
|
},
|
|
538
|
-
[
|
|
539
|
-
), io =
|
|
540
|
-
const
|
|
541
|
-
for (const [a,
|
|
542
|
-
(
|
|
543
|
-
return
|
|
544
|
-
|
|
545
|
-
|
|
541
|
+
[O, ae, p, o]
|
|
542
|
+
), io = b(() => {
|
|
543
|
+
const t = /* @__PURE__ */ new Map();
|
|
544
|
+
for (const [a, y] of he)
|
|
545
|
+
(y.type === "boolean" || y.text.endsWith(" linked")) && t.set(a, y.text);
|
|
546
|
+
return Mr(ee, {
|
|
547
|
+
chips: ye,
|
|
548
|
+
readOnlyView: (e == null ? void 0 : e.layout.layout_type) === "summary",
|
|
549
|
+
ghostTags: t,
|
|
550
|
+
open: ct
|
|
551
|
+
});
|
|
552
|
+
}, [ee, ye, he, ct, e == null ? void 0 : e.layout.layout_type]), lo = b(
|
|
553
|
+
() => he.size > 0 ? (t) => {
|
|
546
554
|
var a;
|
|
547
|
-
return ((a =
|
|
555
|
+
return ((a = he.get(t)) == null ? void 0 : a.text) ?? null;
|
|
548
556
|
} : void 0,
|
|
549
|
-
[
|
|
557
|
+
[he]
|
|
550
558
|
), co = L(
|
|
551
|
-
(
|
|
552
|
-
const a =
|
|
559
|
+
(t) => {
|
|
560
|
+
const a = e == null ? void 0 : e.placements.find((S) => S.field === t);
|
|
553
561
|
if (!a) return;
|
|
554
|
-
const
|
|
555
|
-
|
|
562
|
+
const y = a.group_key === Wt ? { kind: "header", field: t } : { kind: "field", field: t, group_key: a.group_key };
|
|
563
|
+
O(y), requestAnimationFrame(
|
|
556
564
|
() => {
|
|
557
565
|
var S, D;
|
|
558
|
-
return (D = (S = document.querySelector(`[data-layout-editor] [data-design-target="${CSS.escape($(
|
|
566
|
+
return (D = (S = document.querySelector(`[data-layout-editor] [data-design-target="${CSS.escape($(y))}"]`)) == null ? void 0 : S.scrollIntoView) == null ? void 0 : D.call(S, { block: "center" });
|
|
559
567
|
}
|
|
560
568
|
);
|
|
561
569
|
},
|
|
562
|
-
[
|
|
570
|
+
[e, O]
|
|
563
571
|
);
|
|
564
|
-
ma(
|
|
572
|
+
ma(e, v, n.apply, Ke, dt);
|
|
565
573
|
const uo = L(
|
|
566
|
-
(
|
|
574
|
+
(t) => zr(t, ee.describe),
|
|
567
575
|
[ee.describe]
|
|
568
|
-
), po = Tr(o, ee.deps, uo, ee.groupLabel), mo =
|
|
576
|
+
), po = Tr(o, ee.deps, uo, ee.groupLabel), mo = b(
|
|
569
577
|
() => ({ run: n.undo, label: n.undoLabel }),
|
|
570
578
|
[n.undo, n.undoLabel]
|
|
571
|
-
), qe = An(c, W ? $(W) : null), ut =
|
|
572
|
-
(
|
|
579
|
+
), qe = An(c, W ? $(W) : null), ut = b(() => En(qe), [qe]), fo = L(
|
|
580
|
+
(t) => (ut.get($(t)) ?? []).map((a) => ({
|
|
573
581
|
id: a.id,
|
|
574
582
|
name: a.name,
|
|
575
583
|
outline: a.tone.outline,
|
|
576
584
|
chip: a.tone.chip
|
|
577
585
|
})),
|
|
578
586
|
[ut]
|
|
579
|
-
), pt =
|
|
580
|
-
V("canvas"), F([
|
|
581
|
-
var
|
|
587
|
+
), pt = b(() => ea(n.unsavedSteps), [n.unsavedSteps]), yo = L((t) => pt.has($(t)), [pt]), [mt, Ce] = P(null), ft = L((t) => {
|
|
588
|
+
V("canvas"), F([t]), N("inspector"), requestAnimationFrame(() => {
|
|
589
|
+
var y;
|
|
582
590
|
const a = document.querySelector(
|
|
583
|
-
`[data-layout-editor] [data-design-target="${CSS.escape($(
|
|
591
|
+
`[data-layout-editor] [data-design-target="${CSS.escape($(t))}"]`
|
|
584
592
|
);
|
|
585
|
-
(
|
|
593
|
+
(y = a == null ? void 0 : a.scrollIntoView) == null || y.call(a, { block: "center" }), a == null || a.focus({ preventScroll: !0 });
|
|
586
594
|
});
|
|
587
|
-
}, []),
|
|
595
|
+
}, []), ho = $o(), j = Gn(c), yt = Zn(), vo = b(
|
|
588
596
|
() => {
|
|
589
|
-
var
|
|
597
|
+
var t, a;
|
|
590
598
|
return {
|
|
591
599
|
settled: j.isFetched || j.isError,
|
|
592
|
-
draft: ((
|
|
600
|
+
draft: ((t = j.data) == null ? void 0 : t.data) ?? null,
|
|
593
601
|
available: ((a = j.data) == null ? void 0 : a.available) ?? !j.isError,
|
|
594
|
-
writer:
|
|
602
|
+
writer: yt
|
|
595
603
|
};
|
|
596
604
|
},
|
|
597
|
-
[j.isFetched, j.isError, j.data,
|
|
598
|
-
),
|
|
599
|
-
(
|
|
605
|
+
[j.isFetched, j.isError, j.data, yt]
|
|
606
|
+
), Oe = Lr(n, c, ho, vo), go = L(
|
|
607
|
+
(t) => J((a) => a.roleId === t ? a : { ...a, roleId: t }),
|
|
600
608
|
[]
|
|
601
|
-
), oe = (
|
|
609
|
+
), oe = (t) => {
|
|
602
610
|
var S;
|
|
603
|
-
if (N("inspector"),
|
|
604
|
-
const a = document.activeElement,
|
|
611
|
+
if (N("inspector"), t === c) return;
|
|
612
|
+
const a = document.activeElement, y = a instanceof HTMLElement && ((S = _.current) != null && S.contains(a)) ? a : null;
|
|
605
613
|
ae(
|
|
606
614
|
"open another form",
|
|
607
615
|
() => {
|
|
608
|
-
n.flush(), F([]),
|
|
616
|
+
n.flush(), F([]), k(t), m == null || m(t);
|
|
609
617
|
},
|
|
610
|
-
|
|
618
|
+
y
|
|
611
619
|
);
|
|
612
|
-
}, ko = Un(o,
|
|
613
|
-
(
|
|
614
|
-
bundle:
|
|
615
|
-
selection:
|
|
620
|
+
}, ko = Un(o, e, (A == null ? void 0 : A.rows) ?? [], oe), wo = L(
|
|
621
|
+
(t) => e ? rr(t, {
|
|
622
|
+
bundle: e,
|
|
623
|
+
selection: v,
|
|
616
624
|
select: (a) => {
|
|
617
625
|
F([a]), N("inspector");
|
|
618
626
|
},
|
|
619
627
|
openSettings: () => N("settings"),
|
|
620
628
|
openAddPanel: () => re("add"),
|
|
621
|
-
root:
|
|
629
|
+
root: _.current
|
|
622
630
|
}) : Promise.resolve({ ok: !1, message: "The form is still loading" }),
|
|
623
|
-
[
|
|
624
|
-
),
|
|
625
|
-
|
|
631
|
+
[e, v]
|
|
632
|
+
), ht = z(oe);
|
|
633
|
+
ht.current = oe;
|
|
626
634
|
const bo = L(
|
|
627
|
-
(
|
|
628
|
-
if (
|
|
629
|
-
J((a) => ({ ...a, record: { id:
|
|
630
|
-
else if (
|
|
635
|
+
(t) => {
|
|
636
|
+
if (t.kind === "record")
|
|
637
|
+
J((a) => ({ ...a, record: { id: t.id, label: `#${t.id}` }, sample: null }));
|
|
638
|
+
else if (t.kind === "layout") ht.current(t.id);
|
|
631
639
|
else {
|
|
632
|
-
const a =
|
|
633
|
-
if (!a) return It.info(`${
|
|
634
|
-
const
|
|
635
|
-
|
|
640
|
+
const a = e == null ? void 0 : e.placements.find((S) => S.field === t.field);
|
|
641
|
+
if (!a) return It.info(`${t.label} is not on this form`);
|
|
642
|
+
const y = { kind: "field", field: a.field, group_key: a.group_key };
|
|
643
|
+
O(y), requestAnimationFrame(
|
|
636
644
|
() => {
|
|
637
645
|
var S, D, ke;
|
|
638
|
-
return (ke = (D = (S =
|
|
646
|
+
return (ke = (D = (S = _.current) == null ? void 0 : S.querySelector(`[data-design-target="${CSS.escape($(y))}"]`)) == null ? void 0 : D.scrollIntoView) == null ? void 0 : ke.call(D, { block: "center" });
|
|
639
647
|
}
|
|
640
648
|
);
|
|
641
649
|
}
|
|
642
650
|
},
|
|
643
|
-
[
|
|
644
|
-
), ge = String((
|
|
645
|
-
bodyRef:
|
|
646
|
-
bundle:
|
|
651
|
+
[e, O]
|
|
652
|
+
), ge = String((e == null ? void 0 : e.layout.name) ?? (f == null ? void 0 : f.name) ?? ""), Ue = String((e == null ? void 0 : e.layout.layout_type) ?? (f == null ? void 0 : f.layout_type) ?? "grouped"), w = Ue !== "table" && Ue !== "file", x = yn({
|
|
653
|
+
bodyRef: _,
|
|
654
|
+
bundle: e,
|
|
647
655
|
parent: C,
|
|
648
656
|
fields: E,
|
|
649
|
-
onSelect:
|
|
657
|
+
onSelect: O,
|
|
650
658
|
showHidden: Y,
|
|
651
659
|
setShowHidden: Te,
|
|
652
|
-
canvasShown: !(
|
|
653
|
-
}), vt = x.outlineOpen && !!
|
|
660
|
+
canvasShown: !(w && R === "table")
|
|
661
|
+
}), vt = x.outlineOpen && !!e && w, gt = z(null), ze = vn(x.zoom, x.compact), { zoom: kt, setZoom: $e, compact: wt } = x, bt = Fn(
|
|
654
662
|
T.device,
|
|
655
663
|
T.roleId && T.compareRoleId ? 2 : 1
|
|
656
|
-
), xt =
|
|
664
|
+
), xt = b(
|
|
657
665
|
() => ({
|
|
658
666
|
value: kt,
|
|
659
667
|
onChange: $e,
|
|
660
668
|
onFit: () => {
|
|
661
|
-
var
|
|
662
|
-
return $e(
|
|
669
|
+
var t;
|
|
670
|
+
return $e(hn(((t = gt.current) == null ? void 0 : t.clientWidth) ?? 0, bt, wt));
|
|
663
671
|
}
|
|
664
672
|
}),
|
|
665
673
|
[kt, $e, wt, bt]
|
|
666
|
-
), St = p.warning ?? (A == null ? void 0 : A.warning) ?? null, We =
|
|
667
|
-
bundle:
|
|
674
|
+
), St = p.warning ?? (A == null ? void 0 : A.warning) ?? null, We = On({
|
|
675
|
+
bundle: e,
|
|
668
676
|
savedBundle: Je ?? null,
|
|
669
677
|
collection: o,
|
|
670
678
|
layoutId: c,
|
|
671
679
|
layoutName: ge,
|
|
672
680
|
fields: E,
|
|
673
|
-
selection:
|
|
681
|
+
selection: v,
|
|
674
682
|
apply: n.apply,
|
|
675
683
|
onSelection: F,
|
|
676
|
-
rootRef:
|
|
684
|
+
rootRef: _
|
|
677
685
|
}), xo = se ? {
|
|
678
686
|
role: "dialog",
|
|
679
687
|
"aria-modal": !0,
|
|
680
688
|
"aria-label": `Edit form ${ge}`,
|
|
681
689
|
tabIndex: -1
|
|
682
|
-
} : {}, So = /* @__PURE__ */
|
|
690
|
+
} : {}, So = /* @__PURE__ */ h(
|
|
683
691
|
"div",
|
|
684
692
|
{
|
|
685
|
-
ref: (
|
|
686
|
-
|
|
693
|
+
ref: (t) => {
|
|
694
|
+
_.current = t, se && (no.current = t);
|
|
687
695
|
},
|
|
688
696
|
"data-layout-editor": "",
|
|
689
697
|
"data-mode": l,
|
|
@@ -713,55 +721,55 @@ function hi({
|
|
|
713
721
|
onReviewChanges: X.toggleReview,
|
|
714
722
|
reviewing: ((Pt = X.compare) == null ? void 0 : Pt.kind) === "unsaved",
|
|
715
723
|
onOpenUnsaved: Ce,
|
|
716
|
-
pendingTip: Cr(
|
|
717
|
-
presence: /* @__PURE__ */
|
|
724
|
+
pendingTip: Cr(Oe.sync),
|
|
725
|
+
presence: /* @__PURE__ */ h(ie, { children: [
|
|
718
726
|
/* @__PURE__ */ r(
|
|
719
|
-
|
|
727
|
+
yr,
|
|
720
728
|
{
|
|
721
729
|
peers: qe,
|
|
722
|
-
describe: (
|
|
723
|
-
const a = Ut(
|
|
724
|
-
return a &&
|
|
730
|
+
describe: (t) => {
|
|
731
|
+
const a = Ut(t);
|
|
732
|
+
return a && e && Ge(a, e, C) ? zt(a, e, E) : null;
|
|
725
733
|
},
|
|
726
|
-
onJump: (
|
|
727
|
-
const a = Ut(
|
|
734
|
+
onJump: (t) => {
|
|
735
|
+
const a = Ut(t);
|
|
728
736
|
a && ft(a);
|
|
729
737
|
}
|
|
730
738
|
}
|
|
731
739
|
),
|
|
732
740
|
/* @__PURE__ */ r($n, { others: ((Nt = j.data) == null ? void 0 : Nt.others) ?? [] })
|
|
733
741
|
] }),
|
|
734
|
-
onSelectField: (
|
|
742
|
+
onSelectField: (t) => {
|
|
735
743
|
var a;
|
|
736
|
-
return
|
|
744
|
+
return O({
|
|
737
745
|
kind: "field",
|
|
738
|
-
field:
|
|
739
|
-
group_key: ((a =
|
|
746
|
+
field: t,
|
|
747
|
+
group_key: ((a = e == null ? void 0 : e.placements.find((y) => y.field === t)) == null ? void 0 : a.group_key) ?? null
|
|
740
748
|
});
|
|
741
749
|
},
|
|
742
|
-
view:
|
|
743
|
-
/* @__PURE__ */ r(ba, { view:
|
|
744
|
-
/* @__PURE__ */ r(Br, { on:
|
|
750
|
+
view: e && w ? /* @__PURE__ */ h(ie, { children: [
|
|
751
|
+
/* @__PURE__ */ r(ba, { view: R, onView: V }),
|
|
752
|
+
/* @__PURE__ */ r(Br, { on: ye, onChange: Jt })
|
|
745
753
|
] }) : null,
|
|
746
|
-
tools: /* @__PURE__ */
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
/* @__PURE__ */ r(
|
|
752
|
-
|
|
754
|
+
tools: /* @__PURE__ */ h(ie, { children: [
|
|
755
|
+
e && w && /* @__PURE__ */ r(Qo, { bundle: e, apply: n.apply }),
|
|
756
|
+
e && /* @__PURE__ */ r(cn, { find: x.find }),
|
|
757
|
+
e && w && /* @__PURE__ */ r(Vr, { bundle: e, apply: n.apply, collection: o }),
|
|
758
|
+
e && w && /* @__PURE__ */ r(kn, { bundle: e, apply: n.apply, collection: o }),
|
|
759
|
+
/* @__PURE__ */ r(Re, {}),
|
|
760
|
+
e && /* @__PURE__ */ r(
|
|
753
761
|
un,
|
|
754
762
|
{
|
|
755
|
-
outline:
|
|
763
|
+
outline: w ? {
|
|
756
764
|
open: x.outlineOpen,
|
|
757
765
|
onToggle: () => x.setOutlineOpen(!x.outlineOpen)
|
|
758
766
|
} : null
|
|
759
767
|
}
|
|
760
768
|
),
|
|
761
|
-
|
|
769
|
+
e && /* @__PURE__ */ r(
|
|
762
770
|
pn,
|
|
763
771
|
{
|
|
764
|
-
view:
|
|
772
|
+
view: w && R === "canvas" ? {
|
|
765
773
|
compact: x.compact,
|
|
766
774
|
onCompact: x.setCompact,
|
|
767
775
|
onExpandAll: x.expandAll,
|
|
@@ -770,7 +778,7 @@ function hi({
|
|
|
770
778
|
} : null
|
|
771
779
|
}
|
|
772
780
|
),
|
|
773
|
-
|
|
781
|
+
e && w && /* @__PURE__ */ r(
|
|
774
782
|
He,
|
|
775
783
|
{
|
|
776
784
|
label: "Show how full each field is",
|
|
@@ -781,38 +789,38 @@ function hi({
|
|
|
781
789
|
data: { "data-editor-fill-toggle": "" }
|
|
782
790
|
}
|
|
783
791
|
),
|
|
784
|
-
|
|
792
|
+
e && w && /* @__PURE__ */ r(
|
|
785
793
|
He,
|
|
786
794
|
{
|
|
787
795
|
label: "Show where saves fail",
|
|
788
|
-
icon: /* @__PURE__ */ r(
|
|
796
|
+
icon: /* @__PURE__ */ r(Oo, { className: "h-3.5 w-3.5" }),
|
|
789
797
|
hint: "Tint each field by how often a save is refused on it",
|
|
790
798
|
checked: de.on,
|
|
791
799
|
onClick: () => de.setOn(!de.on),
|
|
792
800
|
data: { "data-editor-refusal-toggle": "" }
|
|
793
801
|
}
|
|
794
802
|
),
|
|
795
|
-
|
|
803
|
+
e && w && /* @__PURE__ */ r(
|
|
796
804
|
He,
|
|
797
805
|
{
|
|
798
806
|
label: "Set the tab order",
|
|
799
|
-
icon: /* @__PURE__ */ r(
|
|
807
|
+
icon: /* @__PURE__ */ r(Ro, { className: "h-3.5 w-3.5" }),
|
|
800
808
|
hint: "Click fields in the order Tab should visit them",
|
|
801
|
-
checked:
|
|
802
|
-
onClick: () =>
|
|
809
|
+
checked: M.active,
|
|
810
|
+
onClick: () => M.active ? M.cancel() : Be.startTabOrder(),
|
|
803
811
|
data: { "data-editor-tab-order-toggle": "" }
|
|
804
812
|
}
|
|
805
813
|
),
|
|
806
|
-
|
|
814
|
+
e && w && /* @__PURE__ */ r(
|
|
807
815
|
Fr,
|
|
808
816
|
{
|
|
809
|
-
on:
|
|
817
|
+
on: _e,
|
|
810
818
|
onChange: so,
|
|
811
|
-
appDark:
|
|
812
|
-
disabled:
|
|
819
|
+
appDark: Me,
|
|
820
|
+
disabled: R !== "canvas"
|
|
813
821
|
}
|
|
814
822
|
),
|
|
815
|
-
/* @__PURE__ */ r(
|
|
823
|
+
/* @__PURE__ */ r(Re, {}),
|
|
816
824
|
/* @__PURE__ */ r(
|
|
817
825
|
ar,
|
|
818
826
|
{
|
|
@@ -822,12 +830,12 @@ function hi({
|
|
|
822
830
|
recorder: be
|
|
823
831
|
}
|
|
824
832
|
),
|
|
825
|
-
/* @__PURE__ */ r(Hr, { bundle:
|
|
826
|
-
/* @__PURE__ */ r(
|
|
827
|
-
|
|
833
|
+
/* @__PURE__ */ r(Hr, { bundle: e, collection: o }),
|
|
834
|
+
/* @__PURE__ */ r(Re, {}),
|
|
835
|
+
e && /* @__PURE__ */ r(mn, { shortcuts: x.shortcuts })
|
|
828
836
|
] }),
|
|
829
|
-
ai: /* @__PURE__ */
|
|
830
|
-
|
|
837
|
+
ai: /* @__PURE__ */ h(ie, { children: [
|
|
838
|
+
e && w && /* @__PURE__ */ r(
|
|
831
839
|
Xo,
|
|
832
840
|
{
|
|
833
841
|
collection: o,
|
|
@@ -836,54 +844,54 @@ function hi({
|
|
|
836
844
|
onOpenLayout: oe
|
|
837
845
|
}
|
|
838
846
|
),
|
|
839
|
-
|
|
847
|
+
e && /* @__PURE__ */ r(
|
|
840
848
|
Yo,
|
|
841
849
|
{
|
|
842
850
|
collection: o,
|
|
843
851
|
layoutId: c,
|
|
844
|
-
bundle:
|
|
852
|
+
bundle: e,
|
|
845
853
|
apply: n.apply,
|
|
846
854
|
previewRecordShown: T.record != null,
|
|
847
855
|
onPins: Qt,
|
|
848
|
-
onSelect:
|
|
856
|
+
onSelect: O
|
|
849
857
|
}
|
|
850
858
|
),
|
|
851
|
-
/* @__PURE__ */ r(
|
|
852
|
-
|
|
859
|
+
/* @__PURE__ */ r(Re, {}),
|
|
860
|
+
e && p.isAdmin && /* @__PURE__ */ r(
|
|
853
861
|
er,
|
|
854
862
|
{
|
|
855
863
|
active: U === "ask",
|
|
856
|
-
onClick: () => N((
|
|
864
|
+
onClick: () => N((t) => t === "ask" ? "inspector" : "ask")
|
|
857
865
|
}
|
|
858
866
|
),
|
|
859
867
|
/* @__PURE__ */ r(kr, { collection: o, layoutId: c, draft: n }),
|
|
860
|
-
|
|
868
|
+
e && /* @__PURE__ */ r(nr, { layoutId: c, draft: n })
|
|
861
869
|
] }),
|
|
862
|
-
testing:
|
|
870
|
+
testing: e ? /* @__PURE__ */ r(
|
|
863
871
|
Yn,
|
|
864
872
|
{
|
|
865
873
|
collection: o,
|
|
866
874
|
layoutId: c,
|
|
867
|
-
bundle:
|
|
875
|
+
bundle: e,
|
|
868
876
|
parent: C,
|
|
869
877
|
apply: n.apply,
|
|
870
878
|
dirty: n.dirty,
|
|
871
879
|
fields: E
|
|
872
880
|
}
|
|
873
881
|
) : null,
|
|
874
|
-
beforeSave:
|
|
882
|
+
beforeSave: e ? /* @__PURE__ */ r(
|
|
875
883
|
Qn,
|
|
876
884
|
{
|
|
877
885
|
collection: o,
|
|
878
886
|
layoutId: c,
|
|
879
|
-
bundle:
|
|
887
|
+
bundle: e,
|
|
880
888
|
parent: C,
|
|
881
889
|
apply: n.apply,
|
|
882
890
|
dirty: n.dirty,
|
|
883
891
|
fields: E
|
|
884
892
|
}
|
|
885
893
|
) : null,
|
|
886
|
-
previewExtra: /* @__PURE__ */
|
|
894
|
+
previewExtra: /* @__PURE__ */ h(ie, { children: [
|
|
887
895
|
/* @__PURE__ */ r(
|
|
888
896
|
In,
|
|
889
897
|
{
|
|
@@ -896,19 +904,19 @@ function hi({
|
|
|
896
904
|
),
|
|
897
905
|
/* @__PURE__ */ r(jo, { scope: Ft, options: Gt })
|
|
898
906
|
] }),
|
|
899
|
-
problems:
|
|
907
|
+
problems: e && /* @__PURE__ */ r(
|
|
900
908
|
nn,
|
|
901
909
|
{
|
|
902
910
|
findings: Le.findings,
|
|
903
911
|
active: U === "checks",
|
|
904
|
-
onClick: () => N((
|
|
912
|
+
onClick: () => N((t) => t === "checks" ? "inspector" : "checks")
|
|
905
913
|
}
|
|
906
914
|
),
|
|
907
915
|
more: /* @__PURE__ */ r(
|
|
908
|
-
|
|
916
|
+
_n,
|
|
909
917
|
{
|
|
910
918
|
collection: o,
|
|
911
|
-
bundle:
|
|
919
|
+
bundle: e,
|
|
912
920
|
previewRecord: T.record,
|
|
913
921
|
onOpenLayout: oe
|
|
914
922
|
}
|
|
@@ -927,7 +935,7 @@ function hi({
|
|
|
927
935
|
onDone: De
|
|
928
936
|
}
|
|
929
937
|
),
|
|
930
|
-
n.status === "conflict" && n.dirty && /* @__PURE__ */
|
|
938
|
+
n.status === "conflict" && n.dirty && /* @__PURE__ */ h(
|
|
931
939
|
"div",
|
|
932
940
|
{
|
|
933
941
|
role: "alert",
|
|
@@ -938,11 +946,11 @@ function hi({
|
|
|
938
946
|
),
|
|
939
947
|
children: [
|
|
940
948
|
/* @__PURE__ */ r(Et, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
941
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1", children: [
|
|
942
950
|
n.error ?? "Someone else saved this form",
|
|
943
951
|
". Save again to try once more, or reload their version."
|
|
944
952
|
] }),
|
|
945
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ h(
|
|
946
954
|
"button",
|
|
947
955
|
{
|
|
948
956
|
type: "button",
|
|
@@ -959,16 +967,16 @@ function hi({
|
|
|
959
967
|
]
|
|
960
968
|
}
|
|
961
969
|
),
|
|
962
|
-
/* @__PURE__ */ r(
|
|
970
|
+
/* @__PURE__ */ r(hr, { labels: n.dropped, onDismiss: n.clearDropped }),
|
|
963
971
|
/* @__PURE__ */ r(
|
|
964
972
|
vr,
|
|
965
973
|
{
|
|
966
|
-
state:
|
|
967
|
-
onRecover:
|
|
968
|
-
onDismiss:
|
|
974
|
+
state: Oe.state,
|
|
975
|
+
onRecover: Oe.recover,
|
|
976
|
+
onDismiss: Oe.dismiss
|
|
969
977
|
}
|
|
970
978
|
),
|
|
971
|
-
St && /* @__PURE__ */
|
|
979
|
+
St && /* @__PURE__ */ h(
|
|
972
980
|
"div",
|
|
973
981
|
{
|
|
974
982
|
role: "note",
|
|
@@ -982,7 +990,7 @@ function hi({
|
|
|
982
990
|
]
|
|
983
991
|
}
|
|
984
992
|
),
|
|
985
|
-
te && /* @__PURE__ */
|
|
993
|
+
te && /* @__PURE__ */ h(
|
|
986
994
|
"div",
|
|
987
995
|
{
|
|
988
996
|
role: "note",
|
|
@@ -1001,15 +1009,15 @@ function hi({
|
|
|
1001
1009
|
/* @__PURE__ */ r(
|
|
1002
1010
|
br,
|
|
1003
1011
|
{
|
|
1004
|
-
bundle:
|
|
1012
|
+
bundle: e,
|
|
1005
1013
|
apply: n.apply,
|
|
1006
1014
|
onDragActive: ro,
|
|
1007
1015
|
onDropOnLayout: ko,
|
|
1008
|
-
selection:
|
|
1016
|
+
selection: v,
|
|
1009
1017
|
undo: mo,
|
|
1010
1018
|
warnTrash: po,
|
|
1011
|
-
children: /* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */
|
|
1019
|
+
children: /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
1020
|
+
/* @__PURE__ */ h(
|
|
1013
1021
|
"aside",
|
|
1014
1022
|
{
|
|
1015
1023
|
className: G(
|
|
@@ -1017,7 +1025,7 @@ function hi({
|
|
|
1017
1025
|
vt && "hidden"
|
|
1018
1026
|
),
|
|
1019
1027
|
children: [
|
|
1020
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ h(
|
|
1021
1029
|
"div",
|
|
1022
1030
|
{
|
|
1023
1031
|
role: "tablist",
|
|
@@ -1036,7 +1044,7 @@ function hi({
|
|
|
1036
1044
|
children: "Forms"
|
|
1037
1045
|
}
|
|
1038
1046
|
),
|
|
1039
|
-
/* @__PURE__ */
|
|
1047
|
+
/* @__PURE__ */ h(
|
|
1040
1048
|
"button",
|
|
1041
1049
|
{
|
|
1042
1050
|
type: "button",
|
|
@@ -1045,7 +1053,7 @@ function hi({
|
|
|
1045
1053
|
"data-editor-tab": "add",
|
|
1046
1054
|
className: Ze(q === "add"),
|
|
1047
1055
|
onClick: () => re("add"),
|
|
1048
|
-
disabled: !
|
|
1056
|
+
disabled: !e,
|
|
1049
1057
|
"data-tip": "Add a field, section, panel or widget after the selection",
|
|
1050
1058
|
children: [
|
|
1051
1059
|
/* @__PURE__ */ r(No, { className: "h-3.5 w-3.5" }),
|
|
@@ -1053,7 +1061,7 @@ function hi({
|
|
|
1053
1061
|
]
|
|
1054
1062
|
}
|
|
1055
1063
|
),
|
|
1056
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ h(
|
|
1057
1065
|
"button",
|
|
1058
1066
|
{
|
|
1059
1067
|
type: "button",
|
|
@@ -1062,7 +1070,7 @@ function hi({
|
|
|
1062
1070
|
"data-editor-tab": "usage",
|
|
1063
1071
|
className: Ze(q === "usage"),
|
|
1064
1072
|
onClick: () => re("usage"),
|
|
1065
|
-
disabled: !
|
|
1073
|
+
disabled: !e,
|
|
1066
1074
|
"data-tip": "How this form is used and where it slows people down",
|
|
1067
1075
|
children: [
|
|
1068
1076
|
/* @__PURE__ */ r(Ao, { className: "h-3.5 w-3.5" }),
|
|
@@ -1073,20 +1081,20 @@ function hi({
|
|
|
1073
1081
|
]
|
|
1074
1082
|
}
|
|
1075
1083
|
),
|
|
1076
|
-
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto", children: q === "add" &&
|
|
1084
|
+
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto", children: q === "add" && e ? /* @__PURE__ */ r(
|
|
1077
1085
|
Zo,
|
|
1078
1086
|
{
|
|
1079
|
-
bundle:
|
|
1087
|
+
bundle: e,
|
|
1080
1088
|
collection: o,
|
|
1081
1089
|
selected: W,
|
|
1082
1090
|
apply: n.apply,
|
|
1083
|
-
onSelect:
|
|
1091
|
+
onSelect: O,
|
|
1084
1092
|
removed: le.entries
|
|
1085
1093
|
}
|
|
1086
|
-
) : q === "usage" &&
|
|
1094
|
+
) : q === "usage" && e ? /* @__PURE__ */ r(
|
|
1087
1095
|
oa,
|
|
1088
1096
|
{
|
|
1089
|
-
bundle:
|
|
1097
|
+
bundle: e,
|
|
1090
1098
|
collection: o,
|
|
1091
1099
|
fields: E,
|
|
1092
1100
|
apply: n.apply,
|
|
@@ -1108,7 +1116,7 @@ function hi({
|
|
|
1108
1116
|
]
|
|
1109
1117
|
}
|
|
1110
1118
|
),
|
|
1111
|
-
vt &&
|
|
1119
|
+
vt && e && /* @__PURE__ */ r(
|
|
1112
1120
|
"aside",
|
|
1113
1121
|
{
|
|
1114
1122
|
"data-editor-outline-panel": "",
|
|
@@ -1116,9 +1124,9 @@ function hi({
|
|
|
1116
1124
|
children: /* @__PURE__ */ r(
|
|
1117
1125
|
fn,
|
|
1118
1126
|
{
|
|
1119
|
-
bundle:
|
|
1127
|
+
bundle: e,
|
|
1120
1128
|
nodes: x.nodes,
|
|
1121
|
-
selection:
|
|
1129
|
+
selection: v,
|
|
1122
1130
|
onPick: x.selectAndReveal,
|
|
1123
1131
|
onMoved: dt,
|
|
1124
1132
|
apply: n.apply,
|
|
@@ -1127,75 +1135,75 @@ function hi({
|
|
|
1127
1135
|
)
|
|
1128
1136
|
}
|
|
1129
1137
|
),
|
|
1130
|
-
/* @__PURE__ */
|
|
1131
|
-
|
|
1132
|
-
X.compare && (
|
|
1133
|
-
|
|
1138
|
+
/* @__PURE__ */ h("main", { ref: gt, className: "flex min-w-0 flex-1 flex-col overflow-y-auto", children: [
|
|
1139
|
+
R === "canvas" && /* @__PURE__ */ r(Ir, { editor: M }),
|
|
1140
|
+
X.compare && (R === "canvas" || !w) && /* @__PURE__ */ r(cr, { compare: X.compare, onClose: X.close }),
|
|
1141
|
+
e && w && R === "states" ? /* @__PURE__ */ r(
|
|
1134
1142
|
ln,
|
|
1135
1143
|
{
|
|
1136
|
-
bundle:
|
|
1144
|
+
bundle: e,
|
|
1137
1145
|
parent: C,
|
|
1138
1146
|
collection: o,
|
|
1139
1147
|
apply: n.apply,
|
|
1140
|
-
onSelect:
|
|
1148
|
+
onSelect: O
|
|
1141
1149
|
}
|
|
1142
|
-
) :
|
|
1150
|
+
) : e && w && R === "roles" ? /* @__PURE__ */ r(
|
|
1143
1151
|
dn,
|
|
1144
1152
|
{
|
|
1145
|
-
bundle:
|
|
1153
|
+
bundle: e,
|
|
1146
1154
|
parent: C,
|
|
1147
1155
|
apply: n.apply,
|
|
1148
|
-
onSelect:
|
|
1156
|
+
onSelect: O
|
|
1149
1157
|
}
|
|
1150
|
-
) :
|
|
1158
|
+
) : e && w && R === "table" ? /* @__PURE__ */ r(
|
|
1151
1159
|
Cn,
|
|
1152
1160
|
{
|
|
1153
|
-
bundle:
|
|
1161
|
+
bundle: e,
|
|
1154
1162
|
collection: o,
|
|
1155
1163
|
apply: n.apply,
|
|
1156
1164
|
flush: n.flush,
|
|
1157
|
-
selection:
|
|
1158
|
-
onSelect:
|
|
1165
|
+
selection: v,
|
|
1166
|
+
onSelect: O,
|
|
1159
1167
|
onSelection: F
|
|
1160
1168
|
}
|
|
1161
|
-
) :
|
|
1169
|
+
) : e ? /* @__PURE__ */ r(
|
|
1162
1170
|
"div",
|
|
1163
1171
|
{
|
|
1164
|
-
"data-canvas-density": x.compact &&
|
|
1165
|
-
"data-canvas-zoom":
|
|
1166
|
-
style:
|
|
1172
|
+
"data-canvas-density": x.compact && w ? "compact" : "normal",
|
|
1173
|
+
"data-canvas-zoom": w ? ze : void 0,
|
|
1174
|
+
style: w && ze !== 1 ? { zoom: ze } : void 0,
|
|
1167
1175
|
className: G(
|
|
1168
1176
|
"flex min-h-0 flex-1 flex-col",
|
|
1169
|
-
Kr(
|
|
1170
|
-
|
|
1177
|
+
Kr(_e, Me),
|
|
1178
|
+
_e && !Me && "bg-background text-foreground"
|
|
1171
1179
|
),
|
|
1172
1180
|
children: /* @__PURE__ */ r(
|
|
1173
1181
|
Dn,
|
|
1174
1182
|
{
|
|
1175
1183
|
collection: o,
|
|
1176
|
-
bundle:
|
|
1184
|
+
bundle: e,
|
|
1177
1185
|
parent: C,
|
|
1178
1186
|
preview: T,
|
|
1179
1187
|
onPreview: J,
|
|
1180
1188
|
record: T.sample ?? jt,
|
|
1181
1189
|
fields: E,
|
|
1182
|
-
renderPane: (
|
|
1190
|
+
renderPane: (t) => /* @__PURE__ */ r(
|
|
1183
1191
|
ka,
|
|
1184
1192
|
{
|
|
1185
1193
|
collection: o,
|
|
1186
|
-
bundle:
|
|
1194
|
+
bundle: e,
|
|
1187
1195
|
parent: C,
|
|
1188
|
-
roleId:
|
|
1189
|
-
stateKey:
|
|
1190
|
-
marks: Yt(
|
|
1191
|
-
overlay:
|
|
1196
|
+
roleId: t.roleId,
|
|
1197
|
+
stateKey: t.stateKey,
|
|
1198
|
+
marks: Yt(t.marks),
|
|
1199
|
+
overlay: M.overlay(de.wrap(t.overlay)),
|
|
1192
1200
|
ruleMarks: io,
|
|
1193
1201
|
ghost: lo,
|
|
1194
1202
|
deps: ee.deps,
|
|
1195
|
-
noDnd:
|
|
1196
|
-
record:
|
|
1203
|
+
noDnd: t.noDnd,
|
|
1204
|
+
record: t.record,
|
|
1197
1205
|
selected: W,
|
|
1198
|
-
selection:
|
|
1206
|
+
selection: v,
|
|
1199
1207
|
onSelect: ao,
|
|
1200
1208
|
showHidden: Y,
|
|
1201
1209
|
fold: x.fold,
|
|
@@ -1203,7 +1211,7 @@ function hi({
|
|
|
1203
1211
|
apply: n.apply,
|
|
1204
1212
|
whenIdle: n.whenIdle,
|
|
1205
1213
|
fillRate: Ne,
|
|
1206
|
-
unsaved:
|
|
1214
|
+
unsaved: yo,
|
|
1207
1215
|
peers: fo,
|
|
1208
1216
|
compare: X.compare,
|
|
1209
1217
|
lastChanges: X.compare ? void 0 : Zt
|
|
@@ -1212,24 +1220,24 @@ function hi({
|
|
|
1212
1220
|
}
|
|
1213
1221
|
)
|
|
1214
1222
|
}
|
|
1215
|
-
) : n.error ? /* @__PURE__ */ r("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */
|
|
1223
|
+
) : n.error ? /* @__PURE__ */ r("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: [
|
|
1216
1224
|
/* @__PURE__ */ r(Kt, { className: "h-10 w-full rounded-lg" }),
|
|
1217
1225
|
/* @__PURE__ */ r(Kt, { className: "h-48 w-full rounded-lg" })
|
|
1218
1226
|
] }),
|
|
1219
|
-
|
|
1227
|
+
e && w && R === "canvas" && /* @__PURE__ */ r(gn, { zoom: xt })
|
|
1220
1228
|
] }),
|
|
1221
1229
|
/* @__PURE__ */ r(
|
|
1222
1230
|
"aside",
|
|
1223
1231
|
{
|
|
1224
1232
|
"data-editor-inspector": "",
|
|
1225
1233
|
className: "flex w-[344px] shrink-0 flex-col overflow-hidden border-l border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
1226
|
-
children:
|
|
1234
|
+
children: e && (U === "ask" ? /* @__PURE__ */ r(
|
|
1227
1235
|
tr,
|
|
1228
1236
|
{
|
|
1229
1237
|
layoutId: c,
|
|
1230
1238
|
layoutName: ge,
|
|
1231
|
-
kind: jn(
|
|
1232
|
-
bundle:
|
|
1239
|
+
kind: jn(e.layout),
|
|
1240
|
+
bundle: e,
|
|
1233
1241
|
thread: Q,
|
|
1234
1242
|
setThread: ue,
|
|
1235
1243
|
pending: Pe,
|
|
@@ -1244,7 +1252,7 @@ function hi({
|
|
|
1244
1252
|
findings: Le.findings,
|
|
1245
1253
|
health: Le.health,
|
|
1246
1254
|
ready: Le.ready,
|
|
1247
|
-
onSelect: (
|
|
1255
|
+
onSelect: (t) => F([t]),
|
|
1248
1256
|
apply: n.apply,
|
|
1249
1257
|
onOpenAiReview: p.aiReviewSlot ? () => N("settings") : void 0,
|
|
1250
1258
|
onTurnOff: Ye.onTurnOff,
|
|
@@ -1253,21 +1261,21 @@ function hi({
|
|
|
1253
1261
|
) : U === "settings" ? /* @__PURE__ */ r(
|
|
1254
1262
|
ca,
|
|
1255
1263
|
{
|
|
1256
|
-
bundle:
|
|
1264
|
+
bundle: e,
|
|
1257
1265
|
apply: n.apply,
|
|
1258
1266
|
flush: n.flush,
|
|
1259
1267
|
collection: o,
|
|
1260
1268
|
previewRoleId: T.roleId,
|
|
1261
1269
|
onPreviewRoleChange: go,
|
|
1262
|
-
onAskWhere: p.isAdmin ? (
|
|
1263
|
-
pe(
|
|
1270
|
+
onAskWhere: p.isAdmin ? (t) => {
|
|
1271
|
+
pe(t), N("ask");
|
|
1264
1272
|
} : void 0
|
|
1265
1273
|
}
|
|
1266
|
-
) :
|
|
1274
|
+
) : v.length > 1 ? /* @__PURE__ */ r(
|
|
1267
1275
|
Jr,
|
|
1268
1276
|
{
|
|
1269
|
-
bundle:
|
|
1270
|
-
selection:
|
|
1277
|
+
bundle: e,
|
|
1278
|
+
selection: v,
|
|
1271
1279
|
apply: n.apply,
|
|
1272
1280
|
collection: o,
|
|
1273
1281
|
onSelection: F
|
|
@@ -1275,7 +1283,7 @@ function hi({
|
|
|
1275
1283
|
) : /* @__PURE__ */ r(
|
|
1276
1284
|
ua,
|
|
1277
1285
|
{
|
|
1278
|
-
bundle:
|
|
1286
|
+
bundle: e,
|
|
1279
1287
|
target: W,
|
|
1280
1288
|
apply: n.apply,
|
|
1281
1289
|
flush: n.flush,
|
|
@@ -1292,23 +1300,23 @@ function hi({
|
|
|
1292
1300
|
/* @__PURE__ */ r(
|
|
1293
1301
|
Wn,
|
|
1294
1302
|
{
|
|
1295
|
-
bundle:
|
|
1296
|
-
selection:
|
|
1303
|
+
bundle: e,
|
|
1304
|
+
selection: v,
|
|
1297
1305
|
apply: n.apply,
|
|
1298
1306
|
onSelection: F,
|
|
1299
|
-
rootRef:
|
|
1307
|
+
rootRef: _,
|
|
1300
1308
|
extraItems: We.menuItems
|
|
1301
1309
|
}
|
|
1302
1310
|
),
|
|
1303
1311
|
/* @__PURE__ */ r(
|
|
1304
1312
|
zn,
|
|
1305
1313
|
{
|
|
1306
|
-
bundle:
|
|
1314
|
+
bundle: e,
|
|
1307
1315
|
fields: E,
|
|
1308
1316
|
apply: n.apply,
|
|
1309
|
-
onSelect:
|
|
1310
|
-
rootRef:
|
|
1311
|
-
enabled: !(
|
|
1317
|
+
onSelect: O,
|
|
1318
|
+
rootRef: _,
|
|
1319
|
+
enabled: !(w && R !== "canvas")
|
|
1312
1320
|
}
|
|
1313
1321
|
),
|
|
1314
1322
|
/* @__PURE__ */ r(
|
|
@@ -1343,10 +1351,10 @@ function hi({
|
|
|
1343
1351
|
{
|
|
1344
1352
|
anchor: mt,
|
|
1345
1353
|
steps: n.unsavedSteps,
|
|
1346
|
-
exists: (
|
|
1347
|
-
describe: (
|
|
1348
|
-
onJump: (
|
|
1349
|
-
Ce(null), ft(
|
|
1354
|
+
exists: (t) => !!e && Ge(t, e, C),
|
|
1355
|
+
describe: (t) => zt(t, e, E),
|
|
1356
|
+
onJump: (t) => {
|
|
1357
|
+
Ce(null), ft(t);
|
|
1350
1358
|
},
|
|
1351
1359
|
onSettings: () => {
|
|
1352
1360
|
Ce(null), N("settings");
|
|
@@ -1361,7 +1369,7 @@ function hi({
|
|
|
1361
1369
|
if (!se)
|
|
1362
1370
|
return /* @__PURE__ */ r(Bt.Provider, { value: Be, children: /* @__PURE__ */ r(qt, { value: We, children: Tt }) });
|
|
1363
1371
|
const Lt = u ?? (Fe ? Go(Fe) ?? document.body : null);
|
|
1364
|
-
return /* @__PURE__ */
|
|
1372
|
+
return /* @__PURE__ */ h(ie, { children: [
|
|
1365
1373
|
/* @__PURE__ */ r("span", { ref: oo, hidden: !0, "data-layout-editor-marker": "" }),
|
|
1366
1374
|
/* @__PURE__ */ r(Bt.Provider, { value: Be, children: /* @__PURE__ */ r(qt, { value: We, children: Lt && Ko(Tt, Lt) }) })
|
|
1367
1375
|
] });
|
|
@@ -1371,7 +1379,7 @@ function $t(o) {
|
|
|
1371
1379
|
return `Frozen until ${Uo(o.until)}${i}. Saving asks for an override note, kept in History.`;
|
|
1372
1380
|
}
|
|
1373
1381
|
export {
|
|
1374
|
-
|
|
1382
|
+
yi as LayoutEditor,
|
|
1375
1383
|
Qe as isTyping,
|
|
1376
1384
|
Ge as targetExists
|
|
1377
1385
|
};
|