@nivaro/react 0.3.36 → 0.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/slots/CommentsSlot.js +44 -36
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/shared/components/AgentBadge.js +26 -0
- package/dist/shared/components/AgentQuestionsCard.js +198 -0
- package/dist/shared/components/ItemEditForm.js +3329 -3263
- package/dist/shared/components/McpConnectionScope.js +480 -0
- package/dist/shared/components/MyWorkView.js +223 -208
- package/dist/shared/components/RecordReadView.js +620 -575
- package/dist/shared/components/chat/ChatPanel.js +683 -671
- package/dist/shared/components/imports/DownloadSampleButton.js +69 -0
- package/dist/shared/components/imports/ImportConsole.js +106 -104
- package/dist/shared/components/imports/RunDetailSheet.js +11 -10
- package/dist/shared/components/item-edit/FieldAffordances.js +32 -32
- package/dist/shared/components/item-edit/FormTour.js +279 -0
- package/dist/shared/components/item-edit/GroupSection.js +377 -360
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +28 -28
- package/dist/shared/components/item-edit/entry/EntryStrip.js +30 -26
- package/dist/shared/components/item-edit/form-density.js +36 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -46
- package/dist/shared/components/item-edit/usePersonalDefaults.js +312 -296
- package/dist/shared/components/layout-editor/AddPanel.js +349 -192
- package/dist/shared/components/layout-editor/DesignNode.js +126 -112
- package/dist/shared/components/layout-editor/EditorTopBar.js +123 -103
- package/dist/shared/components/layout-editor/LayoutEditor.js +829 -751
- package/dist/shared/components/layout-editor/PlaceTools.js +334 -0
- package/dist/shared/components/layout-editor/SlashInsert.js +252 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +285 -242
- package/dist/shared/components/layout-editor/add-target.js +54 -43
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +238 -155
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +1 -1
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +15 -12
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +347 -189
- package/dist/shared/components/layout-editor/dnd/TrashZone.js +60 -32
- package/dist/shared/components/layout-editor/dnd/UndoChip.js +76 -0
- package/dist/shared/components/layout-editor/dnd/merge-drop.js +33 -0
- package/dist/shared/components/layout-editor/dnd/multi-drop.js +87 -0
- package/dist/shared/components/layout-editor/dnd/node.js +115 -105
- package/dist/shared/components/layout-editor/dnd/sensors.js +23 -0
- package/dist/shared/components/layout-editor/dnd/trash-drop.js +34 -28
- package/dist/shared/components/layout-editor/dnd/trash-links.js +97 -0
- package/dist/shared/components/layout-editor/even-row.js +86 -0
- package/dist/shared/components/layout-editor/field-list.js +99 -0
- package/dist/shared/components/layout-editor/format-painter.js +102 -0
- package/dist/shared/components/layout-editor/grid-guides.js +15 -13
- package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +150 -132
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +57 -53
- package/dist/shared/components/layout-editor/inspector/EvenRowAction.js +31 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +154 -141
- package/dist/shared/components/layout-editor/inspector/Inspector.js +209 -178
- package/dist/shared/components/layout-editor/inspector/LookTab.js +106 -98
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +38 -37
- package/dist/shared/components/layout-editor/inspector/kit.js +280 -223
- package/dist/shared/components/layout-editor/keyboard-move.js +15 -15
- package/dist/shared/components/layout-editor/lint/LabelStyle.js +201 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +132 -84
- package/dist/shared/components/layout-editor/lint/lint-api.js +65 -28
- package/dist/shared/components/layout-editor/nav/NavTools.js +14 -12
- package/dist/shared/components/layout-editor/nav/ZoomControls.js +145 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +34 -32
- package/dist/shared/components/layout-editor/nav/view-prefs.js +100 -15
- package/dist/shared/components/layout-editor/outputs/LayoutFile.js +89 -0
- package/dist/shared/components/layout-editor/outputs/OutputsButton.js +272 -195
- package/dist/shared/components/layout-editor/outputs/layout-file-plan.js +176 -0
- package/dist/shared/components/layout-editor/outputs/output-api.js +71 -37
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +16 -11
- package/dist/shared/components/layout-editor/overview/purpose.js +5 -5
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/pin.js +37 -19
- package/dist/shared/components/layout-editor/place-clip.js +257 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +27 -26
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +148 -117
- package/dist/shared/components/layout-editor/preview/SampleRecord.js +113 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +79 -60
- package/dist/shared/components/layout-editor/preview/sample-record.js +105 -0
- package/dist/shared/components/layout-editor/removed-log.js +151 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +109 -78
- package/dist/shared/components/layout-editor/reuse/linked-sections.js +373 -0
- package/dist/shared/components/layout-editor/revert-element.js +140 -0
- package/dist/shared/components/layout-editor/section-structure.js +193 -170
- package/dist/shared/components/layout-editor/settings/EntrySection.js +63 -45
- package/dist/shared/components/layout-editor/settings/LayoutSection.js +63 -32
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +179 -137
- package/dist/shared/components/layout-editor/settings/WhoSection.js +18 -17
- package/dist/shared/components/layout-editor/settings/settings-registry.js +24 -0
- package/dist/shared/components/layout-editor/shortcuts.js +21 -16
- package/dist/shared/components/layout-editor/structure-ops.js +221 -195
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +133 -85
- package/dist/shared/components/layout-editor/usage/refusal-lens.js +130 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +12 -11
- package/dist/shared/components/panels/CommentPanel.js +47 -45
- package/dist/shared/components/panels/RevisionsPanel.js +66 -64
- package/dist/shared/components/panels/TaskPanel.js +395 -332
- package/dist/shared/components/profile/AgentsPanel.js +196 -147
- package/dist/shared/components/profile/ConnectionRollback.js +329 -0
- package/dist/shared/components/profile/MyDefaultsCard.js +526 -520
- package/dist/shared/lib/entry-config.js +22 -22
- package/dist/shared/lib/form-usage-beacon.js +91 -55
- package/dist/shared/lib/layout-lint.js +530 -284
- package/dist/shared/lib/layout-resolve.js +58 -44
- package/package.json +1 -1
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { MousePointerClick as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { HEADER_GROUP_KEY as
|
|
5
|
-
import { isDisplayFormulaField as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { TipLayer as
|
|
8
|
-
import { ArrangeButton as
|
|
9
|
-
import { AutoArrangeButton as
|
|
10
|
-
import { useLayoutDesign as
|
|
11
|
-
import { PlacementPresets as
|
|
12
|
-
import { FIELD_HOLDERS as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { jsx as t, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { MousePointerClick as ne } from "lucide-react";
|
|
3
|
+
import { useMemo as q, useState as ie, useId as re } from "react";
|
|
4
|
+
import { HEADER_GROUP_KEY as B, CANVAS_SLOT_KEYS as oe, UNGROUPED_KEY as de } from "../../../lib/layout-ops.js";
|
|
5
|
+
import { isDisplayFormulaField as ae } from "../../../lib/placement-behaviour.js";
|
|
6
|
+
import { cn as se, titleCase as k } from "../../../lib/utils.js";
|
|
7
|
+
import { TipLayer as ce } from "../../TipLayer.js";
|
|
8
|
+
import { ArrangeButton as ue } from "../ArrangeButton.js";
|
|
9
|
+
import { AutoArrangeButton as me } from "../AutoArrange.js";
|
|
10
|
+
import { useLayoutDesign as fe, targetKey as z } from "../design-context.js";
|
|
11
|
+
import { PlacementPresets as pe } from "../entry/PlacementPresets.js";
|
|
12
|
+
import { FIELD_HOLDERS as be } from "../field-zones.js";
|
|
13
|
+
import { RevertInline as J } from "../PlaceTools.js";
|
|
14
|
+
import { PanelHeader as F, PanelBody as C, PanelTabs as he, tabId as ye, tabPanelId as ke } from "../panel-frame.js";
|
|
15
|
+
import { tintCard as ve } from "../panel-style.js";
|
|
16
|
+
import { useLinkedTarget as xe, LinkedSectionNotice as $ } from "../reuse/linked-sections.js";
|
|
17
|
+
import { slotName as X } from "../slot-names.js";
|
|
18
|
+
import { useLayoutBundle as _e } from "../useLayoutDraft.js";
|
|
19
|
+
import { AdvancedTab as ge } from "./AdvancedTab.js";
|
|
20
|
+
import { DisplayFormulaSettings as Ne } from "./BehaviourSettings.js";
|
|
21
|
+
import { Breadcrumb as L } from "./Breadcrumb.js";
|
|
22
|
+
import { useCollectionMeta as W, useGlobalWriter as Pe, useFieldCtxValue as Te, FieldCtxContext as Se } from "./field-context.js";
|
|
23
|
+
import { GridTab as Ie } from "./GridTab.js";
|
|
24
|
+
import { GroupInspector as Ee } from "./GroupInspector.js";
|
|
25
|
+
import { HeaderItemInspector as Le } from "./HeaderItemInspector.js";
|
|
26
|
+
import { HelpVideoSetting as Z, NoteSetting as Q } from "./HelpTab.js";
|
|
27
|
+
import { InspectorEnvContext as D, useInspectorEnv as K, PinZone as w, ScopeLegend as j, GlobalWriterContext as Fe } from "./kit.js";
|
|
28
|
+
import { LookTab as Ce } from "./LookTab.js";
|
|
29
|
+
import { isDefaultForm as Ke, layoutTypeOf as Me, findPlacement as V, SUBTITLE_FIELD as U, overrideGroupOps as Oe, overridePlacementOps as Re, describeField as ee, asObject as A, NUMERIC_TYPES as De } from "./model.js";
|
|
30
|
+
import { OverrideNotice as Ge } from "./OverrideNotice.js";
|
|
31
|
+
import { PickerTab as He } from "./PickerTab.js";
|
|
32
|
+
import { RulesTab as Ae } from "./RulesTab.js";
|
|
33
|
+
import { SlotInspector as Be } from "./SlotInspector.js";
|
|
34
|
+
import { SubtitleInspector as We } from "./SubtitleInspector.js";
|
|
35
|
+
import { useInspectorTabRequest as we } from "./tab-request.js";
|
|
36
|
+
import { WidgetInspector as je } from "./WidgetInspector.js";
|
|
37
|
+
const Ue = /^__widget_\d+__$/, Ye = /^__ext_[a-z][a-z0-9-]{1,60}__$/, te = (e) => oe.includes(e) || e === "__owners__" || e === "__pdf__" || Ye.test(e);
|
|
38
|
+
function le(e) {
|
|
37
39
|
switch (e.kind) {
|
|
38
40
|
case "field":
|
|
39
41
|
case "slot":
|
|
@@ -41,120 +43,147 @@ function X(e) {
|
|
|
41
43
|
case "header":
|
|
42
44
|
return {
|
|
43
45
|
field: e.field,
|
|
44
|
-
group_key: e.field ===
|
|
46
|
+
group_key: e.field === U ? null : B
|
|
45
47
|
};
|
|
46
48
|
default:
|
|
47
49
|
return null;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
function
|
|
51
|
-
const { bundle: l, target: n, apply: i, collection:
|
|
52
|
+
function Dt(e) {
|
|
53
|
+
const { bundle: l, target: n, apply: i, collection: a } = e, o = fe(), f = q(
|
|
52
54
|
() => ({
|
|
53
55
|
bundle: l,
|
|
54
56
|
apply: i,
|
|
55
57
|
flush: e.flush ?? (() => {
|
|
56
58
|
}),
|
|
57
|
-
collection:
|
|
58
|
-
layoutType:
|
|
59
|
-
defaultForm:
|
|
59
|
+
collection: a,
|
|
60
|
+
layoutType: Me(l.layout),
|
|
61
|
+
defaultForm: Ke(l.layout),
|
|
60
62
|
select: e.onSelect
|
|
61
63
|
}),
|
|
62
|
-
[l, i, e.flush,
|
|
63
|
-
), s = n ?
|
|
64
|
+
[l, i, e.flush, a, e.onSelect]
|
|
65
|
+
), s = n ? le(n) : null, r = s ? V(l, s.field, s.group_key) : null, p = (n == null ? void 0 : n.kind) === "group" ? l.groups.find((m) => m.key === n.key) ?? null : null, v = !!n && (n.kind === "group" ? !p : !r && !te((s == null ? void 0 : s.field) ?? "") && (s == null ? void 0 : s.field) !== U), g = l.layout.parent_layout_id != null ? Number(l.layout.parent_layout_id) : null, M = e.inheritedFrom ?? (n ? (o == null ? void 0 : o.inheritedFrom(n)) ?? null : null), { data: c } = _e(g), b = v && c && s ? V(c, s.field, s.group_key) : null, h = v && c && (n == null ? void 0 : n.kind) === "group" ? c.groups.find((m) => m.key === n.key) ?? null : null, N = v && (!!b || !!h || !!M), u = xe(v ? null : n);
|
|
64
66
|
if (!n)
|
|
65
|
-
return /* @__PURE__ */ t(
|
|
66
|
-
/* @__PURE__ */ t(
|
|
67
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ d("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-8 pb-16 text-center", children: [
|
|
68
|
+
/* @__PURE__ */ t(ne, { className: "h-5 w-5 text-slate-400" }),
|
|
67
69
|
/* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Select a field, section or panel on the form to change it." })
|
|
68
70
|
] }) });
|
|
69
71
|
if (N) {
|
|
70
|
-
const
|
|
71
|
-
} },
|
|
72
|
+
const m = c != null && c.layout.name ? String(c.layout.name) : M ?? "the parent form", _ = { ...f, bundle: c ?? l, apply: () => {
|
|
73
|
+
} }, O = () => {
|
|
72
74
|
if (!c) return;
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
const S = h ? Oe(l, c, h) : b ? Re(l, c, b) : [];
|
|
76
|
+
S.length && i(S, { label: `Override ${I(n)} on this form` });
|
|
77
|
+
}, y = /* @__PURE__ */ d("div", { "data-setting": "inspector.inherited_override", className: se(ve, "space-y-2.5 p-3"), children: [
|
|
78
|
+
/* @__PURE__ */ d("p", { className: "text-[12px] leading-snug text-slate-700 dark:text-foreground", children: [
|
|
77
79
|
"This comes from ",
|
|
78
|
-
/* @__PURE__ */ t("span", { className: "font-medium", children:
|
|
80
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: m }),
|
|
79
81
|
". Change it there for every form built on it, or override it on this form only."
|
|
80
82
|
] }),
|
|
81
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap gap-2", children: [
|
|
82
84
|
/* @__PURE__ */ t(
|
|
83
85
|
"button",
|
|
84
86
|
{
|
|
85
87
|
type: "button",
|
|
86
88
|
"data-override-here": "",
|
|
87
|
-
disabled: !c || !
|
|
88
|
-
onClick:
|
|
89
|
+
disabled: !c || !b && !h,
|
|
90
|
+
onClick: O,
|
|
89
91
|
className: "h-7 rounded-md bg-nvr-cyan px-2.5 text-[12px] font-medium text-white transition-colors hover:bg-[#00b8e0] disabled:opacity-40",
|
|
90
92
|
children: "Override here"
|
|
91
93
|
}
|
|
92
94
|
),
|
|
93
|
-
g != null && e.openLayout && /* @__PURE__ */
|
|
95
|
+
g != null && e.openLayout && /* @__PURE__ */ d(
|
|
94
96
|
"button",
|
|
95
97
|
{
|
|
96
98
|
type: "button",
|
|
97
99
|
"data-edit-in-parent": "",
|
|
98
100
|
onClick: () => {
|
|
99
|
-
var
|
|
100
|
-
return (
|
|
101
|
+
var S;
|
|
102
|
+
return (S = e.openLayout) == null ? void 0 : S.call(e, g);
|
|
101
103
|
},
|
|
102
104
|
className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 transition-colors hover:bg-slate-50 dark:border-border dark:bg-background dark:text-foreground dark:hover:bg-muted",
|
|
103
105
|
children: [
|
|
104
106
|
"Edit in ",
|
|
105
|
-
|
|
107
|
+
m
|
|
106
108
|
]
|
|
107
109
|
}
|
|
108
110
|
)
|
|
109
111
|
] })
|
|
110
112
|
] });
|
|
111
|
-
return /* @__PURE__ */ t(
|
|
112
|
-
/* @__PURE__ */ t(
|
|
113
|
-
/* @__PURE__ */ t(
|
|
113
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(D.Provider, { value: _, children: h ? /* @__PURE__ */ t(G, { group: h, notice: y, readOnly: !0 }) : b ? /* @__PURE__ */ t(H, { target: n, row: b, notice: y, readOnly: !0 }) : /* @__PURE__ */ d(x, { children: [
|
|
114
|
+
/* @__PURE__ */ t(F, { title: I(n) }),
|
|
115
|
+
/* @__PURE__ */ t(C, { children: y })
|
|
114
116
|
] }) }) });
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
if (u && !u.editing) {
|
|
119
|
+
const m = /* @__PURE__ */ t($, { link: u.link }), _ = { ...f, apply: () => {
|
|
120
|
+
} };
|
|
121
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(D.Provider, { value: _, children: p ? /* @__PURE__ */ t(G, { group: p, notice: m, readOnly: !0 }, p.key) : /* @__PURE__ */ t(
|
|
122
|
+
H,
|
|
123
|
+
{
|
|
124
|
+
target: n,
|
|
125
|
+
row: r,
|
|
126
|
+
notice: m,
|
|
127
|
+
readOnly: !0
|
|
128
|
+
},
|
|
129
|
+
z(n)
|
|
130
|
+
) }) });
|
|
131
|
+
}
|
|
132
|
+
const P = u ? /* @__PURE__ */ t($, { link: u.link }) : null, T = v ? null : /* @__PURE__ */ t(
|
|
133
|
+
Ge,
|
|
118
134
|
{
|
|
119
135
|
bundle: l,
|
|
120
136
|
parent: c,
|
|
121
137
|
target: n,
|
|
122
|
-
title:
|
|
138
|
+
title: I(n),
|
|
123
139
|
apply: i
|
|
124
140
|
}
|
|
125
141
|
);
|
|
126
|
-
return /* @__PURE__ */ t(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
return /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(D.Provider, { value: f, children: n.kind === "group" ? p && /* @__PURE__ */ t(
|
|
143
|
+
G,
|
|
144
|
+
{
|
|
145
|
+
group: p,
|
|
146
|
+
notice: /* @__PURE__ */ d(x, { children: [
|
|
147
|
+
P,
|
|
148
|
+
T
|
|
149
|
+
] })
|
|
150
|
+
},
|
|
151
|
+
p.key
|
|
152
|
+
) : v ? /* @__PURE__ */ d(x, { children: [
|
|
153
|
+
/* @__PURE__ */ t(F, { title: I(n) }),
|
|
154
|
+
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ d("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: [
|
|
155
|
+
I(n),
|
|
130
156
|
" is not on this form any more."
|
|
131
157
|
] }) })
|
|
132
158
|
] }) : /* @__PURE__ */ t(
|
|
133
|
-
|
|
159
|
+
H,
|
|
134
160
|
{
|
|
135
161
|
target: n,
|
|
136
162
|
row: r,
|
|
137
|
-
notice:
|
|
163
|
+
notice: /* @__PURE__ */ d(x, { children: [
|
|
164
|
+
P,
|
|
165
|
+
T
|
|
166
|
+
] })
|
|
138
167
|
},
|
|
139
|
-
|
|
168
|
+
z(n)
|
|
140
169
|
) }) });
|
|
141
170
|
}
|
|
142
|
-
function
|
|
143
|
-
return e.kind === "group" ?
|
|
171
|
+
function I(e) {
|
|
172
|
+
return e.kind === "group" ? k(e.key) : e.field.startsWith("__") ? X(e.field) : k(e.field.split(".").pop() ?? e.field);
|
|
144
173
|
}
|
|
145
|
-
function
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */ t(
|
|
174
|
+
function R({ children: e }) {
|
|
175
|
+
return /* @__PURE__ */ d("div", { "data-inspector": "", className: "flex h-full min-h-0 min-w-0 flex-col text-[12px]", children: [
|
|
176
|
+
/* @__PURE__ */ t(ce, {}),
|
|
148
177
|
e
|
|
149
178
|
] });
|
|
150
179
|
}
|
|
151
|
-
function
|
|
152
|
-
if (!l || l ===
|
|
153
|
-
if (l ===
|
|
180
|
+
function ze(e, l) {
|
|
181
|
+
if (!l || l === de) return null;
|
|
182
|
+
if (l === B) return "Header strip";
|
|
154
183
|
const n = e.groups.find((i) => i.key === l);
|
|
155
|
-
return n ? n.label ||
|
|
184
|
+
return n ? n.label || k(n.key) : k(l);
|
|
156
185
|
}
|
|
157
|
-
function
|
|
186
|
+
function $e(e) {
|
|
158
187
|
if (e.isPath) return "shows a linked value";
|
|
159
188
|
if (e.computedType) return "calculated";
|
|
160
189
|
if (e.relKind === "M2O") return "picks one record";
|
|
@@ -162,7 +191,7 @@ function we(e) {
|
|
|
162
191
|
if (e.relKind === "O2M")
|
|
163
192
|
return e.iface === "inline-table" ? "table of related rows" : "related rows";
|
|
164
193
|
if (e.relKind) return "related records";
|
|
165
|
-
if (
|
|
194
|
+
if (De.has(e.type)) return "number";
|
|
166
195
|
switch (e.type) {
|
|
167
196
|
case "boolean":
|
|
168
197
|
return "yes or no";
|
|
@@ -185,79 +214,80 @@ function we(e) {
|
|
|
185
214
|
return e.type;
|
|
186
215
|
}
|
|
187
216
|
}
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
e && /* @__PURE__ */
|
|
217
|
+
function Y({ words: e, k: l, setting: n }) {
|
|
218
|
+
return /* @__PURE__ */ d("span", { "data-setting": n, children: [
|
|
219
|
+
e && /* @__PURE__ */ d(x, { children: [
|
|
191
220
|
e,
|
|
192
221
|
" · "
|
|
193
222
|
] }),
|
|
194
223
|
/* @__PURE__ */ t("span", { className: "font-mono text-[11px]", children: l })
|
|
195
224
|
] });
|
|
196
225
|
}
|
|
197
|
-
function
|
|
226
|
+
function Ve(e, l) {
|
|
198
227
|
const n = l.parent_key ? e.groups.find((i) => i.key === l.parent_key) ?? null : null;
|
|
199
228
|
return l.type === "tab" ? (n == null ? void 0 : n.tab_mode) === "steps" ? "Step" : "Tab" : l.type === "container" ? l.tab_mode === "steps" ? "Steps holder" : "Tabs holder" : l.type === "content" ? "Text block" : l.type === "metadata" ? "Record info" : "Section";
|
|
200
229
|
}
|
|
201
|
-
function
|
|
230
|
+
function G({
|
|
202
231
|
group: e,
|
|
203
232
|
notice: l,
|
|
204
233
|
readOnly: n = !1
|
|
205
234
|
}) {
|
|
206
|
-
const i =
|
|
207
|
-
return /* @__PURE__ */
|
|
235
|
+
const i = K(), a = /* @__PURE__ */ t(Ee, { group: e, readOnly: n });
|
|
236
|
+
return /* @__PURE__ */ d(x, { children: [
|
|
208
237
|
/* @__PURE__ */ t(
|
|
209
|
-
|
|
238
|
+
F,
|
|
210
239
|
{
|
|
211
240
|
eyebrow: /* @__PURE__ */ t(
|
|
212
|
-
|
|
241
|
+
L,
|
|
213
242
|
{
|
|
214
|
-
kind:
|
|
243
|
+
kind: Ve(i.bundle, e),
|
|
215
244
|
target: { kind: "group", key: e.key }
|
|
216
245
|
}
|
|
217
246
|
),
|
|
218
|
-
title: e.label ||
|
|
219
|
-
sub: /* @__PURE__ */ t(
|
|
247
|
+
title: e.label || k(e.key),
|
|
248
|
+
sub: /* @__PURE__ */ t(Y, { k: e.key, setting: "group.key" })
|
|
220
249
|
}
|
|
221
250
|
),
|
|
222
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ d(C, { children: [
|
|
223
252
|
l,
|
|
224
253
|
n ? (
|
|
225
254
|
// Inputs sit in a disabled fieldset and writes go nowhere.
|
|
226
|
-
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children:
|
|
227
|
-
) : /* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */ t(
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */ t(
|
|
231
|
-
|
|
232
|
-
|
|
255
|
+
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: a })
|
|
256
|
+
) : /* @__PURE__ */ d(w, { children: [
|
|
257
|
+
/* @__PURE__ */ t(j, {}),
|
|
258
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap gap-2", children: [
|
|
259
|
+
/* @__PURE__ */ t(ue, { targets: [{ kind: "group", key: e.key }] }),
|
|
260
|
+
/* @__PURE__ */ t(J, { target: { kind: "group", key: e.key }, bundle: i.bundle }),
|
|
261
|
+
be.has(e.type) && i.layoutType !== "table" && i.layoutType !== "file" && /* @__PURE__ */ t(
|
|
262
|
+
me,
|
|
233
263
|
{
|
|
234
264
|
bundle: i.bundle,
|
|
235
265
|
apply: i.apply,
|
|
236
266
|
zone: e.key,
|
|
237
|
-
zoneLabel: e.label ||
|
|
267
|
+
zoneLabel: e.label || k(e.key)
|
|
238
268
|
}
|
|
239
269
|
)
|
|
240
270
|
] }),
|
|
241
|
-
|
|
242
|
-
/* @__PURE__ */
|
|
271
|
+
a,
|
|
272
|
+
/* @__PURE__ */ d(
|
|
243
273
|
"div",
|
|
244
274
|
{
|
|
245
275
|
"data-group-help": "",
|
|
246
276
|
className: "mt-5 space-y-5 border-t border-slate-100 pt-5 dark:border-border/60",
|
|
247
277
|
children: [
|
|
248
278
|
/* @__PURE__ */ t(
|
|
249
|
-
|
|
279
|
+
Z,
|
|
250
280
|
{
|
|
251
281
|
kind: "section",
|
|
252
282
|
name: e.key,
|
|
253
|
-
label: e.label ||
|
|
283
|
+
label: e.label || k(e.key)
|
|
254
284
|
}
|
|
255
285
|
),
|
|
256
286
|
/* @__PURE__ */ t(
|
|
257
|
-
|
|
287
|
+
Q,
|
|
258
288
|
{
|
|
259
289
|
target: { kind: "group", key: e.key },
|
|
260
|
-
name: e.label ||
|
|
290
|
+
name: e.label || k(e.key)
|
|
261
291
|
}
|
|
262
292
|
)
|
|
263
293
|
]
|
|
@@ -267,161 +297,162 @@ function j({
|
|
|
267
297
|
] })
|
|
268
298
|
] });
|
|
269
299
|
}
|
|
270
|
-
function
|
|
300
|
+
function E({
|
|
271
301
|
eyebrow: e,
|
|
272
302
|
title: l,
|
|
273
303
|
sub: n,
|
|
274
304
|
notice: i,
|
|
275
|
-
readOnly:
|
|
305
|
+
readOnly: a,
|
|
276
306
|
children: o
|
|
277
307
|
}) {
|
|
278
|
-
return /* @__PURE__ */
|
|
279
|
-
/* @__PURE__ */ t(
|
|
280
|
-
/* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ d(x, { children: [
|
|
309
|
+
/* @__PURE__ */ t(F, { eyebrow: e, title: l, sub: n }),
|
|
310
|
+
/* @__PURE__ */ d(C, { children: [
|
|
281
311
|
i,
|
|
282
|
-
|
|
283
|
-
/* @__PURE__ */ t(
|
|
312
|
+
a ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: /* @__PURE__ */ t("fieldset", { disabled: !0, className: "min-w-0", children: o }) }) : /* @__PURE__ */ d(w, { children: [
|
|
313
|
+
/* @__PURE__ */ t(j, {}),
|
|
284
314
|
o
|
|
285
315
|
] })
|
|
286
316
|
] })
|
|
287
317
|
] });
|
|
288
318
|
}
|
|
289
|
-
function
|
|
319
|
+
function H({
|
|
290
320
|
target: e,
|
|
291
321
|
row: l,
|
|
292
322
|
notice: n,
|
|
293
323
|
readOnly: i = !1
|
|
294
324
|
}) {
|
|
295
325
|
var r;
|
|
296
|
-
const
|
|
297
|
-
return o ===
|
|
298
|
-
|
|
326
|
+
const a = K(), o = e.kind === "group" ? "" : e.field, f = (l == null ? void 0 : l.group_key) ?? (e.kind === "group" ? null : ((r = le(e)) == null ? void 0 : r.group_key) ?? null), s = ze(a.bundle, f);
|
|
327
|
+
return o === U ? /* @__PURE__ */ t(E, { eyebrow: "Header", title: "Subtitle", notice: n, readOnly: i, children: /* @__PURE__ */ t(We, {}) }) : l && (Ue.test(o) || l.widget_id != null) ? /* @__PURE__ */ t(
|
|
328
|
+
E,
|
|
299
329
|
{
|
|
300
|
-
eyebrow: /* @__PURE__ */ t(
|
|
330
|
+
eyebrow: /* @__PURE__ */ t(L, { kind: "Widget", target: e, where: s }),
|
|
301
331
|
title: l.label_override || "Widget",
|
|
302
332
|
notice: n,
|
|
303
333
|
readOnly: i,
|
|
304
|
-
children: /* @__PURE__ */ t(
|
|
334
|
+
children: /* @__PURE__ */ t(je, { row: l })
|
|
305
335
|
}
|
|
306
|
-
) :
|
|
307
|
-
|
|
336
|
+
) : te(o) ? /* @__PURE__ */ t(
|
|
337
|
+
E,
|
|
308
338
|
{
|
|
309
|
-
eyebrow: /* @__PURE__ */ t(
|
|
310
|
-
title:
|
|
339
|
+
eyebrow: /* @__PURE__ */ t(L, { kind: "Panel", target: e, where: s }),
|
|
340
|
+
title: X(o),
|
|
311
341
|
notice: n,
|
|
312
342
|
readOnly: i,
|
|
313
|
-
children: /* @__PURE__ */ t(
|
|
343
|
+
children: /* @__PURE__ */ t(Be, { field: o, groupKey: f, row: l })
|
|
314
344
|
}
|
|
315
|
-
) : l ? e.kind === "header" || l.group_key ===
|
|
316
|
-
|
|
345
|
+
) : l ? e.kind === "header" || l.group_key === B ? /* @__PURE__ */ t(Xe, { row: l, notice: n, readOnly: i }) : ae(o) ? /* @__PURE__ */ t(
|
|
346
|
+
E,
|
|
317
347
|
{
|
|
318
|
-
eyebrow: /* @__PURE__ */ t(
|
|
319
|
-
title:
|
|
348
|
+
eyebrow: /* @__PURE__ */ t(L, { kind: "Formula", target: e, where: s }),
|
|
349
|
+
title: qe(l),
|
|
320
350
|
notice: n,
|
|
321
351
|
readOnly: i,
|
|
322
|
-
children: /* @__PURE__ */ t(
|
|
352
|
+
children: /* @__PURE__ */ t(Je, { row: l })
|
|
323
353
|
}
|
|
324
|
-
) : /* @__PURE__ */ t(
|
|
354
|
+
) : /* @__PURE__ */ t(Qe, { target: e, row: l, where: s, notice: n, readOnly: i }) : null;
|
|
325
355
|
}
|
|
326
|
-
function
|
|
327
|
-
const l =
|
|
356
|
+
function qe(e) {
|
|
357
|
+
const l = A(e.overrides);
|
|
328
358
|
return typeof l.label == "string" && l.label.trim() ? l.label : "Formula";
|
|
329
359
|
}
|
|
330
|
-
function
|
|
331
|
-
const l =
|
|
332
|
-
return /* @__PURE__ */ t(
|
|
360
|
+
function Je({ row: e }) {
|
|
361
|
+
const l = K(), { data: n } = W(l.collection), i = q(() => ((n == null ? void 0 : n.fields) ?? []).map((a) => a.field), [n == null ? void 0 : n.fields]);
|
|
362
|
+
return /* @__PURE__ */ t(Ne, { row: e, fields: i });
|
|
333
363
|
}
|
|
334
|
-
function
|
|
364
|
+
function Xe({
|
|
335
365
|
row: e,
|
|
336
366
|
notice: l,
|
|
337
367
|
readOnly: n
|
|
338
368
|
}) {
|
|
339
|
-
const i =
|
|
369
|
+
const i = K(), { data: a } = W(i.collection), o = ee(e.field, (a == null ? void 0 : a.fields) ?? [], (a == null ? void 0 : a.relations) ?? [], null).label;
|
|
340
370
|
return /* @__PURE__ */ t(
|
|
341
|
-
|
|
371
|
+
E,
|
|
342
372
|
{
|
|
343
373
|
eyebrow: "Header strip",
|
|
344
374
|
title: e.label_override || o,
|
|
345
|
-
sub: /* @__PURE__ */ t(
|
|
375
|
+
sub: /* @__PURE__ */ t(Y, { k: e.field }),
|
|
346
376
|
notice: l,
|
|
347
377
|
readOnly: n,
|
|
348
|
-
children: /* @__PURE__ */ t(
|
|
378
|
+
children: /* @__PURE__ */ t(Le, { row: e, label: o })
|
|
349
379
|
}
|
|
350
380
|
);
|
|
351
381
|
}
|
|
352
|
-
const
|
|
353
|
-
function
|
|
382
|
+
const Ze = { fields: [], relations: [], label: "" };
|
|
383
|
+
function Qe({
|
|
354
384
|
target: e,
|
|
355
385
|
row: l,
|
|
356
386
|
where: n,
|
|
357
387
|
notice: i,
|
|
358
|
-
readOnly:
|
|
388
|
+
readOnly: a
|
|
359
389
|
}) {
|
|
360
|
-
var
|
|
361
|
-
const o =
|
|
390
|
+
var T, m, _, O;
|
|
391
|
+
const o = K(), { data: f } = W(o.collection), s = f ?? Ze, r = ee(l.field, s.fields, s.relations, l), p = Pe({
|
|
362
392
|
collection: o.collection,
|
|
363
|
-
collectionLabel: s.label ||
|
|
393
|
+
collectionLabel: s.label || k(o.collection),
|
|
364
394
|
field: l.field,
|
|
365
395
|
fieldLabel: r.label,
|
|
366
396
|
stored: {
|
|
367
|
-
options:
|
|
368
|
-
dependency_config:
|
|
397
|
+
options: A((T = r.global) == null ? void 0 : T.options),
|
|
398
|
+
dependency_config: A((m = r.global) == null ? void 0 : m.dependency_config),
|
|
369
399
|
columns: {
|
|
370
|
-
deprecated: !!((
|
|
371
|
-
deprecation_note: ((
|
|
400
|
+
deprecated: !!((_ = r.global) != null && _.deprecated_at),
|
|
401
|
+
deprecation_note: ((O = r.global) == null ? void 0 : O.deprecation_note) || null
|
|
372
402
|
}
|
|
373
403
|
}
|
|
374
|
-
}),
|
|
404
|
+
}), v = Te({ env: o, row: l, meta: s, writer: p, readOnly: a }), g = r.relKind === "M2O" || r.relKind === "M2M" || r.isPath || r.iface === "relation-path" || r.iface === "file-image" || r.iface === "files-m2m", M = r.relKind === "O2M" && (r.iface === "inline-grid" || r.iface === "inline-table"), c = [
|
|
375
405
|
{ key: "look", label: "Look" },
|
|
376
406
|
{ key: "rules", label: "Rules" },
|
|
377
407
|
...g ? [{ key: "picker", label: "Picker" }] : [],
|
|
378
|
-
...
|
|
408
|
+
...M ? [{ key: "grid", label: r.iface === "inline-table" ? "Table" : "Grid" }] : [],
|
|
379
409
|
{ key: "help", label: "Help" },
|
|
380
410
|
{ key: "advanced", label: "Advanced" }
|
|
381
|
-
], [
|
|
382
|
-
|
|
383
|
-
const N =
|
|
411
|
+
], [b, h] = ie("look");
|
|
412
|
+
we(l.field, (y) => h(y));
|
|
413
|
+
const N = re(), u = c.some((y) => y.key === b) ? b : "look", P = /* @__PURE__ */ t("fieldset", { disabled: a, className: "min-w-0", children: f ? u === "look" ? /* @__PURE__ */ t(Ce, {}) : u === "rules" ? /* @__PURE__ */ t(Ae, {}) : u === "picker" ? /* @__PURE__ */ t(He, {}) : u === "grid" ? /* @__PURE__ */ t(Ie, {}) : u === "help" ? /* @__PURE__ */ d("div", { "data-help-tab": "", className: "space-y-5", children: [
|
|
384
414
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "Help text and the placeholder are on the Look tab." }),
|
|
385
|
-
/* @__PURE__ */ t(
|
|
415
|
+
/* @__PURE__ */ t(Z, { kind: "field", name: l.field, label: r.label }),
|
|
386
416
|
/* @__PURE__ */ t(
|
|
387
|
-
|
|
417
|
+
Q,
|
|
388
418
|
{
|
|
389
419
|
target: { kind: "field", field: l.field, group_key: l.group_key },
|
|
390
420
|
name: r.label
|
|
391
421
|
}
|
|
392
422
|
)
|
|
393
|
-
] }) : /* @__PURE__ */ t(
|
|
394
|
-
return /* @__PURE__ */ t(
|
|
423
|
+
] }) : /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Loading the field…" }) });
|
|
424
|
+
return /* @__PURE__ */ t(Se.Provider, { value: v, children: /* @__PURE__ */ d(Fe.Provider, { value: p, children: [
|
|
395
425
|
/* @__PURE__ */ t(
|
|
396
|
-
|
|
426
|
+
F,
|
|
397
427
|
{
|
|
398
|
-
eyebrow: /* @__PURE__ */ t(
|
|
428
|
+
eyebrow: /* @__PURE__ */ t(L, { kind: "Field", target: e, where: n }),
|
|
399
429
|
title: r.label,
|
|
400
|
-
sub: /* @__PURE__ */ t(
|
|
430
|
+
sub: /* @__PURE__ */ t(Y, { words: f ? $e(r) : void 0, k: l.field }),
|
|
401
431
|
children: /* @__PURE__ */ t(
|
|
402
|
-
|
|
432
|
+
he,
|
|
403
433
|
{
|
|
404
434
|
idBase: N,
|
|
405
435
|
label: `Settings of ${r.label}`,
|
|
406
436
|
tabs: c,
|
|
407
437
|
active: u,
|
|
408
|
-
onChange: (
|
|
409
|
-
o.flush(),
|
|
438
|
+
onChange: (y) => {
|
|
439
|
+
o.flush(), h(y);
|
|
410
440
|
}
|
|
411
441
|
}
|
|
412
442
|
)
|
|
413
443
|
}
|
|
414
444
|
),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
|
|
445
|
+
/* @__PURE__ */ d(
|
|
446
|
+
C,
|
|
417
447
|
{
|
|
418
|
-
tabpanel: { id:
|
|
448
|
+
tabpanel: { id: ke(N), labelledBy: ye(N, u) },
|
|
419
449
|
children: [
|
|
420
450
|
i,
|
|
421
|
-
|
|
422
|
-
/* @__PURE__ */ t(
|
|
423
|
-
/* @__PURE__ */ t(
|
|
424
|
-
|
|
451
|
+
a ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: P }) : /* @__PURE__ */ d(w, { children: [
|
|
452
|
+
/* @__PURE__ */ t("div", { className: "mb-3 empty:hidden", children: /* @__PURE__ */ t(J, { target: e, bundle: o.bundle }) }),
|
|
453
|
+
/* @__PURE__ */ t(pe, { bundle: o.bundle, rows: [l], apply: o.apply }),
|
|
454
|
+
/* @__PURE__ */ t(j, { field: !0 }),
|
|
455
|
+
P
|
|
425
456
|
] })
|
|
426
457
|
]
|
|
427
458
|
},
|
|
@@ -430,5 +461,5 @@ function Ve({
|
|
|
430
461
|
] }) });
|
|
431
462
|
}
|
|
432
463
|
export {
|
|
433
|
-
|
|
464
|
+
Dt as Inspector
|
|
434
465
|
};
|