@nivaro/react 0.2.54 → 0.2.56

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.
Files changed (151) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +99 -98
  3. package/dist/index.d.ts +367 -2
  4. package/dist/index.js +645 -616
  5. package/dist/layout-editor.d.ts +4 -0
  6. package/dist/shared/components/BackgroundRunOffer.js +117 -0
  7. package/dist/shared/components/BroadcastView.js +214 -213
  8. package/dist/shared/components/CollectionBrowserView.js +2592 -2695
  9. package/dist/shared/components/ItemEditForm.js +4066 -3832
  10. package/dist/shared/components/JobsTray.js +100 -55
  11. package/dist/shared/components/MyWorkView.js +91 -89
  12. package/dist/shared/components/NotificationBell.js +80 -79
  13. package/dist/shared/components/ProfileView.js +568 -520
  14. package/dist/shared/components/RecordCompare.js +254 -0
  15. package/dist/shared/components/RecordReadView.js +599 -552
  16. package/dist/shared/components/ReportView.js +578 -543
  17. package/dist/shared/components/RowPresence.js +91 -0
  18. package/dist/shared/components/WidgetSlot.js +474 -458
  19. package/dist/shared/components/ai/AiAnalyticsView.js +16 -6
  20. package/dist/shared/components/ai/AskPanel.js +139 -119
  21. package/dist/shared/components/ai/FirstWeekCard.js +126 -0
  22. package/dist/shared/components/bulk/BulkFieldUpdate.js +289 -0
  23. package/dist/shared/components/bulk/bulk-field-options.js +45 -0
  24. package/dist/shared/components/charts/CumulativeFlowChart.js +176 -0
  25. package/dist/shared/components/chat/ChannelArchive.js +326 -0
  26. package/dist/shared/components/chat/ChannelExtras.js +141 -121
  27. package/dist/shared/components/chat/ChatAnalyticsView.js +112 -110
  28. package/dist/shared/components/chat/ChatPanel.js +1695 -1733
  29. package/dist/shared/components/chat/Composer.js +357 -303
  30. package/dist/shared/components/chat/MessageActions.js +92 -0
  31. package/dist/shared/components/chat/MessageFormat.js +290 -264
  32. package/dist/shared/components/chat/OutboxBubbles.js +146 -0
  33. package/dist/shared/components/chat/RequestIdCard.js +135 -0
  34. package/dist/shared/components/chat/RoomHeaderMenu.js +202 -0
  35. package/dist/shared/components/chat/RoomParts.js +213 -274
  36. package/dist/shared/components/chat/ScreenClip.js +184 -0
  37. package/dist/shared/components/chat/chat-core.js +402 -483
  38. package/dist/shared/components/chat/chat-drafts.js +59 -0
  39. package/dist/shared/components/chat/chat-emoji.js +348 -0
  40. package/dist/shared/components/chat/chat-local-time.js +41 -0
  41. package/dist/shared/components/chat/chat-outbox.js +303 -0
  42. package/dist/shared/components/chat/chat-window.js +163 -0
  43. package/dist/shared/components/chat/huddle/HuddleControls.js +143 -0
  44. package/dist/shared/components/chat/huddle/HuddleStage.js +164 -0
  45. package/dist/shared/components/chat/huddle/huddle-store.js +342 -0
  46. package/dist/shared/components/chat/huddle/useHuddle.js +58 -0
  47. package/dist/shared/components/help-videos/api.js +76 -73
  48. package/dist/shared/components/item-edit/CatalogPickerField.js +113 -112
  49. package/dist/shared/components/item-edit/ChangeReasonDialog.js +13 -13
  50. package/dist/shared/components/item-edit/FieldAffordances.js +2 -2
  51. package/dist/shared/components/item-edit/FieldRenderer.js +248 -245
  52. package/dist/shared/components/item-edit/FieldRow.js +292 -279
  53. package/dist/shared/components/item-edit/GroupSection.js +698 -574
  54. package/dist/shared/components/item-edit/InlineTableField.js +3 -1
  55. package/dist/shared/components/item-edit/RelationCombobox.js +186 -176
  56. package/dist/shared/components/item-edit/entry/EntryStrip.js +54 -0
  57. package/dist/shared/components/item-edit/entry/entry-keys.js +27 -0
  58. package/dist/shared/components/item-edit/entry/useEntryKeyboard.js +70 -0
  59. package/dist/shared/components/item-edit/entry/useEntryMode.js +59 -0
  60. package/dist/shared/components/item-edit/form-structure-ui.js +105 -0
  61. package/dist/shared/components/item-edit/lazy-sections.js +36 -0
  62. package/dist/shared/components/item-edit/lock-why.js +39 -32
  63. package/dist/shared/components/item-edit/picker-miss.js +26 -0
  64. package/dist/shared/components/item-edit/placement-behaviour.js +196 -0
  65. package/dist/shared/components/item-edit/useFormUsageBeacon.js +51 -45
  66. package/dist/shared/components/layout-editor/AddPanel.js +134 -117
  67. package/dist/shared/components/layout-editor/ChangeNote.js +25 -24
  68. package/dist/shared/components/layout-editor/CollabParts.js +80 -75
  69. package/dist/shared/components/layout-editor/DesignNode.js +126 -120
  70. package/dist/shared/components/layout-editor/EditorCanvas.js +30 -27
  71. package/dist/shared/components/layout-editor/EditorTopBar.js +203 -192
  72. package/dist/shared/components/layout-editor/HistoryPanel.js +120 -104
  73. package/dist/shared/components/layout-editor/LayoutEditor.js +768 -671
  74. package/dist/shared/components/layout-editor/RestorePiece.js +143 -0
  75. package/dist/shared/components/layout-editor/StagedChip.js +22 -0
  76. package/dist/shared/components/layout-editor/StructureMenu.js +237 -186
  77. package/dist/shared/components/layout-editor/collab/FormFollowShare.js +149 -103
  78. package/dist/shared/components/layout-editor/collab/collab-api.js +29 -26
  79. package/dist/shared/components/layout-editor/dnd/LayoutDndProvider.js +81 -80
  80. package/dist/shared/components/layout-editor/dnd/node.js +69 -57
  81. package/dist/shared/components/layout-editor/draft-recovery.js +113 -43
  82. package/dist/shared/components/layout-editor/entry/PlacementPresets.js +149 -0
  83. package/dist/shared/components/layout-editor/entry/entry-editor-context.js +10 -0
  84. package/dist/shared/components/layout-editor/entry/presets.js +71 -0
  85. package/dist/shared/components/layout-editor/entry/tab-order.js +110 -0
  86. package/dist/shared/components/layout-editor/entry/theme-preview.js +37 -0
  87. package/dist/shared/components/layout-editor/grid-guides.js +142 -0
  88. package/dist/shared/components/layout-editor/inspector/BehaviourSettings.js +402 -0
  89. package/dist/shared/components/layout-editor/inspector/BulkInspector.js +61 -57
  90. package/dist/shared/components/layout-editor/inspector/GroupInspector.js +247 -151
  91. package/dist/shared/components/layout-editor/inspector/Inspector.js +176 -155
  92. package/dist/shared/components/layout-editor/inspector/LookTab.js +167 -116
  93. package/dist/shared/components/layout-editor/inspector/PickerMisses.js +129 -0
  94. package/dist/shared/components/layout-editor/inspector/PickerTab.js +84 -82
  95. package/dist/shared/components/layout-editor/inspector/RulesTab.js +66 -62
  96. package/dist/shared/components/layout-editor/inspector/kit.js +69 -68
  97. package/dist/shared/components/layout-editor/outputs/OutputsButton.js +254 -0
  98. package/dist/shared/components/layout-editor/outputs/help-sheet.js +154 -0
  99. package/dist/shared/components/layout-editor/outputs/output-api.js +61 -0
  100. package/dist/shared/components/layout-editor/overview/describe-conditions.js +6 -0
  101. package/dist/shared/components/layout-editor/overview/purpose.js +15 -13
  102. package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
  103. package/dist/shared/components/layout-editor/restore-piece.js +192 -0
  104. package/dist/shared/components/layout-editor/section-structure.js +241 -0
  105. package/dist/shared/components/layout-editor/settings/EntrySection.js +296 -0
  106. package/dist/shared/components/layout-editor/settings/FormSettings.js +41 -39
  107. package/dist/shared/components/layout-editor/settings/ResolveSettings.js +255 -0
  108. package/dist/shared/components/layout-editor/settings/ToolsSection.js +147 -111
  109. package/dist/shared/components/layout-editor/settings/WhoSection.js +29 -26
  110. package/dist/shared/components/layout-editor/settings/settings-registry.js +114 -17
  111. package/dist/shared/components/layout-editor/staged-api.js +64 -0
  112. package/dist/shared/components/layout-editor/structure-ops.js +81 -77
  113. package/dist/shared/components/layout-editor/testing/TestingPanels.js +65 -60
  114. package/dist/shared/components/layout-editor/testing/testing-model.js +198 -185
  115. package/dist/shared/components/layout-editor/toolbar-kit.js +11 -11
  116. package/dist/shared/components/layout-editor/usage/AbTestSection.js +355 -0
  117. package/dist/shared/components/layout-editor/usage/UsagePanel.js +144 -70
  118. package/dist/shared/components/layout-editor/usage/ab-api.js +86 -0
  119. package/dist/shared/components/layout-editor/usage/suggest-collapse.js +32 -0
  120. package/dist/shared/components/layout-editor/useLayoutDraft.js +25 -24
  121. package/dist/shared/components/notifications/NotificationAnalyticsView.js +148 -77
  122. package/dist/shared/components/panels/ErpFailureBanner.js +18 -17
  123. package/dist/shared/components/panels/ExternalRequestsChip.js +63 -62
  124. package/dist/shared/components/pipeline/PipelineEditorView.js +106 -104
  125. package/dist/shared/components/profile/AgentsPanel.js +479 -0
  126. package/dist/shared/components/queue/QueueWorklist.js +1026 -1040
  127. package/dist/shared/components/support/SupportAnalytics.js +171 -0
  128. package/dist/shared/components/support/SupportView.js +75 -73
  129. package/dist/shared/lib/background-runs.js +150 -0
  130. package/dist/shared/lib/delivery-ack.js +9 -0
  131. package/dist/shared/lib/entry-badge-style.js +13 -0
  132. package/dist/shared/lib/entry-config.js +71 -0
  133. package/dist/shared/lib/form-sections.js +64 -0
  134. package/dist/shared/lib/form-structure.js +99 -0
  135. package/dist/shared/lib/form-usage-beacon.js +101 -52
  136. package/dist/shared/lib/jobs-tray.js +25 -23
  137. package/dist/shared/lib/keyset-pager.js +37 -0
  138. package/dist/shared/lib/layout-ops.js +84 -82
  139. package/dist/shared/lib/layout-resolve.js +113 -0
  140. package/dist/shared/lib/placement-behaviour.js +144 -0
  141. package/dist/shared/lib/prefetch.js +149 -0
  142. package/dist/shared/lib/presence-hooks.js +199 -0
  143. package/dist/shared/lib/record-outbox.js +82 -81
  144. package/dist/shared/lib/replay-socket.js +93 -0
  145. package/dist/shared/lib/request-gate.js +51 -50
  146. package/dist/shared/lib/room-gaps.js +96 -0
  147. package/dist/shared/lib/search-log.js +27 -0
  148. package/dist/shared/lib/socket-realtime.js +101 -80
  149. package/dist/shared/lib/stale-chunk.js +60 -0
  150. package/dist/shared/lib/worker-socket.js +200 -0
  151. package/package.json +1 -1
@@ -1,36 +1,39 @@
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) {
1
+ import { jsx as t, jsxs as a, Fragment as k } from "react/jsx-runtime";
2
+ import { MousePointerClick as Q } from "lucide-react";
3
+ import { useMemo as Y, useState as Z, useId as ee } from "react";
4
+ import { HEADER_GROUP_KEY as O, CANVAS_SLOT_KEYS as te, UNGROUPED_KEY as le } from "../../../lib/layout-ops.js";
5
+ import { isDisplayFormulaField as ne } from "../../../lib/placement-behaviour.js";
6
+ import { cn as ie, titleCase as h } from "../../../lib/utils.js";
7
+ import { TipLayer as re } from "../../TipLayer.js";
8
+ import { ArrangeButton as oe } from "../ArrangeButton.js";
9
+ import { AutoArrangeButton as ae } from "../AutoArrange.js";
10
+ import { useLayoutDesign as de, targetKey as se } from "../design-context.js";
11
+ import { PlacementPresets as ce } from "../entry/PlacementPresets.js";
12
+ import { FIELD_HOLDERS as ue } from "../field-zones.js";
13
+ import { PanelHeader as E, PanelBody as F, PanelTabs as me, tabId as fe, tabPanelId as pe } from "../panel-frame.js";
14
+ import { tintCard as be } from "../panel-style.js";
15
+ import { slotName as z } from "../slot-names.js";
16
+ import { useLayoutBundle as he } from "../useLayoutDraft.js";
17
+ import { AdvancedTab as ye } from "./AdvancedTab.js";
18
+ import { DisplayFormulaSettings as ke } from "./BehaviourSettings.js";
19
+ import { Breadcrumb as I } from "./Breadcrumb.js";
20
+ import { useCollectionMeta as R, useGlobalWriter as xe, useFieldCtxValue as _e, FieldCtxContext as ve } from "./field-context.js";
21
+ import { GridTab as ge } from "./GridTab.js";
22
+ import { GroupInspector as Ne } from "./GroupInspector.js";
23
+ import { HeaderItemInspector as Te } from "./HeaderItemInspector.js";
24
+ import { HelpVideoSetting as $, NoteSetting as V } from "./HelpTab.js";
25
+ import { InspectorEnvContext as W, useInspectorEnv as L, ScopeLegend as H, GlobalWriterContext as Pe } from "./kit.js";
26
+ import { LookTab as Se } from "./LookTab.js";
27
+ import { isDefaultForm as Ie, layoutTypeOf as Ee, findPlacement as w, SUBTITLE_FIELD as A, overrideGroupOps as Fe, overridePlacementOps as Le, describeField as q, asObject as G, NUMERIC_TYPES as Ce } from "./model.js";
28
+ import { OverrideNotice as Ke } from "./OverrideNotice.js";
29
+ import { PickerTab as Me } from "./PickerTab.js";
30
+ import { RulesTab as De } from "./RulesTab.js";
31
+ import { SlotInspector as Ge } from "./SlotInspector.js";
32
+ import { SubtitleInspector as Oe } from "./SubtitleInspector.js";
33
+ import { useInspectorTabRequest as Re } from "./tab-request.js";
34
+ import { WidgetInspector as He } from "./WidgetInspector.js";
35
+ const Ae = /^__widget_\d+__$/, Be = /^__ext_[a-z][a-z0-9-]{1,60}__$/, J = (e) => te.includes(e) || e === "__owners__" || e === "__pdf__" || Be.test(e);
36
+ function X(e) {
34
37
  switch (e.kind) {
35
38
  case "field":
36
39
  case "slot":
@@ -38,56 +41,56 @@ function J(e) {
38
41
  case "header":
39
42
  return {
40
43
  field: e.field,
41
- group_key: e.field === H ? null : G
44
+ group_key: e.field === A ? null : O
42
45
  };
43
46
  default:
44
47
  return null;
45
48
  }
46
49
  }
47
- function vt(e) {
48
- const { bundle: l, target: n, apply: i, collection: c } = e, a = ae(), f = Q(
50
+ function Ft(e) {
51
+ const { bundle: l, target: n, apply: i, collection: d } = e, o = de(), m = Y(
49
52
  () => ({
50
53
  bundle: l,
51
54
  apply: i,
52
55
  flush: e.flush ?? (() => {
53
56
  }),
54
- collection: c,
55
- layoutType: Se(l.layout),
56
- defaultForm: Te(l.layout),
57
+ collection: d,
58
+ layoutType: Ee(l.layout),
59
+ defaultForm: Ie(l.layout),
57
60
  select: e.onSelect
58
61
  }),
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);
62
+ [l, i, e.flush, d, e.onSelect]
63
+ ), s = n ? X(n) : null, r = s ? w(l, s.field, s.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 && !J((s == null ? void 0 : s.field) ?? "") && (s == null ? void 0 : s.field) !== A), g = l.layout.parent_layout_id != null ? Number(l.layout.parent_layout_id) : null, C = e.inheritedFrom ?? (n ? (o == null ? void 0 : o.inheritedFrom(n)) ?? null : null), { data: c } = he(g), f = _ && c && s ? w(c, s.field, s.group_key) : null, p = _ && c && (n == null ? void 0 : n.kind) === "group" ? c.groups.find((b) => b.key === n.key) ?? null : null, N = _ && (!!f || !!p || !!C);
61
64
  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" }),
65
+ return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-8 pb-16 text-center", children: [
66
+ /* @__PURE__ */ t(Q, { className: "h-5 w-5 text-slate-400" }),
64
67
  /* @__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." })
65
68
  ] }) });
66
69
  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 = () => {
69
- if (!s) return;
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: [
70
+ const b = c != null && c.layout.name ? String(c.layout.name) : C ?? "the parent form", K = { ...m, bundle: c ?? l, apply: () => {
71
+ } }, M = () => {
72
+ if (!c) return;
73
+ const y = p ? Fe(l, c, p) : f ? Le(l, c, f) : [];
74
+ y.length && i(y, { label: `Override ${P(n)} on this form` });
75
+ }, v = /* @__PURE__ */ a("div", { "data-setting": "inspector.inherited_override", className: ie(be, "space-y-2.5 p-3"), children: [
76
+ /* @__PURE__ */ a("p", { className: "text-[12px] leading-snug text-slate-700 dark:text-foreground", children: [
74
77
  "This comes from ",
75
78
  /* @__PURE__ */ t("span", { className: "font-medium", children: b }),
76
79
  ". Change it there for every form built on it, or override it on this form only."
77
80
  ] }),
78
- /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2", children: [
81
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
79
82
  /* @__PURE__ */ t(
80
83
  "button",
81
84
  {
82
85
  type: "button",
83
86
  "data-override-here": "",
84
- disabled: !s || !m && !p,
85
- onClick: C,
87
+ disabled: !c || !f && !p,
88
+ onClick: M,
86
89
  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",
87
90
  children: "Override here"
88
91
  }
89
92
  ),
90
- g != null && e.openLayout && /* @__PURE__ */ o(
93
+ g != null && e.openLayout && /* @__PURE__ */ a(
91
94
  "button",
92
95
  {
93
96
  type: "button",
@@ -105,53 +108,53 @@ function vt(e) {
105
108
  )
106
109
  ] })
107
110
  ] });
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 })
111
+ return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(W.Provider, { value: K, children: p ? /* @__PURE__ */ t(j, { group: p, notice: v, readOnly: !0 }) : f ? /* @__PURE__ */ t(U, { target: n, row: f, notice: v, readOnly: !0 }) : /* @__PURE__ */ a(k, { children: [
112
+ /* @__PURE__ */ t(E, { title: P(n) }),
113
+ /* @__PURE__ */ t(F, { children: v })
111
114
  ] }) }) });
112
115
  }
113
116
  const u = _ ? null : /* @__PURE__ */ t(
114
- Le,
117
+ Ke,
115
118
  {
116
119
  bundle: l,
117
- parent: s,
120
+ parent: c,
118
121
  target: n,
119
- title: S(n),
122
+ title: P(n),
120
123
  apply: i
121
124
  }
122
125
  );
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),
126
+ return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(W.Provider, { value: m, children: n.kind === "group" ? x && /* @__PURE__ */ t(j, { group: x, notice: u }, x.key) : _ ? /* @__PURE__ */ a(k, { children: [
127
+ /* @__PURE__ */ t(E, { title: P(n) }),
128
+ /* @__PURE__ */ t(F, { children: /* @__PURE__ */ a("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: [
129
+ P(n),
127
130
  " is not on this form any more."
128
131
  ] }) })
129
132
  ] }) : /* @__PURE__ */ t(
130
- j,
133
+ U,
131
134
  {
132
135
  target: n,
133
136
  row: r,
134
137
  notice: u
135
138
  },
136
- de(n)
139
+ se(n)
137
140
  ) }) });
138
141
  }
139
- function S(e) {
140
- return e.kind === "group" ? h(e.key) : e.field.startsWith("__") ? U(e.field) : h(e.field.split(".").pop() ?? e.field);
142
+ function P(e) {
143
+ return e.kind === "group" ? h(e.key) : e.field.startsWith("__") ? z(e.field) : h(e.field.split(".").pop() ?? e.field);
141
144
  }
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, {}),
145
+ function D({ children: e }) {
146
+ return /* @__PURE__ */ a("div", { "data-inspector": "", className: "flex h-full min-h-0 min-w-0 flex-col text-[12px]", children: [
147
+ /* @__PURE__ */ t(re, {}),
145
148
  e
146
149
  ] });
147
150
  }
148
- function Ae(e, l) {
151
+ function We(e, l) {
149
152
  if (!l || l === le) return null;
150
- if (l === G) return "Header strip";
153
+ if (l === O) return "Header strip";
151
154
  const n = e.groups.find((i) => i.key === l);
152
155
  return n ? n.label || h(n.key) : h(l);
153
156
  }
154
- function Be(e) {
157
+ function we(e) {
155
158
  if (e.isPath) return "shows a linked value";
156
159
  if (e.computedType) return "calculated";
157
160
  if (e.relKind === "M2O") return "picks one record";
@@ -159,7 +162,7 @@ function Be(e) {
159
162
  if (e.relKind === "O2M")
160
163
  return e.iface === "inline-table" ? "table of related rows" : "related rows";
161
164
  if (e.relKind) return "related records";
162
- if (Ee.has(e.type)) return "number";
165
+ if (Ce.has(e.type)) return "number";
163
166
  switch (e.type) {
164
167
  case "boolean":
165
168
  return "yes or no";
@@ -182,51 +185,51 @@ function Be(e) {
182
185
  return e.type;
183
186
  }
184
187
  }
185
- function A({ words: e, k: l, setting: n }) {
186
- return /* @__PURE__ */ o("span", { "data-setting": n, children: [
187
- e && /* @__PURE__ */ o(k, { children: [
188
+ function B({ words: e, k: l, setting: n }) {
189
+ return /* @__PURE__ */ a("span", { "data-setting": n, children: [
190
+ e && /* @__PURE__ */ a(k, { children: [
188
191
  e,
189
192
  " · "
190
193
  ] }),
191
194
  /* @__PURE__ */ t("span", { className: "font-mono text-[11px]", children: l })
192
195
  ] });
193
196
  }
194
- function De(e, l) {
197
+ function je(e, l) {
195
198
  const n = l.parent_key ? e.groups.find((i) => i.key === l.parent_key) ?? null : null;
196
199
  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";
197
200
  }
198
- function w({
201
+ function j({
199
202
  group: e,
200
203
  notice: l,
201
204
  readOnly: n = !1
202
205
  }) {
203
- const i = F(), c = /* @__PURE__ */ t(_e, { group: e, readOnly: n });
204
- return /* @__PURE__ */ o(k, { children: [
206
+ const i = L(), d = /* @__PURE__ */ t(Ne, { group: e, readOnly: n });
207
+ return /* @__PURE__ */ a(k, { children: [
205
208
  /* @__PURE__ */ t(
206
- I,
209
+ E,
207
210
  {
208
211
  eyebrow: /* @__PURE__ */ t(
209
- M,
212
+ I,
210
213
  {
211
- kind: De(i.bundle, e),
214
+ kind: je(i.bundle, e),
212
215
  target: { kind: "group", key: e.key }
213
216
  }
214
217
  ),
215
218
  title: e.label || h(e.key),
216
- sub: /* @__PURE__ */ t(A, { k: e.key, setting: "group.key" })
219
+ sub: /* @__PURE__ */ t(B, { k: e.key, setting: "group.key" })
217
220
  }
218
221
  ),
219
- /* @__PURE__ */ o(P, { children: [
222
+ /* @__PURE__ */ a(F, { children: [
220
223
  l,
221
224
  n ? (
222
225
  // Inputs sit in a disabled fieldset and writes go nowhere.
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,
226
+ /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: d })
227
+ ) : /* @__PURE__ */ a(k, { children: [
228
+ /* @__PURE__ */ t(H, {}),
229
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: [
230
+ /* @__PURE__ */ t(oe, { targets: [{ kind: "group", key: e.key }] }),
231
+ ue.has(e.type) && i.layoutType !== "table" && i.layoutType !== "file" && /* @__PURE__ */ t(
232
+ ae,
230
233
  {
231
234
  bundle: i.bundle,
232
235
  apply: i.apply,
@@ -235,15 +238,15 @@ function w({
235
238
  }
236
239
  )
237
240
  ] }),
238
- c,
239
- /* @__PURE__ */ o(
241
+ d,
242
+ /* @__PURE__ */ a(
240
243
  "div",
241
244
  {
242
245
  "data-group-help": "",
243
246
  className: "mt-5 space-y-5 border-t border-slate-100 pt-5 dark:border-border/60",
244
247
  children: [
245
248
  /* @__PURE__ */ t(
246
- z,
249
+ $,
247
250
  {
248
251
  kind: "section",
249
252
  name: e.key,
@@ -251,7 +254,7 @@ function w({
251
254
  }
252
255
  ),
253
256
  /* @__PURE__ */ t(
254
- $,
257
+ V,
255
258
  {
256
259
  target: { kind: "group", key: e.key },
257
260
  name: e.label || h(e.key)
@@ -264,142 +267,160 @@ function w({
264
267
  ] })
265
268
  ] });
266
269
  }
267
- function K({
270
+ function S({
268
271
  eyebrow: e,
269
272
  title: l,
270
273
  sub: n,
271
274
  notice: i,
272
- readOnly: c,
273
- children: a
275
+ readOnly: d,
276
+ children: o
274
277
  }) {
275
- return /* @__PURE__ */ o(k, { children: [
276
- /* @__PURE__ */ t(I, { eyebrow: e, title: l, sub: n }),
277
- /* @__PURE__ */ o(P, { children: [
278
+ return /* @__PURE__ */ a(k, { children: [
279
+ /* @__PURE__ */ t(E, { eyebrow: e, title: l, sub: n }),
280
+ /* @__PURE__ */ a(F, { children: [
278
281
  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, {}),
281
- a
282
+ d ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: /* @__PURE__ */ t("fieldset", { disabled: !0, className: "min-w-0", children: o }) }) : /* @__PURE__ */ a(k, { children: [
283
+ /* @__PURE__ */ t(H, {}),
284
+ o
282
285
  ] })
283
286
  ] })
284
287
  ] });
285
288
  }
286
- function j({
289
+ function U({
287
290
  target: e,
288
291
  row: l,
289
292
  notice: n,
290
293
  readOnly: i = !1
291
294
  }) {
292
295
  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,
296
+ const d = L(), o = e.kind === "group" ? "" : e.field, m = (l == null ? void 0 : l.group_key) ?? (e.kind === "group" ? null : ((r = X(e)) == null ? void 0 : r.group_key) ?? null), s = We(d.bundle, m);
297
+ return o === A ? /* @__PURE__ */ t(S, { eyebrow: "Header", title: "Subtitle", notice: n, readOnly: i, children: /* @__PURE__ */ t(Oe, {}) }) : l && (Ae.test(o) || l.widget_id != null) ? /* @__PURE__ */ t(
298
+ S,
296
299
  {
297
- eyebrow: /* @__PURE__ */ t(M, { kind: "Widget", target: e, where: d }),
300
+ eyebrow: /* @__PURE__ */ t(I, { kind: "Widget", target: e, where: s }),
298
301
  title: l.label_override || "Widget",
299
302
  notice: n,
300
303
  readOnly: i,
301
- children: /* @__PURE__ */ t(Ge, { row: l })
304
+ children: /* @__PURE__ */ t(He, { row: l })
305
+ }
306
+ ) : J(o) ? /* @__PURE__ */ t(
307
+ S,
308
+ {
309
+ eyebrow: /* @__PURE__ */ t(I, { kind: "Panel", target: e, where: s }),
310
+ title: z(o),
311
+ notice: n,
312
+ readOnly: i,
313
+ children: /* @__PURE__ */ t(Ge, { field: o, groupKey: m, row: l })
302
314
  }
303
- ) : q(a) ? /* @__PURE__ */ t(
304
- K,
315
+ ) : l ? e.kind === "header" || l.group_key === O ? /* @__PURE__ */ t(ze, { row: l, notice: n, readOnly: i }) : ne(o) ? /* @__PURE__ */ t(
316
+ S,
305
317
  {
306
- eyebrow: /* @__PURE__ */ t(M, { kind: "Panel", target: e, where: d }),
307
- title: U(a),
318
+ eyebrow: /* @__PURE__ */ t(I, { kind: "Formula", target: e, where: s }),
319
+ title: Ue(l),
308
320
  notice: n,
309
321
  readOnly: i,
310
- children: /* @__PURE__ */ t(Me, { field: a, groupKey: f, row: l })
322
+ children: /* @__PURE__ */ t(Ye, { row: l })
311
323
  }
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;
324
+ ) : /* @__PURE__ */ t(Ve, { target: e, row: l, where: s, notice: n, readOnly: i }) : null;
325
+ }
326
+ function Ue(e) {
327
+ const l = G(e.overrides);
328
+ return typeof l.label == "string" && l.label.trim() ? l.label : "Formula";
329
+ }
330
+ function Ye({ row: e }) {
331
+ const l = L(), { data: n } = R(l.collection), i = Y(() => ((n == null ? void 0 : n.fields) ?? []).map((d) => d.field), [n == null ? void 0 : n.fields]);
332
+ return /* @__PURE__ */ t(ke, { row: e, fields: i });
313
333
  }
314
- function We({
334
+ function ze({
315
335
  row: e,
316
336
  notice: l,
317
337
  readOnly: n
318
338
  }) {
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;
339
+ const i = L(), { data: d } = R(i.collection), o = q(e.field, (d == null ? void 0 : d.fields) ?? [], (d == null ? void 0 : d.relations) ?? [], null).label;
320
340
  return /* @__PURE__ */ t(
321
- K,
341
+ S,
322
342
  {
323
343
  eyebrow: "Header strip",
324
- title: e.label_override || a,
325
- sub: /* @__PURE__ */ t(A, { k: e.field }),
344
+ title: e.label_override || o,
345
+ sub: /* @__PURE__ */ t(B, { k: e.field }),
326
346
  notice: l,
327
347
  readOnly: n,
328
- children: /* @__PURE__ */ t(ve, { row: e, label: a })
348
+ children: /* @__PURE__ */ t(Te, { row: e, label: o })
329
349
  }
330
350
  );
331
351
  }
332
- const we = { fields: [], relations: [], label: "" };
333
- function je({
352
+ const $e = { fields: [], relations: [], label: "" };
353
+ function Ve({
334
354
  target: e,
335
355
  row: l,
336
356
  where: n,
337
357
  notice: i,
338
- readOnly: c
358
+ readOnly: d
339
359
  }) {
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),
360
+ var K, M, v, y;
361
+ const o = L(), { data: m } = R(o.collection), s = m ?? $e, r = q(l.field, s.fields, s.relations, l), x = xe({
362
+ collection: o.collection,
363
+ collectionLabel: s.label || h(o.collection),
344
364
  field: l.field,
345
365
  fieldLabel: r.label,
346
366
  stored: {
347
- options: W((L = r.global) == null ? void 0 : L.options),
348
- dependency_config: W((C = r.global) == null ? void 0 : C.dependency_config),
367
+ options: G((K = r.global) == null ? void 0 : K.options),
368
+ dependency_config: G((M = r.global) == null ? void 0 : M.dependency_config),
349
369
  columns: {
350
370
  deprecated: !!((v = r.global) != null && v.deprecated_at),
351
371
  deprecation_note: ((y = r.global) == null ? void 0 : y.deprecation_note) || null
352
372
  }
353
373
  }
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 = [
374
+ }), _ = _e({ env: o, row: l, meta: s, writer: x, readOnly: d }), g = r.relKind === "M2O" || r.relKind === "M2M" || r.isPath || r.iface === "relation-path" || r.iface === "file-image" || r.iface === "files-m2m", C = r.relKind === "O2M" && (r.iface === "inline-grid" || r.iface === "inline-table"), c = [
355
375
  { key: "look", label: "Look" },
356
376
  { key: "rules", label: "Rules" },
357
377
  ...g ? [{ key: "picker", label: "Picker" }] : [],
358
- ...E ? [{ key: "grid", label: r.iface === "inline-table" ? "Table" : "Grid" }] : [],
378
+ ...C ? [{ key: "grid", label: r.iface === "inline-table" ? "Table" : "Grid" }] : [],
359
379
  { key: "help", label: "Help" },
360
380
  { key: "advanced", label: "Advanced" }
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: [
381
+ ], [f, p] = Z("look");
382
+ Re(l.field, (T) => p(T));
383
+ const N = ee(), u = c.some((T) => T.key === f) ? f : "look", b = /* @__PURE__ */ t("fieldset", { disabled: d, className: "min-w-0", children: m ? u === "look" ? /* @__PURE__ */ t(Se, {}) : u === "rules" ? /* @__PURE__ */ t(De, {}) : u === "picker" ? /* @__PURE__ */ t(Me, {}) : u === "grid" ? /* @__PURE__ */ t(ge, {}) : u === "help" ? /* @__PURE__ */ a("div", { "data-help-tab": "", className: "space-y-5", children: [
364
384
  /* @__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 }),
385
+ /* @__PURE__ */ t($, { kind: "field", name: l.field, label: r.label }),
366
386
  /* @__PURE__ */ t(
367
- $,
387
+ V,
368
388
  {
369
389
  target: { kind: "field", field: l.field, group_key: l.group_key },
370
390
  name: r.label
371
391
  }
372
392
  )
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: [
393
+ ] }) : /* @__PURE__ */ t(ye, {}) : /* @__PURE__ */ t("p", { className: "text-[13px] text-slate-500 dark:text-muted-foreground", children: "Loading the field…" }) });
394
+ return /* @__PURE__ */ t(ve.Provider, { value: _, children: /* @__PURE__ */ a(Pe.Provider, { value: x, children: [
375
395
  /* @__PURE__ */ t(
376
- I,
396
+ E,
377
397
  {
378
- eyebrow: /* @__PURE__ */ t(M, { kind: "Field", target: e, where: n }),
398
+ eyebrow: /* @__PURE__ */ t(I, { kind: "Field", target: e, where: n }),
379
399
  title: r.label,
380
- sub: /* @__PURE__ */ t(A, { words: f ? Be(r) : void 0, k: l.field }),
400
+ sub: /* @__PURE__ */ t(B, { words: m ? we(r) : void 0, k: l.field }),
381
401
  children: /* @__PURE__ */ t(
382
- se,
402
+ me,
383
403
  {
384
404
  idBase: N,
385
405
  label: `Settings of ${r.label}`,
386
- tabs: s,
406
+ tabs: c,
387
407
  active: u,
388
408
  onChange: (T) => {
389
- a.flush(), p(T);
409
+ o.flush(), p(T);
390
410
  }
391
411
  }
392
412
  )
393
413
  }
394
414
  ),
395
- /* @__PURE__ */ o(
396
- P,
415
+ /* @__PURE__ */ a(
416
+ F,
397
417
  {
398
- tabpanel: { id: fe(N), labelledBy: ue(N, u) },
418
+ tabpanel: { id: pe(N), labelledBy: fe(N, u) },
399
419
  children: [
400
420
  i,
401
- c ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: b }) : /* @__PURE__ */ o(k, { children: [
402
- /* @__PURE__ */ t(R, { field: !0 }),
421
+ d ? /* @__PURE__ */ t("div", { "data-inherited-view": "", className: "opacity-70", children: b }) : /* @__PURE__ */ a(k, { children: [
422
+ /* @__PURE__ */ t(ce, { bundle: o.bundle, rows: [l], apply: o.apply }),
423
+ /* @__PURE__ */ t(H, { field: !0 }),
403
424
  b
404
425
  ] })
405
426
  ]
@@ -409,5 +430,5 @@ function je({
409
430
  ] }) });
410
431
  }
411
432
  export {
412
- vt as Inspector
433
+ Ft as Inspector
413
434
  };