@nivaro/react 0.2.53 → 0.2.55

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