@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,206 +1,245 @@
1
- import { jsxs as a, Fragment as u, jsx as o } from "react/jsx-runtime";
2
- import { useState as _ } from "react";
3
- import { RecordConditionsEditor as O, RecordConditionsJson as R } from "../editors/RecordConditionsEditor.js";
4
- import { RolesPicker as A } from "../editors/RolesPicker.js";
5
- import { LAYOUT_TYPES as w } from "../overview/OverviewActions.js";
6
- import { useRoleNames as D } from "../overview/overview-api.js";
7
- import { Setting as y, smallBtn as s, quietText as C, Segmented as z } from "./controls.js";
8
- import { changeLabel as N, flag as x } from "./section-props.js";
9
- import { useFieldSources as F, useCollectionLayoutList as Y } from "./settings-api.js";
10
- import { layoutKindOf as j } from "./settings-registry.js";
11
- import { TextSetting as v } from "./TextSetting.js";
12
- import { ToggleSetting as I } from "./ToggleSetting.js";
13
- const f = (e) => {
14
- var t;
15
- return ((t = w.find((n) => n.type === e)) == null ? void 0 : t.label) ?? e;
16
- }, K = (e) => e.toLowerCase().replace(/[^a-z0-9_]/g, "_"), S = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
17
- function M(e) {
18
- let t = e;
19
- if (typeof t == "string")
1
+ import { jsxs as a, Fragment as u, jsx as n } from "react/jsx-runtime";
2
+ import { useState as y } from "react";
3
+ import { RecordConditionsEditor as I, RecordConditionsJson as P } from "../editors/RecordConditionsEditor.js";
4
+ import { RolesPicker as z } from "../editors/RolesPicker.js";
5
+ import { DependencyDiagram as w } from "../ops/DependencyDiagram.js";
6
+ import { useLayoutDependencies as L } from "../ops/ops-api.js";
7
+ import { LAYOUT_TYPES as D } from "../overview/OverviewActions.js";
8
+ import { useRoleNames as F } from "../overview/overview-api.js";
9
+ import { roleIdsPatch as Y } from "../testing/testing-model.js";
10
+ import { Setting as p, smallBtn as d, quietText as x, Segmented as j } from "./controls.js";
11
+ import { ActiveDatesSetting as K, PhoneVersionSetting as M } from "./ResolveSettings.js";
12
+ import { changeLabel as _, flag as C } from "./section-props.js";
13
+ import { useFieldSources as U, useCollectionLayoutList as $ } from "./settings-api.js";
14
+ import { layoutKindOf as B } from "./settings-registry.js";
15
+ import { TextSetting as S } from "./TextSetting.js";
16
+ import { ToggleSetting as E } from "./ToggleSetting.js";
17
+ const g = (t) => {
18
+ var e;
19
+ return ((e = D.find((o) => o.type === t)) == null ? void 0 : e.label) ?? t;
20
+ }, G = (t) => t.toLowerCase().replace(/[^a-z0-9_]/g, "_"), v = (t) => t.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_|_$/g, "");
21
+ function J(t) {
22
+ let e = t;
23
+ if (typeof e == "string")
20
24
  try {
21
- t = JSON.parse(t);
25
+ e = JSON.parse(e);
22
26
  } catch {
23
27
  return [];
24
28
  }
25
- const n = t == null ? void 0 : t.role_ids;
26
- return Array.isArray(n) ? n.map(String) : [];
29
+ const o = e == null ? void 0 : e.role_ids;
30
+ return Array.isArray(o) ? o.map(String) : [];
27
31
  }
28
- function ee(e) {
29
- const { layout: t, collection: n } = e, { fields: m, columns: i, relations: c } = F(n), { data: h = [] } = D(!0), d = M(t.conditions);
32
+ function me(t) {
33
+ const { layout: e, collection: o } = t, { fields: c, columns: l, relations: i } = U(o), { data: m = [] } = F(!0), f = J(e.conditions);
30
34
  return /* @__PURE__ */ a(u, { children: [
31
- /* @__PURE__ */ o(P, { ...e }),
32
- /* @__PURE__ */ o(
33
- y,
35
+ /* @__PURE__ */ n(V, { ...t }),
36
+ /* @__PURE__ */ n(
37
+ p,
34
38
  {
35
39
  k: "layout.record_conditions",
36
- note: /* @__PURE__ */ o(
37
- R,
40
+ note: /* @__PURE__ */ n(
41
+ P,
38
42
  {
39
- value: t.record_conditions,
40
- onApply: (r) => e.set({ record_conditions: r }, N("layout.record_conditions"))
43
+ value: e.record_conditions,
44
+ onApply: (s) => t.set({ record_conditions: s }, _("layout.record_conditions"))
41
45
  }
42
46
  ),
43
- children: /* @__PURE__ */ o(
44
- O,
47
+ children: /* @__PURE__ */ n(
48
+ I,
45
49
  {
46
50
  json: !1,
47
- collection: n,
48
- value: t.record_conditions,
49
- fields: m,
50
- columns: i,
51
- relations: c,
52
- onBlur: e.flush,
53
- onChange: (r, { text: b }) => (b ? e.setText : e.set)(
54
- { record_conditions: r },
55
- N("layout.record_conditions")
51
+ collection: o,
52
+ value: e.record_conditions,
53
+ fields: c,
54
+ columns: l,
55
+ relations: i,
56
+ onBlur: t.flush,
57
+ onChange: (s, { text: h }) => (h ? t.setText : t.set)(
58
+ { record_conditions: s },
59
+ _("layout.record_conditions")
56
60
  )
57
61
  }
58
62
  )
59
63
  }
60
64
  ),
61
- /* @__PURE__ */ o(y, { k: "layout.conditions.role_ids", children: /* @__PURE__ */ o(
62
- A,
65
+ /* @__PURE__ */ n(p, { k: "layout.conditions.role_ids", children: /* @__PURE__ */ n(
66
+ z,
63
67
  {
64
- value: d,
65
- roles: h,
66
- onChange: (r) => e.set(
67
- { conditions: r.length ? { role_ids: r } : null },
68
- r.length > d.length ? "Add a role" : "Remove a role"
68
+ value: f,
69
+ roles: m,
70
+ onChange: (s) => t.set(
71
+ // Keeps the layout's pinned test records (conditions.testing).
72
+ Y(e.conditions, s),
73
+ s.length > f.length ? "Add a role" : "Remove a role"
69
74
  )
70
75
  }
71
76
  ) }),
72
- /* @__PURE__ */ o(
73
- v,
77
+ /* @__PURE__ */ n(
78
+ S,
74
79
  {
75
80
  k: "layout.slug",
76
- props: e,
81
+ props: t,
77
82
  mono: !0,
78
83
  placeholder: "e.g. unit_order",
79
- sanitize: K,
84
+ sanitize: G,
80
85
  blurOnly: !0,
81
- extra: !t.slug && typeof t.name == "string" && S(t.name) ? /* @__PURE__ */ o(
86
+ extra: !e.slug && typeof e.name == "string" && v(e.name) ? /* @__PURE__ */ n(
82
87
  "button",
83
88
  {
84
89
  type: "button",
85
- className: s,
86
- onClick: () => e.set({ slug: S(String(t.name)) }, "Generate link name"),
90
+ className: d,
91
+ onClick: () => t.set({ slug: v(String(e.name)) }, "Generate link name"),
87
92
  children: "Generate"
88
93
  }
89
94
  ) : null,
90
- note: t.slug ? /* @__PURE__ */ a(u, { children: [
95
+ note: e.slug ? /* @__PURE__ */ a(u, { children: [
91
96
  "Opens with ",
92
97
  /* @__PURE__ */ a("code", { className: "font-mono", children: [
93
98
  "?layout=",
94
- String(t.slug)
95
- ] })
99
+ String(e.slug)
100
+ ] }),
101
+ /* @__PURE__ */ n(q, { layoutId: Number(e.id) })
96
102
  ] }) : null
97
103
  }
98
104
  ),
99
- /* @__PURE__ */ o(
100
- v,
105
+ /* @__PURE__ */ n(
106
+ S,
101
107
  {
102
108
  k: "layout.create_label",
103
- props: e,
104
- placeholder: typeof t.name == "string" ? t.name : ""
109
+ props: t,
110
+ placeholder: typeof e.name == "string" ? e.name : ""
105
111
  }
106
112
  ),
107
- /* @__PURE__ */ o(I, { k: "layout.create_hidden", props: e })
113
+ /* @__PURE__ */ n(E, { k: "layout.create_hidden", props: t }),
114
+ /* @__PURE__ */ n(K, { ...t }),
115
+ /* @__PURE__ */ n(M, { ...t })
108
116
  ] });
109
117
  }
110
- function P(e) {
111
- const { layout: t, kind: n, bundle: m } = e, [i, c] = _(null), h = m.placements.length + m.groups.length, d = (l) => e.set({ layout_type: l }, `Change kind to ${f(l)}`), r = x(t.is_active), [b, g] = _(!1), p = Y(e.collection).find(
112
- (l) => l.id !== Number(t.id) && j(l) === n && x(l.is_active)
113
- ), k = n === "grouped" ? "form" : `${f(n).toLowerCase()} layout`, L = () => {
114
- e.set({ is_active: !0 }, "Make default", { undoable: !1 }), g(!1);
115
- }, T = n === "file" ? null : /* @__PURE__ */ o("div", { className: "flex flex-wrap items-center gap-2", children: r ? /* @__PURE__ */ a("span", { className: C, "data-default-layout": !0, children: [
118
+ function q({ layoutId: t }) {
119
+ const { data: e } = L(t), [o, c] = y(!1), l = ((e == null ? void 0 : e.nodes) ?? []).filter((i) => i.breaks.includes("slug")).length;
120
+ return l ? /* @__PURE__ */ a(u, { children: [
121
+ " · ",
122
+ /* @__PURE__ */ a(
123
+ "button",
124
+ {
125
+ type: "button",
126
+ "data-slug-users": !0,
127
+ className: "font-medium text-amber-700 hover:underline dark:text-amber-300",
128
+ onClick: () => c((i) => !i),
129
+ children: [
130
+ l,
131
+ " ",
132
+ l === 1 ? "thing finds" : "things find",
133
+ " it by this name"
134
+ ]
135
+ }
136
+ ),
137
+ o && /* @__PURE__ */ n(w, { layoutId: t, change: "slug", compact: !0, className: "mt-2" })
138
+ ] }) : null;
139
+ }
140
+ function V(t) {
141
+ const { layout: e, kind: o, bundle: c } = t, [l, i] = y(null), { data: m } = L(Number(e.id)), f = ((m == null ? void 0 : m.nodes.length) ?? 0) > 0, s = c.placements.length + c.groups.length, h = (r) => t.set({ layout_type: r }, `Change kind to ${g(r)}`), T = C(e.is_active), [O, b] = y(!1), k = $(t.collection).find(
142
+ (r) => r.id !== Number(e.id) && B(r) === o && C(r.is_active)
143
+ ), N = o === "grouped" ? "form" : `${g(o).toLowerCase()} layout`, A = () => {
144
+ t.set({ is_active: !0 }, "Make default", { undoable: !1 }), b(!1);
145
+ }, R = o === "file" ? null : /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2", children: T ? /* @__PURE__ */ a("span", { className: x, "data-default-layout": !0, children: [
116
146
  "This is the default ",
117
- f(n).toLowerCase(),
147
+ g(o).toLowerCase(),
118
148
  " layout: records no rule or role catches use it."
119
- ] }) : b ? /* @__PURE__ */ a(
149
+ ] }) : O ? /* @__PURE__ */ a(
120
150
  "div",
121
151
  {
122
152
  "data-make-default-confirm": !0,
123
153
  className: "w-full rounded-md border border-amber-300 bg-amber-50 p-2 text-[12px] text-amber-900 dark:border-amber-400/30 dark:bg-amber-400/10 dark:text-amber-200",
124
154
  children: [
125
155
  /* @__PURE__ */ a("p", { children: [
126
- p ? /* @__PURE__ */ a(u, { children: [
127
- /* @__PURE__ */ o("strong", { className: "font-semibold", children: p.name }),
156
+ k ? /* @__PURE__ */ a(u, { children: [
157
+ /* @__PURE__ */ n("strong", { className: "font-semibold", children: k.name }),
128
158
  " stops being the default",
129
159
  " ",
130
- k,
160
+ N,
131
161
  " for records no rule catches."
132
162
  ] }) : /* @__PURE__ */ a(u, { children: [
133
163
  "No ",
134
- k,
164
+ N,
135
165
  " is the default yet; this one becomes it."
136
166
  ] }),
137
167
  " ",
138
168
  "This cannot be undone with Undo."
139
169
  ] }),
140
170
  /* @__PURE__ */ a("div", { className: "mt-1.5 flex gap-1.5", children: [
141
- /* @__PURE__ */ o(
171
+ /* @__PURE__ */ n(
142
172
  "button",
143
173
  {
144
174
  type: "button",
145
175
  "data-action": "make-default-confirm",
146
- className: s,
147
- onClick: L,
176
+ className: d,
177
+ onClick: A,
148
178
  children: "Yes, make default"
149
179
  }
150
180
  ),
151
- /* @__PURE__ */ o("button", { type: "button", className: s, onClick: () => g(!1), children: "Cancel" })
181
+ /* @__PURE__ */ n("button", { type: "button", className: d, onClick: () => b(!1), children: "Cancel" })
152
182
  ] })
153
183
  ]
154
184
  }
155
185
  ) : /* @__PURE__ */ a(u, { children: [
156
- /* @__PURE__ */ o(
186
+ /* @__PURE__ */ n(
157
187
  "button",
158
188
  {
159
189
  type: "button",
160
190
  "data-action": "make-default",
161
- className: s,
162
- onClick: () => g(!0),
191
+ className: d,
192
+ onClick: () => b(!0),
163
193
  children: "Make default"
164
194
  }
165
195
  ),
166
- /* @__PURE__ */ o("span", { className: C, children: "Records no rule or role catches would open with this layout." })
196
+ /* @__PURE__ */ n("span", { className: x, children: "Records no rule or role catches would open with this layout." })
167
197
  ] }) });
168
- return /* @__PURE__ */ a(y, { k: "layout.layout_type", note: T, children: [
169
- /* @__PURE__ */ o(
170
- z,
198
+ return /* @__PURE__ */ a(p, { k: "layout.layout_type", note: R, children: [
199
+ /* @__PURE__ */ n(
200
+ j,
171
201
  {
172
202
  ariaLabel: "Kind of layout",
173
- value: n,
174
- options: w.map((l) => ({ value: l.type, label: l.label })),
175
- onChange: (l) => h > 0 ? c(l) : d(l)
203
+ value: o,
204
+ options: D.map((r) => ({ value: r.type, label: r.label })),
205
+ onChange: (r) => s > 0 || f ? i(r) : h(r)
176
206
  }
177
207
  ),
178
- i && /* @__PURE__ */ a(
208
+ l && /* @__PURE__ */ a(
179
209
  "div",
180
210
  {
181
- "data-kind-confirm": i,
211
+ "data-kind-confirm": l,
182
212
  className: "rounded-md border border-amber-300 bg-amber-50 p-2.5 text-[12px] text-amber-900 dark:border-amber-400/30 dark:bg-amber-400/10 dark:text-amber-200",
183
213
  children: [
184
214
  /* @__PURE__ */ a("p", { children: [
185
215
  "Make this a ",
186
- f(i),
216
+ g(l),
187
217
  " layout? Its sections and fields stay, but",
188
218
  " ",
189
- i === "file" ? "tabs, widgets and slot cards do not appear in a PDF." : i === "table" ? "grid columns use only its fields, not its sections." : "some of them may not apply to this kind."
219
+ l === "file" ? "tabs, widgets and slot cards do not appear in a PDF." : l === "table" ? "grid columns use only its fields, not its sections." : "some of them may not apply to this kind."
190
220
  ] }),
221
+ f && /* @__PURE__ */ n(
222
+ w,
223
+ {
224
+ layoutId: Number(e.id),
225
+ change: "type",
226
+ compact: !0,
227
+ className: "mt-2 rounded-md bg-white p-2 text-slate-800 dark:bg-card dark:text-foreground"
228
+ }
229
+ ),
191
230
  /* @__PURE__ */ a("div", { className: "mt-1.5 flex gap-1.5", children: [
192
- /* @__PURE__ */ o(
231
+ /* @__PURE__ */ n(
193
232
  "button",
194
233
  {
195
234
  type: "button",
196
- className: s,
235
+ className: d,
197
236
  onClick: () => {
198
- d(i), c(null);
237
+ h(l), i(null);
199
238
  },
200
239
  children: "Yes, change it"
201
240
  }
202
241
  ),
203
- /* @__PURE__ */ o("button", { type: "button", className: s, onClick: () => c(null), children: "Cancel" })
242
+ /* @__PURE__ */ n("button", { type: "button", className: d, onClick: () => i(null), children: "Cancel" })
204
243
  ] })
205
244
  ]
206
245
  }
@@ -208,6 +247,6 @@ function P(e) {
208
247
  ] });
209
248
  }
210
249
  export {
211
- ee as WhoSection,
212
- K as sanitizeSlug
250
+ me as WhoSection,
251
+ G as sanitizeSlug
213
252
  };
@@ -1,10 +1,10 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import { ChevronsUpDown as k, Check as f, X as w } from "lucide-react";
3
- import { createContext as C, isValidElement as S, useState as T, useContext as P } from "react";
3
+ import { createContext as C, useState as S, isValidElement as T, useContext as P } from "react";
4
4
  import { cn as i } from "../../../lib/utils.js";
5
5
  import { Command as j, CommandInput as O, CommandList as V, CommandEmpty as B, CommandItem as b } from "../../ui/command.js";
6
6
  import { Popover as D, PopoverTrigger as E, PopoverContent as I } from "../../ui/popover.js";
7
- import { inputBase as v, effectText as $, labelText as q, segOption as U, segTrack as X } from "../panel-style.js";
7
+ import { inputBase as v, effectText as $, segOption as q, segTrack as U, labelText as X } from "../panel-style.js";
8
8
  import { settingDef as z } from "./settings-registry.js";
9
9
  const A = C(null);
10
10
  function F(e) {
@@ -21,10 +21,10 @@ function L({
21
21
  }) {
22
22
  const s = F(e), d = z(e);
23
23
  if (!s || !d) return null;
24
- const m = S(n) && n.type === G;
24
+ const m = T(n) && n.type === G;
25
25
  return /* @__PURE__ */ l("div", { "data-setting": e, className: "space-y-1.5", children: [
26
26
  /* @__PURE__ */ l("div", { className: "flex min-h-5 items-center justify-between gap-3", children: [
27
- /* @__PURE__ */ t("label", { htmlFor: c, className: i(q, "min-w-0"), children: d.label }),
27
+ /* @__PURE__ */ t("label", { htmlFor: c, className: i(X, "min-w-0"), children: d.label }),
28
28
  m && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center", children: n })
29
29
  ] }),
30
30
  n && !m && /* @__PURE__ */ t("div", { children: n }),
@@ -75,7 +75,7 @@ function ee({
75
75
  "fieldset",
76
76
  {
77
77
  "aria-label": r,
78
- className: i("m-0 min-w-0 border-0", X(n.length)),
78
+ className: i("m-0 min-w-0 border-0", U(n.length)),
79
79
  children: n.map((s) => /* @__PURE__ */ t(
80
80
  "button",
81
81
  {
@@ -83,7 +83,7 @@ function ee({
83
83
  "aria-pressed": e === s.value,
84
84
  disabled: c,
85
85
  onClick: () => e !== s.value && o(s.value),
86
- className: U(e === s.value),
86
+ className: q(e === s.value),
87
87
  children: s.label
88
88
  },
89
89
  s.value
@@ -102,7 +102,7 @@ function te({
102
102
  className: m,
103
103
  emptyText: N = "Nothing to pick"
104
104
  }) {
105
- const [y, u] = T(!1), p = n.find((a) => a.value === e), h = (a) => {
105
+ const [y, u] = S(!1), p = n.find((a) => a.value === e), h = (a) => {
106
106
  o(a), u(!1);
107
107
  }, x = "gap-1.5 px-2 py-1 text-[12px] text-slate-700 data-[selected=true]:bg-muted dark:text-foreground";
108
108
  return /* @__PURE__ */ l(D, { open: y, onOpenChange: u, children: [
@@ -6,9 +6,10 @@ const y = [
6
6
  { id: "pdf", title: "PDF" },
7
7
  { id: "addendum", title: "Addendum" },
8
8
  { id: "defaults", title: "Defaults for new records" },
9
+ { id: "entry", title: "Entering data" },
9
10
  { id: "inheritance", title: "Inheritance" },
10
11
  { id: "tools", title: "AI review, previews, version history" }
11
- ], o = ["grouped", "table", "file", "addendum", "detail", "summary"], t = ["grouped", "table", "detail", "summary"], n = ["grouped", "detail", "summary"], r = ["grouped"], c = [
12
+ ], o = ["grouped", "table", "file", "addendum", "detail", "summary"], t = ["grouped", "table", "detail", "summary"], l = ["grouped", "detail", "summary"], s = ["grouped"], c = [
12
13
  // ── Who gets this form ────────────────────────────────────────────────────
13
14
  {
14
15
  key: "layout.layout_type",
@@ -44,14 +45,30 @@ const y = [
44
45
  section: "who",
45
46
  label: "New-menu label",
46
47
  effect: "The name shown in the New menu of the collection list. Empty uses the layout name.",
47
- types: r
48
+ types: s
48
49
  },
49
50
  {
50
51
  key: "layout.create_hidden",
51
52
  section: "who",
52
53
  label: "Hide from New menu",
53
54
  effect: "Leaves this layout out of the New menu; its link name keeps working.",
54
- types: r
55
+ types: s
56
+ },
57
+ {
58
+ key: "layout.conditions.active_window",
59
+ section: "who",
60
+ label: "Active dates",
61
+ effect: "The form applies only on these days, both included; outside them records open with the next form that fits.",
62
+ types: ["grouped"],
63
+ keywords: "window from until year end close season schedule period"
64
+ },
65
+ {
66
+ key: "layout.conditions.phone_of",
67
+ section: "who",
68
+ label: "Phone version",
69
+ effect: "A lighter copy of a form that opens instead of it on small screens; it never opens on its own.",
70
+ types: ["grouped"],
71
+ keywords: "mobile small screen variant device lighter"
55
72
  },
56
73
  // ── How it's laid out ─────────────────────────────────────────────────────
57
74
  {
@@ -95,14 +112,14 @@ const y = [
95
112
  section: "buttons",
96
113
  label: "Dossier button",
97
114
  effect: "Adds a Dossier button on saved records: one PDF with values, workflow history, comments and tasks. Only the default form's switch counts.",
98
- types: n
115
+ types: l
99
116
  },
100
117
  {
101
118
  key: "layout.dossier_label",
102
119
  section: "buttons",
103
120
  label: "Dossier button label",
104
121
  effect: "Text on the Dossier button. Empty shows “Dossier”. Only the default form's label counts.",
105
- types: n
122
+ types: l
106
123
  },
107
124
  {
108
125
  key: "layout.disable_comments",
@@ -180,14 +197,14 @@ const y = [
180
197
  section: "read",
181
198
  label: "Summary side panel",
182
199
  effect: "Shows a side panel with the summary fields beside the form.",
183
- types: n
200
+ types: l
184
201
  },
185
202
  {
186
203
  key: "layout.summary_hide_empty",
187
204
  section: "read",
188
205
  label: "Summary: hide empty fields",
189
206
  effect: "Fields with no value are left out of the summary panel.",
190
- types: n
207
+ types: l
191
208
  },
192
209
  {
193
210
  key: "layout.display_mode",
@@ -346,6 +363,70 @@ const y = [
346
363
  effect: "Replaces the steps with the cascade chain of this collection, parents first.",
347
364
  types: t
348
365
  },
366
+ // ── Entering data ─────────────────────────────────────────────────────────
367
+ {
368
+ key: "layout.focus_first",
369
+ section: "entry",
370
+ label: "Start on the first empty required field",
371
+ effect: "When the form opens, the cursor is already in the first required field with no value.",
372
+ types: s,
373
+ keywords: "keyboard focus autofocus cursor"
374
+ },
375
+ {
376
+ key: "layout.enter_next",
377
+ section: "entry",
378
+ label: "Enter moves to the next field",
379
+ effect: "Pressing Enter in a field goes to the next one instead of saving; Ctrl or ⌘ + Enter still saves.",
380
+ types: s,
381
+ keywords: "keyboard submit return"
382
+ },
383
+ {
384
+ key: "layout.tab_order",
385
+ section: "entry",
386
+ label: "Tab order",
387
+ effect: "The order the Tab key visits fields in. Set it by clicking fields in order on the canvas.",
388
+ types: s,
389
+ keywords: "keyboard accessibility sequence"
390
+ },
391
+ {
392
+ key: "layout.adaptive_mode",
393
+ section: "entry",
394
+ label: "Guided steps for new people",
395
+ effect: "A person making their first records sees this form as steps; after that it shows as tabs. Each person can switch.",
396
+ types: s,
397
+ keywords: "beginner expert onboarding steps tabs"
398
+ },
399
+ {
400
+ key: "layout.adaptive_threshold",
401
+ section: "entry",
402
+ label: "Records before tabs",
403
+ effect: "How many records of their own a person makes before the form switches to tabs.",
404
+ types: s
405
+ },
406
+ {
407
+ key: "layout.badge",
408
+ section: "entry",
409
+ label: "Form badge",
410
+ effect: "A colour and short tag on the record header, so people can tell which form they are in.",
411
+ types: s,
412
+ keywords: "identity chip tag colour label"
413
+ },
414
+ {
415
+ key: "layout.glossary",
416
+ section: "entry",
417
+ label: "Glossary tooltips in help text",
418
+ effect: "Glossary terms in help text get a dotted underline that shows their definition.",
419
+ types: s,
420
+ keywords: "definition term hover"
421
+ },
422
+ {
423
+ key: "layout.presets",
424
+ section: "entry",
425
+ label: "Placement presets",
426
+ effect: "Named bundles of field settings (width, required, help text) that apply to other fields in one click.",
427
+ types: s,
428
+ keywords: "template reuse bundle"
429
+ },
349
430
  // ── Inheritance ───────────────────────────────────────────────────────────
350
431
  {
351
432
  key: "layout.parent_layout_id",
@@ -383,6 +464,14 @@ const y = [
383
464
  effect: "AI looks for problems (missing required fields, odd order) and offers fixes you can undo.",
384
465
  types: o
385
466
  },
467
+ {
468
+ key: "tool.ai_text",
469
+ section: "tools",
470
+ label: "AI wording",
471
+ effect: "AI checks labels, help and choices against the glossary and plain language, and drafts section intros, placeholders and translations; you pick what to apply.",
472
+ types: t,
473
+ keywords: "glossary intro placeholder choices reading level plain language translation"
474
+ },
386
475
  {
387
476
  key: "tool.version_history",
388
477
  section: "tools",
@@ -404,6 +493,38 @@ const y = [
404
493
  effect: "Puts the layout back exactly as a version was; the current one is kept as a version.",
405
494
  types: o
406
495
  },
496
+ {
497
+ key: "layout.change_note",
498
+ section: "tools",
499
+ label: "Ask why on every save",
500
+ effect: "Save asks for a short reason, and a ticket link if you choose, and keeps it with the version in History.",
501
+ types: o,
502
+ keywords: "change note reason ticket audit required"
503
+ },
504
+ {
505
+ key: "layout.email_summary_group",
506
+ section: "tools",
507
+ label: "Section for notification emails",
508
+ effect: "Notification emails summarise the record with this section’s fields, in this form’s order, cut to what each person may see. None keeps the header strip. Only the default form’s choice counts.",
509
+ types: s,
510
+ keywords: "email mail notification summary body section"
511
+ },
512
+ {
513
+ key: "layout.conditions.freeze",
514
+ section: "tools",
515
+ label: "Freeze edits",
516
+ effect: "Until the date, saves to this layout are refused with your reason; an administrator can still save by giving a note.",
517
+ types: o,
518
+ keywords: "freeze lock go-live audit read-only block edits override"
519
+ },
520
+ {
521
+ key: "tool.cost_limit",
522
+ section: "tools",
523
+ label: "Form cost limit",
524
+ effect: "Test and Check impact warn when opening a record on this form takes more requests than this.",
525
+ types: l,
526
+ keywords: "requests pickers grids widgets queries slow"
527
+ },
407
528
  {
408
529
  key: "tool.layout_drift",
409
530
  section: "tools",
@@ -416,24 +537,24 @@ function h(e) {
416
537
  return f.get(e);
417
538
  }
418
539
  function p(e) {
419
- const s = e == null ? void 0 : e.layout_type;
420
- return s === "table" || s === "file" || s === "addendum" || s === "detail" || s === "summary" ? s : "grouped";
540
+ const a = e == null ? void 0 : e.layout_type;
541
+ return a === "table" || a === "file" || a === "addendum" || a === "detail" || a === "summary" ? a : "grouped";
421
542
  }
422
- function u(e, s) {
423
- const a = s.toLowerCase().split(/\s+/).filter(Boolean);
424
- if (a.length === 0) return !0;
425
- const l = `${e.label} ${e.effect} ${e.key} ${e.keywords ?? ""}`.toLowerCase();
426
- return a.every((i) => l.includes(i));
543
+ function u(e, a) {
544
+ const i = a.toLowerCase().split(/\s+/).filter(Boolean);
545
+ if (i.length === 0) return !0;
546
+ const n = `${e.label} ${e.effect} ${e.key} ${e.keywords ?? ""}`.toLowerCase();
547
+ return i.every((r) => n.includes(r));
427
548
  }
428
- function m(e, s = "") {
429
- const a = [];
430
- for (const l of y) {
431
- const i = c.filter(
432
- (d) => d.section === l.id && d.types.includes(e) && u(d, s)
549
+ function m(e, a = "") {
550
+ const i = [];
551
+ for (const n of y) {
552
+ const r = c.filter(
553
+ (d) => d.section === n.id && d.types.includes(e) && u(d, a)
433
554
  );
434
- i.length && a.push({ section: l, settings: i });
555
+ r.length && i.push({ section: n, settings: r });
435
556
  }
436
- return a;
557
+ return i;
437
558
  }
438
559
  export {
439
560
  y as SECTIONS,