@nivaro/react 0.2.52 → 0.2.54
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 +116 -2
- package/dist/layout-editor.d.ts +248 -2
- package/dist/shared/components/FormWhatsNew.js +60 -0
- package/dist/shared/components/ItemEditForm.js +3994 -3876
- package/dist/shared/components/RecordReadView.js +219 -211
- package/dist/shared/components/TipLayer.js +27 -27
- package/dist/shared/components/help-videos/api.js +51 -41
- package/dist/shared/components/help-videos/editor/DetailsTab.js +147 -130
- package/dist/shared/components/item-edit/FieldAffordances.js +7 -6
- package/dist/shared/components/item-edit/FieldRow.js +353 -304
- package/dist/shared/components/item-edit/FormHelpVideoButton.js +59 -0
- package/dist/shared/components/item-edit/GroupSection.js +419 -396
- package/dist/shared/components/item-edit/HeaderTools.js +59 -56
- package/dist/shared/components/item-edit/LayoutContentBlock.js +47 -24
- package/dist/shared/components/item-edit/lock-why.js +87 -0
- package/dist/shared/components/item-edit/useFormUsageBeacon.js +59 -0
- package/dist/shared/components/layout-editor/AddPanel.js +204 -146
- package/dist/shared/components/layout-editor/ArrangeButton.js +34 -0
- package/dist/shared/components/layout-editor/AutoArrange.js +86 -0
- package/dist/shared/components/layout-editor/CanvasCompare.js +79 -0
- package/dist/shared/components/layout-editor/ChangeNote.js +146 -0
- package/dist/shared/components/layout-editor/CollabParts.js +170 -0
- package/dist/shared/components/layout-editor/DesignNode.js +304 -115
- package/dist/shared/components/layout-editor/EditorCanvas.js +21 -20
- package/dist/shared/components/layout-editor/EditorTopBar.js +452 -175
- package/dist/shared/components/layout-editor/FindReplace.js +188 -0
- package/dist/shared/components/layout-editor/FormMapButton.js +141 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +234 -109
- package/dist/shared/components/layout-editor/LayoutEditor.js +1101 -307
- package/dist/shared/components/layout-editor/LayoutsRail.js +94 -67
- package/dist/shared/components/layout-editor/NoteMarker.js +38 -0
- package/dist/shared/components/layout-editor/PlacementsTable.js +187 -0
- package/dist/shared/components/layout-editor/ScheduleChange.js +106 -0
- package/dist/shared/components/layout-editor/SessionHistory.js +84 -0
- package/dist/shared/components/layout-editor/StructureMenu.js +413 -0
- package/dist/shared/components/layout-editor/UnsavedConfirm.js +103 -0
- package/dist/shared/components/layout-editor/ai/AiToolsButton.js +625 -0
- package/dist/shared/components/layout-editor/ai/ChangeCheck.js +153 -0
- package/dist/shared/components/layout-editor/ai/ai-tools-api.js +80 -0
- package/dist/shared/components/layout-editor/ai/assist-ops.js +38 -0
- package/dist/shared/components/layout-editor/ai/autofill-ops.js +73 -0
- package/dist/shared/components/layout-editor/ai/canvas-capture.js +41 -0
- package/dist/shared/components/layout-editor/ai-forms/AiComposer.js +271 -0
- package/dist/shared/components/layout-editor/ai-forms/AiFormsButton.js +182 -0
- package/dist/shared/components/layout-editor/ai-forms/MeaningSuggestions.js +109 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +170 -0
- package/dist/shared/components/layout-editor/ai-forms/ai-forms-api.js +40 -0
- package/dist/shared/components/layout-editor/ai-forms/pending.js +25 -0
- package/dist/shared/components/layout-editor/ai-forms/plan.js +263 -0
- package/dist/shared/components/layout-editor/ai-rules/AiAskPopover.js +160 -0
- package/dist/shared/components/layout-editor/ai-rules/CascadeWriter.js +175 -0
- package/dist/shared/components/layout-editor/ai-rules/FieldRuleWriter.js +97 -0
- package/dist/shared/components/layout-editor/ai-rules/RuleWriter.js +94 -0
- package/dist/shared/components/layout-editor/ai-rules/ValidationSuggest.js +153 -0
- package/dist/shared/components/layout-editor/ai-rules/api.js +6 -0
- package/dist/shared/components/layout-editor/ai-text/AiTextTools.js +383 -0
- package/dist/shared/components/layout-editor/ai-text/text-ops.js +125 -0
- package/dist/shared/components/layout-editor/assist/AskPanel.js +278 -0
- package/dist/shared/components/layout-editor/assist/ExplainDiff.js +93 -0
- package/dist/shared/components/layout-editor/assist/ProposalsButton.js +150 -0
- package/dist/shared/components/layout-editor/assist/assist-api.js +63 -0
- package/dist/shared/components/layout-editor/assist/jump.js +142 -0
- package/dist/shared/components/layout-editor/assist/settings-index.js +118 -0
- package/dist/shared/components/layout-editor/auto-arrange.js +101 -0
- package/dist/shared/components/layout-editor/bulk/BulkChangesButton.js +221 -0
- package/dist/shared/components/layout-editor/bulk/BulkRun.js +237 -0
- package/dist/shared/components/layout-editor/bulk/MacrosPanel.js +230 -0
- package/dist/shared/components/layout-editor/bulk/bulk-api.js +65 -0
- package/dist/shared/components/layout-editor/bulk/field-labels.js +22 -0
- package/dist/shared/components/layout-editor/bulk/macro-record.js +142 -0
- package/dist/shared/components/layout-editor/bulk/useMacroRecorder.js +65 -0
- package/dist/shared/components/layout-editor/bundle-to-active.js +1 -0
- package/dist/shared/components/layout-editor/canvas-diff.js +157 -0
- package/dist/shared/components/layout-editor/collab/FormFollowShare.js +342 -0
- package/dist/shared/components/layout-editor/collab/collab-api.js +77 -0
- package/dist/shared/components/layout-editor/commands/CommandPalette.js +221 -0
- package/dist/shared/components/layout-editor/commands/intents.js +214 -0
- package/dist/shared/components/layout-editor/commands/parse.js +242 -0
- package/dist/shared/components/layout-editor/design-context.js +26 -6
- package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +179 -163
- package/dist/shared/components/layout-editor/dnd/collision.js +25 -23
- package/dist/shared/components/layout-editor/dnd/rail-drop.js +56 -0
- package/dist/shared/components/layout-editor/draft-recovery.js +61 -0
- package/dist/shared/components/layout-editor/editor-notes.js +78 -0
- package/dist/shared/components/layout-editor/editors/swap-config.js +1 -0
- package/dist/shared/components/layout-editor/explain/CanvasRules.js +142 -0
- package/dist/shared/components/layout-editor/explain/default-ghosts.js +81 -0
- package/dist/shared/components/layout-editor/explain/driver-hover.js +62 -0
- package/dist/shared/components/layout-editor/explain/field-sources.js +246 -0
- package/dist/shared/components/layout-editor/explain/rule-graph.js +215 -0
- package/dist/shared/components/layout-editor/explain/use-explain.js +132 -0
- package/dist/shared/components/layout-editor/field-zones.js +116 -0
- package/dist/shared/components/layout-editor/form-map.js +138 -0
- package/dist/shared/components/layout-editor/history-api.js +87 -0
- package/dist/shared/components/layout-editor/inheritance.js +55 -0
- package/dist/shared/components/layout-editor/inspect/inspect-api.js +66 -0
- package/dist/shared/components/layout-editor/inspect/picker-preview.js +48 -0
- package/dist/shared/components/layout-editor/inspect/width-fit.js +87 -0
- package/dist/shared/components/layout-editor/inspector/AiFillSetting.js +85 -0
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +36 -0
- package/dist/shared/components/layout-editor/inspector/BulkInspector.js +175 -0
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +112 -0
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +146 -92
- package/dist/shared/components/layout-editor/inspector/HelpTab.js +174 -0
- package/dist/shared/components/layout-editor/inspector/Inspector.js +256 -175
- package/dist/shared/components/layout-editor/inspector/LookTab.js +46 -40
- package/dist/shared/components/layout-editor/inspector/OverrideNotice.js +61 -0
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +134 -0
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +167 -141
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +175 -128
- package/dist/shared/components/layout-editor/inspector/Translations.js +156 -0
- package/dist/shared/components/layout-editor/inspector/kit.js +3 -3
- package/dist/shared/components/layout-editor/inspector/tab-request.js +21 -0
- package/dist/shared/components/layout-editor/is-typing.js +9 -0
- package/dist/shared/components/layout-editor/keyboard-move.js +66 -0
- package/dist/shared/components/layout-editor/lint/LintPanel.js +190 -0
- package/dist/shared/components/layout-editor/lint/lint-api.js +52 -0
- package/dist/shared/components/layout-editor/load-error.js +37 -0
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +305 -0
- package/dist/shared/components/layout-editor/matrix/MatrixGrid.js +181 -0
- package/dist/shared/components/layout-editor/matrix/RoleSectionMatrix.js +147 -0
- package/dist/shared/components/layout-editor/matrix/matrix-api.js +48 -0
- package/dist/shared/components/layout-editor/matrix/role-matrix.js +36 -0
- package/dist/shared/components/layout-editor/matrix/state-matrix.js +145 -0
- package/dist/shared/components/layout-editor/nav/FindPanel.js +109 -0
- package/dist/shared/components/layout-editor/nav/NavTools.js +114 -0
- package/dist/shared/components/layout-editor/nav/OutlinePanel.js +228 -0
- package/dist/shared/components/layout-editor/nav/ShortcutSheet.js +31 -0
- package/dist/shared/components/layout-editor/nav/find.js +20 -0
- package/dist/shared/components/layout-editor/nav/tree.js +142 -0
- package/dist/shared/components/layout-editor/nav/useEditorNav.js +101 -0
- package/dist/shared/components/layout-editor/nav/view-prefs.js +34 -0
- package/dist/shared/components/layout-editor/ops/ChangeRequestsPanel.js +143 -0
- package/dist/shared/components/layout-editor/ops/DependencyDiagram.js +179 -0
- package/dist/shared/components/layout-editor/ops/LayoutOpsBlocks.js +92 -0
- package/dist/shared/components/layout-editor/ops/PromotePanel.js +287 -0
- package/dist/shared/components/layout-editor/ops/ops-api.js +122 -0
- package/dist/shared/components/layout-editor/overview/OverviewActions.js +15 -3
- package/dist/shared/components/layout-editor/overview/describe-conditions.js +18 -14
- package/dist/shared/components/layout-editor/overview/overview-api.js +105 -88
- package/dist/shared/components/layout-editor/panel-style.js +8 -7
- package/dist/shared/components/layout-editor/parity-keys.json.js +4 -0
- package/dist/shared/components/layout-editor/pin.js +25 -0
- package/dist/shared/components/layout-editor/presence.js +111 -0
- package/dist/shared/components/layout-editor/preview/PreviewModes.js +224 -0
- package/dist/shared/components/layout-editor/preview/PreviewPanes.js +262 -0
- package/dist/shared/components/layout-editor/preview/preview-api.js +57 -0
- package/dist/shared/components/layout-editor/preview/preview-model.js +157 -0
- package/dist/shared/components/layout-editor/reuse/FieldMapStep.js +70 -0
- package/dist/shared/components/layout-editor/reuse/FormMoreMenu.js +127 -0
- package/dist/shared/components/layout-editor/reuse/LibraryRows.js +150 -0
- package/dist/shared/components/layout-editor/reuse/NewFormStart.js +20 -0
- package/dist/shared/components/layout-editor/reuse/SectionReuseActions.js +291 -0
- package/dist/shared/components/layout-editor/reuse/field-match.js +77 -0
- package/dist/shared/components/layout-editor/reuse/reuse-api.js +73 -0
- package/dist/shared/components/layout-editor/reuse/seed.js +13 -0
- package/dist/shared/components/layout-editor/reuse/useFormFromRecord.js +43 -0
- package/dist/shared/components/layout-editor/reuse/useRailCopy.js +34 -0
- package/dist/shared/components/layout-editor/settings/FormSettings.js +123 -103
- package/dist/shared/components/layout-editor/settings/InheritanceSection.js +1 -1
- package/dist/shared/components/layout-editor/settings/ToolsSection.js +174 -100
- package/dist/shared/components/layout-editor/settings/WhoSection.js +136 -100
- package/dist/shared/components/layout-editor/settings/controls.js +8 -8
- package/dist/shared/components/layout-editor/settings/settings-registry.js +35 -11
- package/dist/shared/components/layout-editor/shortcuts.js +88 -0
- package/dist/shared/components/layout-editor/show-when.js +35 -0
- package/dist/shared/components/layout-editor/slot-names.js +4 -3
- package/dist/shared/components/layout-editor/structure-ops.js +399 -0
- package/dist/shared/components/layout-editor/testing/CostLimitSetting.js +42 -0
- package/dist/shared/components/layout-editor/testing/TestingPanels.js +551 -0
- package/dist/shared/components/layout-editor/testing/testing-api.js +67 -0
- package/dist/shared/components/layout-editor/testing/testing-model.js +393 -0
- package/dist/shared/components/layout-editor/testing/use-record-check.js +44 -0
- package/dist/shared/components/layout-editor/toolbar-kit.js +242 -0
- package/dist/shared/components/layout-editor/unsaved-marks.js +72 -0
- package/dist/shared/components/layout-editor/usage/FillChip.js +27 -0
- package/dist/shared/components/layout-editor/usage/UsagePanel.js +158 -0
- package/dist/shared/components/layout-editor/usage/suggest-sections.js +55 -0
- package/dist/shared/components/layout-editor/usage/usage-api.js +104 -0
- package/dist/shared/components/layout-editor/useLayoutDraft.js +573 -307
- package/dist/shared/components/support/SuggestFormChange.js +143 -0
- package/dist/shared/lib/ai-fill.js +37 -0
- package/dist/shared/lib/form-usage-beacon.js +84 -0
- package/dist/shared/lib/layout-i18n.js +66 -0
- package/dist/shared/lib/layout-lint.js +490 -0
- package/dist/shared/lib/layout-ops.js +110 -106
- package/dist/shared/lib/screenshot.js +54 -28
- package/dist/shared/lib/visible-when.js +34 -0
- package/package.json +1 -1
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { MousePointerClick as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { HEADER_GROUP_KEY as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { TipLayer as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsx as t, jsxs as o, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { MousePointerClick as X } from "lucide-react";
|
|
3
|
+
import { useMemo as Q, useState as Z, useId as ee } from "react";
|
|
4
|
+
import { HEADER_GROUP_KEY as G, CANVAS_SLOT_KEYS as te, UNGROUPED_KEY as le } from "../../../lib/layout-ops.js";
|
|
5
|
+
import { cn as ne, titleCase as h } from "../../../lib/utils.js";
|
|
6
|
+
import { TipLayer as ie } from "../../TipLayer.js";
|
|
7
|
+
import { ArrangeButton as re } from "../ArrangeButton.js";
|
|
8
|
+
import { AutoArrangeButton as oe } from "../AutoArrange.js";
|
|
9
|
+
import { useLayoutDesign as ae, targetKey as de } from "../design-context.js";
|
|
10
|
+
import { FIELD_HOLDERS as ce } from "../field-zones.js";
|
|
11
|
+
import { PanelHeader as I, PanelBody as P, PanelTabs as se, tabId as ue, tabPanelId as fe } from "../panel-frame.js";
|
|
12
|
+
import { tintCard as me } from "../panel-style.js";
|
|
13
|
+
import { slotName as U } from "../slot-names.js";
|
|
14
|
+
import { useLayoutBundle as pe } from "../useLayoutDraft.js";
|
|
15
|
+
import { AdvancedTab as be } from "./AdvancedTab.js";
|
|
16
|
+
import { Breadcrumb as M } from "./Breadcrumb.js";
|
|
17
|
+
import { useCollectionMeta as Y, useGlobalWriter as he, useFieldCtxValue as ye, FieldCtxContext as ke } from "./field-context.js";
|
|
18
|
+
import { GridTab as xe } from "./GridTab.js";
|
|
19
|
+
import { GroupInspector as _e } from "./GroupInspector.js";
|
|
20
|
+
import { HeaderItemInspector as ve } from "./HeaderItemInspector.js";
|
|
21
|
+
import { HelpVideoSetting as z, NoteSetting as $ } from "./HelpTab.js";
|
|
22
|
+
import { InspectorEnvContext as B, useInspectorEnv as F, ScopeLegend as R, GlobalWriterContext as ge } from "./kit.js";
|
|
23
|
+
import { LookTab as Ne } from "./LookTab.js";
|
|
24
|
+
import { isDefaultForm as Te, layoutTypeOf as Se, findPlacement as D, SUBTITLE_FIELD as H, overrideGroupOps as Ie, overridePlacementOps as Pe, describeField as V, asObject as W, NUMERIC_TYPES as Ee } from "./model.js";
|
|
25
|
+
import { OverrideNotice as Le } from "./OverrideNotice.js";
|
|
26
|
+
import { PickerTab as Ce } from "./PickerTab.js";
|
|
27
|
+
import { RulesTab as Ke } from "./RulesTab.js";
|
|
28
|
+
import { SlotInspector as Me } from "./SlotInspector.js";
|
|
29
|
+
import { SubtitleInspector as Fe } from "./SubtitleInspector.js";
|
|
30
|
+
import { useInspectorTabRequest as Oe } from "./tab-request.js";
|
|
31
|
+
import { WidgetInspector as Ge } from "./WidgetInspector.js";
|
|
32
|
+
const Re = /^__widget_\d+__$/, He = /^__ext_[a-z][a-z0-9-]{1,60}__$/, q = (e) => te.includes(e) || e === "__owners__" || e === "__pdf__" || He.test(e);
|
|
33
|
+
function J(e) {
|
|
27
34
|
switch (e.kind) {
|
|
28
35
|
case "field":
|
|
29
36
|
case "slot":
|
|
@@ -31,102 +38,120 @@ function z(e) {
|
|
|
31
38
|
case "header":
|
|
32
39
|
return {
|
|
33
40
|
field: e.field,
|
|
34
|
-
group_key: e.field ===
|
|
41
|
+
group_key: e.field === H ? null : G
|
|
35
42
|
};
|
|
36
43
|
default:
|
|
37
44
|
return null;
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
function
|
|
41
|
-
const { bundle:
|
|
47
|
+
function vt(e) {
|
|
48
|
+
const { bundle: l, target: n, apply: i, collection: c } = e, a = ae(), f = Q(
|
|
42
49
|
() => ({
|
|
43
|
-
bundle:
|
|
44
|
-
apply:
|
|
50
|
+
bundle: l,
|
|
51
|
+
apply: i,
|
|
45
52
|
flush: e.flush ?? (() => {
|
|
46
53
|
}),
|
|
47
|
-
collection:
|
|
48
|
-
layoutType:
|
|
49
|
-
defaultForm:
|
|
54
|
+
collection: c,
|
|
55
|
+
layoutType: Se(l.layout),
|
|
56
|
+
defaultForm: Te(l.layout),
|
|
57
|
+
select: e.onSelect
|
|
50
58
|
}),
|
|
51
|
-
[
|
|
52
|
-
),
|
|
53
|
-
if (!
|
|
54
|
-
return /* @__PURE__ */ t(
|
|
55
|
-
/* @__PURE__ */ t(
|
|
59
|
+
[l, i, e.flush, c, e.onSelect]
|
|
60
|
+
), d = n ? J(n) : null, r = d ? D(l, d.field, d.group_key) : null, x = (n == null ? void 0 : n.kind) === "group" ? l.groups.find((b) => b.key === n.key) ?? null : null, _ = !!n && (n.kind === "group" ? !x : !r && !q((d == null ? void 0 : d.field) ?? "") && (d == null ? void 0 : d.field) !== H), g = l.layout.parent_layout_id != null ? Number(l.layout.parent_layout_id) : null, E = e.inheritedFrom ?? (n ? (a == null ? void 0 : a.inheritedFrom(n)) ?? null : null), { data: s } = pe(g), m = _ && s && d ? D(s, d.field, d.group_key) : null, p = _ && s && (n == null ? void 0 : n.kind) === "group" ? s.groups.find((b) => b.key === n.key) ?? null : null, N = _ && (!!m || !!p || !!E);
|
|
61
|
+
if (!n)
|
|
62
|
+
return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-8 pb-16 text-center", children: [
|
|
63
|
+
/* @__PURE__ */ t(X, { className: "h-5 w-5 text-slate-400" }),
|
|
56
64
|
/* @__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." })
|
|
57
65
|
] }) });
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
} },
|
|
66
|
+
if (N) {
|
|
67
|
+
const b = s != null && s.layout.name ? String(s.layout.name) : E ?? "the parent form", L = { ...f, bundle: s ?? l, apply: () => {
|
|
68
|
+
} }, C = () => {
|
|
61
69
|
if (!s) return;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
/* @__PURE__ */
|
|
70
|
+
const y = p ? Ie(l, s, p) : m ? Pe(l, s, m) : [];
|
|
71
|
+
y.length && i(y, { label: `Override ${S(n)} on this form` });
|
|
72
|
+
}, v = /* @__PURE__ */ o("div", { "data-setting": "inspector.inherited_override", className: ne(me, "space-y-2.5 p-3"), children: [
|
|
73
|
+
/* @__PURE__ */ o("p", { className: "text-[12px] leading-snug text-slate-700 dark:text-foreground", children: [
|
|
66
74
|
"This comes from ",
|
|
67
|
-
/* @__PURE__ */ t("span", { className: "font-medium", children:
|
|
75
|
+
/* @__PURE__ */ t("span", { className: "font-medium", children: b }),
|
|
68
76
|
". Change it there for every form built on it, or override it on this form only."
|
|
69
77
|
] }),
|
|
70
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2", children: [
|
|
71
79
|
/* @__PURE__ */ t(
|
|
72
80
|
"button",
|
|
73
81
|
{
|
|
74
82
|
type: "button",
|
|
75
83
|
"data-override-here": "",
|
|
76
|
-
disabled: !s || !
|
|
77
|
-
onClick:
|
|
84
|
+
disabled: !s || !m && !p,
|
|
85
|
+
onClick: C,
|
|
78
86
|
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",
|
|
79
87
|
children: "Override here"
|
|
80
88
|
}
|
|
81
89
|
),
|
|
82
|
-
|
|
90
|
+
g != null && e.openLayout && /* @__PURE__ */ o(
|
|
83
91
|
"button",
|
|
84
92
|
{
|
|
85
93
|
type: "button",
|
|
86
94
|
"data-edit-in-parent": "",
|
|
87
95
|
onClick: () => {
|
|
88
|
-
var
|
|
89
|
-
return (
|
|
96
|
+
var y;
|
|
97
|
+
return (y = e.openLayout) == null ? void 0 : y.call(e, g);
|
|
90
98
|
},
|
|
91
99
|
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",
|
|
92
100
|
children: [
|
|
93
101
|
"Edit in ",
|
|
94
|
-
|
|
102
|
+
b
|
|
95
103
|
]
|
|
96
104
|
}
|
|
97
105
|
)
|
|
98
106
|
] })
|
|
99
107
|
] });
|
|
100
|
-
return /* @__PURE__ */ t(
|
|
101
|
-
/* @__PURE__ */ t(
|
|
102
|
-
/* @__PURE__ */ t(
|
|
108
|
+
return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(B.Provider, { value: L, children: p ? /* @__PURE__ */ t(w, { group: p, notice: v, readOnly: !0 }) : m ? /* @__PURE__ */ t(j, { target: n, row: m, notice: v, readOnly: !0 }) : /* @__PURE__ */ o(k, { children: [
|
|
109
|
+
/* @__PURE__ */ t(I, { title: S(n) }),
|
|
110
|
+
/* @__PURE__ */ t(P, { children: v })
|
|
103
111
|
] }) }) });
|
|
104
112
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
const u = _ ? null : /* @__PURE__ */ t(
|
|
114
|
+
Le,
|
|
115
|
+
{
|
|
116
|
+
bundle: l,
|
|
117
|
+
parent: s,
|
|
118
|
+
target: n,
|
|
119
|
+
title: S(n),
|
|
120
|
+
apply: i
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
return /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t(B.Provider, { value: f, children: n.kind === "group" ? x && /* @__PURE__ */ t(w, { group: x, notice: u }, x.key) : _ ? /* @__PURE__ */ o(k, { children: [
|
|
124
|
+
/* @__PURE__ */ t(I, { title: S(n) }),
|
|
125
|
+
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ o("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: [
|
|
126
|
+
S(n),
|
|
109
127
|
" is not on this form any more."
|
|
110
128
|
] }) })
|
|
111
|
-
] }) : /* @__PURE__ */ t(
|
|
129
|
+
] }) : /* @__PURE__ */ t(
|
|
130
|
+
j,
|
|
131
|
+
{
|
|
132
|
+
target: n,
|
|
133
|
+
row: r,
|
|
134
|
+
notice: u
|
|
135
|
+
},
|
|
136
|
+
de(n)
|
|
137
|
+
) }) });
|
|
112
138
|
}
|
|
113
139
|
function S(e) {
|
|
114
|
-
return e.kind === "group" ?
|
|
140
|
+
return e.kind === "group" ? h(e.key) : e.field.startsWith("__") ? U(e.field) : h(e.field.split(".").pop() ?? e.field);
|
|
115
141
|
}
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */ t(
|
|
142
|
+
function O({ children: e }) {
|
|
143
|
+
return /* @__PURE__ */ o("div", { "data-inspector": "", className: "flex h-full min-h-0 min-w-0 flex-col text-[12px]", children: [
|
|
144
|
+
/* @__PURE__ */ t(ie, {}),
|
|
119
145
|
e
|
|
120
146
|
] });
|
|
121
147
|
}
|
|
122
|
-
function
|
|
123
|
-
if (!
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
return
|
|
148
|
+
function Ae(e, l) {
|
|
149
|
+
if (!l || l === le) return null;
|
|
150
|
+
if (l === G) return "Header strip";
|
|
151
|
+
const n = e.groups.find((i) => i.key === l);
|
|
152
|
+
return n ? n.label || h(n.key) : h(l);
|
|
127
153
|
}
|
|
128
|
-
|
|
129
|
-
function Ke(e) {
|
|
154
|
+
function Be(e) {
|
|
130
155
|
if (e.isPath) return "shows a linked value";
|
|
131
156
|
if (e.computedType) return "calculated";
|
|
132
157
|
if (e.relKind === "M2O") return "picks one record";
|
|
@@ -134,7 +159,7 @@ function Ke(e) {
|
|
|
134
159
|
if (e.relKind === "O2M")
|
|
135
160
|
return e.iface === "inline-table" ? "table of related rows" : "related rows";
|
|
136
161
|
if (e.relKind) return "related records";
|
|
137
|
-
if (
|
|
162
|
+
if (Ee.has(e.type)) return "number";
|
|
138
163
|
switch (e.type) {
|
|
139
164
|
case "boolean":
|
|
140
165
|
return "yes or no";
|
|
@@ -157,176 +182,232 @@ function Ke(e) {
|
|
|
157
182
|
return e.type;
|
|
158
183
|
}
|
|
159
184
|
}
|
|
160
|
-
function
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
e && /* @__PURE__ */
|
|
185
|
+
function A({ words: e, k: l, setting: n }) {
|
|
186
|
+
return /* @__PURE__ */ o("span", { "data-setting": n, children: [
|
|
187
|
+
e && /* @__PURE__ */ o(k, { children: [
|
|
163
188
|
e,
|
|
164
189
|
" · "
|
|
165
190
|
] }),
|
|
166
|
-
/* @__PURE__ */ t("span", { className: "font-mono text-[11px]", children:
|
|
191
|
+
/* @__PURE__ */ t("span", { className: "font-mono text-[11px]", children: l })
|
|
167
192
|
] });
|
|
168
193
|
}
|
|
169
|
-
function
|
|
170
|
-
const
|
|
171
|
-
return
|
|
194
|
+
function De(e, l) {
|
|
195
|
+
const n = l.parent_key ? e.groups.find((i) => i.key === l.parent_key) ?? null : null;
|
|
196
|
+
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";
|
|
172
197
|
}
|
|
173
|
-
function
|
|
198
|
+
function w({
|
|
174
199
|
group: e,
|
|
175
|
-
notice:
|
|
176
|
-
readOnly:
|
|
200
|
+
notice: l,
|
|
201
|
+
readOnly: n = !1
|
|
177
202
|
}) {
|
|
178
|
-
const
|
|
179
|
-
return /* @__PURE__ */
|
|
203
|
+
const i = F(), c = /* @__PURE__ */ t(_e, { group: e, readOnly: n });
|
|
204
|
+
return /* @__PURE__ */ o(k, { children: [
|
|
180
205
|
/* @__PURE__ */ t(
|
|
181
|
-
|
|
206
|
+
I,
|
|
182
207
|
{
|
|
183
|
-
eyebrow:
|
|
184
|
-
|
|
185
|
-
|
|
208
|
+
eyebrow: /* @__PURE__ */ t(
|
|
209
|
+
M,
|
|
210
|
+
{
|
|
211
|
+
kind: De(i.bundle, e),
|
|
212
|
+
target: { kind: "group", key: e.key }
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
title: e.label || h(e.key),
|
|
216
|
+
sub: /* @__PURE__ */ t(A, { k: e.key, setting: "group.key" })
|
|
186
217
|
}
|
|
187
218
|
),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
|
|
190
|
-
|
|
219
|
+
/* @__PURE__ */ o(P, { children: [
|
|
220
|
+
l,
|
|
221
|
+
n ? (
|
|
191
222
|
// Inputs sit in a disabled fieldset and writes go nowhere.
|
|
192
|
-
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children:
|
|
193
|
-
) : /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */ t(
|
|
195
|
-
|
|
223
|
+
/* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: c })
|
|
224
|
+
) : /* @__PURE__ */ o(k, { children: [
|
|
225
|
+
/* @__PURE__ */ t(R, {}),
|
|
226
|
+
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2", children: [
|
|
227
|
+
/* @__PURE__ */ t(re, { targets: [{ kind: "group", key: e.key }] }),
|
|
228
|
+
ce.has(e.type) && i.layoutType !== "table" && i.layoutType !== "file" && /* @__PURE__ */ t(
|
|
229
|
+
oe,
|
|
230
|
+
{
|
|
231
|
+
bundle: i.bundle,
|
|
232
|
+
apply: i.apply,
|
|
233
|
+
zone: e.key,
|
|
234
|
+
zoneLabel: e.label || h(e.key)
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
] }),
|
|
238
|
+
c,
|
|
239
|
+
/* @__PURE__ */ o(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
"data-group-help": "",
|
|
243
|
+
className: "mt-5 space-y-5 border-t border-slate-100 pt-5 dark:border-border/60",
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ t(
|
|
246
|
+
z,
|
|
247
|
+
{
|
|
248
|
+
kind: "section",
|
|
249
|
+
name: e.key,
|
|
250
|
+
label: e.label || h(e.key)
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
/* @__PURE__ */ t(
|
|
254
|
+
$,
|
|
255
|
+
{
|
|
256
|
+
target: { kind: "group", key: e.key },
|
|
257
|
+
name: e.label || h(e.key)
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
)
|
|
196
263
|
] })
|
|
197
264
|
] })
|
|
198
265
|
] });
|
|
199
266
|
}
|
|
200
|
-
function
|
|
267
|
+
function K({
|
|
201
268
|
eyebrow: e,
|
|
202
|
-
title:
|
|
203
|
-
sub:
|
|
204
|
-
notice:
|
|
205
|
-
readOnly:
|
|
269
|
+
title: l,
|
|
270
|
+
sub: n,
|
|
271
|
+
notice: i,
|
|
272
|
+
readOnly: c,
|
|
206
273
|
children: a
|
|
207
274
|
}) {
|
|
208
|
-
return /* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */ t(
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
/* @__PURE__ */ t(
|
|
275
|
+
return /* @__PURE__ */ o(k, { children: [
|
|
276
|
+
/* @__PURE__ */ t(I, { eyebrow: e, title: l, sub: n }),
|
|
277
|
+
/* @__PURE__ */ o(P, { children: [
|
|
278
|
+
i,
|
|
279
|
+
c ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: /* @__PURE__ */ t("fieldset", { disabled: !0, className: "min-w-0", children: a }) }) : /* @__PURE__ */ o(k, { children: [
|
|
280
|
+
/* @__PURE__ */ t(R, {}),
|
|
214
281
|
a
|
|
215
282
|
] })
|
|
216
283
|
] })
|
|
217
284
|
] });
|
|
218
285
|
}
|
|
219
|
-
function
|
|
286
|
+
function j({
|
|
220
287
|
target: e,
|
|
221
|
-
row:
|
|
222
|
-
notice:
|
|
223
|
-
readOnly:
|
|
288
|
+
row: l,
|
|
289
|
+
notice: n,
|
|
290
|
+
readOnly: i = !1
|
|
224
291
|
}) {
|
|
225
|
-
var
|
|
226
|
-
const
|
|
227
|
-
return a ===
|
|
228
|
-
|
|
292
|
+
var r;
|
|
293
|
+
const c = F(), a = e.kind === "group" ? "" : e.field, f = (l == null ? void 0 : l.group_key) ?? (e.kind === "group" ? null : ((r = J(e)) == null ? void 0 : r.group_key) ?? null), d = Ae(c.bundle, f);
|
|
294
|
+
return a === H ? /* @__PURE__ */ t(K, { eyebrow: "Header", title: "Subtitle", notice: n, readOnly: i, children: /* @__PURE__ */ t(Fe, {}) }) : l && (Re.test(a) || l.widget_id != null) ? /* @__PURE__ */ t(
|
|
295
|
+
K,
|
|
229
296
|
{
|
|
230
|
-
eyebrow:
|
|
231
|
-
title:
|
|
232
|
-
notice:
|
|
233
|
-
readOnly:
|
|
234
|
-
children: /* @__PURE__ */ t(
|
|
297
|
+
eyebrow: /* @__PURE__ */ t(M, { kind: "Widget", target: e, where: d }),
|
|
298
|
+
title: l.label_override || "Widget",
|
|
299
|
+
notice: n,
|
|
300
|
+
readOnly: i,
|
|
301
|
+
children: /* @__PURE__ */ t(Ge, { row: l })
|
|
235
302
|
}
|
|
236
|
-
) :
|
|
237
|
-
|
|
303
|
+
) : q(a) ? /* @__PURE__ */ t(
|
|
304
|
+
K,
|
|
238
305
|
{
|
|
239
|
-
eyebrow:
|
|
240
|
-
title:
|
|
241
|
-
notice:
|
|
242
|
-
readOnly:
|
|
243
|
-
children: /* @__PURE__ */ t(
|
|
306
|
+
eyebrow: /* @__PURE__ */ t(M, { kind: "Panel", target: e, where: d }),
|
|
307
|
+
title: U(a),
|
|
308
|
+
notice: n,
|
|
309
|
+
readOnly: i,
|
|
310
|
+
children: /* @__PURE__ */ t(Me, { field: a, groupKey: f, row: l })
|
|
244
311
|
}
|
|
245
|
-
) :
|
|
312
|
+
) : l ? e.kind === "header" || l.group_key === G ? /* @__PURE__ */ t(We, { row: l, notice: n, readOnly: i }) : /* @__PURE__ */ t(je, { target: e, row: l, where: d, notice: n, readOnly: i }) : null;
|
|
246
313
|
}
|
|
247
|
-
function
|
|
314
|
+
function We({
|
|
248
315
|
row: e,
|
|
249
|
-
notice:
|
|
250
|
-
readOnly:
|
|
316
|
+
notice: l,
|
|
317
|
+
readOnly: n
|
|
251
318
|
}) {
|
|
252
|
-
const
|
|
319
|
+
const i = F(), { data: c } = Y(i.collection), a = V(e.field, (c == null ? void 0 : c.fields) ?? [], (c == null ? void 0 : c.relations) ?? [], null).label;
|
|
253
320
|
return /* @__PURE__ */ t(
|
|
254
|
-
|
|
321
|
+
K,
|
|
255
322
|
{
|
|
256
323
|
eyebrow: "Header strip",
|
|
257
324
|
title: e.label_override || a,
|
|
258
|
-
sub: /* @__PURE__ */ t(
|
|
259
|
-
notice:
|
|
260
|
-
readOnly:
|
|
261
|
-
children: /* @__PURE__ */ t(
|
|
325
|
+
sub: /* @__PURE__ */ t(A, { k: e.field }),
|
|
326
|
+
notice: l,
|
|
327
|
+
readOnly: n,
|
|
328
|
+
children: /* @__PURE__ */ t(ve, { row: e, label: a })
|
|
262
329
|
}
|
|
263
330
|
);
|
|
264
331
|
}
|
|
265
|
-
const
|
|
266
|
-
function
|
|
267
|
-
|
|
332
|
+
const we = { fields: [], relations: [], label: "" };
|
|
333
|
+
function je({
|
|
334
|
+
target: e,
|
|
335
|
+
row: l,
|
|
268
336
|
where: n,
|
|
269
|
-
notice:
|
|
270
|
-
readOnly:
|
|
337
|
+
notice: i,
|
|
338
|
+
readOnly: c
|
|
271
339
|
}) {
|
|
272
|
-
var
|
|
273
|
-
const
|
|
274
|
-
collection:
|
|
275
|
-
collectionLabel:
|
|
276
|
-
field:
|
|
340
|
+
var L, C, v, y;
|
|
341
|
+
const a = F(), { data: f } = Y(a.collection), d = f ?? we, r = V(l.field, d.fields, d.relations, l), x = he({
|
|
342
|
+
collection: a.collection,
|
|
343
|
+
collectionLabel: d.label || h(a.collection),
|
|
344
|
+
field: l.field,
|
|
277
345
|
fieldLabel: r.label,
|
|
278
346
|
stored: {
|
|
279
|
-
options:
|
|
280
|
-
dependency_config:
|
|
347
|
+
options: W((L = r.global) == null ? void 0 : L.options),
|
|
348
|
+
dependency_config: W((C = r.global) == null ? void 0 : C.dependency_config),
|
|
281
349
|
columns: {
|
|
282
|
-
deprecated: !!((
|
|
283
|
-
deprecation_note: ((
|
|
350
|
+
deprecated: !!((v = r.global) != null && v.deprecated_at),
|
|
351
|
+
deprecation_note: ((y = r.global) == null ? void 0 : y.deprecation_note) || null
|
|
284
352
|
}
|
|
285
353
|
}
|
|
286
|
-
}),
|
|
354
|
+
}), _ = ye({ env: a, row: l, meta: d, writer: x, readOnly: c }), g = r.relKind === "M2O" || r.relKind === "M2M" || r.isPath || r.iface === "relation-path" || r.iface === "file-image" || r.iface === "files-m2m", E = r.relKind === "O2M" && (r.iface === "inline-grid" || r.iface === "inline-table"), s = [
|
|
287
355
|
{ key: "look", label: "Look" },
|
|
288
356
|
{ key: "rules", label: "Rules" },
|
|
289
|
-
...
|
|
290
|
-
...
|
|
357
|
+
...g ? [{ key: "picker", label: "Picker" }] : [],
|
|
358
|
+
...E ? [{ key: "grid", label: r.iface === "inline-table" ? "Table" : "Grid" }] : [],
|
|
359
|
+
{ key: "help", label: "Help" },
|
|
291
360
|
{ key: "advanced", label: "Advanced" }
|
|
292
|
-
], [
|
|
293
|
-
|
|
361
|
+
], [m, p] = Z("look");
|
|
362
|
+
Oe(l.field, (T) => p(T));
|
|
363
|
+
const N = ee(), u = s.some((T) => T.key === m) ? m : "look", b = /* @__PURE__ */ t("fieldset", { disabled: c, className: "min-w-0", children: f ? u === "look" ? /* @__PURE__ */ t(Ne, {}) : u === "rules" ? /* @__PURE__ */ t(Ke, {}) : u === "picker" ? /* @__PURE__ */ t(Ce, {}) : u === "grid" ? /* @__PURE__ */ t(xe, {}) : u === "help" ? /* @__PURE__ */ o("div", { "data-help-tab": "", className: "space-y-5", children: [
|
|
364
|
+
/* @__PURE__ */ t("p", { className: "text-[12px] text-slate-500 dark:text-muted-foreground", children: "Help text and the placeholder are on the Look tab." }),
|
|
365
|
+
/* @__PURE__ */ t(z, { kind: "field", name: l.field, label: r.label }),
|
|
294
366
|
/* @__PURE__ */ t(
|
|
295
|
-
|
|
367
|
+
$,
|
|
368
|
+
{
|
|
369
|
+
target: { kind: "field", field: l.field, group_key: l.group_key },
|
|
370
|
+
name: r.label
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
] }) : /* @__PURE__ */ t(be, {}) : /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Loading the field…" }) });
|
|
374
|
+
return /* @__PURE__ */ t(ke.Provider, { value: _, children: /* @__PURE__ */ o(ge.Provider, { value: x, children: [
|
|
375
|
+
/* @__PURE__ */ t(
|
|
376
|
+
I,
|
|
296
377
|
{
|
|
297
|
-
eyebrow:
|
|
378
|
+
eyebrow: /* @__PURE__ */ t(M, { kind: "Field", target: e, where: n }),
|
|
298
379
|
title: r.label,
|
|
299
|
-
sub: /* @__PURE__ */ t(
|
|
380
|
+
sub: /* @__PURE__ */ t(A, { words: f ? Be(r) : void 0, k: l.field }),
|
|
300
381
|
children: /* @__PURE__ */ t(
|
|
301
|
-
|
|
382
|
+
se,
|
|
302
383
|
{
|
|
303
|
-
idBase:
|
|
384
|
+
idBase: N,
|
|
304
385
|
label: `Settings of ${r.label}`,
|
|
305
|
-
tabs:
|
|
306
|
-
active:
|
|
307
|
-
onChange: (
|
|
308
|
-
|
|
386
|
+
tabs: s,
|
|
387
|
+
active: u,
|
|
388
|
+
onChange: (T) => {
|
|
389
|
+
a.flush(), p(T);
|
|
309
390
|
}
|
|
310
391
|
}
|
|
311
392
|
)
|
|
312
393
|
}
|
|
313
394
|
),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
|
|
395
|
+
/* @__PURE__ */ o(
|
|
396
|
+
P,
|
|
316
397
|
{
|
|
317
|
-
tabpanel: { id:
|
|
398
|
+
tabpanel: { id: fe(N), labelledBy: ue(N, u) },
|
|
318
399
|
children: [
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
/* @__PURE__ */ t(
|
|
322
|
-
|
|
400
|
+
i,
|
|
401
|
+
c ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: b }) : /* @__PURE__ */ o(k, { children: [
|
|
402
|
+
/* @__PURE__ */ t(R, { field: !0 }),
|
|
403
|
+
b
|
|
323
404
|
] })
|
|
324
405
|
]
|
|
325
406
|
},
|
|
326
|
-
|
|
407
|
+
u
|
|
327
408
|
)
|
|
328
409
|
] }) });
|
|
329
410
|
}
|
|
330
411
|
export {
|
|
331
|
-
|
|
412
|
+
vt as Inspector
|
|
332
413
|
};
|