@declarion/react 0.61.1 → 0.63.1

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 (487) hide show
  1. package/dist-lib/ActionDialog-uiuse5W8.js +374 -0
  2. package/dist-lib/ActionResultDialog.impl-BUBm9Ck3.js +273 -0
  3. package/dist-lib/ActionRunner-DAxgnKB3.js +1440 -0
  4. package/dist-lib/AdminCatalogPage.impl-BJGn7EvA.js +441 -0
  5. package/dist-lib/{AgentChatPanel.impl-rgkewyMl.js → AgentChatPanel.impl-8bw8J-xV.js} +358 -319
  6. package/dist-lib/AgentOpenFollower.impl-Cga1q7_e.js +81 -0
  7. package/dist-lib/AssociatedBlock-D6qDYmRO.js +1515 -0
  8. package/dist-lib/AuthShell-DdiughRT.js +361 -0
  9. package/dist-lib/ChangePasswordDialog-DFe7lVQg.js +12 -0
  10. package/dist-lib/ChangePasswordDialog.impl-DtSIaP-A.js +194 -0
  11. package/dist-lib/CommandPalette.impl-Db3AFA5w.js +383 -0
  12. package/dist-lib/CopyButton-C0iEvaT1.js +119 -0
  13. package/dist-lib/DirtyTabsCloseDialog.impl-DWaFaWKn.js +191 -0
  14. package/dist-lib/{DraggableChildrenTable-DruYOxKm.js → DraggableChildrenTable-Cy8uevS_.js} +45 -44
  15. package/dist-lib/DynamicIcon-DuBSz6TZ.js +133 -0
  16. package/dist-lib/FieldRow-BXBBFOZh.js +157 -0
  17. package/dist-lib/FilterChips-8fMDBXHp.js +1031 -0
  18. package/dist-lib/Forgot.impl-CmT5A__V.js +105 -0
  19. package/dist-lib/{Grid-Dsf3I0xG.js → Grid-Cg29k0jv.js} +98 -99
  20. package/dist-lib/Icons-Dzl-AkD_.d.ts +159 -0
  21. package/dist-lib/Icons-lt-7lhYR.js +151 -0
  22. package/dist-lib/ImpersonationBanner.impl-CBJJx6an.js +76 -0
  23. package/dist-lib/ImpersonationStartModal.impl-RaZcsJpG.js +158 -0
  24. package/dist-lib/Kbd-CNttVu0z.js +23 -0
  25. package/dist-lib/{LayoutRenderer-QN7Wp2W6.js → LayoutRenderer-DEHtYtzV.js} +965 -942
  26. package/dist-lib/{ListCardsBody-CNaZ0xwz.js → ListCardsBody-BAwFR3yO.js} +46 -52
  27. package/dist-lib/{MarkdownRenderer-BuO5hYJh.js → MarkdownRenderer-kNEMr6K_.js} +15 -16
  28. package/dist-lib/MenuItem-CfkVXPvC.js +140 -0
  29. package/dist-lib/NotFoundPage.impl-ZSBn4WWb.js +68 -0
  30. package/dist-lib/PageHeader-tw4pX3lI.js +71 -0
  31. package/dist-lib/PageShell-tI-mm0C5.js +47 -0
  32. package/dist-lib/Pill-D-wsfRhx.js +42 -0
  33. package/dist-lib/Preferences.impl-BG9XBZDf.js +162 -0
  34. package/dist-lib/Profile.impl-CbzSzxyG.js +527 -0
  35. package/dist-lib/PropertyGridEditor-BTjscqfz.js +4378 -0
  36. package/dist-lib/RecordHeader-Bv9nJXnG.js +217 -0
  37. package/dist-lib/RecordIdBadge-C3MgoZvt.js +25 -0
  38. package/dist-lib/RefreshControl-Ce-T_wSQ.js +195 -0
  39. package/dist-lib/Reset.impl-Cesyqt5p.js +168 -0
  40. package/dist-lib/SSOCallbackPage.impl-BC_W9nQA.js +31 -0
  41. package/dist-lib/SectionCard-VonaiLrx.js +150 -0
  42. package/dist-lib/SignUp.impl-C1KCQbfZ.js +212 -0
  43. package/dist-lib/SmartDetailPage.impl-8iOAMYQh.js +1609 -0
  44. package/dist-lib/SmartListPage.impl-Cc4Zwz5f.js +2818 -0
  45. package/dist-lib/SmartRecordListPage.impl-xTSohkqG.js +795 -0
  46. package/dist-lib/{SortHeaderMenu-BV-aQbPy.js → SortHeaderMenu-BKTrq0Wb.js} +23 -23
  47. package/dist-lib/TenantParamsPage.impl-DMuSs3eP.js +306 -0
  48. package/dist-lib/TwoFA.impl-BClZ3ndk.js +125 -0
  49. package/dist-lib/{cardProjection-BnmWukxk.js → cardProjection-Cr7fG6wJ.js} +134 -133
  50. package/dist-lib/declarion-react.css +1 -1
  51. package/dist-lib/format-count-CSEFw2ht.js +943 -0
  52. package/dist-lib/headerActionZone-bef-tZZ7.js +14 -0
  53. package/dist-lib/{stores/icon-registry.d.ts → icon-registry-CUT4eF63.d.ts} +14 -11
  54. package/dist-lib/icons.d.ts +20 -4
  55. package/dist-lib/icons.js +3 -2
  56. package/dist-lib/index.d.ts +2516 -150
  57. package/dist-lib/index.js +1588 -5117
  58. package/dist-lib/page-inset-D_kkVwwN.js +9 -0
  59. package/dist-lib/page-state-eA6J_KIR.js +124 -0
  60. package/dist-lib/param-editors-9yJr7xmN.js +201 -0
  61. package/dist-lib/payload-B2wODLAX.js +86 -0
  62. package/dist-lib/{peekDraftStore-Dk1Ha5u3.js → peekDraftStore-D4GRsRKW.js} +44 -43
  63. package/dist-lib/registry-BpzE8-h8.js +119 -0
  64. package/dist-lib/screen-back-Cs4kzeqD.js +44 -0
  65. package/dist-lib/testing.d.ts +53 -56
  66. package/dist-lib/testing.js +54 -55
  67. package/dist-lib/use-filter-value-labels-DuqvAIVG.js +413 -0
  68. package/dist-lib/{useAgentConversation-nT5UypJX.js → useAgentConversation-D210VDCQ.js} +158 -169
  69. package/dist-lib/useAuth-CR2YKKXb.js +49 -0
  70. package/dist-lib/useBranding-Ckp_AuJb.js +41 -0
  71. package/dist-lib/useBrandingChrome-bKTXXDLy.js +170 -0
  72. package/dist-lib/useCurrentLocation-BdngVeQv.js +22 -0
  73. package/dist-lib/useCurrentScreen--UovgvRj.js +2511 -0
  74. package/dist-lib/useImpersonation-DNV23Ks1.js +35 -0
  75. package/dist-lib/useObject-1OCeV34A.js +26 -0
  76. package/dist-lib/useOwnRefresh-DkOuM4yo.js +435 -0
  77. package/dist-lib/useParams-ei6w4I7w.js +133 -0
  78. package/dist-lib/useProperties-CbdhlhZd.js +81 -0
  79. package/dist-lib/useResponsiveMode-DIR1bZfo.d.ts +1786 -0
  80. package/dist-lib/useScreenBack-J861tbwn.js +71 -0
  81. package/dist-lib/useTabNavigate-BZiW4q3M.js +78 -0
  82. package/dist-lib/useTabTitle-CZZnWIQi.js +22 -0
  83. package/dist-lib/utils-D_QDpB8_.js +11 -0
  84. package/dist-lib/{value-Dwfyghtj.js → value-CDCeHgOv.js} +8 -22
  85. package/dist-lib/{action-dispatch-gWmOYjOP.js → variants-CbAwl3Mn.js} +734 -740
  86. package/dist-lib/vite/index.d.ts +42 -16
  87. package/dist-lib/window-election-CHIvIZwx.js +45 -0
  88. package/package.json +16 -23
  89. package/dist-lib/DetailAuditStrip-CSXZoy7v.js +0 -288
  90. package/dist-lib/DynamicIcon-DW5krHuX.js +0 -280
  91. package/dist-lib/RefreshControl-DO9rYcdq.js +0 -399
  92. package/dist-lib/SmartDetailPage.impl-DFIIx80b.js +0 -1565
  93. package/dist-lib/SmartListPage.impl-D694R32H.js +0 -3051
  94. package/dist-lib/SmartRecordListPage.impl-CB5cuQJV.js +0 -780
  95. package/dist-lib/api/agents.d.ts +0 -140
  96. package/dist-lib/api/auth-redirect.d.ts +0 -3
  97. package/dist-lib/api/auth.d.ts +0 -26
  98. package/dist-lib/api/batch.d.ts +0 -25
  99. package/dist-lib/api/client.d.ts +0 -51
  100. package/dist-lib/api/data.d.ts +0 -153
  101. package/dist-lib/api/entities.d.ts +0 -149
  102. package/dist-lib/api/events.d.ts +0 -91
  103. package/dist-lib/api/params.d.ts +0 -28
  104. package/dist-lib/api/properties.d.ts +0 -3
  105. package/dist-lib/api/schema.d.ts +0 -2
  106. package/dist-lib/api/status.d.ts +0 -2
  107. package/dist-lib/app.d.ts +0 -1
  108. package/dist-lib/components/actions/ActionButton.d.ts +0 -18
  109. package/dist-lib/components/actions/ActionDialog.d.ts +0 -20
  110. package/dist-lib/components/actions/ActionResultDialog.d.ts +0 -22
  111. package/dist-lib/components/actions/ActionRunner.d.ts +0 -62
  112. package/dist-lib/components/actions/ObjectActionBar.d.ts +0 -29
  113. package/dist-lib/components/actions/PropertyGridEditor.d.ts +0 -20
  114. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +0 -259
  115. package/dist-lib/components/actions/RowActionsKebab.d.ts +0 -20
  116. package/dist-lib/components/agents/AgentChatPanel.d.ts +0 -3
  117. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +0 -14
  118. package/dist-lib/components/agents/AgentConversationDrawer.d.ts +0 -11
  119. package/dist-lib/components/agents/AgentElicitForm.d.ts +0 -27
  120. package/dist-lib/components/agents/AgentPicker.d.ts +0 -8
  121. package/dist-lib/components/agents/transcript-runs.d.ts +0 -29
  122. package/dist-lib/components/chrome/AssociationTabs.d.ts +0 -9
  123. package/dist-lib/components/chrome/AuditMetaStrip.d.ts +0 -11
  124. package/dist-lib/components/chrome/Breadcrumbs.d.ts +0 -14
  125. package/dist-lib/components/chrome/HighlightsStrip.d.ts +0 -10
  126. package/dist-lib/components/chrome/PageHeader.d.ts +0 -16
  127. package/dist-lib/components/chrome/PageShell.d.ts +0 -7
  128. package/dist-lib/components/chrome/RecordHeader.d.ts +0 -17
  129. package/dist-lib/components/chrome/headerActionZone.d.ts +0 -27
  130. package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +0 -20
  131. package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +0 -13
  132. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +0 -16
  133. package/dist-lib/components/detail-layout/ChildrenCards.d.ts +0 -2
  134. package/dist-lib/components/detail-layout/ChildrenList.d.ts +0 -2
  135. package/dist-lib/components/detail-layout/ChildrenTable.d.ts +0 -2
  136. package/dist-lib/components/detail-layout/ChildrenTimeline.d.ts +0 -2
  137. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +0 -12
  138. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +0 -14
  139. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +0 -16
  140. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +0 -16
  141. package/dist-lib/components/detail-layout/ErrorSummary.d.ts +0 -11
  142. package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +0 -6
  143. package/dist-lib/components/detail-layout/FieldRow.d.ts +0 -23
  144. package/dist-lib/components/detail-layout/FieldsBlock.d.ts +0 -8
  145. package/dist-lib/components/detail-layout/LayoutColumn.d.ts +0 -9
  146. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +0 -46
  147. package/dist-lib/components/detail-layout/LayoutRow.d.ts +0 -8
  148. package/dist-lib/components/detail-layout/LayoutTabs.d.ts +0 -8
  149. package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +0 -8
  150. package/dist-lib/components/detail-layout/QuickAddForm.d.ts +0 -10
  151. package/dist-lib/components/detail-layout/SectionBlock.d.ts +0 -8
  152. package/dist-lib/components/detail-layout/StatusesBlock.d.ts +0 -8
  153. package/dist-lib/components/detail-layout/TimelineComposer.d.ts +0 -10
  154. package/dist-lib/components/detail-layout/blockMeta.d.ts +0 -5
  155. package/dist-lib/components/detail-layout/index.d.ts +0 -21
  156. package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +0 -25
  157. package/dist-lib/components/detail-layout/useQuickAdd.d.ts +0 -16
  158. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.d.ts +0 -2
  159. package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.d.ts +0 -2
  160. package/dist-lib/components/detail-layout/widgets/MonacoJson.d.ts +0 -9
  161. package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +0 -9
  162. package/dist-lib/components/detail-layout/widgets/builtins.d.ts +0 -1
  163. package/dist-lib/components/detail-layout/widgets/canonicalizeJson.d.ts +0 -1
  164. package/dist-lib/components/detail-layout/widgets/monacoBootstrap.d.ts +0 -1
  165. package/dist-lib/components/detail-layout/widgets/registry.d.ts +0 -14
  166. package/dist-lib/components/fields/BoolField.d.ts +0 -2
  167. package/dist-lib/components/fields/EmailField.d.ts +0 -2
  168. package/dist-lib/components/fields/EnumField.d.ts +0 -2
  169. package/dist-lib/components/fields/IntArrayField.d.ts +0 -2
  170. package/dist-lib/components/fields/JsonEditor.d.ts +0 -10
  171. package/dist-lib/components/fields/JsonField.d.ts +0 -3
  172. package/dist-lib/components/fields/MultilangArrayField.d.ts +0 -2
  173. package/dist-lib/components/fields/MultilangField.d.ts +0 -2
  174. package/dist-lib/components/fields/MultilangTextField.d.ts +0 -2
  175. package/dist-lib/components/fields/NumberField.d.ts +0 -2
  176. package/dist-lib/components/fields/PasswordField.d.ts +0 -2
  177. package/dist-lib/components/fields/PhoneField.d.ts +0 -2
  178. package/dist-lib/components/fields/RefCombobox.d.ts +0 -45
  179. package/dist-lib/components/fields/RefField.d.ts +0 -2
  180. package/dist-lib/components/fields/RichTextField.d.ts +0 -2
  181. package/dist-lib/components/fields/SecretField.d.ts +0 -2
  182. package/dist-lib/components/fields/StringArrayField.d.ts +0 -2
  183. package/dist-lib/components/fields/StringField.d.ts +0 -2
  184. package/dist-lib/components/fields/StructureField.d.ts +0 -2
  185. package/dist-lib/components/fields/TextField.d.ts +0 -2
  186. package/dist-lib/components/fields/TimestampField.d.ts +0 -2
  187. package/dist-lib/components/fields/UrlField.d.ts +0 -2
  188. package/dist-lib/components/fields/cells/factories/badge.d.ts +0 -2
  189. package/dist-lib/components/fields/cells/factories/boolPill.d.ts +0 -2
  190. package/dist-lib/components/fields/cells/factories/code.d.ts +0 -2
  191. package/dist-lib/components/fields/cells/factories/date.d.ts +0 -2
  192. package/dist-lib/components/fields/cells/factories/email.d.ts +0 -2
  193. package/dist-lib/components/fields/cells/factories/emptyCell.d.ts +0 -2
  194. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +0 -17
  195. package/dist-lib/components/fields/cells/factories/json.d.ts +0 -2
  196. package/dist-lib/components/fields/cells/factories/link.d.ts +0 -2
  197. package/dist-lib/components/fields/cells/factories/markdown.d.ts +0 -2
  198. package/dist-lib/components/fields/cells/factories/markdownPreview.d.ts +0 -9
  199. package/dist-lib/components/fields/cells/factories/money.d.ts +0 -2
  200. package/dist-lib/components/fields/cells/factories/multilangInline.d.ts +0 -2
  201. package/dist-lib/components/fields/cells/factories/nextRun.d.ts +0 -2
  202. package/dist-lib/components/fields/cells/factories/number.d.ts +0 -2
  203. package/dist-lib/components/fields/cells/factories/passwordMask.d.ts +0 -2
  204. package/dist-lib/components/fields/cells/factories/phone.d.ts +0 -2
  205. package/dist-lib/components/fields/cells/factories/refLink.d.ts +0 -2
  206. package/dist-lib/components/fields/cells/factories/richTextPreview.d.ts +0 -2
  207. package/dist-lib/components/fields/cells/factories/statusPill.d.ts +0 -2
  208. package/dist-lib/components/fields/cells/factories/tagList.d.ts +0 -2
  209. package/dist-lib/components/fields/cells/factories/text.d.ts +0 -2
  210. package/dist-lib/components/fields/cells/factories/timestamp.d.ts +0 -3
  211. package/dist-lib/components/fields/cells/factories/url-helpers.d.ts +0 -12
  212. package/dist-lib/components/fields/cells/factories/url.d.ts +0 -2
  213. package/dist-lib/components/fields/cells/registry.d.ts +0 -21
  214. package/dist-lib/components/fields/index.d.ts +0 -28
  215. package/dist-lib/components/fields/langMap.d.ts +0 -2
  216. package/dist-lib/components/fields/secretValue.d.ts +0 -2
  217. package/dist-lib/components/file-widgets/CircleImage.d.ts +0 -2
  218. package/dist-lib/components/file-widgets/DocumentCard.d.ts +0 -2
  219. package/dist-lib/components/file-widgets/FileList.d.ts +0 -2
  220. package/dist-lib/components/file-widgets/Grid.d.ts +0 -2
  221. package/dist-lib/components/file-widgets/GridLazy.d.ts +0 -2
  222. package/dist-lib/components/file-widgets/ImageWidget.d.ts +0 -12
  223. package/dist-lib/components/file-widgets/LabeledSlots.d.ts +0 -2
  224. package/dist-lib/components/file-widgets/SquareImage.d.ts +0 -2
  225. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +0 -3
  226. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +0 -4
  227. package/dist-lib/components/file-widgets/WideBanner.d.ts +0 -2
  228. package/dist-lib/components/file-widgets/builtins.d.ts +0 -1
  229. package/dist-lib/components/file-widgets/cropper.d.ts +0 -14
  230. package/dist-lib/components/file-widgets/draft-scope.d.ts +0 -22
  231. package/dist-lib/components/file-widgets/helpers.d.ts +0 -15
  232. package/dist-lib/components/file-widgets/host.d.ts +0 -28
  233. package/dist-lib/components/file-widgets/index.d.ts +0 -16
  234. package/dist-lib/components/file-widgets/payload.d.ts +0 -21
  235. package/dist-lib/components/file-widgets/registry.d.ts +0 -5
  236. package/dist-lib/components/file-widgets/types.d.ts +0 -17
  237. package/dist-lib/components/file-widgets/upload.d.ts +0 -45
  238. package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +0 -42
  239. package/dist-lib/components/file-widgets/value.d.ts +0 -4
  240. package/dist-lib/components/filters/FilterChips.d.ts +0 -14
  241. package/dist-lib/components/filters/FilterDrawer.d.ts +0 -32
  242. package/dist-lib/components/filters/filter-op-label.d.ts +0 -3
  243. package/dist-lib/components/layout/CommandPalette.d.ts +0 -21
  244. package/dist-lib/components/layout/DirtyTabsCloseDialog.d.ts +0 -9
  245. package/dist-lib/components/layout/ImpersonationBanner.d.ts +0 -11
  246. package/dist-lib/components/layout/ImpersonationFrame.d.ts +0 -11
  247. package/dist-lib/components/layout/ImpersonationStartModal.d.ts +0 -22
  248. package/dist-lib/components/layout/Layout.d.ts +0 -6
  249. package/dist-lib/components/layout/Rail.d.ts +0 -22
  250. package/dist-lib/components/layout/Sidebar.d.ts +0 -12
  251. package/dist-lib/components/layout/TabStrip.d.ts +0 -6
  252. package/dist-lib/components/layout/TenantChip.d.ts +0 -26
  253. package/dist-lib/components/layout/TopBar.d.ts +0 -22
  254. package/dist-lib/components/layout/tab-close.d.ts +0 -13
  255. package/dist-lib/components/list/ColumnPicker.d.ts +0 -20
  256. package/dist-lib/components/list/InlineEditCell.d.ts +0 -15
  257. package/dist-lib/components/list/PeekFieldCell.d.ts +0 -16
  258. package/dist-lib/components/list/QuickPeek.d.ts +0 -59
  259. package/dist-lib/components/list/ViewSwitcher.d.ts +0 -24
  260. package/dist-lib/components/list/peekDraftStore.d.ts +0 -6
  261. package/dist-lib/components/pages/AdminCatalogPage.d.ts +0 -1
  262. package/dist-lib/components/pages/DocumentsMenu.d.ts +0 -21
  263. package/dist-lib/components/pages/ExportMenu.d.ts +0 -30
  264. package/dist-lib/components/pages/NotFoundPage.d.ts +0 -1
  265. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +0 -41
  266. package/dist-lib/components/pages/SSOCallbackPage.d.ts +0 -1
  267. package/dist-lib/components/pages/SmartDetailPage.d.ts +0 -2
  268. package/dist-lib/components/pages/SmartDetailPage.impl.d.ts +0 -4
  269. package/dist-lib/components/pages/SmartListPage.d.ts +0 -2
  270. package/dist-lib/components/pages/SmartListPage.impl.d.ts +0 -4
  271. package/dist-lib/components/pages/SmartRecordListPage.d.ts +0 -2
  272. package/dist-lib/components/pages/SmartRecordListPage.impl.d.ts +0 -4
  273. package/dist-lib/components/pages/auth/AuthShell.d.ts +0 -18
  274. package/dist-lib/components/pages/auth/Forgot.d.ts +0 -1
  275. package/dist-lib/components/pages/auth/Reset.d.ts +0 -1
  276. package/dist-lib/components/pages/auth/SignIn.d.ts +0 -1
  277. package/dist-lib/components/pages/auth/SignUp.d.ts +0 -1
  278. package/dist-lib/components/pages/auth/TwoFA.d.ts +0 -1
  279. package/dist-lib/components/pages/auth/icons.d.ts +0 -6
  280. package/dist-lib/components/pages/exportRequest.d.ts +0 -69
  281. package/dist-lib/components/pages/list/DataCell.d.ts +0 -4
  282. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +0 -8
  283. package/dist-lib/components/pages/list/ListCardRow.d.ts +0 -39
  284. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -33
  285. package/dist-lib/components/pages/list/ListFloatbar.d.ts +0 -29
  286. package/dist-lib/components/pages/list/ListFooter.d.ts +0 -26
  287. package/dist-lib/components/pages/list/ListHeader.d.ts +0 -26
  288. package/dist-lib/components/pages/list/ListNoRows.d.ts +0 -31
  289. package/dist-lib/components/pages/list/ListTable.d.ts +0 -33
  290. package/dist-lib/components/pages/list/ListTableRow.d.ts +0 -17
  291. package/dist-lib/components/pages/list/ListToolbar.d.ts +0 -46
  292. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +0 -10
  293. package/dist-lib/components/pages/list/RowActionsCell.d.ts +0 -34
  294. package/dist-lib/components/pages/list/RowContextMenu.d.ts +0 -28
  295. package/dist-lib/components/pages/list/SaveViewDialog.d.ts +0 -10
  296. package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +0 -14
  297. package/dist-lib/components/pages/list/cardProjection.d.ts +0 -67
  298. package/dist-lib/components/pages/list/column-sizing.d.ts +0 -14
  299. package/dist-lib/components/pages/list/columns.d.ts +0 -46
  300. package/dist-lib/components/pages/list/filter-meta.d.ts +0 -25
  301. package/dist-lib/components/pages/list/page-size.d.ts +0 -3
  302. package/dist-lib/components/pages/list/sortable-header.d.ts +0 -2
  303. package/dist-lib/components/pages/list/table-features.d.ts +0 -14
  304. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +0 -24
  305. package/dist-lib/components/pages/list/useActiveView.d.ts +0 -45
  306. package/dist-lib/components/pages/list/useHeaderReorder.d.ts +0 -26
  307. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +0 -38
  308. package/dist-lib/components/pages/list/useListQuery.d.ts +0 -67
  309. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +0 -61
  310. package/dist-lib/components/pages/list/useListSelection.d.ts +0 -31
  311. package/dist-lib/components/pages/list/useListSort.d.ts +0 -46
  312. package/dist-lib/components/pages/list/useListViews.d.ts +0 -57
  313. package/dist-lib/components/pages/list/useRowMenu.d.ts +0 -46
  314. package/dist-lib/components/pages/profile/Preferences.d.ts +0 -1
  315. package/dist-lib/components/pages/profile/Profile.d.ts +0 -7
  316. package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +0 -2
  317. package/dist-lib/components/params/ParamsBlock.d.ts +0 -13
  318. package/dist-lib/components/params/param-editors.d.ts +0 -20
  319. package/dist-lib/components/primitives/Avatar.d.ts +0 -6
  320. package/dist-lib/components/primitives/BoolToggle.d.ts +0 -7
  321. package/dist-lib/components/primitives/BrandGlyph.d.ts +0 -8
  322. package/dist-lib/components/primitives/BrandLogo.d.ts +0 -12
  323. package/dist-lib/components/primitives/Btn.d.ts +0 -19
  324. package/dist-lib/components/primitives/Check.d.ts +0 -7
  325. package/dist-lib/components/primitives/Chip.d.ts +0 -9
  326. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +0 -9
  327. package/dist-lib/components/primitives/Dropdown.d.ts +0 -20
  328. package/dist-lib/components/primitives/Fields.d.ts +0 -111
  329. package/dist-lib/components/primitives/HoverCard.d.ts +0 -15
  330. package/dist-lib/components/primitives/IconBtn.d.ts +0 -11
  331. package/dist-lib/components/primitives/Icons.d.ts +0 -136
  332. package/dist-lib/components/primitives/Kbd.d.ts +0 -4
  333. package/dist-lib/components/primitives/MenuItem.d.ts +0 -14
  334. package/dist-lib/components/primitives/Pill.d.ts +0 -11
  335. package/dist-lib/components/primitives/RecordIdBadge.d.ts +0 -8
  336. package/dist-lib/components/primitives/RowField.d.ts +0 -10
  337. package/dist-lib/components/primitives/SectionCard.d.ts +0 -24
  338. package/dist-lib/components/primitives/Spinner.d.ts +0 -3
  339. package/dist-lib/components/primitives/Tooltip.d.ts +0 -34
  340. package/dist-lib/components/primitives/dataTableStyles.d.ts +0 -4
  341. package/dist-lib/components/primitives/index.d.ts +0 -37
  342. package/dist-lib/components/shared/ChangePasswordDialog.d.ts +0 -9
  343. package/dist-lib/components/shared/ConfirmDialog.d.ts +0 -11
  344. package/dist-lib/components/shared/CopyButton.d.ts +0 -8
  345. package/dist-lib/components/shared/DynamicIcon.d.ts +0 -20
  346. package/dist-lib/components/shared/EmptyState.d.ts +0 -9
  347. package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -17
  348. package/dist-lib/components/shared/LoadingSkeleton.d.ts +0 -6
  349. package/dist-lib/components/shared/LucideIcon.d.ts +0 -16
  350. package/dist-lib/components/shared/Markdown.d.ts +0 -3
  351. package/dist-lib/components/shared/MarkdownRenderer.d.ts +0 -11
  352. package/dist-lib/components/shared/RefreshControl.d.ts +0 -25
  353. package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +0 -11
  354. package/dist-lib/components/shared/StatusStepper.d.ts +0 -13
  355. package/dist-lib/components/shared/toast/DeclarionToast.d.ts +0 -31
  356. package/dist-lib/components/shared/useOwnRefresh.d.ts +0 -9
  357. package/dist-lib/embed/EmbedAuthBootstrap.d.ts +0 -8
  358. package/dist-lib/embed/EmbedContext.d.ts +0 -50
  359. package/dist-lib/embed/EmbedDirtyReporter.d.ts +0 -10
  360. package/dist-lib/embed/EmbedHistoryTracker.d.ts +0 -1
  361. package/dist-lib/embed/EmbedLocationReporter.d.ts +0 -8
  362. package/dist-lib/embed/EmbedResizeReporter.d.ts +0 -6
  363. package/dist-lib/embed/EmbedUnsavedGuard.d.ts +0 -7
  364. package/dist-lib/embed/embed-dirty.d.ts +0 -24
  365. package/dist-lib/embed/embed-history.d.ts +0 -19
  366. package/dist-lib/embed/embed-nav-guard.d.ts +0 -20
  367. package/dist-lib/embed/file-src.d.ts +0 -63
  368. package/dist-lib/embed/handshake.d.ts +0 -57
  369. package/dist-lib/embed/index.d.ts +0 -19
  370. package/dist-lib/embed/params.d.ts +0 -75
  371. package/dist-lib/embed/protocol.d.ts +0 -165
  372. package/dist-lib/embed/screen-location.d.ts +0 -50
  373. package/dist-lib/embed/theme.d.ts +0 -34
  374. package/dist-lib/embed/token.d.ts +0 -57
  375. package/dist-lib/embed/useEmbedNavigate.d.ts +0 -48
  376. package/dist-lib/embed/useGlobalLinkInterceptor.d.ts +0 -66
  377. package/dist-lib/failure-BUxXuP4c.js +0 -158
  378. package/dist-lib/format-count-bXVfHzbI.js +0 -1771
  379. package/dist-lib/hooks/useActionData.d.ts +0 -61
  380. package/dist-lib/hooks/useAgentConversation.d.ts +0 -24
  381. package/dist-lib/hooks/useAllEntityData.d.ts +0 -16
  382. package/dist-lib/hooks/useAssociatedData.d.ts +0 -10
  383. package/dist-lib/hooks/useAuth.d.ts +0 -22
  384. package/dist-lib/hooks/useBranding.d.ts +0 -8
  385. package/dist-lib/hooks/useBrandingChrome.d.ts +0 -59
  386. package/dist-lib/hooks/useChildrenData.d.ts +0 -3
  387. package/dist-lib/hooks/useColumns.d.ts +0 -13
  388. package/dist-lib/hooks/useCurrentScreen.d.ts +0 -34
  389. package/dist-lib/hooks/useCursorEntityData.d.ts +0 -79
  390. package/dist-lib/hooks/useDebounce.d.ts +0 -1
  391. package/dist-lib/hooks/useEntity.d.ts +0 -2
  392. package/dist-lib/hooks/useEntityData.d.ts +0 -41
  393. package/dist-lib/hooks/useFilters.d.ts +0 -14
  394. package/dist-lib/hooks/useImpersonation.d.ts +0 -23
  395. package/dist-lib/hooks/useLanguage.d.ts +0 -4
  396. package/dist-lib/hooks/useLiveObject.d.ts +0 -9
  397. package/dist-lib/hooks/useLongPress.d.ts +0 -29
  398. package/dist-lib/hooks/useMutations.d.ts +0 -13
  399. package/dist-lib/hooks/useObject.d.ts +0 -11
  400. package/dist-lib/hooks/useObjectStatus.d.ts +0 -5
  401. package/dist-lib/hooks/usePageState.d.ts +0 -32
  402. package/dist-lib/hooks/usePageStateRuntime.d.ts +0 -27
  403. package/dist-lib/hooks/usePageStateTtl.d.ts +0 -11
  404. package/dist-lib/hooks/useParams.d.ts +0 -49
  405. package/dist-lib/hooks/useProperties.d.ts +0 -5
  406. package/dist-lib/hooks/useRealtimeThresholds.d.ts +0 -1
  407. package/dist-lib/hooks/useRegisterScreenTab.d.ts +0 -11
  408. package/dist-lib/hooks/useResponsiveMode.d.ts +0 -27
  409. package/dist-lib/hooks/useSSE.d.ts +0 -31
  410. package/dist-lib/hooks/useSchema.d.ts +0 -1
  411. package/dist-lib/hooks/useScreen.d.ts +0 -2
  412. package/dist-lib/hooks/useScreenBack.d.ts +0 -21
  413. package/dist-lib/hooks/useScreenTab.d.ts +0 -10
  414. package/dist-lib/hooks/useTabNavigate.d.ts +0 -34
  415. package/dist-lib/hooks/useTabSearchMirror.d.ts +0 -1
  416. package/dist-lib/hooks/useTabTitle.d.ts +0 -2
  417. package/dist-lib/hooks/useText.d.ts +0 -3
  418. package/dist-lib/hooks/useTimelineData.d.ts +0 -10
  419. package/dist-lib/hooks/useVersionWatcher.d.ts +0 -30
  420. package/dist-lib/hooks/useViews.d.ts +0 -26
  421. package/dist-lib/lib/action-dispatch.d.ts +0 -8
  422. package/dist-lib/lib/actions.d.ts +0 -254
  423. package/dist-lib/lib/anchor.d.ts +0 -36
  424. package/dist-lib/lib/brand-tokens.d.ts +0 -43
  425. package/dist-lib/lib/branding.d.ts +0 -20
  426. package/dist-lib/lib/canonical-url.d.ts +0 -27
  427. package/dist-lib/lib/capabilityPrefetch.d.ts +0 -6
  428. package/dist-lib/lib/child-config.d.ts +0 -24
  429. package/dist-lib/lib/children-validation.d.ts +0 -5
  430. package/dist-lib/lib/decimal-text.d.ts +0 -1
  431. package/dist-lib/lib/display-value.d.ts +0 -1
  432. package/dist-lib/lib/document-templates.d.ts +0 -11
  433. package/dist-lib/lib/download.d.ts +0 -21
  434. package/dist-lib/lib/evidence-verdict.d.ts +0 -11
  435. package/dist-lib/lib/failure.d.ts +0 -2
  436. package/dist-lib/lib/field-classification.d.ts +0 -61
  437. package/dist-lib/lib/field-regions.d.ts +0 -8
  438. package/dist-lib/lib/filter-evaluator.d.ts +0 -16
  439. package/dist-lib/lib/filters.d.ts +0 -93
  440. package/dist-lib/lib/format-count.d.ts +0 -41
  441. package/dist-lib/lib/html-state.d.ts +0 -11
  442. package/dist-lib/lib/language.d.ts +0 -19
  443. package/dist-lib/lib/longPressGesture.d.ts +0 -55
  444. package/dist-lib/lib/mass-edit.d.ts +0 -32
  445. package/dist-lib/lib/page-inset.d.ts +0 -3
  446. package/dist-lib/lib/quick-add.d.ts +0 -2
  447. package/dist-lib/lib/realtime-query-keys.d.ts +0 -22
  448. package/dist-lib/lib/realtime-reconcile.d.ts +0 -33
  449. package/dist-lib/lib/realtime-resync.d.ts +0 -23
  450. package/dist-lib/lib/record-documents-key.d.ts +0 -1
  451. package/dist-lib/lib/rich-text.d.ts +0 -14
  452. package/dist-lib/lib/rowClickGesture.d.ts +0 -26
  453. package/dist-lib/lib/safe-url.d.ts +0 -15
  454. package/dist-lib/lib/schema-routing.d.ts +0 -3
  455. package/dist-lib/lib/screen-back.d.ts +0 -70
  456. package/dist-lib/lib/scroll-restoration.d.ts +0 -90
  457. package/dist-lib/lib/size-value.d.ts +0 -16
  458. package/dist-lib/lib/sort.d.ts +0 -72
  459. package/dist-lib/lib/timestamp.d.ts +0 -53
  460. package/dist-lib/lib/toast.d.ts +0 -49
  461. package/dist-lib/lib/ui-actions.d.ts +0 -12
  462. package/dist-lib/lib/utils.d.ts +0 -9
  463. package/dist-lib/lib/variants.d.ts +0 -7
  464. package/dist-lib/lib/versionTracker.d.ts +0 -72
  465. package/dist-lib/lib/viewport-category.d.ts +0 -44
  466. package/dist-lib/main.d.ts +0 -1
  467. package/dist-lib/registry-nSeHd5si.js +0 -1956
  468. package/dist-lib/safe-url-oSJw5pzO.js +0 -34
  469. package/dist-lib/stores/auth.d.ts +0 -16
  470. package/dist-lib/stores/list-layout.d.ts +0 -85
  471. package/dist-lib/stores/page-state.d.ts +0 -61
  472. package/dist-lib/stores/preferences.d.ts +0 -37
  473. package/dist-lib/stores/realtime.d.ts +0 -96
  474. package/dist-lib/stores/screen-registry.d.ts +0 -17
  475. package/dist-lib/stores/tabs.d.ts +0 -73
  476. package/dist-lib/types/api.d.ts +0 -579
  477. package/dist-lib/types/fieldType.d.ts +0 -2
  478. package/dist-lib/types/files.d.ts +0 -79
  479. package/dist-lib/types/ordmap.d.ts +0 -39
  480. package/dist-lib/types/schema.d.ts +0 -1089
  481. package/dist-lib/useCurrentScreen-0WBj7wT6.js +0 -7860
  482. package/dist-lib/useListQuery-C7dq_sEo.js +0 -103
  483. package/dist-lib/useOwnRefresh-q80kCMMh.js +0 -1167
  484. package/dist-lib/useProperties-CeGKtq7Q.js +0 -83
  485. package/dist-lib/useTabSearchMirror-CzNAj82Q.js +0 -175
  486. package/dist-lib/useText-BsedsJ-J.js +0 -952
  487. package/dist-lib/vite/fingerprint-plugin.d.ts +0 -44
@@ -1,21 +1,29 @@
1
- import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
2
- import { An as n, Bn as r, D as i, Dn as a, En as o, Fn as s, It as c, Jn as l, Kn as u, O as d, Pn as f, St as p, Tn as m, Un as h, Vn as g, b as _, fn as v, gn as y, it as b, jn as x, kn as S, qn as C, rt as w, sn as T, xt as E, yn as D, z as O, zt as k } from "./useCurrentScreen-0WBj7wT6.js";
3
- import { M as A, d as j, t as M } from "./useText-BsedsJ-J.js";
4
- import { a as N, d as P, f as F, h as I, i as L, l as R, m as z, o as B, r as V, t as H, u as U } from "./registry-nSeHd5si.js";
5
- import { c as ee, o as te, s as ne, t as re, y as ie } from "./failure-BUxXuP4c.js";
6
- import { E as ae, _ as oe, i as se, t as ce, y as le } from "./useOwnRefresh-q80kCMMh.js";
7
- import { m as ue, p as de } from "./action-dispatch-gWmOYjOP.js";
8
- import { n as fe, r as pe, t as me } from "./dataTableStyles-vwD1mVOP.js";
9
- import { Suspense as he, lazy as ge, useCallback as W, useEffect as G, useId as _e, useLayoutEffect as ve, useMemo as ye, useRef as K, useState as q } from "react";
10
- import { useInfiniteQuery as be, useMutation as xe, useQueryClient as Se } from "@tanstack/react-query";
1
+ import { Cn as e, Dn as t, Pt as n, Q as r, Qt as i, U as a, an as o, c as s, cn as c, ct as l, dn as u, fn as d, gn as f, hn as p, in as m, l as h, o as g, on as _, ot as v, st as y, wn as b, wt as x, xt as S, yt as C } from "./useCurrentScreen--UovgvRj.js";
2
+ import { t as w } from "./Icons-lt-7lhYR.js";
3
+ import { n as T, r as E } from "./CopyButton-C0iEvaT1.js";
4
+ import { t as D } from "./Pill-D-wsfRhx.js";
5
+ import { Q as O, f as k, p as A, q as j, tt as M, u as N } from "./PropertyGridEditor-BTjscqfz.js";
6
+ import { t as P } from "./SectionCard-VonaiLrx.js";
7
+ import { a as F, i as I, r as L, t as ee } from "./registry-BpzE8-h8.js";
8
+ import { t as R } from "./DynamicIcon-DuBSz6TZ.js";
9
+ import { t as z } from "./utils-D_QDpB8_.js";
10
+ import { n as B } from "./useTabNavigate-BZiW4q3M.js";
11
+ import { E as V, T as te, v as H } from "./ActionRunner-DAxgnKB3.js";
12
+ import { g as ne, i as U, t as re, v as ie } from "./useOwnRefresh-DkOuM4yo.js";
13
+ import { h as ae, m as oe, p as se } from "./variants-CbAwl3Mn.js";
14
+ import { n as ce, r as le, t as ue } from "./dataTableStyles-vwD1mVOP.js";
15
+ import { n as de, t as fe } from "./AssociatedBlock-D6qDYmRO.js";
16
+ import { i as pe, n as me, r as he, t as ge } from "./FieldRow-BXBBFOZh.js";
17
+ import { Suspense as _e, lazy as ve, useCallback as W, useEffect as G, useId as ye, useLayoutEffect as be, useMemo as xe, useRef as K, useState as q } from "react";
18
+ import { useInfiniteQuery as Se, useMutation as Ce, useQueryClient as we } from "@tanstack/react-query";
11
19
  import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
12
20
  //#region src/lib/size-value.ts
13
- var Ce = /^(\d+)px$/;
14
- function we(e) {
21
+ var Te = /^(\d+)px$/;
22
+ function Ee(e) {
15
23
  if (e == null || e === "") return null;
16
24
  if (e === "auto") return { kind: "auto" };
17
25
  if (e === "fill") return { kind: "fill" };
18
- let t = Ce.exec(e);
26
+ let t = Te.exec(e);
19
27
  if (t) {
20
28
  let e = parseInt(t[1], 10);
21
29
  return e > 0 ? {
@@ -31,7 +39,7 @@ function we(e) {
31
39
  }
32
40
  //#endregion
33
41
  //#region src/components/detail-layout/LayoutRow.tsx
34
- function Te({ config: e, ctx: t }) {
42
+ function De({ config: e, ctx: t }) {
35
43
  let { items: n, gap: r = 0, resizable: i = !1, stack_below: a } = e, o = a === "never" ? 0 : a ?? 768, [s, c] = q(!1), l = K(null);
36
44
  G(() => {
37
45
  if (o === 0) return;
@@ -43,7 +51,7 @@ function Te({ config: e, ctx: t }) {
43
51
  return t.observe(e), () => t.disconnect();
44
52
  }, [o]);
45
53
  let [u, d] = q(null), f = K(null), p = W(() => n.map((t) => {
46
- let n = we(t.width ?? t.column?.width ?? t.row?.width ?? e.width);
54
+ let n = Ee(t.width ?? t.column?.width ?? t.row?.width ?? e.width);
47
55
  return n && n.kind === "weight" ? n.value : 1;
48
56
  }), [n, e.width]), m = W((e, t) => {
49
57
  t.preventDefault();
@@ -62,20 +70,20 @@ function Te({ config: e, ctx: t }) {
62
70
  f.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
63
71
  };
64
72
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
65
- }, [u, p]), h = u ?? p(), g = e.height ? De(e.height) : void 0;
73
+ }, [u, p]), h = u ?? p(), g = e.height ? ke(e.height) : void 0;
66
74
  return /* @__PURE__ */ Y("div", {
67
75
  ref: l,
68
- className: F("flex", s && "flex-col"),
76
+ className: z("flex", s && "flex-col"),
69
77
  style: {
70
78
  gap: r ? `${r}px` : void 0,
71
79
  ...g
72
80
  },
73
81
  children: n.map((r, a) => /* @__PURE__ */ X("div", {
74
- className: F("min-w-0 flex items-stretch", s && "w-full"),
75
- style: s ? void 0 : Ee(r.width ?? r.column?.width ?? r.row?.width ?? e.width, h[a], r.min_width, r.max_width),
82
+ className: z("min-w-0 flex items-stretch", s && "w-full"),
83
+ style: s ? void 0 : Oe(r.width ?? r.column?.width ?? r.row?.width ?? e.width, h[a], r.min_width, r.max_width),
76
84
  children: [/* @__PURE__ */ Y("div", {
77
- className: F("flex-1 min-w-0 flex flex-col", g && "overflow-y-auto overflow-x-hidden"),
78
- children: /* @__PURE__ */ Y(ln, {
85
+ className: z("flex-1 min-w-0 flex flex-col", g && "overflow-y-auto overflow-x-hidden"),
86
+ children: /* @__PURE__ */ Y(fn, {
79
87
  node: r,
80
88
  ctx: t
81
89
  })
@@ -86,17 +94,17 @@ function Te({ config: e, ctx: t }) {
86
94
  }, a))
87
95
  });
88
96
  }
89
- function Ee(e, t, n, r) {
90
- let i = we(e), a;
97
+ function Oe(e, t, n, r) {
98
+ let i = Ee(e), a;
91
99
  return a = !i || i.kind === "weight" ? `${t} 1 0%` : i.kind === "px" ? `0 0 ${i.value}px` : i.kind === "fill" ? "1 1 0%" : "0 0 auto", {
92
100
  flex: a,
93
101
  minWidth: n,
94
102
  maxWidth: r
95
103
  };
96
104
  }
97
- function De(e) {
105
+ function ke(e) {
98
106
  if (!e) return;
99
- let t = we(e);
107
+ let t = Ee(e);
100
108
  if (t?.kind === "px") return {
101
109
  height: `${t.value}px`,
102
110
  overflow: "hidden"
@@ -108,12 +116,12 @@ function De(e) {
108
116
  }
109
117
  //#endregion
110
118
  //#region src/components/detail-layout/LayoutColumn.tsx
111
- function Oe({ config: e, ctx: t }) {
119
+ function Ae({ config: e, ctx: t }) {
112
120
  let { items: n, gap: r = 12 } = e;
113
121
  return /* @__PURE__ */ Y("div", {
114
122
  className: "flex flex-col h-full",
115
123
  style: { gap: r ? `${r}px` : void 0 },
116
- children: n.map((e, n) => /* @__PURE__ */ Y(ln, {
124
+ children: n.map((e, n) => /* @__PURE__ */ Y(fn, {
117
125
  node: e,
118
126
  ctx: t
119
127
  }, n))
@@ -121,11 +129,11 @@ function Oe({ config: e, ctx: t }) {
121
129
  }
122
130
  //#endregion
123
131
  //#region src/components/detail-layout/blockMeta.ts
124
- function ke(e) {
132
+ function je(e) {
125
133
  return e.children ?? e.associated;
126
134
  }
127
- function Ae(e, t, n) {
128
- let r = ke(e);
135
+ function Me(e, t, n) {
136
+ let r = je(e);
129
137
  if (r) {
130
138
  if (e.label) return n(e.label);
131
139
  let i = t.entity.children?.find((e) => e.entity === r);
@@ -135,9 +143,9 @@ function Ae(e, t, n) {
135
143
  }
136
144
  return e.section ? n(e.section.name) : n("record.tabs.fallback", "Tab");
137
145
  }
138
- function je(e, t) {
146
+ function Ne(e, t) {
139
147
  if (e.icon) return e.icon;
140
- let n = ke(e);
148
+ let n = je(e);
141
149
  if (n) {
142
150
  let e = t.entity.children?.find((e) => e.entity === n);
143
151
  if (e?.display?.icon) return e.display.icon;
@@ -147,11 +155,11 @@ function je(e, t) {
147
155
  }
148
156
  //#endregion
149
157
  //#region src/components/detail-layout/LayoutTabs.tsx
150
- function Me({ config: e, ctx: n }) {
151
- let r = M(), { items: i } = e, [a, o] = q(0), s = y(), c = n.detailTabsPresentation ?? (s.isPhone ? "sections" : "scroll");
152
- if (i.length === 0) return null;
153
- if (c === "sections") {
154
- let e = i.map((e, t) => `detail-tab-section-${t}`);
158
+ function Pe({ config: e, ctx: t }) {
159
+ let n = x(), { items: r } = e, [i, a] = q(0), o = S(), s = t.detailTabsPresentation ?? (o.isPhone ? "sections" : "scroll");
160
+ if (r.length === 0) return null;
161
+ if (s === "sections") {
162
+ let e = r.map((e, t) => `detail-tab-section-${t}`);
155
163
  return /* @__PURE__ */ X("div", {
156
164
  style: {
157
165
  display: "flex",
@@ -159,8 +167,8 @@ function Me({ config: e, ctx: n }) {
159
167
  gap: 10,
160
168
  minWidth: 0
161
169
  },
162
- children: [i.length > 1 && /* @__PURE__ */ Y("nav", {
163
- "aria-label": r("record.tabs.sections", "Detail sections"),
170
+ children: [r.length > 1 && /* @__PURE__ */ Y("nav", {
171
+ "aria-label": n("record.tabs.sections", "Detail sections"),
164
172
  style: {
165
173
  display: "flex",
166
174
  gap: 6,
@@ -168,11 +176,11 @@ function Me({ config: e, ctx: n }) {
168
176
  padding: "0 2px 2px",
169
177
  WebkitOverflowScrolling: "touch"
170
178
  },
171
- children: i.map((i, a) => {
172
- let o = Ae(i, n, r), s = je(i, n);
179
+ children: r.map((r, i) => {
180
+ let a = Me(r, t, n), o = Ne(r, t);
173
181
  return /* @__PURE__ */ X("button", {
174
182
  type: "button",
175
- onClick: () => document.getElementById(e[a])?.scrollIntoView({
183
+ onClick: () => document.getElementById(e[i])?.scrollIntoView({
176
184
  block: "start",
177
185
  behavior: "smooth"
178
186
  }),
@@ -192,22 +200,22 @@ function Me({ config: e, ctx: n }) {
192
200
  whiteSpace: "nowrap",
193
201
  cursor: "pointer"
194
202
  },
195
- children: [s && /* @__PURE__ */ Y(t, {
196
- name: s,
203
+ children: [o && /* @__PURE__ */ Y(R, {
204
+ name: o,
197
205
  size: 13
198
206
  }), /* @__PURE__ */ Y("span", {
199
207
  style: {
200
208
  overflow: "hidden",
201
209
  textOverflow: "ellipsis"
202
210
  },
203
- children: o
211
+ children: a
204
212
  })]
205
- }, a);
213
+ }, i);
206
214
  })
207
- }), i.map((i, a) => {
208
- let o = Ae(i, n, r), s = je(i, n);
215
+ }), r.map((r, i) => {
216
+ let a = Me(r, t, n), o = Ne(r, t);
209
217
  return /* @__PURE__ */ X("section", {
210
- id: e[a],
218
+ id: e[i],
211
219
  style: {
212
220
  background: "var(--surface)",
213
221
  border: "1px solid var(--border)",
@@ -228,27 +236,27 @@ function Me({ config: e, ctx: n }) {
228
236
  fontSize: 13,
229
237
  fontWeight: 700
230
238
  },
231
- children: [s && /* @__PURE__ */ Y(t, {
232
- name: s,
239
+ children: [o && /* @__PURE__ */ Y(R, {
240
+ name: o,
233
241
  size: 14
234
242
  }), /* @__PURE__ */ Y("span", {
235
243
  style: { overflowWrap: "anywhere" },
236
- children: o
244
+ children: a
237
245
  })]
238
246
  }), /* @__PURE__ */ Y("div", {
239
247
  style: {
240
248
  padding: 14,
241
249
  minWidth: 0
242
250
  },
243
- children: /* @__PURE__ */ Y(ln, {
244
- node: i,
251
+ children: /* @__PURE__ */ Y(fn, {
252
+ node: r,
245
253
  ctx: {
246
- ...n,
254
+ ...t,
247
255
  withinCard: !0
248
256
  }
249
257
  })
250
258
  })]
251
- }, a);
259
+ }, i);
252
260
  })]
253
261
  });
254
262
  }
@@ -271,13 +279,13 @@ function Me({ config: e, ctx: n }) {
271
279
  padding: "6px 10px 0 10px",
272
280
  overflowX: "auto"
273
281
  },
274
- children: i.map((e, i) => {
275
- let s = Ae(e, n, r), c = je(e, n), l = i === a;
282
+ children: r.map((e, r) => {
283
+ let o = Me(e, t, n), s = Ne(e, t), c = r === i;
276
284
  return /* @__PURE__ */ X("button", {
277
285
  role: "tab",
278
- "aria-selected": l,
286
+ "aria-selected": c,
279
287
  onClick: (e) => {
280
- e.stopPropagation(), o(i);
288
+ e.stopPropagation(), a(r);
281
289
  },
282
290
  style: {
283
291
  position: "relative",
@@ -291,23 +299,23 @@ function Me({ config: e, ctx: n }) {
291
299
  fontSize: 12.5,
292
300
  fontWeight: 500,
293
301
  fontFamily: "inherit",
294
- color: l ? "var(--text)" : "var(--text-3)",
302
+ color: c ? "var(--text)" : "var(--text-3)",
295
303
  whiteSpace: "nowrap",
296
304
  transition: "color .12s"
297
305
  },
298
306
  onMouseEnter: (e) => {
299
- l || (e.currentTarget.style.color = "var(--text-2)");
307
+ c || (e.currentTarget.style.color = "var(--text-2)");
300
308
  },
301
309
  onMouseLeave: (e) => {
302
- l || (e.currentTarget.style.color = "var(--text-3)");
310
+ c || (e.currentTarget.style.color = "var(--text-3)");
303
311
  },
304
312
  children: [
305
- c && /* @__PURE__ */ Y(t, {
306
- name: c,
313
+ s && /* @__PURE__ */ Y(R, {
314
+ name: s,
307
315
  size: 13
308
316
  }),
309
- s,
310
- l && /* @__PURE__ */ Y("span", { style: {
317
+ o,
318
+ c && /* @__PURE__ */ Y("span", { style: {
311
319
  position: "absolute",
312
320
  left: 4,
313
321
  right: 4,
@@ -317,67 +325,80 @@ function Me({ config: e, ctx: n }) {
317
325
  borderRadius: 2
318
326
  } })
319
327
  ]
320
- }, i);
328
+ }, r);
321
329
  })
322
330
  }), /* @__PURE__ */ Y("div", {
323
331
  role: "tabpanel",
324
332
  style: { padding: 14 },
325
- children: /* @__PURE__ */ Y(ln, {
326
- node: i[a],
333
+ children: /* @__PURE__ */ Y(fn, {
334
+ node: r[i],
327
335
  ctx: {
328
- ...n,
336
+ ...t,
329
337
  withinCard: !0
330
338
  }
331
- }, a)
339
+ }, i)
332
340
  })]
333
341
  });
334
342
  }
335
343
  //#endregion
336
344
  //#region src/components/detail-layout/SectionBlock.tsx
337
- function Ne({ config: e, ctx: n }) {
338
- let r = M(), { name: i, items: a, collapsed: o = !1, columns: s, icon: c, badge: l, emphasis: u } = e, d = {
339
- ...n,
345
+ function Fe({ config: e, ctx: t }) {
346
+ let n = x(), { name: r, items: i, collapsed: a = !1, columns: o, icon: s, badge: c, emphasis: l } = e, u = e.hide_empty_fields === !0 && t.mode === "display";
347
+ if (u && !Ie(i, t)) return null;
348
+ let d = {
349
+ ...t,
340
350
  withinCard: !0,
341
- ...s ? { columns: s } : null
342
- }, f = c ? /* @__PURE__ */ Y(t, {
343
- name: c,
351
+ ...o ? { columns: o } : null,
352
+ ...u ? { hideEmptyFields: u } : null
353
+ }, f = s ? /* @__PURE__ */ Y(R, {
354
+ name: s,
344
355
  size: 14
345
- }) : void 0, p = l ? {
346
- text: r(l.text),
347
- tone: l.tone,
348
- dot: l.dot
356
+ }) : void 0, p = c ? {
357
+ text: n(c.text),
358
+ tone: c.tone,
359
+ dot: c.dot
349
360
  } : void 0;
350
- return /* @__PURE__ */ Y(I, {
351
- title: r(i),
352
- defaultOpen: !o,
361
+ return /* @__PURE__ */ Y(P, {
362
+ title: n(r),
363
+ defaultOpen: !a,
353
364
  icon: f,
354
365
  badge: p,
355
- emphasis: u,
356
- headingLevel: n.withinCard ? 3 : 2,
357
- children: /* @__PURE__ */ Y(cn, {
358
- nodes: a,
359
- ctx: d
366
+ emphasis: l,
367
+ headingLevel: t.withinCard ? 3 : 2,
368
+ children: /* @__PURE__ */ Y("div", {
369
+ style: {
370
+ display: "flex",
371
+ flexDirection: "column",
372
+ gap: 12
373
+ },
374
+ children: /* @__PURE__ */ Y(dn, {
375
+ nodes: i,
376
+ ctx: d
377
+ })
360
378
  })
361
379
  });
362
380
  }
381
+ function Ie(e, t) {
382
+ return e.some((e) => !e.fields || e.fields.some((e) => ae(t.entity, t.record, e.code)));
383
+ }
363
384
  //#endregion
364
385
  //#region src/lib/child-config.ts
365
- function Pe(e, t, n) {
386
+ function Le(e, t, n) {
366
387
  let r = e.display, i = Z(n?.mode, r?.mode, "table"), a = i === "timeline" ? 50 : 20, o = {
367
388
  entity: e.entity,
368
389
  foreign_key: e.foreign_key,
369
- name: Z(n?.label, r?.name, Ie(t)),
390
+ name: Z(n?.label, r?.name, ze(t)),
370
391
  icon: Z(n?.icon, r?.icon, t.display.icon) ?? "",
371
392
  mode: i,
372
- columns: Z(n?.columns, r?.columns, Re(t, e.foreign_key)),
373
- sort: Z(n?.sort, r?.sort, Le(t)),
393
+ columns: Z(n?.columns, r?.columns, Ve(t, e.foreign_key)),
394
+ sort: Z(n?.sort, r?.sort, Be(t)),
374
395
  limit: Z(n?.limit, r?.limit, a),
375
396
  editable: Z(n?.editable, r?.editable, !0),
376
- interaction: Z(n?.interaction, r?.interaction, Fe(t))
397
+ interaction: Z(n?.interaction, r?.interaction, Re(t))
377
398
  }, s = Z(n?.position_field, r?.position_field, void 0);
378
399
  s && (o.position_field = s, o.sort = s + ":asc");
379
400
  let c = n?.timeline ?? r?.timeline;
380
- o.mode === "timeline" ? o.timeline = ze(c ?? {}, t) : c && (o.timeline = c);
401
+ o.mode === "timeline" ? o.timeline = He(c ?? {}, t) : c && (o.timeline = c);
381
402
  let l = n?.cards ?? r?.cards;
382
403
  l && (o.cards = l);
383
404
  let u = n?.quick_add ?? e.quick_add;
@@ -386,13 +407,13 @@ function Pe(e, t, n) {
386
407
  function Z(e, t, n) {
387
408
  return e ?? t ?? n;
388
409
  }
389
- function Fe(e) {
410
+ function Re(e) {
390
411
  return m(e, "update") ? "inline_edit" : "readonly";
391
412
  }
392
- function Ie(e) {
413
+ function ze(e) {
393
414
  return e.display.name_plural && Object.keys(e.display.name_plural).length > 0 ? e.display.name_plural : e.display.name;
394
415
  }
395
- function Le(e) {
416
+ function Be(e) {
396
417
  if (e.fields.get("created_at")?.type === "timestamp") return "created_at:desc";
397
418
  if (e.fields.get("updated_at")?.type === "timestamp") return "updated_at:desc";
398
419
  for (let t of e.fields.names()) {
@@ -403,10 +424,10 @@ function Le(e) {
403
424
  let n = e.fields.get(t);
404
425
  if (n && n.type === "date") return t + ":desc";
405
426
  }
406
- let t = Ge(e);
427
+ let t = Je(e);
407
428
  return t ? t + ":asc" : "";
408
429
  }
409
- function Re(e, t) {
430
+ function Ve(e, t) {
410
431
  let n = new Set(Array.isArray(t) ? t : [t]), r = [];
411
432
  for (let t of e.fields.names()) {
412
433
  if (r.length >= 6) break;
@@ -415,11 +436,11 @@ function Re(e, t) {
415
436
  }
416
437
  return r;
417
438
  }
418
- function ze(e, t) {
439
+ function He(e, t) {
419
440
  let n = { ...e };
420
- return n.time_field ||= He(t), n.type_field ||= Ue(t, "enum"), n.summary_field ||= We(t, "string", "text", "rich_text"), n.content_field ||= We(t, "rich_text", "text"), n.summary_field && n.content_field && n.summary_field === n.content_field && (n.summary_field = void 0), n.author_field || t.fields.get("created_by") && (n.author_field = "created_by"), n.direction_field ||= Be(t), n.intent_field ||= Ve(t), n;
441
+ return n.time_field ||= Ge(t), n.type_field ||= Ke(t, "enum"), n.summary_field ||= qe(t, "string", "text", "rich_text"), n.content_field ||= qe(t, "rich_text", "text"), n.summary_field && n.content_field && n.summary_field === n.content_field && (n.summary_field = void 0), n.author_field || t.fields.get("created_by") && (n.author_field = "created_by"), n.direction_field ||= Ue(t), n.intent_field ||= We(t), n;
421
442
  }
422
- function Be(e) {
443
+ function Ue(e) {
423
444
  let t = e.fields.get("direction");
424
445
  if (t && t.type === "enum") return "direction";
425
446
  for (let t of [
@@ -432,11 +453,11 @@ function Be(e) {
432
453
  if (n && n.type === "bool") return t;
433
454
  }
434
455
  }
435
- function Ve(e) {
456
+ function We(e) {
436
457
  let t = e.fields.get("intent");
437
458
  if (t && t.type === "enum") return "intent";
438
459
  }
439
- function He(e) {
460
+ function Ge(e) {
440
461
  for (let t of e.fields.names()) {
441
462
  let n = e.fields.get(t);
442
463
  if (n && n.type === "timestamp" && !n.auto) return t;
@@ -448,13 +469,13 @@ function He(e) {
448
469
  if (n && n.type === "timestamp") return t;
449
470
  }
450
471
  }
451
- function Ue(e, t) {
472
+ function Ke(e, t) {
452
473
  for (let n of e.fields.names()) {
453
474
  let r = e.fields.get(n);
454
475
  if (r && r.type === t) return n;
455
476
  }
456
477
  }
457
- function We(e, ...t) {
478
+ function qe(e, ...t) {
458
479
  for (let n of e.fields.names()) {
459
480
  let r = e.fields.get(n);
460
481
  if (r) {
@@ -462,28 +483,28 @@ function We(e, ...t) {
462
483
  }
463
484
  }
464
485
  }
465
- function Ge(e) {
466
- let t = S(e);
486
+ function Je(e) {
487
+ let t = c(e);
467
488
  return t.length > 0 ? t[0] : void 0;
468
489
  }
469
- function Ke(e, t) {
490
+ function Ye(e, t) {
470
491
  return e.children?.find((e) => e.entity === t);
471
492
  }
472
493
  //#endregion
473
494
  //#region src/lib/quick-add.ts
474
- function qe(e, t, n, r) {
495
+ function Xe(e, t, n, r) {
475
496
  let i = {
476
497
  ...t ?? {},
477
498
  ...e
478
499
  };
479
500
  if (Array.isArray(n)) {
480
- let e = Array.isArray(r) ? r.map(String) : x(String(r), n.length);
501
+ let e = Array.isArray(r) ? r.map(String) : d(String(r), n.length);
481
502
  if (!e || e.length !== n.length) throw Error("invalid composite parent id");
482
503
  for (let t = 0; t < n.length; t++) i[n[t]] = e[t];
483
504
  } else i[n] = Array.isArray(r) ? r[0] : r;
484
505
  return i;
485
506
  }
486
- function Je(e, t) {
507
+ function Ze(e, t) {
487
508
  for (let n of t) {
488
509
  let t = e[n];
489
510
  if (t == null || t === "") return !1;
@@ -492,27 +513,27 @@ function Je(e, t) {
492
513
  }
493
514
  //#endregion
494
515
  //#region src/components/detail-layout/useQuickAdd.ts
495
- function Ye(e, t, a, o) {
496
- let [s, c] = q(() => {
497
- let t = e.quick_add, n = o.entities[e.entity], i = {};
498
- if (t?.fields) for (let e of t.fields) t.defaults?.[e] == null ? n?.fields.get(e)?.type === "timestamp" && (i[e] = r()) : i[e] = t.defaults[e];
499
- return i;
500
- }), l = Se(), { mutate: u, isPending: d, error: f, reset: p } = xe({
501
- mutationFn: (t) => te(e.entity, t),
502
- onMutate: async (r) => {
503
- let o = Array.isArray(a) ? n(a.map(String)) : a, s = [
516
+ function Qe(t, n, r, i) {
517
+ let [a, o] = q(() => {
518
+ let n = t.quick_add, r = i.entities[t.entity], a = {};
519
+ if (n?.fields) for (let t of n.fields) n.defaults?.[t] == null ? r?.fields.get(t)?.type === "timestamp" && (a[t] = e()) : a[t] = n.defaults[t];
520
+ return a;
521
+ }), s = we(), { mutate: c, isPending: l, error: d, reset: f } = Ce({
522
+ mutationFn: (e) => v(t.entity, e),
523
+ onMutate: async (e) => {
524
+ let i = Array.isArray(r) ? u(r.map(String)) : r, a = [
525
+ te,
526
+ n,
504
527
  i,
505
- t,
506
- o,
507
- e.entity
528
+ t.entity
508
529
  ];
509
- await l.cancelQueries({ queryKey: s });
510
- let c = l.getQueriesData({ queryKey: s }), u = {
511
- ...r,
530
+ await s.cancelQueries({ queryKey: a });
531
+ let o = s.getQueriesData({ queryKey: a }), c = {
532
+ ...e,
512
533
  id: `__optimistic_${crypto.randomUUID()}`,
513
534
  __optimistic: !0
514
535
  };
515
- return l.setQueriesData({ queryKey: s }, (e) => {
536
+ return s.setQueriesData({ queryKey: a }, (e) => {
516
537
  if (!e || typeof e != "object") return e;
517
538
  if ("pages" in e && Array.isArray(e.pages) && e.pages.length > 0) {
518
539
  let t = e, [n, ...r] = t.pages;
@@ -520,80 +541,80 @@ function Ye(e, t, a, o) {
520
541
  ...t,
521
542
  pages: [{
522
543
  ...n,
523
- data: [u, ...n.data]
544
+ data: [c, ...n.data]
524
545
  }, ...r]
525
546
  };
526
547
  }
527
548
  return e;
528
- }), { snapshots: c };
549
+ }), { snapshots: o };
529
550
  },
530
551
  onError: (e, t, n) => {
531
- if (n?.snapshots) for (let [e, t] of n.snapshots) l.setQueryData(e, t);
552
+ if (n?.snapshots) for (let [e, t] of n.snapshots) s.setQueryData(e, t);
532
553
  },
533
554
  onSuccess: () => {
534
- let t = e.quick_add, n = o.entities[e.entity], i = {};
535
- if (t?.fields) for (let e of t.fields) i[e] = t?.defaults?.[e] == null ? n?.fields.get(e)?.type === "timestamp" ? r() : "" : t.defaults[e];
536
- c(i);
555
+ let n = t.quick_add, r = i.entities[t.entity], a = {};
556
+ if (n?.fields) for (let t of n.fields) a[t] = n?.defaults?.[t] == null ? r?.fields.get(t)?.type === "timestamp" ? e() : "" : n.defaults[t];
557
+ o(a);
537
558
  },
538
559
  onSettled: () => {
539
- let r = Array.isArray(a) ? n(a.map(String)) : a;
540
- l.invalidateQueries({ queryKey: [
541
- i,
542
- t,
543
- r,
544
- e.entity
560
+ let e = Array.isArray(r) ? u(r.map(String)) : r;
561
+ s.invalidateQueries({ queryKey: [
562
+ te,
563
+ n,
564
+ e,
565
+ t.entity
545
566
  ] });
546
567
  }
547
- }), m = e.quick_add, h = o.entities[e.entity], g = Je(s, m?.fields.filter((e) => h?.fields.get(e)?.required) ?? []);
548
- function _(t) {
549
- if (t.preventDefault(), !m) return;
550
- let n = qe(s, m.defaults, e.foreign_key, a);
551
- u(n);
568
+ }), p = t.quick_add, m = i.entities[t.entity], h = Ze(a, p?.fields.filter((e) => m?.fields.get(e)?.required) ?? []);
569
+ function g(e) {
570
+ if (e.preventDefault(), !p) return;
571
+ let n = Xe(a, p.defaults, t.foreign_key, r);
572
+ c(n);
552
573
  }
553
- function v(e, t) {
554
- f && p(), c((n) => ({
574
+ function _(e, t) {
575
+ d && f(), o((n) => ({
555
576
  ...n,
556
577
  [e]: t
557
578
  }));
558
579
  }
559
580
  return {
560
- values: s,
561
- quickAdd: m,
562
- childEntity: h,
563
- isPending: d,
564
- error: f,
565
- isReady: g,
566
- handleSubmit: _,
567
- handleFieldChange: v
581
+ values: a,
582
+ quickAdd: p,
583
+ childEntity: m,
584
+ isPending: l,
585
+ error: d,
586
+ isReady: h,
587
+ handleSubmit: g,
588
+ handleFieldChange: _
568
589
  };
569
590
  }
570
591
  //#endregion
571
592
  //#region src/components/detail-layout/QuickAddForm.tsx
572
- function Xe({ config: t, parentEntity: n, parentId: r, schema: i }) {
573
- let o = M(), s = M("errors"), { values: c, quickAdd: u, childEntity: d, isPending: f, error: p, isReady: m, handleSubmit: h, handleFieldChange: g } = Ye(t, n, r, i), _ = y(), v = _e();
574
- return !u || u.fields.length === 0 || !d ? null : /* @__PURE__ */ X("form", {
575
- onSubmit: h,
593
+ function $e({ config: e, parentEntity: t, parentId: n, schema: i }) {
594
+ let a = x(), o = x("errors"), { values: s, quickAdd: c, childEntity: l, isPending: u, error: d, isReady: f, handleSubmit: p, handleFieldChange: m } = Qe(e, t, n, i), h = S(), g = ye();
595
+ return !c || c.fields.length === 0 || !l ? null : /* @__PURE__ */ X("form", {
596
+ onSubmit: p,
576
597
  style: {
577
598
  display: "flex",
578
- flexDirection: _.isPhone ? "column" : "row",
599
+ flexDirection: h.isPhone ? "column" : "row",
579
600
  alignItems: "flex-end",
580
601
  gap: 8,
581
602
  padding: "8px 0",
582
603
  borderBottom: "1px solid var(--divider)"
583
604
  },
584
605
  children: [
585
- u.fields.map((e) => {
586
- let n = d.fields.get(e);
606
+ c.fields.map((t) => {
607
+ let n = l.fields.get(t);
587
608
  if (!n) return null;
588
- let r = `${v}-quick-add-${t.entity}-${e}`, s = `${r}-label`;
609
+ let r = `${g}-quick-add-${e.entity}-${t}`, o = `${r}-label`;
589
610
  return /* @__PURE__ */ X("div", {
590
611
  style: {
591
612
  flex: 1,
592
613
  minWidth: 0,
593
- width: _.isPhone ? "100%" : void 0
614
+ width: h.isPhone ? "100%" : void 0
594
615
  },
595
616
  children: [/* @__PURE__ */ Y("label", {
596
- id: s,
617
+ id: o,
597
618
  htmlFor: r,
598
619
  style: {
599
620
  fontSize: 11,
@@ -602,56 +623,56 @@ function Xe({ config: t, parentEntity: n, parentId: r, schema: i }) {
602
623
  display: "block",
603
624
  fontWeight: 500
604
625
  },
605
- children: a(o, n, e, i.entities)
606
- }), w({
626
+ children: _(a, n, t, i.entities)
627
+ }), k({
607
628
  field: n,
608
- fieldName: e,
609
- value: c[e] ?? "",
629
+ fieldName: t,
630
+ value: s[t] ?? "",
610
631
  mode: "edit",
611
- onChange: (t) => g(e, t),
612
- record: c,
632
+ onChange: (e) => m(t, e),
633
+ record: s,
613
634
  fieldId: r,
614
- labelId: s,
615
- t: o
635
+ labelId: o,
636
+ t: a
616
637
  })]
617
- }, e);
638
+ }, t);
618
639
  }),
619
- /* @__PURE__ */ Y(l, {
640
+ /* @__PURE__ */ Y(E, {
620
641
  type: "submit",
621
642
  kind: "primary",
622
- size: _.isPhone ? "md" : "sm",
623
- icon: /* @__PURE__ */ Y(e.plus, { size: 12 }),
624
- disabled: f || !m,
625
- style: _.isPhone ? { alignSelf: "flex-end" } : void 0,
626
- children: o("record.related.add", "Add")
643
+ size: h.isPhone ? "md" : "sm",
644
+ icon: /* @__PURE__ */ Y(w.plus, { size: 12 }),
645
+ disabled: u || !f,
646
+ style: h.isPhone ? { alignSelf: "flex-end" } : void 0,
647
+ children: a("record.related.add", "Add")
627
648
  }),
628
- p != null && /* @__PURE__ */ Y("span", {
649
+ d != null && /* @__PURE__ */ Y("span", {
629
650
  style: {
630
651
  fontSize: 11,
631
652
  color: "var(--danger)",
632
653
  alignSelf: "flex-end",
633
654
  marginBottom: 4
634
655
  },
635
- children: re(s, p)
656
+ children: r(o, d)
636
657
  })
637
658
  ]
638
659
  });
639
660
  }
640
661
  //#endregion
641
662
  //#region src/components/detail-layout/useManualColumnResize.tsx
642
- function Ze(e, t, n) {
663
+ function et(e, t, n) {
643
664
  return `${e}::child::${t}.${n}`;
644
665
  }
645
- function Qe(e) {
646
- return Math.min(oe, Math.max(60, Math.round(e)));
666
+ function tt(e) {
667
+ return Math.min(ne, Math.max(60, Math.round(e)));
647
668
  }
648
- function $e(e) {
649
- let { widths: t, setWidths: n, resetWidths: r } = le(e), [i, a] = q({}), o = K(null);
669
+ function nt(e) {
670
+ let { widths: t, setWidths: n, resetWidths: r } = ie(e), [i, a] = q({}), o = K(null);
650
671
  G(() => {
651
672
  let e = (e) => {
652
673
  let t = o.current;
653
674
  if (!t) return;
654
- let n = Qe(t.startWidth + (e.clientX - t.startX));
675
+ let n = tt(t.startWidth + (e.clientX - t.startX));
655
676
  t.current = n, a({ [t.colId]: n });
656
677
  }, t = () => {
657
678
  let e = o.current;
@@ -701,7 +722,7 @@ function $e(e) {
701
722
  resetWidths: r
702
723
  };
703
724
  }
704
- function et({ colId: e, onMouseDown: t }) {
725
+ function rt({ colId: e, onMouseDown: t }) {
705
726
  return /* @__PURE__ */ Y("span", {
706
727
  "data-testid": "col-resize-handle",
707
728
  "aria-hidden": "true",
@@ -729,47 +750,49 @@ function et({ colId: e, onMouseDown: t }) {
729
750
  }
730
751
  //#endregion
731
752
  //#region src/components/detail-layout/ChildrenTable.tsx
732
- function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
733
- let o = M(), c = M("errors"), l = i.entities[t.entity], f = Array.isArray(t.foreign_key) ? t.foreign_key.join(",") : t.foreign_key, p = $e(Ze(n, t.entity, f)), m = _(l?.realtime, t.entity), { data: h, isLoading: y, isError: x, refetch: S } = d(n, r, t.entity, t.foreign_key, t.sort, t.limit), { refreshing: w, refresh: T } = ce(S), E = h?.data ?? [], D = h?.$refs, O = K(D);
734
- O.current = D;
735
- let k = t.columns, A = t.interaction === "navigate", j = k[0], N = A && l ? s(void 0, l, i.screens) : null, P = l ? Ge(l) : void 0, F = ye(() => {
736
- let e = /* @__PURE__ */ new Map();
737
- if (!l) return e;
738
- for (let t of k) {
739
- let n = l.fields.get(t);
740
- n && e.set(t, b({
741
- field: n,
742
- fieldName: t,
753
+ function it({ config: e, parentEntity: t, parentId: n, schema: r }) {
754
+ let i = x(), a = x("errors"), o = r.entities[e.entity], s = Array.isArray(e.foreign_key) ? e.foreign_key.join(",") : e.foreign_key, c = nt(et(t, e.entity, s)), l = H(o?.realtime, e.entity), { data: u, isLoading: d, isError: p, refetch: m } = V(t, n, e.entity, e.foreign_key, e.sort, e.limit), { refreshing: h, refresh: g } = re(m), v = u?.data ?? [], y = u?.$refs, S = K(y);
755
+ S.current = y;
756
+ let C = e.columns, E = e.interaction === "navigate", k = C[0], j = E && o ? f(void 0, o, r.screens) : null, M = o ? Je(o) : void 0, N = xe(() => {
757
+ let t = /* @__PURE__ */ new Map();
758
+ if (!o) return t;
759
+ for (let n of C) {
760
+ let a = o.fields.get(n);
761
+ a && t.set(n, A({
762
+ field: a,
763
+ fieldName: n,
743
764
  surface: "list",
744
- entity: l,
745
- entities: i.entities,
746
- screens: i.screens,
747
- refs: () => O.current,
748
- t: o
765
+ entity: o,
766
+ entityCode: e.entity,
767
+ entities: r.entities,
768
+ screens: r.screens,
769
+ refs: () => S.current,
770
+ t: i
749
771
  }));
750
772
  }
751
- return e;
773
+ return t;
752
774
  }, [
753
- l,
754
- k,
755
- i.entities,
756
- i.screens,
757
- o
775
+ o,
776
+ e.entity,
777
+ C,
778
+ r.entities,
779
+ r.screens,
780
+ i
758
781
  ]);
759
- if (!l) return /* @__PURE__ */ Y("div", {
782
+ if (!o) return /* @__PURE__ */ Y("div", {
760
783
  style: {
761
784
  fontSize: 12.5,
762
785
  color: "var(--text-3)",
763
786
  padding: "8px 0"
764
787
  },
765
- children: c("record.related_entity_not_found", "The related record type is not declared in this deployment.")
788
+ children: a("record.related_entity_not_found", "The related record type is not declared in this deployment.")
766
789
  });
767
- let I = /* @__PURE__ */ Y(Xe, {
768
- config: t,
769
- parentEntity: n,
770
- parentId: r,
771
- schema: i
772
- }), L = m ? o("record.related.live", "Live") : o("record.related.paused", "Updates paused"), R = /* @__PURE__ */ X("div", {
790
+ let P = /* @__PURE__ */ Y($e, {
791
+ config: e,
792
+ parentEntity: t,
793
+ parentId: n,
794
+ schema: r
795
+ }), F = l ? i("record.related.live", "Live") : i("record.related.paused", "Updates paused"), I = /* @__PURE__ */ X("div", {
773
796
  style: {
774
797
  display: "flex",
775
798
  alignItems: "center",
@@ -778,40 +801,40 @@ function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
778
801
  justifyContent: "flex-end"
779
802
  },
780
803
  children: [
781
- p.hasWidths && /* @__PURE__ */ Y(C, {
782
- icon: /* @__PURE__ */ Y(e.columns, { size: 13 }),
783
- title: o("record.related.reset_widths", "Reset column widths (this device)"),
804
+ c.hasWidths && /* @__PURE__ */ Y(T, {
805
+ icon: /* @__PURE__ */ Y(w.columns, { size: 13 }),
806
+ title: i("record.related.reset_widths", "Reset column widths (this device)"),
784
807
  size: 24,
785
- onClick: p.resetWidths
808
+ onClick: c.resetWidths
786
809
  }),
787
- l.realtime === !0 && /* @__PURE__ */ Y("span", {
810
+ o.realtime === !0 && /* @__PURE__ */ Y("span", {
788
811
  "data-testid": "children-live-indicator",
789
812
  role: "status",
790
- "aria-label": L,
791
- title: m ? o("record.related.live_hint", "This table updates automatically in realtime.") : o("record.related.paused_hint", "Realtime updates are paused. Refresh manually to load the latest data."),
792
- children: /* @__PURE__ */ Y(u, {
793
- tone: m ? "emerald" : "amber",
813
+ "aria-label": F,
814
+ title: l ? i("record.related.live_hint", "This table updates automatically in realtime.") : i("record.related.paused_hint", "Realtime updates are paused. Refresh manually to load the latest data."),
815
+ children: /* @__PURE__ */ Y(D, {
816
+ tone: l ? "emerald" : "amber",
794
817
  size: "xs",
795
818
  dot: !0,
796
- children: L
819
+ children: F
797
820
  })
798
821
  }),
799
- /* @__PURE__ */ Y(C, {
800
- icon: w ? /* @__PURE__ */ Y("span", {
822
+ /* @__PURE__ */ Y(T, {
823
+ icon: h ? /* @__PURE__ */ Y("span", {
801
824
  "data-testid": "children-refresh-spinner",
802
825
  style: { display: "inline-flex" },
803
- children: /* @__PURE__ */ Y(v, { size: 13 })
804
- }) : /* @__PURE__ */ Y(e.refresh, { size: 13 }),
805
- title: o("record.related.refresh", "Refresh"),
826
+ children: /* @__PURE__ */ Y(O, { size: 13 })
827
+ }) : /* @__PURE__ */ Y(w.refresh, { size: 13 }),
828
+ title: i("record.related.refresh", "Refresh"),
806
829
  size: 24,
807
- disabled: w,
808
- onClick: T
830
+ disabled: h,
831
+ onClick: g
809
832
  })
810
833
  ]
811
834
  });
812
- return x ? /* @__PURE__ */ X("div", { children: [
835
+ return p ? /* @__PURE__ */ X("div", { children: [
836
+ P,
813
837
  I,
814
- R,
815
838
  /* @__PURE__ */ X("div", {
816
839
  style: {
817
840
  fontSize: 12.5,
@@ -819,14 +842,14 @@ function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
819
842
  padding: "8px 0"
820
843
  },
821
844
  children: [
822
- c("record.related_rows_unreadable", "The related records could not be loaded."),
845
+ a("record.related_rows_unreadable", "The related records could not be loaded."),
823
846
  " ",
824
- o("record.related.try_again", "Try again.")
847
+ i("record.related.try_again", "Try again.")
825
848
  ]
826
849
  })
827
- ] }) : y ? /* @__PURE__ */ X("div", { children: [
850
+ ] }) : d ? /* @__PURE__ */ X("div", { children: [
851
+ P,
828
852
  I,
829
- R,
830
853
  /* @__PURE__ */ Y("div", {
831
854
  style: {
832
855
  display: "flex",
@@ -844,40 +867,40 @@ function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
844
867
  borderRadius: 4
845
868
  } }, e))
846
869
  })
847
- ] }) : E.length === 0 ? /* @__PURE__ */ X("div", { children: [
870
+ ] }) : v.length === 0 ? /* @__PURE__ */ X("div", { children: [
871
+ P,
848
872
  I,
849
- R,
850
873
  /* @__PURE__ */ Y("div", {
851
874
  style: {
852
875
  fontSize: 12.5,
853
876
  color: "var(--text-3)",
854
877
  padding: "12px 0"
855
878
  },
856
- children: o("record.related.empty", "No records yet.")
879
+ children: i("record.related.empty", "No records yet.")
857
880
  })
858
881
  ] }) : /* @__PURE__ */ X("div", { children: [
882
+ P,
859
883
  I,
860
- R,
861
884
  /* @__PURE__ */ Y("div", {
862
885
  style: { overflowX: "auto" },
863
886
  children: /* @__PURE__ */ X("table", {
864
- style: pe,
865
- children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ Y("tr", { children: k.map((e) => {
866
- let t = l.fields.get(e);
887
+ style: le,
888
+ children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ Y("tr", { children: C.map((e) => {
889
+ let t = o.fields.get(e);
867
890
  return /* @__PURE__ */ X("th", {
868
- style: p.headerStyle(e, fe),
869
- children: [t ? a(o, t, e, i.entities) : e, /* @__PURE__ */ Y(et, {
891
+ style: c.headerStyle(e, ce),
892
+ children: [t ? _(i, t, e, r.entities) : e, /* @__PURE__ */ Y(rt, {
870
893
  colId: e,
871
- onMouseDown: p.onHandleMouseDown
894
+ onMouseDown: c.onHandleMouseDown
872
895
  })]
873
896
  }, e);
874
- }) }) }), /* @__PURE__ */ Y("tbody", { children: E.map((e, t) => {
875
- let n = P ? g(e[P]) : "", r = A && N && n ? N.replace(/:\w+/, n) : void 0;
876
- return /* @__PURE__ */ Y("tr", { children: k.map((t) => {
877
- let n = t === j, i = F.get(t), a = i ? i(e[t], e) : g(e[t]);
897
+ }) }) }), /* @__PURE__ */ Y("tbody", { children: v.map((e, t) => {
898
+ let n = M ? b(e[M]) : "", r = E && j && n ? j.replace(/:\w+/, n) : void 0;
899
+ return /* @__PURE__ */ Y("tr", { children: C.map((t) => {
900
+ let n = t === k, i = N.get(t), a = i ? i(e[t], e) : b(e[t]);
878
901
  return /* @__PURE__ */ Y("td", {
879
902
  title: typeof a == "string" ? a : void 0,
880
- style: p.cellStyle(t, me),
903
+ style: c.cellStyle(t, ue),
881
904
  children: n && r ? /* @__PURE__ */ Y("a", {
882
905
  href: r,
883
906
  style: {
@@ -890,7 +913,7 @@ function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
890
913
  children: a
891
914
  }) : a
892
915
  }, t);
893
- }) }, g(e.id ?? t));
916
+ }) }, b(e.id ?? t));
894
917
  }) })]
895
918
  })
896
919
  })
@@ -898,35 +921,35 @@ function tt({ config: t, parentEntity: n, parentId: r, schema: i }) {
898
921
  }
899
922
  //#endregion
900
923
  //#region src/components/detail-layout/ChildrenList.tsx
901
- function nt({ config: e, parentEntity: t, parentId: n, schema: r }) {
902
- let i = r.entities[e.entity], a = M(), o = M("errors"), { data: s, isLoading: c, isError: l } = d(t, n, e.entity, e.foreign_key, e.sort, e.limit), u = s?.data ?? [], f = s?.$refs, p = e.columns;
903
- if (!i) return /* @__PURE__ */ Y("div", {
924
+ function at({ config: e, parentEntity: t, parentId: n, schema: r }) {
925
+ let a = r.entities[e.entity], o = x(), s = x("errors"), { data: c, isLoading: l, isError: u } = V(t, n, e.entity, e.foreign_key, e.sort, e.limit), d = c?.data ?? [], f = c?.$refs, p = e.columns;
926
+ if (!a) return /* @__PURE__ */ Y("div", {
904
927
  style: {
905
928
  fontSize: 12.5,
906
929
  color: "var(--text-3)",
907
930
  padding: "8px 0"
908
931
  },
909
- children: o("record.related_entity_not_found", "The related record type is not declared in this deployment.")
932
+ children: s("record.related_entity_not_found", "The related record type is not declared in this deployment.")
910
933
  });
911
- let m = /* @__PURE__ */ Y(Xe, {
934
+ let m = /* @__PURE__ */ Y($e, {
912
935
  config: e,
913
936
  parentEntity: t,
914
937
  parentId: n,
915
938
  schema: r
916
939
  });
917
- if (l) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ X("div", {
940
+ if (u) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ X("div", {
918
941
  style: {
919
942
  fontSize: 12.5,
920
943
  color: "var(--danger)",
921
944
  padding: "8px 0"
922
945
  },
923
946
  children: [
924
- o("record.related_rows_unreadable", "The related records could not be loaded."),
947
+ s("record.related_rows_unreadable", "The related records could not be loaded."),
925
948
  " ",
926
- a("record.related.try_again", "Try again.")
949
+ o("record.related.try_again", "Try again.")
927
950
  ]
928
951
  })] });
929
- if (c) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ X("div", {
952
+ if (l) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ X("div", {
930
953
  style: {
931
954
  display: "flex",
932
955
  flexDirection: "column",
@@ -952,22 +975,22 @@ function nt({ config: e, parentEntity: t, parentId: n, schema: r }) {
952
975
  } })
953
976
  ]
954
977
  })] });
955
- if (u.length === 0) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ Y("div", {
978
+ if (d.length === 0) return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ Y("div", {
956
979
  style: {
957
980
  fontSize: 12.5,
958
981
  color: "var(--text-3)",
959
982
  padding: "12px 0"
960
983
  },
961
- children: a("record.related.empty", "No records yet.")
984
+ children: o("record.related.empty", "No records yet.")
962
985
  })] });
963
- let h = p.length > 0 ? i.display.display_field ?? p[0] : i.display.display_field;
986
+ let h = p.length > 0 ? a.display.display_field ?? p[0] : a.display.display_field;
964
987
  return /* @__PURE__ */ X("div", { children: [m, /* @__PURE__ */ Y("div", {
965
988
  style: {
966
989
  display: "flex",
967
990
  flexDirection: "column"
968
991
  },
969
- children: u.map((e, t) => {
970
- let n = typeof e.$display == "string" ? e[D] : "";
992
+ children: d.map((e, t) => {
993
+ let n = typeof e.$display == "string" ? e[i] : "";
971
994
  return /* @__PURE__ */ Y("div", {
972
995
  style: {
973
996
  display: "flex",
@@ -988,15 +1011,15 @@ function nt({ config: e, parentEntity: t, parentId: n, schema: r }) {
988
1011
  textOverflow: "ellipsis",
989
1012
  whiteSpace: "nowrap"
990
1013
  },
991
- children: n || (h && i.fields.get(h) ? w({
992
- field: i.fields.get(h),
1014
+ children: n || (h && a.fields.get(h) ? k({
1015
+ field: a.fields.get(h),
993
1016
  fieldName: h,
994
1017
  value: e[h],
995
1018
  mode: "display",
996
1019
  record: e,
997
1020
  refs: f,
998
- t: a
999
- }) : h && e[h] != null ? g(e[h]) : null)
1021
+ t: o
1022
+ }) : h && e[h] != null ? b(e[h]) : null)
1000
1023
  }), p.length > 1 && (() => {
1001
1024
  let t = p.slice(1, 3).filter((t) => e[t] != null);
1002
1025
  return t.length === 0 ? null : /* @__PURE__ */ Y("div", {
@@ -1007,58 +1030,58 @@ function nt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1007
1030
  textOverflow: "ellipsis",
1008
1031
  whiteSpace: "nowrap"
1009
1032
  },
1010
- children: t.map((t, n) => /* @__PURE__ */ X("span", { children: [n > 0 && " · ", i.fields.get(t) ? w({
1011
- field: i.fields.get(t),
1033
+ children: t.map((t, n) => /* @__PURE__ */ X("span", { children: [n > 0 && " · ", a.fields.get(t) ? k({
1034
+ field: a.fields.get(t),
1012
1035
  fieldName: t,
1013
1036
  value: e[t],
1014
1037
  mode: "display",
1015
1038
  record: e,
1016
1039
  refs: f,
1017
- t: a
1040
+ t: o
1018
1041
  }) : String(e[t])] }, t))
1019
1042
  });
1020
1043
  })()]
1021
1044
  })
1022
- }, g(e.id ?? t));
1045
+ }, b(e.id ?? t));
1023
1046
  })
1024
1047
  })] });
1025
1048
  }
1026
1049
  //#endregion
1027
1050
  //#region src/components/detail-layout/ChildrenCards.tsx
1028
- function rt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1029
- let i = r.entities[e.entity], o = M(), s = M("errors"), { data: c, isLoading: l, isError: f } = d(t, n, e.entity, e.foreign_key, e.sort, e.limit), p = c?.data ?? [], m = c?.$refs, h = e.columns, _ = e.cards, v = _?.header_field ?? h[0], y = _?.badge_field, b = _?.columns_count ?? 3;
1051
+ function ot({ config: e, parentEntity: t, parentId: n, schema: r }) {
1052
+ let i = r.entities[e.entity], a = x(), o = x("errors"), { data: s, isLoading: c, isError: l } = V(t, n, e.entity, e.foreign_key, e.sort, e.limit), u = s?.data ?? [], d = s?.$refs, f = e.columns, p = e.cards, m = p?.header_field ?? f[0], h = p?.badge_field, g = p?.columns_count ?? 3;
1030
1053
  if (!i) return /* @__PURE__ */ Y("div", {
1031
1054
  style: {
1032
1055
  fontSize: 12.5,
1033
1056
  color: "var(--text-3)",
1034
1057
  padding: "8px 0"
1035
1058
  },
1036
- children: s("record.related_entity_not_found", "The related record type is not declared in this deployment.")
1059
+ children: o("record.related_entity_not_found", "The related record type is not declared in this deployment.")
1037
1060
  });
1038
- let x = {
1061
+ let v = {
1039
1062
  display: "grid",
1040
- gridTemplateColumns: `repeat(auto-fill, minmax(${b >= 4 ? 180 : 240}px, 1fr))`,
1063
+ gridTemplateColumns: `repeat(auto-fill, minmax(${g >= 4 ? 180 : 240}px, 1fr))`,
1041
1064
  gap: 12
1042
- }, S = /* @__PURE__ */ Y(Xe, {
1065
+ }, y = /* @__PURE__ */ Y($e, {
1043
1066
  config: e,
1044
1067
  parentEntity: t,
1045
1068
  parentId: n,
1046
1069
  schema: r
1047
1070
  });
1048
- if (f) return /* @__PURE__ */ X("div", { children: [S, /* @__PURE__ */ X("div", {
1071
+ if (l) return /* @__PURE__ */ X("div", { children: [y, /* @__PURE__ */ X("div", {
1049
1072
  style: {
1050
1073
  fontSize: 12.5,
1051
1074
  color: "var(--danger)",
1052
1075
  padding: "8px 0"
1053
1076
  },
1054
1077
  children: [
1055
- s("record.related_rows_unreadable", "The related records could not be loaded."),
1078
+ o("record.related_rows_unreadable", "The related records could not be loaded."),
1056
1079
  " ",
1057
- o("record.related.try_again", "Try again.")
1080
+ a("record.related.try_again", "Try again.")
1058
1081
  ]
1059
1082
  })] });
1060
- if (l) return /* @__PURE__ */ X("div", { children: [S, /* @__PURE__ */ Y("div", {
1061
- style: x,
1083
+ if (c) return /* @__PURE__ */ X("div", { children: [y, /* @__PURE__ */ Y("div", {
1084
+ style: v,
1062
1085
  children: [
1063
1086
  0,
1064
1087
  1,
@@ -1069,18 +1092,18 @@ function rt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1069
1092
  borderRadius: 10
1070
1093
  } }, e))
1071
1094
  })] });
1072
- if (p.length === 0) return /* @__PURE__ */ X("div", { children: [S, /* @__PURE__ */ Y("div", {
1095
+ if (u.length === 0) return /* @__PURE__ */ X("div", { children: [y, /* @__PURE__ */ Y("div", {
1073
1096
  style: {
1074
1097
  fontSize: 12.5,
1075
1098
  color: "var(--text-3)",
1076
1099
  padding: "12px 0"
1077
1100
  },
1078
- children: o("record.related.empty", "No records yet.")
1101
+ children: a("record.related.empty", "No records yet.")
1079
1102
  })] });
1080
- let C = h.filter((e) => e !== v && e !== y);
1081
- return /* @__PURE__ */ X("div", { children: [S, /* @__PURE__ */ Y("div", {
1082
- style: x,
1083
- children: p.map((e, t) => /* @__PURE__ */ X("div", {
1103
+ let S = f.filter((e) => e !== m && e !== h);
1104
+ return /* @__PURE__ */ X("div", { children: [y, /* @__PURE__ */ Y("div", {
1105
+ style: v,
1106
+ children: u.map((e, t) => /* @__PURE__ */ X("div", {
1084
1107
  style: {
1085
1108
  background: "var(--surface)",
1086
1109
  border: "1px solid var(--border)",
@@ -1094,7 +1117,7 @@ function rt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1094
1117
  alignItems: "center",
1095
1118
  justifyContent: "space-between",
1096
1119
  gap: 8,
1097
- borderBottom: C.length > 0 ? "1px solid var(--divider)" : "none"
1120
+ borderBottom: S.length > 0 ? "1px solid var(--divider)" : "none"
1098
1121
  },
1099
1122
  children: [/* @__PURE__ */ Y("div", {
1100
1123
  style: {
@@ -1104,36 +1127,36 @@ function rt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1104
1127
  textOverflow: "ellipsis",
1105
1128
  whiteSpace: "nowrap"
1106
1129
  },
1107
- children: v && i.fields.get(v) ? w({
1108
- field: i.fields.get(v),
1109
- fieldName: v,
1110
- value: e[v],
1130
+ children: m && i.fields.get(m) ? k({
1131
+ field: i.fields.get(m),
1132
+ fieldName: m,
1133
+ value: e[m],
1111
1134
  mode: "display",
1112
1135
  record: e,
1113
- refs: m,
1114
- t: o
1115
- }) : o("record.related.card_title", "Record {number}", { number: t + 1 })
1116
- }), y && e[y] != null && /* @__PURE__ */ Y(u, {
1136
+ refs: d,
1137
+ t: a
1138
+ }) : a("record.related.card_title", "Record {number}", { number: t + 1 })
1139
+ }), h && e[h] != null && /* @__PURE__ */ Y(D, {
1117
1140
  tone: "slate",
1118
1141
  size: "xs",
1119
- children: i.fields.get(y) ? w({
1120
- field: i.fields.get(y),
1121
- fieldName: y,
1122
- value: e[y],
1142
+ children: i.fields.get(h) ? k({
1143
+ field: i.fields.get(h),
1144
+ fieldName: h,
1145
+ value: e[h],
1123
1146
  mode: "display",
1124
1147
  record: e,
1125
- refs: m,
1126
- t: o
1127
- }) : g(e[y])
1148
+ refs: d,
1149
+ t: a
1150
+ }) : b(e[h])
1128
1151
  })]
1129
- }), C.length > 0 && /* @__PURE__ */ Y("div", {
1152
+ }), S.length > 0 && /* @__PURE__ */ Y("div", {
1130
1153
  style: {
1131
1154
  padding: "10px 14px",
1132
1155
  display: "flex",
1133
1156
  flexDirection: "column",
1134
1157
  gap: 4
1135
1158
  },
1136
- children: C.slice(0, 4).map((t) => {
1159
+ children: S.slice(0, 4).map((t) => {
1137
1160
  let n = i.fields.get(t);
1138
1161
  return n ? /* @__PURE__ */ X("div", {
1139
1162
  style: {
@@ -1147,59 +1170,59 @@ function rt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1147
1170
  color: "var(--text-3)",
1148
1171
  flexShrink: 0
1149
1172
  },
1150
- children: [a(o, n, t, r.entities), ":"]
1173
+ children: [_(a, n, t, r.entities), ":"]
1151
1174
  }), /* @__PURE__ */ Y("span", {
1152
1175
  style: {
1153
1176
  overflow: "hidden",
1154
1177
  textOverflow: "ellipsis",
1155
1178
  whiteSpace: "nowrap"
1156
1179
  },
1157
- children: w({
1180
+ children: k({
1158
1181
  field: n,
1159
1182
  fieldName: t,
1160
1183
  value: e[t],
1161
1184
  mode: "display",
1162
1185
  record: e,
1163
- refs: m,
1164
- t: o
1186
+ refs: d,
1187
+ t: a
1165
1188
  })
1166
1189
  })]
1167
1190
  }, t) : null;
1168
1191
  })
1169
1192
  })]
1170
- }, g(e.id ?? t)))
1193
+ }, b(e.id ?? t)))
1171
1194
  })] });
1172
1195
  }
1173
1196
  //#endregion
1174
1197
  //#region src/hooks/useTimelineData.ts
1175
- var it = 50;
1176
- function at(e, t, n, r, a, o) {
1177
- let s = Array.isArray(r) ? r : [r], c = Array.isArray(r) ? x(t, s.length) : [t], l = o ?? it, u = be({
1198
+ var st = 50;
1199
+ function ct(e, n, r, i, a, o) {
1200
+ let s = Array.isArray(i) ? i : [i], c = Array.isArray(i) ? d(n, s.length) : [n], l = o ?? st, u = Se({
1178
1201
  queryKey: [
1179
- i,
1202
+ te,
1180
1203
  e,
1181
- t,
1182
1204
  n,
1205
+ r,
1183
1206
  "timeline",
1184
1207
  a,
1185
1208
  l
1186
1209
  ],
1187
1210
  queryFn: ({ pageParam: e }) => {
1188
- let t = new URLSearchParams();
1211
+ let n = new URLSearchParams();
1189
1212
  if (!c) throw Error("invalid composite parent id");
1190
- let r = s.map((e, t) => ({
1213
+ let i = s.map((e, t) => ({
1191
1214
  field: e,
1192
1215
  op: "eq",
1193
1216
  value: c[t]
1194
1217
  }));
1195
- return t.set("filters", JSON.stringify(r)), a ? t.set("sort", `${a}:desc`) : typeof console < "u" && console.warn(`[useTimelineData] no time_field for ${n}; fetch order falls back to API default`), t.set("limit", String(l)), e && t.set("after", e), A(`/api/data/${n}?${t.toString()}`);
1218
+ return n.set("filters", JSON.stringify(i)), a ? n.set("sort", `${a}:desc`) : typeof console < "u" && console.warn(`[useTimelineData] no time_field for ${r}; fetch order falls back to API default`), n.set("limit", String(l)), e && n.set("after", e), t(`/api/data/${r}?${n.toString()}`);
1196
1219
  },
1197
1220
  getNextPageParam: (e) => e.meta?.has_more ? e.meta.cursor : void 0,
1198
1221
  initialPageParam: void 0,
1199
- enabled: !!e && !!t && !!n && !!r && c !== null
1222
+ enabled: !!e && !!n && !!r && !!i && c !== null
1200
1223
  });
1201
1224
  return {
1202
- rows: ye(() => u.data?.pages.flatMap((e) => e.data) ?? [], [u.data?.pages]),
1225
+ rows: xe(() => u.data?.pages.flatMap((e) => e.data) ?? [], [u.data?.pages]),
1203
1226
  refs: u.data?.pages[0]?.$refs,
1204
1227
  fetchNextPage: u.fetchNextPage,
1205
1228
  hasOlder: !!u.hasNextPage,
@@ -1210,15 +1233,15 @@ function at(e, t, n, r, a, o) {
1210
1233
  }
1211
1234
  //#endregion
1212
1235
  //#region src/components/detail-layout/TimelineComposer.tsx
1213
- var ot = "quick_entry", st = 100, ct = 240, lt = 800, ut = 80;
1214
- function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1215
- let { values: a, quickAdd: o, childEntity: s, isPending: c, error: u, isReady: d, handleSubmit: f, handleFieldChange: p } = Ye(t, n, r, i), m = M(), h = M("errors"), [g, _] = q(ct), v = K(null), y = K(null), [b, x] = q(lt);
1236
+ var lt = "quick_entry", ut = 100, dt = 240, ft = 800, pt = 80;
1237
+ function mt({ config: e, parentEntity: t, parentId: i, schema: a }) {
1238
+ let { values: o, quickAdd: s, childEntity: c, isPending: l, error: u, isReady: d, handleSubmit: f, handleFieldChange: p } = Qe(e, t, i, a), m = x(), h = x("errors"), [g, _] = q(dt), v = K(null), y = K(null), [b, S] = q(ft);
1216
1239
  G(() => {
1217
1240
  let e = y.current?.parentElement;
1218
1241
  if (!e) return;
1219
1242
  let t = () => {
1220
- let t = Math.max(st, e.clientHeight - ut);
1221
- x(Math.min(lt, t));
1243
+ let t = Math.max(ut, e.clientHeight - pt);
1244
+ S(Math.min(ft, t));
1222
1245
  };
1223
1246
  t();
1224
1247
  let n = new ResizeObserver(t);
@@ -1226,58 +1249,58 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1226
1249
  }, []), G(() => {
1227
1250
  _((e) => Math.min(e, b));
1228
1251
  }, [b]);
1229
- let S = K(a);
1230
- S.current = a;
1231
- let C = K(p);
1232
- C.current = p;
1233
- let T = K({}), E = ye(() => ({
1234
- getField: (e) => S.current[e],
1252
+ let C = K(o);
1253
+ C.current = o;
1254
+ let T = K(p);
1255
+ T.current = p;
1256
+ let D = K({}), O = xe(() => ({
1257
+ getField: (e) => C.current[e],
1235
1258
  setField: (e, t) => {
1236
- C.current(e, t);
1259
+ T.current(e, t);
1237
1260
  },
1238
1261
  focusField: (e) => {
1239
- let t = T.current[e];
1262
+ let t = D.current[e];
1240
1263
  t && (t.querySelector("textarea, input, select, [contenteditable]") ?? t).focus();
1241
1264
  }
1242
1265
  }), []);
1243
- G(() => O(ot, E), [E]);
1244
- let D = W((e) => {
1266
+ G(() => N(lt, O), [O]);
1267
+ let A = W((e) => {
1245
1268
  e.preventDefault(), v.current = {
1246
1269
  startY: e.clientY,
1247
1270
  startHeight: g
1248
1271
  };
1249
1272
  let t = (e) => {
1250
1273
  if (!v.current) return;
1251
- let t = v.current.startY - e.clientY, n = Math.min(b, Math.max(st, v.current.startHeight + t));
1274
+ let t = v.current.startY - e.clientY, n = Math.min(b, Math.max(ut, v.current.startHeight + t));
1252
1275
  _(n);
1253
1276
  }, n = () => {
1254
1277
  v.current = null, document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1255
1278
  };
1256
1279
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
1257
1280
  }, [g, b]);
1258
- if (!o || o.fields.length === 0 || !s) return null;
1259
- let k = o.fields.find((e) => {
1260
- let t = s.fields.get(e);
1281
+ if (!s || s.fields.length === 0 || !c) return null;
1282
+ let j = s.fields.find((e) => {
1283
+ let t = c.fields.get(e);
1261
1284
  return t && (t.type === "text" || t.type === "string");
1262
- }), A = [], N = [];
1263
- for (let e of o.fields) {
1264
- if (e === k) continue;
1265
- let t = s.fields.get(e);
1266
- t && (t.type === "enum" ? A.push(e) : N.push(e));
1285
+ }), M = [], P = [];
1286
+ for (let e of s.fields) {
1287
+ if (e === j) continue;
1288
+ let t = c.fields.get(e);
1289
+ t && (t.type === "enum" ? M.push(e) : P.push(e));
1267
1290
  }
1268
- let P = (e) => {
1269
- let t = s.fields.get(e);
1291
+ let F = (e) => {
1292
+ let t = c.fields.get(e);
1270
1293
  return t ? /* @__PURE__ */ Y("div", {
1271
1294
  ref: (t) => {
1272
- T.current[e] = t;
1295
+ D.current[e] = t;
1273
1296
  },
1274
- children: w({
1297
+ children: k({
1275
1298
  field: t,
1276
1299
  fieldName: e,
1277
- value: a[e] ?? "",
1300
+ value: o[e] ?? "",
1278
1301
  mode: "edit",
1279
1302
  onChange: (t) => p(e, t),
1280
- record: a,
1303
+ record: o,
1281
1304
  t: m
1282
1305
  })
1283
1306
  }, e) : null;
@@ -1293,7 +1316,7 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1293
1316
  height: `${g}px`
1294
1317
  },
1295
1318
  children: [/* @__PURE__ */ Y("div", {
1296
- onMouseDown: D,
1319
+ onMouseDown: A,
1297
1320
  title: m("record.layout.drag_to_resize", "Drag to resize"),
1298
1321
  style: {
1299
1322
  height: 12,
@@ -1323,7 +1346,7 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1323
1346
  padding: "0 12px 8px"
1324
1347
  },
1325
1348
  children: [
1326
- A.length > 0 && /* @__PURE__ */ Y("div", {
1349
+ M.length > 0 && /* @__PURE__ */ Y("div", {
1327
1350
  style: {
1328
1351
  display: "flex",
1329
1352
  flexWrap: "wrap",
@@ -1331,24 +1354,24 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1331
1354
  gap: 6,
1332
1355
  flexShrink: 0
1333
1356
  },
1334
- children: A.map(P)
1357
+ children: M.map(F)
1335
1358
  }),
1336
- k && s.fields.get(k) && /* @__PURE__ */ Y("div", {
1359
+ j && c.fields.get(j) && /* @__PURE__ */ Y("div", {
1337
1360
  style: {
1338
1361
  flex: 1,
1339
1362
  minHeight: 0,
1340
1363
  display: "flex"
1341
1364
  },
1342
1365
  ref: (e) => {
1343
- T.current[k] = e;
1366
+ D.current[j] = e;
1344
1367
  },
1345
- children: w({
1346
- field: s.fields.get(k),
1347
- fieldName: k,
1348
- value: a[k] ?? "",
1368
+ children: k({
1369
+ field: c.fields.get(j),
1370
+ fieldName: j,
1371
+ value: o[j] ?? "",
1349
1372
  mode: "edit",
1350
- onChange: (e) => p(k, e),
1351
- record: a,
1373
+ onChange: (e) => p(j, e),
1374
+ record: o,
1352
1375
  fill: !0,
1353
1376
  t: m
1354
1377
  })
@@ -1361,7 +1384,7 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1361
1384
  gap: 6,
1362
1385
  flexShrink: 0
1363
1386
  },
1364
- children: [N.map(P), /* @__PURE__ */ X("div", {
1387
+ children: [P.map(F), /* @__PURE__ */ X("div", {
1365
1388
  style: {
1366
1389
  marginLeft: "auto",
1367
1390
  display: "flex",
@@ -1373,18 +1396,18 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1373
1396
  fontSize: 10.5,
1374
1397
  color: "var(--text-4)"
1375
1398
  },
1376
- children: j(m("record.related.shortcut_to_add", "{keys} to add"), { keys: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
1399
+ children: n(m("record.related.shortcut_to_add", "{keys} to add"), { keys: /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
1377
1400
  className: "mono",
1378
1401
  children: "⌘"
1379
1402
  }), /* @__PURE__ */ Y("span", {
1380
1403
  className: "mono",
1381
1404
  children: "↵"
1382
1405
  })] }) })
1383
- }), /* @__PURE__ */ Y(l, {
1406
+ }), /* @__PURE__ */ Y(E, {
1384
1407
  type: "submit",
1385
1408
  kind: "primary",
1386
- icon: /* @__PURE__ */ Y(e.plus, { size: 13 }),
1387
- disabled: c || !d,
1409
+ icon: /* @__PURE__ */ Y(w.plus, { size: 13 }),
1410
+ disabled: l || !d,
1388
1411
  children: m("record.related.add", "Add")
1389
1412
  })]
1390
1413
  })]
@@ -1396,7 +1419,7 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1396
1419
  margin: 0,
1397
1420
  flexShrink: 0
1398
1421
  },
1399
- children: re(h, u)
1422
+ children: r(h, u)
1400
1423
  })
1401
1424
  ]
1402
1425
  })]
@@ -1404,72 +1427,72 @@ function dt({ config: t, parentEntity: n, parentId: r, schema: i }) {
1404
1427
  }
1405
1428
  //#endregion
1406
1429
  //#region src/components/detail-layout/ChildrenTimeline.tsx
1407
- var ft = 80, pt = 200, mt = 6, ht = 2e4, gt = 280;
1408
- function _t(e) {
1409
- if (e.length > gt) return !0;
1430
+ var ht = 80, gt = 200, _t = 6, vt = 2e4, yt = 280;
1431
+ function bt(e) {
1432
+ if (e.length > yt) return !0;
1410
1433
  let t = 0;
1411
- for (let n of e) if (n === "\n" && ++t >= mt) return !0;
1434
+ for (let n of e) if (n === "\n" && ++t >= _t) return !0;
1412
1435
  return !1;
1413
1436
  }
1414
- function vt(e, t) {
1415
- if (yt(t)) {
1437
+ function xt(e, t) {
1438
+ if (St(t)) {
1416
1439
  let e = t.id;
1417
- return e == null ? "" : g(e);
1440
+ return e == null ? "" : b(e);
1418
1441
  }
1419
- return ee(o(e, t));
1442
+ return l(o(e, t));
1420
1443
  }
1421
- function yt(e) {
1444
+ function St(e) {
1422
1445
  return e.__optimistic === !0;
1423
1446
  }
1424
- function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1425
- let i = M(), a = M("errors"), o = r.entities[e.entity], { rows: s, refs: c, fetchNextPage: u, hasOlder: d, isFetchingOlder: f, isLoading: p, isError: m } = at(t, n, e.entity, e.foreign_key, e.timeline?.time_field, e.limit), h = e.timeline, g = h?.scroll ?? !1, _ = (e.sort ?? "").endsWith(":asc"), y = ye(() => _ ? [...s].reverse() : s, [s, _]), b = h?.auto_scroll ?? "none", x = K(null), S = K(null), C = K(!1), w = K(0), T = K(null), E = K(null), D = K(!0), O = K(null);
1447
+ function Ct({ config: e, parentEntity: t, parentId: n, schema: r }) {
1448
+ let i = x(), a = x("errors"), o = r.entities[e.entity], { rows: s, refs: c, fetchNextPage: l, hasOlder: u, isFetchingOlder: d, isLoading: f, isError: p } = ct(t, n, e.entity, e.foreign_key, e.timeline?.time_field, e.limit), m = e.timeline, h = m?.scroll ?? !1, g = (e.sort ?? "").endsWith(":asc"), _ = xe(() => g ? [...s].reverse() : s, [s, g]), v = m?.auto_scroll ?? "none", y = K(null), b = K(null), S = K(!1), C = K(0), w = K(null), T = K(null), D = K(!0), k = K(null);
1426
1449
  G(() => {
1427
- C.current = !1, w.current = 0, T.current = null, E.current = null, D.current = !0, O.current = null;
1428
- }, [n]), ve(() => {
1429
- f && x.current && (O.current = {
1430
- scrollHeight: x.current.scrollHeight,
1431
- scrollTop: x.current.scrollTop
1450
+ S.current = !1, C.current = 0, w.current = null, T.current = null, D.current = !0, k.current = null;
1451
+ }, [n]), be(() => {
1452
+ d && y.current && (k.current = {
1453
+ scrollHeight: y.current.scrollHeight,
1454
+ scrollTop: y.current.scrollTop
1432
1455
  });
1433
- }, [f]), ve(() => {
1434
- let e = x.current;
1435
- if (!e || y.length === 0 || !o) {
1436
- w.current = y.length;
1456
+ }, [d]), be(() => {
1457
+ let e = y.current;
1458
+ if (!e || _.length === 0 || !o) {
1459
+ C.current = _.length;
1437
1460
  return;
1438
1461
  }
1439
- let t = vt(o, y[0]), n = vt(o, y[y.length - 1]), r = !C.current, i = y.length > w.current && w.current > 0, a = i && (_ && t !== T.current && n === E.current || !_ && n !== E.current && t === T.current), s = i && !a;
1440
- if (r) _ && b === "bottom" && (e.scrollTop = e.scrollHeight), C.current = !0;
1441
- else if (a && O.current) {
1442
- let t = O.current;
1443
- _ && (e.scrollTop = t.scrollTop + (e.scrollHeight - t.scrollHeight)), O.current = null;
1444
- } else s && _ && D.current && (e.scrollTop = e.scrollHeight);
1445
- w.current = y.length, T.current = t, E.current = n;
1462
+ let t = xt(o, _[0]), n = xt(o, _[_.length - 1]), r = !S.current, i = _.length > C.current && C.current > 0, a = i && (g && t !== w.current && n === T.current || !g && n !== T.current && t === w.current), s = i && !a;
1463
+ if (r) g && v === "bottom" && (e.scrollTop = e.scrollHeight), S.current = !0;
1464
+ else if (a && k.current) {
1465
+ let t = k.current;
1466
+ g && (e.scrollTop = t.scrollTop + (e.scrollHeight - t.scrollHeight)), k.current = null;
1467
+ } else s && g && D.current && (e.scrollTop = e.scrollHeight);
1468
+ C.current = _.length, w.current = t, T.current = n;
1446
1469
  }, [
1447
- y,
1448
- b,
1449
1470
  _,
1471
+ v,
1472
+ g,
1450
1473
  o
1451
1474
  ]);
1452
- let k = W(() => {
1453
- let e = x.current;
1454
- e && (D.current = e.scrollHeight - e.scrollTop - e.clientHeight < ft);
1475
+ let A = W(() => {
1476
+ let e = y.current;
1477
+ e && (D.current = e.scrollHeight - e.scrollTop - e.clientHeight < ht);
1455
1478
  }, []);
1456
1479
  G(() => {
1457
- let e = S.current;
1480
+ let e = b.current;
1458
1481
  if (!e || typeof IntersectionObserver > "u") return;
1459
1482
  let t = new IntersectionObserver((e) => {
1460
- for (let t of e) t.isIntersecting && d && !f && u();
1483
+ for (let t of e) t.isIntersecting && u && !d && l();
1461
1484
  }, {
1462
- root: x.current ?? null,
1463
- rootMargin: `${pt}px 0px 0px 0px`,
1485
+ root: y.current ?? null,
1486
+ rootMargin: `${gt}px 0px 0px 0px`,
1464
1487
  threshold: 0
1465
1488
  });
1466
1489
  return t.observe(e), () => t.disconnect();
1467
1490
  }, [
1491
+ u,
1468
1492
  d,
1469
- f,
1470
- u
1493
+ l
1471
1494
  ]);
1472
- let [A, j] = q(null);
1495
+ let [j, M] = q(null);
1473
1496
  if (!o) return /* @__PURE__ */ Y("div", {
1474
1497
  style: {
1475
1498
  fontSize: 12.5,
@@ -1478,25 +1501,25 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1478
1501
  },
1479
1502
  children: a("record.related_entity_not_found", "The related record type is not declared in this deployment.")
1480
1503
  });
1481
- let N = e.quick_add?.fields ?? [h?.content_field].filter(Boolean), P = i(o.display?.name_plural) || i(o.display?.name) || e.entity, F = d ? /* @__PURE__ */ Y("div", {
1504
+ let N = e.quick_add?.fields ?? [m?.content_field].filter(Boolean), P = i(o.display?.name_plural) || i(o.display?.name) || e.entity, F = u ? /* @__PURE__ */ Y("div", {
1482
1505
  style: {
1483
1506
  display: "flex",
1484
1507
  justifyContent: "center",
1485
1508
  padding: "6px 0"
1486
1509
  },
1487
- children: /* @__PURE__ */ Y(l, {
1510
+ children: /* @__PURE__ */ Y(E, {
1488
1511
  size: "xs",
1489
- onClick: () => u(),
1490
- disabled: f,
1491
- icon: f ? /* @__PURE__ */ Y(v, { size: 11 }) : void 0,
1492
- children: f ? i("record.loading", "Loading…") : i("record.timeline.load_older", "Load older")
1512
+ onClick: () => l(),
1513
+ disabled: d,
1514
+ icon: d ? /* @__PURE__ */ Y(O, { size: 11 }) : void 0,
1515
+ children: d ? i("record.loading", "Loading…") : i("record.timeline.load_older", "Load older")
1493
1516
  })
1494
1517
  }) : null, I = /* @__PURE__ */ Y("div", {
1495
- ref: S,
1518
+ ref: b,
1496
1519
  "aria-hidden": "true",
1497
1520
  style: { height: 1 }
1498
1521
  }), L;
1499
- if (m) L = /* @__PURE__ */ Y("div", {
1522
+ if (p) L = /* @__PURE__ */ Y("div", {
1500
1523
  style: {
1501
1524
  fontSize: 12.5,
1502
1525
  color: "var(--danger)",
@@ -1504,7 +1527,7 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1504
1527
  },
1505
1528
  children: a("record.related_rows_unreadable", "The related records could not be loaded.")
1506
1529
  });
1507
- else if (p) L = /* @__PURE__ */ X("div", {
1530
+ else if (f) L = /* @__PURE__ */ X("div", {
1508
1531
  style: {
1509
1532
  display: "flex",
1510
1533
  flexDirection: "column",
@@ -1521,7 +1544,7 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1521
1544
  borderRadius: 8
1522
1545
  } })]
1523
1546
  });
1524
- else if (y.length === 0) L = /* @__PURE__ */ X(J, { children: [I, /* @__PURE__ */ Y("div", {
1547
+ else if (_.length === 0) L = /* @__PURE__ */ X(J, { children: [I, /* @__PURE__ */ Y("div", {
1525
1548
  style: {
1526
1549
  fontSize: 12.5,
1527
1550
  color: "var(--text-3)",
@@ -1531,32 +1554,32 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1531
1554
  })] });
1532
1555
  else {
1533
1556
  let a = (i, a) => {
1534
- let s = vt(o, i) || String(a);
1535
- return /* @__PURE__ */ Y(xt, {
1557
+ let s = xt(o, i) || String(a);
1558
+ return /* @__PURE__ */ Y(wt, {
1536
1559
  row: i,
1537
1560
  rowId: s,
1538
1561
  childEntity: o,
1539
1562
  entityCode: e.entity,
1540
1563
  parentEntity: t,
1541
1564
  parentId: n,
1542
- timeline: h,
1565
+ timeline: m,
1543
1566
  editableFields: N,
1544
1567
  refs: c,
1545
- isEditing: A === s,
1546
- onStartEdit: () => j(s),
1547
- onCancelEdit: () => j(null),
1548
- onSaved: () => j(null),
1568
+ isEditing: j === s,
1569
+ onStartEdit: () => M(s),
1570
+ onCancelEdit: () => M(null),
1571
+ onSaved: () => M(null),
1549
1572
  schema: r,
1550
- optimistic: yt(i)
1573
+ optimistic: St(i)
1551
1574
  }, s);
1552
- }, s = h?.time_field, l;
1575
+ }, s = m?.time_field, l;
1553
1576
  if (s) {
1554
1577
  let e = [];
1555
- y.forEach((t, n) => {
1556
- let r = t[s], a = Ct(r), o = e[e.length - 1];
1578
+ _.forEach((t, n) => {
1579
+ let r = t[s], a = Et(r), o = e[e.length - 1];
1557
1580
  !o || o.key !== a ? e.push({
1558
1581
  key: a,
1559
- label: wt(i, r),
1582
+ label: Dt(i, r),
1560
1583
  rows: [{
1561
1584
  row: t,
1562
1585
  idx: n
@@ -1571,19 +1594,19 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1571
1594
  flexDirection: "column",
1572
1595
  gap: 8
1573
1596
  },
1574
- children: [/* @__PURE__ */ Y(Tt, {
1597
+ children: [/* @__PURE__ */ Y(Ot, {
1575
1598
  label: e.label,
1576
1599
  count: e.rows.length
1577
1600
  }), e.rows.map(({ row: e, idx: t }) => a(e, t))]
1578
1601
  }, `day-${e.key}`));
1579
- } else l = y.map((e, t) => a(e, t));
1602
+ } else l = _.map((e, t) => a(e, t));
1580
1603
  L = /* @__PURE__ */ X(J, { children: [
1581
1604
  I,
1582
1605
  F,
1583
1606
  l
1584
1607
  ] });
1585
1608
  }
1586
- return g ? /* @__PURE__ */ X("div", {
1609
+ return h ? /* @__PURE__ */ X("div", {
1587
1610
  style: {
1588
1611
  display: "flex",
1589
1612
  flexDirection: "column",
@@ -1609,8 +1632,8 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1609
1632
  })
1610
1633
  }),
1611
1634
  /* @__PURE__ */ Y("div", {
1612
- ref: x,
1613
- onScroll: k,
1635
+ ref: y,
1636
+ onScroll: A,
1614
1637
  style: {
1615
1638
  flex: 1,
1616
1639
  overflowY: "auto",
@@ -1621,7 +1644,7 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1621
1644
  },
1622
1645
  children: L
1623
1646
  }),
1624
- /* @__PURE__ */ Y(dt, {
1647
+ /* @__PURE__ */ Y(mt, {
1625
1648
  config: e,
1626
1649
  parentEntity: t,
1627
1650
  parentId: n,
@@ -1635,59 +1658,59 @@ function bt({ config: e, parentEntity: t, parentId: n, schema: r }) {
1635
1658
  gap: 8
1636
1659
  },
1637
1660
  children: L
1638
- }), /* @__PURE__ */ Y(dt, {
1661
+ }), /* @__PURE__ */ Y(mt, {
1639
1662
  config: e,
1640
1663
  parentEntity: t,
1641
1664
  parentId: n,
1642
1665
  schema: r
1643
1666
  })] });
1644
1667
  }
1645
- function xt({ row: t, rowId: n, childEntity: r, entityCode: o, parentEntity: s, parentId: c, timeline: d, editableFields: f, refs: p, isEditing: m, onStartEdit: h, onCancelEdit: _, onSaved: y, schema: b, optimistic: x = !1 }) {
1646
- let S = M(), T = M("errors"), E = Se(), [D, O] = q({}), A = W(() => {
1647
- E.invalidateQueries({ queryKey: [
1648
- i,
1668
+ function wt({ row: e, rowId: t, childEntity: i, entityCode: o, parentEntity: s, parentId: c, timeline: l, editableFields: u, refs: d, isEditing: f, onStartEdit: p, onCancelEdit: m, onSaved: h, schema: g, optimistic: v = !1 }) {
1669
+ let S = x(), A = x("errors"), j = we(), [M, N] = q({}), P = W(() => {
1670
+ j.invalidateQueries({ queryKey: [
1671
+ te,
1649
1672
  s,
1650
1673
  c,
1651
1674
  o
1652
1675
  ] });
1653
1676
  }, [
1654
- E,
1677
+ j,
1655
1678
  s,
1656
1679
  c,
1657
1680
  o
1658
- ]), N = xe({
1659
- mutationFn: (e) => {
1660
- let r = t.$row_version, i = typeof r == "string" && r !== "" ? {
1661
- ...e,
1681
+ ]), F = Ce({
1682
+ mutationFn: (n) => {
1683
+ let r = e.$row_version, i = typeof r == "string" && r !== "" ? {
1684
+ ...n,
1662
1685
  $row_version: r
1663
- } : e;
1664
- return ie(o, n, i);
1686
+ } : n;
1687
+ return C(o, t, i);
1665
1688
  },
1666
1689
  onSuccess: () => {
1667
- A(), k.success(S("record.timeline.updated", "Updated")), y();
1690
+ P(), a.success(S("record.timeline.updated", "Updated")), h();
1668
1691
  },
1669
- onError: (e) => k.error(re(T, e))
1670
- }), P = xe({
1671
- mutationFn: () => ne(o, n),
1692
+ onError: (e) => a.error(r(A, e))
1693
+ }), I = Ce({
1694
+ mutationFn: () => y(o, t),
1672
1695
  onSuccess: () => {
1673
- A(), k.success(S("record.timeline.deleted", "Deleted"));
1696
+ P(), a.success(S("record.timeline.deleted", "Deleted"));
1674
1697
  },
1675
- onError: (e) => k.error(re(T, e))
1676
- }), F = W(() => {
1677
- let e = {};
1678
- for (let n of f) e[n] = t[n] ?? "";
1679
- O(e), h();
1698
+ onError: (e) => a.error(r(A, e))
1699
+ }), L = W(() => {
1700
+ let t = {};
1701
+ for (let n of u) t[n] = e[n] ?? "";
1702
+ N(t), p();
1680
1703
  }, [
1681
- t,
1682
- f,
1683
- h
1684
- ]), I = W((e, t) => {
1685
- O((n) => ({
1704
+ e,
1705
+ u,
1706
+ p
1707
+ ]), ee = W((e, t) => {
1708
+ N((n) => ({
1686
1709
  ...n,
1687
1710
  [e]: t
1688
1711
  }));
1689
- }, []), L = d?.time_field, R = d?.type_field, z = d?.summary_field, B = d?.content_field, V = d?.author_field, H = d?.direction_field, U = d?.intent_field;
1690
- return m ? /* @__PURE__ */ X("div", {
1712
+ }, []), R = l?.time_field, z = l?.type_field, B = l?.summary_field, V = l?.content_field, H = l?.author_field, ne = l?.direction_field, U = l?.intent_field;
1713
+ return f ? /* @__PURE__ */ X("div", {
1691
1714
  style: {
1692
1715
  borderRadius: 10,
1693
1716
  border: "1px solid var(--accent)",
@@ -1697,8 +1720,8 @@ function xt({ row: t, rowId: n, childEntity: r, entityCode: o, parentEntity: s,
1697
1720
  flexDirection: "column",
1698
1721
  gap: 8
1699
1722
  },
1700
- children: [f.map((e) => {
1701
- let t = r.fields.get(e);
1723
+ children: [u.map((e) => {
1724
+ let t = i.fields.get(e);
1702
1725
  return t ? /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("label", {
1703
1726
  style: {
1704
1727
  fontSize: 11,
@@ -1706,14 +1729,14 @@ function xt({ row: t, rowId: n, childEntity: r, entityCode: o, parentEntity: s,
1706
1729
  marginBottom: 4,
1707
1730
  display: "block"
1708
1731
  },
1709
- children: a(S, t, e, b.entities)
1710
- }), w({
1732
+ children: _(S, t, e, g.entities)
1733
+ }), k({
1711
1734
  field: t,
1712
1735
  fieldName: e,
1713
- value: D[e] ?? "",
1736
+ value: M[e] ?? "",
1714
1737
  mode: "edit",
1715
- onChange: (t) => I(e, t),
1716
- record: D,
1738
+ onChange: (t) => ee(e, t),
1739
+ record: M,
1717
1740
  t: S
1718
1741
  })] }, e) : null;
1719
1742
  }), /* @__PURE__ */ X("div", {
@@ -1723,33 +1746,33 @@ function xt({ row: t, rowId: n, childEntity: r, entityCode: o, parentEntity: s,
1723
1746
  gap: 6,
1724
1747
  paddingTop: 4
1725
1748
  },
1726
- children: [/* @__PURE__ */ Y(l, {
1749
+ children: [/* @__PURE__ */ Y(E, {
1727
1750
  kind: "primary",
1728
1751
  size: "xs",
1729
- icon: N.isPending ? /* @__PURE__ */ Y(v, { size: 12 }) : /* @__PURE__ */ Y(e.check, { size: 12 }),
1730
- onClick: () => N.mutate(D),
1731
- disabled: N.isPending,
1732
- children: N.isPending ? S("dialog.saving", "Saving…") : S("dialog.save", "Save")
1733
- }), /* @__PURE__ */ Y(l, {
1752
+ icon: F.isPending ? /* @__PURE__ */ Y(O, { size: 12 }) : /* @__PURE__ */ Y(w.check, { size: 12 }),
1753
+ onClick: () => F.mutate(M),
1754
+ disabled: F.isPending,
1755
+ children: F.isPending ? S("dialog.saving", "Saving…") : S("dialog.save", "Save")
1756
+ }), /* @__PURE__ */ Y(E, {
1734
1757
  size: "xs",
1735
- icon: /* @__PURE__ */ Y(e.x, { size: 12 }),
1758
+ icon: /* @__PURE__ */ Y(w.x, { size: 12 }),
1736
1759
  onClick: () => {
1737
- O({}), _();
1760
+ N({}), m();
1738
1761
  },
1739
- disabled: N.isPending,
1762
+ disabled: F.isPending,
1740
1763
  children: S("dialog.cancel", "Cancel")
1741
1764
  })]
1742
1765
  })]
1743
1766
  }) : /* @__PURE__ */ X("div", {
1744
1767
  className: "group",
1745
- "data-optimistic": x || void 0,
1768
+ "data-optimistic": v || void 0,
1746
1769
  style: {
1747
1770
  borderRadius: 10,
1748
1771
  border: "1px solid var(--border)",
1749
1772
  background: "var(--surface)",
1750
1773
  padding: 12,
1751
1774
  transition: "border-color .12s",
1752
- opacity: x ? .6 : 1
1775
+ opacity: v ? .6 : 1
1753
1776
  },
1754
1777
  onMouseEnter: (e) => e.currentTarget.style.borderColor = "var(--border-strong)",
1755
1778
  onMouseLeave: (e) => e.currentTarget.style.borderColor = "var(--border)",
@@ -1764,131 +1787,131 @@ function xt({ row: t, rowId: n, childEntity: r, entityCode: o, parentEntity: s,
1764
1787
  color: "var(--text-3)"
1765
1788
  },
1766
1789
  children: [
1767
- L && t[L] != null && r.fields.get(L) && /* @__PURE__ */ Y("span", {
1790
+ R && e[R] != null && i.fields.get(R) && /* @__PURE__ */ Y("span", {
1768
1791
  style: { fontWeight: 500 },
1769
- children: w({
1770
- field: r.fields.get(L),
1771
- fieldName: L,
1772
- value: t[L],
1792
+ children: k({
1793
+ field: i.fields.get(R),
1794
+ fieldName: R,
1795
+ value: e[R],
1773
1796
  mode: "display",
1774
- record: t,
1775
- refs: p,
1797
+ record: e,
1798
+ refs: d,
1776
1799
  t: S
1777
1800
  })
1778
1801
  }),
1779
- R && t[R] != null && r.fields.get(R) && /* @__PURE__ */ Y(u, {
1802
+ z && e[z] != null && i.fields.get(z) && /* @__PURE__ */ Y(D, {
1780
1803
  tone: "slate",
1781
1804
  size: "xs",
1782
- children: w({
1783
- field: r.fields.get(R),
1784
- fieldName: R,
1785
- value: t[R],
1805
+ children: k({
1806
+ field: i.fields.get(z),
1807
+ fieldName: z,
1808
+ value: e[z],
1786
1809
  mode: "display",
1787
- record: t,
1788
- refs: p,
1810
+ record: e,
1811
+ refs: d,
1789
1812
  t: S
1790
1813
  })
1791
1814
  }),
1792
- H && t[H] != null && r.fields.get(H) && /* @__PURE__ */ Y(Et, {
1793
- value: t[H],
1794
- field: r.fields.get(H)
1815
+ ne && e[ne] != null && i.fields.get(ne) && /* @__PURE__ */ Y(kt, {
1816
+ value: e[ne],
1817
+ field: i.fields.get(ne)
1795
1818
  }),
1796
- U && t[U] != null && r.fields.get(U) && /* @__PURE__ */ Y(u, {
1819
+ U && e[U] != null && i.fields.get(U) && /* @__PURE__ */ Y(D, {
1797
1820
  tone: "slate",
1798
1821
  size: "xs",
1799
- children: w({
1800
- field: r.fields.get(U),
1822
+ children: k({
1823
+ field: i.fields.get(U),
1801
1824
  fieldName: U,
1802
- value: t[U],
1825
+ value: e[U],
1803
1826
  mode: "display",
1804
- record: t,
1805
- refs: p,
1827
+ record: e,
1828
+ refs: d,
1806
1829
  t: S
1807
1830
  })
1808
1831
  }),
1809
- V && t[V] != null && r.fields.get(V) && /* @__PURE__ */ Y("span", { children: j(S("record.timeline.by_author", "by {author}"), { author: w({
1810
- field: r.fields.get(V),
1811
- fieldName: V,
1812
- value: t[V],
1832
+ H && e[H] != null && i.fields.get(H) && /* @__PURE__ */ Y("span", { children: n(S("record.timeline.by_author", "by {author}"), { author: k({
1833
+ field: i.fields.get(H),
1834
+ fieldName: H,
1835
+ value: e[H],
1813
1836
  mode: "display",
1814
- record: t,
1815
- refs: p,
1837
+ record: e,
1838
+ refs: d,
1816
1839
  t: S
1817
1840
  }) }) }),
1818
- !x && /* @__PURE__ */ X("div", {
1841
+ !v && /* @__PURE__ */ X("div", {
1819
1842
  style: {
1820
1843
  marginLeft: "auto",
1821
1844
  display: "flex",
1822
1845
  alignItems: "center",
1823
1846
  gap: 2
1824
1847
  },
1825
- children: [/* @__PURE__ */ Y(C, {
1848
+ children: [/* @__PURE__ */ Y(T, {
1826
1849
  size: 22,
1827
- icon: /* @__PURE__ */ Y(e.edit, { size: 11 }),
1828
- onClick: F,
1850
+ icon: /* @__PURE__ */ Y(w.edit, { size: 11 }),
1851
+ onClick: L,
1829
1852
  title: S("record.action.edit", "Edit")
1830
- }), /* @__PURE__ */ Y(C, {
1853
+ }), /* @__PURE__ */ Y(T, {
1831
1854
  size: 22,
1832
- icon: /* @__PURE__ */ Y(e.trash, { size: 11 }),
1833
- onClick: () => P.mutate(),
1855
+ icon: /* @__PURE__ */ Y(w.trash, { size: 11 }),
1856
+ onClick: () => I.mutate(),
1834
1857
  title: S("record.action.delete", "Delete")
1835
1858
  })]
1836
1859
  })
1837
1860
  ]
1838
1861
  }),
1839
- z && t[z] != null && r.fields.get(z) && /* @__PURE__ */ Y("div", {
1862
+ B && e[B] != null && i.fields.get(B) && /* @__PURE__ */ Y("div", {
1840
1863
  style: {
1841
1864
  fontSize: 12.5,
1842
1865
  fontWeight: 500,
1843
1866
  marginTop: 6
1844
1867
  },
1845
- children: w({
1846
- field: r.fields.get(z),
1847
- fieldName: z,
1848
- value: t[z],
1868
+ children: k({
1869
+ field: i.fields.get(B),
1870
+ fieldName: B,
1871
+ value: e[B],
1849
1872
  mode: "display",
1850
- record: t,
1851
- refs: p,
1873
+ record: e,
1874
+ refs: d,
1852
1875
  t: S
1853
1876
  })
1854
1877
  }),
1855
- B && t[B] != null && B !== z && r.fields.get(B) && /* @__PURE__ */ Y(St, {
1856
- rendered: w({
1857
- field: r.fields.get(B),
1858
- fieldName: B,
1859
- value: t[B],
1878
+ V && e[V] != null && V !== B && i.fields.get(V) && /* @__PURE__ */ Y(Tt, {
1879
+ rendered: k({
1880
+ field: i.fields.get(V),
1881
+ fieldName: V,
1882
+ value: e[V],
1860
1883
  mode: "display",
1861
- record: t,
1862
- refs: p,
1884
+ record: e,
1885
+ refs: d,
1863
1886
  t: S
1864
1887
  }),
1865
- text: g(t[B])
1888
+ text: b(e[V])
1866
1889
  })
1867
1890
  ]
1868
1891
  });
1869
1892
  }
1870
- function St({ rendered: e, text: t }) {
1871
- let n = M(), r = {
1893
+ function Tt({ rendered: e, text: t }) {
1894
+ let n = x(), r = {
1872
1895
  fontSize: 12.5,
1873
1896
  fontWeight: 400,
1874
1897
  marginTop: 6
1875
1898
  };
1876
- if (!_t(t)) return /* @__PURE__ */ Y("div", {
1899
+ if (!bt(t)) return /* @__PURE__ */ Y("div", {
1877
1900
  style: r,
1878
1901
  children: e
1879
1902
  });
1880
- let i = t.length > ht, a = i ? t.slice(0, ht) : t;
1903
+ let i = t.length > vt, a = i ? t.slice(0, vt) : t;
1881
1904
  return /* @__PURE__ */ Y("div", {
1882
1905
  style: {
1883
1906
  ...r,
1884
1907
  display: "-webkit-box",
1885
1908
  WebkitBoxOrient: "vertical",
1886
- WebkitLineClamp: mt,
1909
+ WebkitLineClamp: _t,
1887
1910
  overflow: "hidden",
1888
1911
  whiteSpace: "pre-wrap",
1889
1912
  overflowWrap: "anywhere"
1890
1913
  },
1891
- children: /* @__PURE__ */ Y(h, {
1914
+ children: /* @__PURE__ */ Y(M, {
1892
1915
  width: 380,
1893
1916
  content: /* @__PURE__ */ X("div", {
1894
1917
  style: {
@@ -1909,14 +1932,14 @@ function St({ rendered: e, text: t }) {
1909
1932
  })
1910
1933
  });
1911
1934
  }
1912
- function Ct(e) {
1935
+ function Et(e) {
1913
1936
  if (e == null) return "";
1914
- let t = new Date(g(e));
1937
+ let t = new Date(b(e));
1915
1938
  return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`;
1916
1939
  }
1917
- function wt(e, t) {
1940
+ function Dt(e, t) {
1918
1941
  if (t == null) return "—";
1919
- let n = new Date(g(t));
1942
+ let n = new Date(b(t));
1920
1943
  if (Number.isNaN(n.getTime())) return "—";
1921
1944
  let r = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
1922
1945
  i.setDate(r.getDate() - 1);
@@ -1927,7 +1950,7 @@ function wt(e, t) {
1927
1950
  day: "numeric"
1928
1951
  });
1929
1952
  }
1930
- function Tt({ label: e, count: t }) {
1953
+ function Ot({ label: e, count: t }) {
1931
1954
  return /* @__PURE__ */ X("div", {
1932
1955
  style: {
1933
1956
  position: "sticky",
@@ -1964,9 +1987,9 @@ function Tt({ label: e, count: t }) {
1964
1987
  ]
1965
1988
  });
1966
1989
  }
1967
- function Et({ value: t, field: n }) {
1968
- let r = M(), i = Dt(t, n);
1969
- return i === null ? null : /* @__PURE__ */ X("span", {
1990
+ function kt({ value: e, field: t }) {
1991
+ let n = x(), r = At(e, t);
1992
+ return r === null ? null : /* @__PURE__ */ X("span", {
1970
1993
  style: {
1971
1994
  display: "inline-flex",
1972
1995
  alignItems: "center",
@@ -1975,13 +1998,13 @@ function Et({ value: t, field: n }) {
1975
1998
  borderRadius: 999,
1976
1999
  fontSize: 10.5,
1977
2000
  fontWeight: 600,
1978
- background: i ? "var(--accent-soft)" : "var(--info-soft)",
1979
- color: i ? "var(--accent)" : "var(--info)"
2001
+ background: r ? "var(--accent-soft)" : "var(--info-soft)",
2002
+ color: r ? "var(--accent)" : "var(--info)"
1980
2003
  },
1981
- children: [Y(i ? e.arrowUp : e.arrowDown, { size: 10 }), i ? r("record.timeline.outbound", "Out") : r("record.timeline.inbound", "In")]
2004
+ children: [Y(r ? w.arrowUp : w.arrowDown, { size: 10 }), r ? n("record.timeline.outbound", "Out") : n("record.timeline.inbound", "In")]
1982
2005
  });
1983
2006
  }
1984
- function Dt(e, t) {
2007
+ function At(e, t) {
1985
2008
  if (t.type === "bool") return e === !0;
1986
2009
  if (typeof e == "string") {
1987
2010
  let t = e.toLowerCase();
@@ -1992,70 +2015,70 @@ function Dt(e, t) {
1992
2015
  }
1993
2016
  //#endregion
1994
2017
  //#region src/components/detail-layout/EditableChildrenTable.tsx
1995
- function Ot({ config: t, childEntity: n, schema: r, rows: i, onChange: o, validationErrors: s, refs: c, forceTablePresentation: u = !1 }) {
1996
- let d = M(), f = y(), p = K(null), m = t.columns, h = t.position_field, _ = new Set(Array.isArray(t.foreign_key) ? t.foreign_key : [t.foreign_key]), v = m.filter((e) => {
1997
- if (_.has(e) || t.position_field && e === t.position_field) return !1;
1998
- let r = n.fields.get(e);
2018
+ function jt({ config: e, childEntity: t, schema: n, rows: r, onChange: i, validationErrors: a, refs: o, forceTablePresentation: s = !1 }) {
2019
+ let c = x(), l = S(), u = K(null), d = e.columns, f = e.position_field, p = new Set(Array.isArray(e.foreign_key) ? e.foreign_key : [e.foreign_key]), m = d.filter((n) => {
2020
+ if (p.has(n) || e.position_field && n === e.position_field) return !1;
2021
+ let r = t.fields.get(n);
1999
2022
  return !(!r || r.auto || r.primary || r.source);
2000
- }), b = new Set(m.filter((e) => {
2001
- if (t.position_field && e === t.position_field) return !0;
2002
- let r = n.fields.get(e);
2023
+ }), h = new Set(d.filter((n) => {
2024
+ if (e.position_field && n === e.position_field) return !0;
2025
+ let r = t.fields.get(n);
2003
2026
  return r && (r.auto || r.primary || r.source);
2004
- })), x = W((e, t, n) => {
2005
- o(i.map((r) => r._key === e ? {
2027
+ })), g = W((e, t, n) => {
2028
+ i(r.map((r) => r._key === e ? {
2006
2029
  ...r,
2007
2030
  [t]: n,
2008
2031
  _dirty: !0
2009
2032
  } : r));
2010
- }, [i, o]), S = W(() => {
2011
- let e = {
2033
+ }, [r, i]), v = W(() => {
2034
+ let n = {
2012
2035
  _key: crypto.randomUUID(),
2013
2036
  _dirty: !0
2014
2037
  };
2015
- if (h) {
2016
- let t = i.filter((e) => !e._deleted).reduce((e, t) => {
2017
- let n = typeof t[h] == "number" ? t[h] : -1;
2038
+ if (f) {
2039
+ let e = r.filter((e) => !e._deleted).reduce((e, t) => {
2040
+ let n = typeof t[f] == "number" ? t[f] : -1;
2018
2041
  return Math.max(e, n);
2019
2042
  }, -1);
2020
- e[h] = t + 1;
2043
+ n[f] = e + 1;
2021
2044
  }
2022
- let r = t.quick_add?.defaults ?? {};
2023
- for (let t of v) {
2024
- let i = n.fields.get(t);
2025
- i && (r[t] === void 0 ? i.default === void 0 ? i.type === "bool" && (e[t] = !1) : e[t] = i.default : e[t] = r[t]);
2045
+ let a = e.quick_add?.defaults ?? {};
2046
+ for (let e of m) {
2047
+ let r = t.fields.get(e);
2048
+ r && (a[e] === void 0 ? r.default === void 0 ? r.type === "bool" && (n[e] = !1) : n[e] = r.default : n[e] = a[e]);
2026
2049
  }
2027
- o([...i, e]);
2050
+ i([...r, n]);
2028
2051
  }, [
2052
+ r,
2029
2053
  i,
2030
- o,
2031
- v,
2032
- n,
2033
- t.quick_add?.defaults,
2034
- h
2035
- ]), T = W((e) => {
2036
- o(i.map((t) => t._key === e ? {
2054
+ m,
2055
+ t,
2056
+ e.quick_add?.defaults,
2057
+ f
2058
+ ]), y = W((e) => {
2059
+ i(r.map((t) => t._key === e ? {
2037
2060
  ...t,
2038
2061
  _deleted: !0
2039
2062
  } : t));
2040
- }, [i, o]), E = W((e) => {
2041
- o(i.map((t) => t._key === e ? {
2063
+ }, [r, i]), C = W((e) => {
2064
+ i(r.map((t) => t._key === e ? {
2042
2065
  ...t,
2043
2066
  _deleted: !1
2044
2067
  } : t));
2045
- }, [i, o]), D = W((e, t) => {
2046
- if (!h) return;
2047
- let n = i.filter((e) => !e._deleted), r = i.filter((e) => e._deleted), a = n.findIndex((t) => t._key === e), s = a + t;
2048
- if (a < 0 || s < 0 || s >= n.length) return;
2049
- let c = [...n], [l] = c.splice(a, 1);
2050
- c.splice(s, 0, l), o([...c.map((e, t) => ({
2068
+ }, [r, i]), D = W((e, t) => {
2069
+ if (!f) return;
2070
+ let n = r.filter((e) => !e._deleted), a = r.filter((e) => e._deleted), o = n.findIndex((t) => t._key === e), s = o + t;
2071
+ if (o < 0 || s < 0 || s >= n.length) return;
2072
+ let c = [...n], [l] = c.splice(o, 1);
2073
+ c.splice(s, 0, l), i([...c.map((e, t) => ({
2051
2074
  ...e,
2052
- [h]: t,
2053
- _dirty: e[h] !== t || e._dirty
2054
- })), ...r]);
2075
+ [f]: t,
2076
+ _dirty: e[f] !== t || e._dirty
2077
+ })), ...a]);
2055
2078
  }, [
2079
+ r,
2056
2080
  i,
2057
- o,
2058
- h
2081
+ f
2059
2082
  ]), O = W((e) => {
2060
2083
  let t = e.target, n = t.closest("td");
2061
2084
  if (!n) return;
@@ -2080,7 +2103,7 @@ function Ot({ config: t, childEntity: n, schema: r, rows: i, onChange: o, valida
2080
2103
  if (o < t.length - 1) {
2081
2104
  let e = t[o + 1].cells[a]?.querySelector("input, select, textarea, [tabindex]");
2082
2105
  e && e.focus();
2083
- } else S(), requestAnimationFrame(() => {
2106
+ } else v(), requestAnimationFrame(() => {
2084
2107
  let e = i.querySelectorAll("tr"), t = e[e.length - 1];
2085
2108
  if (t) {
2086
2109
  let e = t.querySelector("input, select, textarea, [tabindex]");
@@ -2088,21 +2111,21 @@ function Ot({ config: t, childEntity: n, schema: r, rows: i, onChange: o, valida
2088
2111
  }
2089
2112
  });
2090
2113
  } else e.key === "Escape" && t.blur?.();
2091
- }, [S]), k = fe;
2092
- return f.isPhone && !u ? /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("div", {
2114
+ }, [v]), A = ce;
2115
+ return l.isPhone && !s ? /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("div", {
2093
2116
  style: {
2094
2117
  display: "flex",
2095
2118
  flexDirection: "column",
2096
2119
  gap: 10
2097
2120
  },
2098
- children: i.map((t, o) => {
2099
- let l = !!t._deleted, u = s?.[t._key], f = h ? i.filter((e) => !e._deleted) : [], p = h ? f.findIndex((e) => e._key === t._key) : -1;
2121
+ children: r.map((e, i) => {
2122
+ let s = !!e._deleted, l = a?.[e._key], u = f ? r.filter((e) => !e._deleted) : [], p = f ? u.findIndex((t) => t._key === e._key) : -1;
2100
2123
  return /* @__PURE__ */ X("div", {
2101
2124
  style: {
2102
2125
  border: "1px solid var(--border)",
2103
2126
  borderRadius: 8,
2104
2127
  background: "var(--surface)",
2105
- opacity: l ? .58 : 1,
2128
+ opacity: s ? .58 : 1,
2106
2129
  overflow: "hidden"
2107
2130
  },
2108
2131
  children: [/* @__PURE__ */ X("div", {
@@ -2121,35 +2144,35 @@ function Ot({ config: t, childEntity: n, schema: r, rows: i, onChange: o, valida
2121
2144
  fontWeight: 600,
2122
2145
  color: "var(--text-2)"
2123
2146
  },
2124
- children: d("record.row.number", "Row {number}", { number: o + 1 })
2147
+ children: c("record.row.number", "Row {number}", { number: i + 1 })
2125
2148
  }), /* @__PURE__ */ X("div", {
2126
2149
  style: {
2127
2150
  display: "flex",
2128
2151
  alignItems: "center",
2129
2152
  gap: 4
2130
2153
  },
2131
- children: [h && !l && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(C, {
2154
+ children: [f && !s && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(T, {
2132
2155
  size: 32,
2133
- icon: /* @__PURE__ */ Y(e.up, { size: 14 }),
2134
- onClick: () => D(t._key, -1),
2156
+ icon: /* @__PURE__ */ Y(w.up, { size: 14 }),
2157
+ onClick: () => D(e._key, -1),
2135
2158
  disabled: p <= 0,
2136
- title: d("record.row.move_up", "Move row up")
2137
- }), /* @__PURE__ */ Y(C, {
2159
+ title: c("record.row.move_up", "Move row up")
2160
+ }), /* @__PURE__ */ Y(T, {
2138
2161
  size: 32,
2139
- icon: /* @__PURE__ */ Y(e.down, { size: 14 }),
2140
- onClick: () => D(t._key, 1),
2141
- disabled: p === -1 || p >= f.length - 1,
2142
- title: d("record.row.move_down", "Move row down")
2143
- })] }), l ? /* @__PURE__ */ Y(C, {
2162
+ icon: /* @__PURE__ */ Y(w.down, { size: 14 }),
2163
+ onClick: () => D(e._key, 1),
2164
+ disabled: p === -1 || p >= u.length - 1,
2165
+ title: c("record.row.move_down", "Move row down")
2166
+ })] }), s ? /* @__PURE__ */ Y(T, {
2144
2167
  size: 32,
2145
- icon: /* @__PURE__ */ Y(e.refresh, { size: 14 }),
2146
- onClick: () => E(t._key),
2147
- title: d("record.row.undo_delete", "Undo delete")
2148
- }) : /* @__PURE__ */ Y(C, {
2168
+ icon: /* @__PURE__ */ Y(w.refresh, { size: 14 }),
2169
+ onClick: () => C(e._key),
2170
+ title: c("record.row.undo_delete", "Undo delete")
2171
+ }) : /* @__PURE__ */ Y(T, {
2149
2172
  size: 32,
2150
- icon: /* @__PURE__ */ Y(e.trash, { size: 14 }),
2151
- onClick: () => T(t._key),
2152
- title: d("record.row.delete", "Delete row")
2173
+ icon: /* @__PURE__ */ Y(w.trash, { size: 14 }),
2174
+ onClick: () => y(e._key),
2175
+ title: c("record.row.delete", "Delete row")
2153
2176
  })]
2154
2177
  })]
2155
2178
  }), /* @__PURE__ */ Y("div", {
@@ -2159,299 +2182,299 @@ function Ot({ config: t, childEntity: n, schema: r, rows: i, onChange: o, valida
2159
2182
  flexDirection: "column",
2160
2183
  gap: 12
2161
2184
  },
2162
- children: m.map((e) => {
2163
- let i = n.fields.get(e), o = u?.includes(e), s = b.has(e), f = i ? a(d, i, e, r.entities) : e, p = `child-${t._key}-${e}`, m = `${p}-label`, h = {
2164
- outline: o ? "1px solid var(--danger)" : "none",
2185
+ children: d.map((r) => {
2186
+ let i = t.fields.get(r), a = l?.includes(r), u = h.has(r), d = i ? _(c, i, r, n.entities) : r, f = `child-${e._key}-${r}`, p = `${f}-label`, m = {
2187
+ outline: a ? "1px solid var(--danger)" : "none",
2165
2188
  outlineOffset: 3,
2166
- borderRadius: o ? 5 : 0
2167
- }, _ = {
2189
+ borderRadius: a ? 5 : 0
2190
+ }, v = {
2168
2191
  fontSize: 11.5,
2169
2192
  fontWeight: 600,
2170
2193
  color: "var(--text-3)"
2171
- }, v = !l && !s && !!i;
2194
+ }, y = !s && !u && !!i;
2172
2195
  return /* @__PURE__ */ X("div", {
2173
2196
  style: {
2174
2197
  display: "flex",
2175
2198
  flexDirection: "column",
2176
2199
  gap: 5,
2177
2200
  minWidth: 0,
2178
- textDecoration: l ? "line-through" : "none"
2201
+ textDecoration: s ? "line-through" : "none"
2179
2202
  },
2180
- title: o ? d("record.row.field_required", "{field} is required", { field: e }) : void 0,
2181
- children: [v ? /* @__PURE__ */ Y("label", {
2182
- id: m,
2183
- htmlFor: p,
2184
- style: _,
2185
- children: f
2203
+ title: a ? c("record.row.field_required", "{field} is required", { field: r }) : void 0,
2204
+ children: [y ? /* @__PURE__ */ Y("label", {
2205
+ id: p,
2206
+ htmlFor: f,
2207
+ style: v,
2208
+ children: d
2186
2209
  }) : /* @__PURE__ */ Y("div", {
2187
- id: m,
2188
- style: _,
2189
- children: f
2210
+ id: p,
2211
+ style: v,
2212
+ children: d
2190
2213
  }), /* @__PURE__ */ Y("div", {
2191
- style: h,
2192
- children: l || s ? i ? w({
2214
+ style: m,
2215
+ children: s || u ? i ? k({
2193
2216
  field: i,
2194
- fieldName: e,
2195
- value: t[e],
2217
+ fieldName: r,
2218
+ value: e[r],
2196
2219
  mode: "display",
2197
- record: t,
2198
- refs: c,
2199
- fieldId: p,
2200
- labelId: m,
2201
- t: d
2202
- }) : g(t[e]) : i ? w({
2220
+ record: e,
2221
+ refs: o,
2222
+ fieldId: f,
2223
+ labelId: p,
2224
+ t: c
2225
+ }) : b(e[r]) : i ? k({
2203
2226
  field: i,
2204
- fieldName: e,
2205
- value: t[e],
2227
+ fieldName: r,
2228
+ value: e[r],
2206
2229
  mode: "edit",
2207
- onChange: (n) => x(t._key, e, n),
2208
- record: t,
2209
- refs: c,
2230
+ onChange: (t) => g(e._key, r, t),
2231
+ record: e,
2232
+ refs: o,
2210
2233
  compact: !0,
2211
- fieldId: p,
2212
- labelId: m,
2213
- t: d
2214
- }) : g(t[e])
2234
+ fieldId: f,
2235
+ labelId: p,
2236
+ t: c
2237
+ }) : b(e[r])
2215
2238
  })]
2216
- }, e);
2239
+ }, r);
2217
2240
  })
2218
2241
  })]
2219
- }, t._key);
2242
+ }, e._key);
2220
2243
  })
2221
2244
  }), /* @__PURE__ */ Y("div", {
2222
2245
  style: { marginTop: 10 },
2223
- children: /* @__PURE__ */ Y(l, {
2246
+ children: /* @__PURE__ */ Y(E, {
2224
2247
  kind: "ghost",
2225
2248
  size: "sm",
2226
- icon: /* @__PURE__ */ Y(e.plus, { size: 14 }),
2227
- onClick: S,
2228
- children: d("record.row.add", "Add row")
2249
+ icon: /* @__PURE__ */ Y(w.plus, { size: 14 }),
2250
+ onClick: v,
2251
+ children: c("record.row.add", "Add row")
2229
2252
  })
2230
2253
  })] }) : /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("div", {
2231
2254
  style: { overflowX: "auto" },
2232
2255
  children: /* @__PURE__ */ X("table", {
2233
- ref: p,
2234
- style: pe,
2256
+ ref: u,
2257
+ style: le,
2235
2258
  onKeyDown: O,
2236
- children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [m.map((e) => {
2237
- let t = n.fields.get(e);
2259
+ children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [d.map((e) => {
2260
+ let r = t.fields.get(e);
2238
2261
  return /* @__PURE__ */ Y("th", {
2239
- style: k,
2240
- children: t ? a(d, t, e, r.entities) : e
2262
+ style: A,
2263
+ children: r ? _(c, r, e, n.entities) : e
2241
2264
  }, e);
2242
2265
  }), /* @__PURE__ */ Y("th", { style: {
2243
- ...k,
2266
+ ...A,
2244
2267
  width: 40
2245
- } })] }) }), /* @__PURE__ */ Y("tbody", { children: i.map((t) => {
2246
- let r = !!t._deleted, i = s?.[t._key];
2268
+ } })] }) }), /* @__PURE__ */ Y("tbody", { children: r.map((e) => {
2269
+ let n = !!e._deleted, r = a?.[e._key];
2247
2270
  return /* @__PURE__ */ X("tr", {
2248
- style: { opacity: r ? .5 : 1 },
2249
- children: [m.map((e) => {
2250
- let a = n.fields.get(e), o = i?.includes(e), s = b.has(e);
2251
- return r || s ? /* @__PURE__ */ Y("td", {
2271
+ style: { opacity: n ? .5 : 1 },
2272
+ children: [d.map((i) => {
2273
+ let a = t.fields.get(i), s = r?.includes(i), l = h.has(i);
2274
+ return n || l ? /* @__PURE__ */ Y("td", {
2252
2275
  style: {
2253
2276
  padding: "6px 12px",
2254
2277
  borderBottom: "1px solid var(--divider)",
2255
2278
  verticalAlign: "middle",
2256
- textDecoration: r ? "line-through" : "none",
2279
+ textDecoration: n ? "line-through" : "none",
2257
2280
  color: "var(--text-2)"
2258
2281
  },
2259
- children: a ? w({
2282
+ children: a ? k({
2260
2283
  field: a,
2261
- fieldName: e,
2262
- value: t[e],
2284
+ fieldName: i,
2285
+ value: e[i],
2263
2286
  mode: "display",
2264
- record: t,
2265
- refs: c,
2266
- t: d
2267
- }) : g(t[e])
2268
- }, e) : /* @__PURE__ */ Y("td", {
2287
+ record: e,
2288
+ refs: o,
2289
+ t: c
2290
+ }) : b(e[i])
2291
+ }, i) : /* @__PURE__ */ Y("td", {
2269
2292
  style: {
2270
2293
  padding: "4px 4px",
2271
2294
  borderBottom: "1px solid var(--divider)",
2272
2295
  verticalAlign: "middle",
2273
- outline: o ? "1px solid var(--danger)" : "none",
2296
+ outline: s ? "1px solid var(--danger)" : "none",
2274
2297
  outlineOffset: -1,
2275
- borderRadius: o ? 4 : 0
2298
+ borderRadius: s ? 4 : 0
2276
2299
  },
2277
- title: o ? d("record.row.field_required", "{field} is required", { field: e }) : void 0,
2278
- children: a ? w({
2300
+ title: s ? c("record.row.field_required", "{field} is required", { field: i }) : void 0,
2301
+ children: a ? k({
2279
2302
  field: a,
2280
- fieldName: e,
2281
- value: t[e],
2303
+ fieldName: i,
2304
+ value: e[i],
2282
2305
  mode: "edit",
2283
- onChange: (n) => x(t._key, e, n),
2284
- record: t,
2285
- refs: c,
2306
+ onChange: (t) => g(e._key, i, t),
2307
+ record: e,
2308
+ refs: o,
2286
2309
  compact: !0,
2287
- t: d
2288
- }) : g(t[e])
2289
- }, e);
2310
+ t: c
2311
+ }) : b(e[i])
2312
+ }, i);
2290
2313
  }), /* @__PURE__ */ Y("td", {
2291
2314
  style: {
2292
2315
  padding: "4px 8px",
2293
2316
  borderBottom: "1px solid var(--divider)",
2294
2317
  verticalAlign: "middle"
2295
2318
  },
2296
- children: r ? /* @__PURE__ */ Y(C, {
2319
+ children: n ? /* @__PURE__ */ Y(T, {
2297
2320
  size: 24,
2298
- icon: /* @__PURE__ */ Y(e.refresh, { size: 12 }),
2299
- onClick: () => E(t._key),
2300
- title: d("record.row.undo_delete", "Undo delete")
2301
- }) : /* @__PURE__ */ Y(C, {
2321
+ icon: /* @__PURE__ */ Y(w.refresh, { size: 12 }),
2322
+ onClick: () => C(e._key),
2323
+ title: c("record.row.undo_delete", "Undo delete")
2324
+ }) : /* @__PURE__ */ Y(T, {
2302
2325
  size: 24,
2303
- icon: /* @__PURE__ */ Y(e.trash, { size: 12 }),
2304
- onClick: () => T(t._key),
2305
- title: d("record.row.delete", "Delete row")
2326
+ icon: /* @__PURE__ */ Y(w.trash, { size: 12 }),
2327
+ onClick: () => y(e._key),
2328
+ title: c("record.row.delete", "Delete row")
2306
2329
  })
2307
2330
  })]
2308
- }, t._key);
2331
+ }, e._key);
2309
2332
  }) })]
2310
2333
  })
2311
2334
  }), /* @__PURE__ */ Y("div", {
2312
2335
  style: { marginTop: 8 },
2313
- children: /* @__PURE__ */ Y(l, {
2336
+ children: /* @__PURE__ */ Y(E, {
2314
2337
  kind: "ghost",
2315
2338
  size: "xs",
2316
- icon: /* @__PURE__ */ Y(e.plus, { size: 12 }),
2317
- onClick: S,
2318
- children: d("record.row.add", "Add row")
2339
+ icon: /* @__PURE__ */ Y(w.plus, { size: 12 }),
2340
+ onClick: v,
2341
+ children: c("record.row.add", "Add row")
2319
2342
  })
2320
2343
  })] });
2321
2344
  }
2322
2345
  //#endregion
2323
2346
  //#region src/components/detail-layout/ChildrenBlock.tsx
2324
- var kt = ge(() => import("./DraggableChildrenTable-DruYOxKm.js").then((e) => ({ default: e.DraggableChildrenTable })));
2325
- function At({ node: e, ctx: n }) {
2326
- let r = M(), i = M("errors"), a = y(), o = e.children;
2327
- if (!o) return null;
2328
- let s = a.isPhone && n.relatedRecordsPresentation === "table";
2329
- if (n.isNew && n.mode !== "edit") return null;
2330
- let c = Ke(n.entity, o);
2331
- if (!c) return /* @__PURE__ */ X("div", {
2347
+ var Mt = ve(() => import("./DraggableChildrenTable-Cy8uevS_.js").then((e) => ({ default: e.DraggableChildrenTable })));
2348
+ function Nt({ node: e, ctx: t }) {
2349
+ let n = x(), r = x("errors"), i = S(), a = e.children;
2350
+ if (!a) return null;
2351
+ let o = i.isPhone && t.relatedRecordsPresentation === "table";
2352
+ if (t.isNew && t.mode !== "edit") return null;
2353
+ let s = Ye(t.entity, a);
2354
+ if (!s) return /* @__PURE__ */ X("div", {
2332
2355
  className: "text-sm text-muted-foreground py-2",
2333
2356
  children: [
2334
- i("record.child_relation_unknown", "This record type has no child relation by that name."),
2357
+ r("record.child_relation_unknown", "This record type has no child relation by that name."),
2335
2358
  " ",
2336
- /* @__PURE__ */ Y("code", { children: o })
2359
+ /* @__PURE__ */ Y("code", { children: a })
2337
2360
  ]
2338
2361
  });
2339
- let l = n.schema.entities[c.entity];
2340
- if (!l) return /* @__PURE__ */ X("div", {
2362
+ let c = t.schema.entities[s.entity];
2363
+ if (!c) return /* @__PURE__ */ X("div", {
2341
2364
  className: "text-sm text-muted-foreground py-2",
2342
2365
  children: [
2343
- i("record.related_entity_not_found", "The related record type is not declared in this deployment."),
2366
+ r("record.related_entity_not_found", "The related record type is not declared in this deployment."),
2344
2367
  " ",
2345
- /* @__PURE__ */ Y("code", { children: c.entity })
2368
+ /* @__PURE__ */ Y("code", { children: s.entity })
2346
2369
  ]
2347
2370
  });
2348
- let u = Pe(c, l, e), d = Ae(e, n, r), f = je(e, n), p = (e) => u.mode === "timeline" || n.withinCard ? e : /* @__PURE__ */ Y(I, {
2349
- title: d,
2350
- icon: f ? /* @__PURE__ */ Y(t, {
2351
- name: f,
2371
+ let l = Le(s, c, e), u = Me(e, t, n), d = Ne(e, t), f = (e) => l.mode === "timeline" || t.withinCard ? e : /* @__PURE__ */ Y(P, {
2372
+ title: u,
2373
+ icon: d ? /* @__PURE__ */ Y(R, {
2374
+ name: d,
2352
2375
  size: 14
2353
2376
  }) : void 0,
2354
2377
  children: e
2355
2378
  });
2356
- if (n.mode === "edit" && u.editable && u.interaction !== "navigate" && u.interaction !== "readonly" && m(l, "update") && u.mode === "table" && n.pendingChildren !== void 0 && n.onChildrenChange) {
2357
- let e = n.pendingChildren[o] ?? [], t = n.childValidationErrors?.[o], r = u.position_field ? a.isPhone && !s ? Ot : kt : Ot;
2358
- return p(/* @__PURE__ */ Y(he, {
2359
- fallback: /* @__PURE__ */ Y(se, {}),
2379
+ if (t.mode === "edit" && l.editable && l.interaction !== "navigate" && l.interaction !== "readonly" && m(c, "update") && l.mode === "table" && t.pendingChildren !== void 0 && t.onChildrenChange) {
2380
+ let e = t.pendingChildren[a] ?? [], n = t.childValidationErrors?.[a], r = l.position_field ? i.isPhone && !o ? jt : Mt : jt;
2381
+ return f(/* @__PURE__ */ Y(_e, {
2382
+ fallback: /* @__PURE__ */ Y(U, {}),
2360
2383
  children: /* @__PURE__ */ Y(r, {
2361
- config: u,
2362
- childEntity: l,
2363
- schema: n.schema,
2384
+ config: l,
2385
+ childEntity: c,
2386
+ schema: t.schema,
2364
2387
  rows: e,
2365
- onChange: (e) => n.onChildrenChange(o, e),
2366
- validationErrors: t,
2367
- refs: n.refs,
2368
- forceTablePresentation: s
2388
+ onChange: (e) => t.onChildrenChange(a, e),
2389
+ validationErrors: n,
2390
+ refs: t.refs,
2391
+ forceTablePresentation: o
2369
2392
  })
2370
2393
  }));
2371
2394
  }
2372
- if (n.isNew) return null;
2373
- let h = {
2374
- config: u,
2375
- parentEntity: n.entityCode,
2376
- parentId: n.recordId,
2377
- schema: n.schema
2395
+ if (t.isNew) return null;
2396
+ let p = {
2397
+ config: l,
2398
+ parentEntity: t.entityCode,
2399
+ parentId: t.recordId,
2400
+ schema: t.schema
2378
2401
  };
2379
- switch (u.mode) {
2380
- case "list": return p(/* @__PURE__ */ Y(nt, { ...h }));
2381
- case "cards": return p(/* @__PURE__ */ Y(rt, { ...h }));
2382
- case "timeline": return p(/* @__PURE__ */ Y(bt, { ...h }));
2383
- default: return a.isPhone && !s ? p(/* @__PURE__ */ Y(rt, { ...h })) : p(/* @__PURE__ */ Y(tt, { ...h }));
2402
+ switch (l.mode) {
2403
+ case "list": return f(/* @__PURE__ */ Y(at, { ...p }));
2404
+ case "cards": return f(/* @__PURE__ */ Y(ot, { ...p }));
2405
+ case "timeline": return f(/* @__PURE__ */ Y(Ct, { ...p }));
2406
+ default: return i.isPhone && !o ? f(/* @__PURE__ */ Y(ot, { ...p })) : f(/* @__PURE__ */ Y(it, { ...p }));
2384
2407
  }
2385
2408
  }
2386
2409
  //#endregion
2387
2410
  //#region src/components/detail-layout/FieldsBlock.tsx
2388
- function jt({ fields: e, ctx: t }) {
2389
- let n = M(), { entity: r, entityCode: i, record: a, mode: o, onFieldChange: s, schema: c } = t, l = t.columns ?? 2, u = l === 1 && e.length === 1;
2390
- return /* @__PURE__ */ Y(U, {
2391
- columns: l,
2392
- children: e.map((e) => {
2393
- let l = e.code, d = `${i ?? "field"}-${l}`, f = `${d}-label`, m = r.fields.get(l), h = !!(m?.auto || m?.readonly || m?.source), _ = p(r, l), v = _?.read === "denied", y = _?.write === "denied", b = o === "display" ? v : y || v, x = h || o === "edit" && y ? "display" : o, S = b ? /* @__PURE__ */ Y(z, {
2411
+ function Pt({ fields: e, ctx: t }) {
2412
+ let n = x(), { entity: r, entityCode: i, record: a, mode: o, onFieldChange: c, schema: l } = t, u = t.columns ?? 2, d = t.hideEmptyFields && o === "display" ? e.filter((e) => ae(r, a, e.code)) : e, f = u === 1 && e.length === 1;
2413
+ return d.length === 0 ? null : /* @__PURE__ */ Y(me, {
2414
+ columns: u,
2415
+ children: d.map((e) => {
2416
+ let u = e.code, d = `${i ?? "field"}-${u}`, p = `${d}-label`, m = r.fields.get(u), g = !!(m?.auto || m?.readonly || m?.source), _ = h(r, u), v = _?.read === "denied", y = _?.write === "denied", b = o === "display" ? v : y || v, x = g || o === "edit" && y ? "display" : o, S = b ? /* @__PURE__ */ Y(F, {
2394
2417
  tier: _.classification,
2395
- tierDef: E(c, r, l),
2418
+ tierDef: s(l, r, u),
2396
2419
  requiredPermission: _?.required_permission,
2397
2420
  variant: x === "edit" ? "input" : "value"
2398
- }) : de({
2421
+ }) : se({
2399
2422
  entity: r,
2400
2423
  entityCode: i,
2401
- fieldName: l,
2424
+ fieldName: u,
2402
2425
  record: a,
2403
2426
  mode: x,
2404
- onChange: s && !h ? (e) => s(l, e) : void 0,
2427
+ onChange: c && !g ? (e) => c(u, e) : void 0,
2405
2428
  refs: t.refs,
2406
- entities: c?.entities,
2407
- screens: c?.screens,
2429
+ entities: l?.entities,
2430
+ screens: l?.screens,
2408
2431
  t: n,
2409
2432
  fieldId: d,
2410
- labelId: f,
2433
+ labelId: p,
2411
2434
  structure: e.structure,
2412
2435
  detailScreen: e.detail_screen
2413
2436
  });
2414
2437
  if (!S) return null;
2415
- let C = o === "display" && e.actions && e.actions.length > 0 ? /* @__PURE__ */ Y(J, { children: e.actions.map((e, t) => /* @__PURE__ */ Y(B, {
2416
- actionCode: `${l}.action[${t}]`,
2438
+ let C = o === "display" && e.actions && e.actions.length > 0 ? /* @__PURE__ */ Y(J, { children: e.actions.map((e, t) => /* @__PURE__ */ Y(de, {
2439
+ actionCode: `${u}.action[${t}]`,
2417
2440
  action: e,
2418
2441
  entityCode: i,
2419
2442
  row: a,
2420
2443
  variant: "ghost",
2421
2444
  size: "icon"
2422
- }, t)) }) : void 0, w = !!m && P.has(m.type), T = a?.[l], D = x === "display" && (m?.copyable || m?.type === "uuid") && T != null && T !== "" ? g(T) : void 0, O = n(m?.display?.description);
2423
- return u ? /* @__PURE__ */ X("div", {
2445
+ }, t)) }) : void 0, w = !!m && he.has(m.type), T = x === "display" ? pe(m, a?.[u]) : void 0, E = n(m?.display?.description);
2446
+ return f && (w || e.structure) ? /* @__PURE__ */ X("div", {
2424
2447
  style: { gridColumn: "1 / -1" },
2425
- children: [S, x === "edit" && O && /* @__PURE__ */ Y("div", {
2448
+ children: [S, x === "edit" && E && /* @__PURE__ */ Y("div", {
2426
2449
  style: {
2427
2450
  fontSize: 11.5,
2428
2451
  lineHeight: 1.4,
2429
2452
  color: "var(--text-3)",
2430
2453
  marginTop: 3
2431
2454
  },
2432
- children: O
2455
+ children: E
2433
2456
  })]
2434
- }, l) : /* @__PURE__ */ Y(R, {
2435
- "data-testid": `field-${l}`,
2436
- label: ue(n, r, l, c.entities),
2457
+ }, u) : /* @__PURE__ */ Y(ge, {
2458
+ "data-testid": `field-${u}`,
2459
+ label: oe(n, r, u, l.entities),
2437
2460
  htmlFor: x === "edit" ? d : void 0,
2438
- labelId: f,
2439
- labelTitle: O || void 0,
2461
+ labelId: p,
2462
+ labelTitle: E || void 0,
2440
2463
  required: m?.required ?? !1,
2441
2464
  mode: x,
2442
2465
  span: w,
2443
- error: t.fieldErrors?.[l],
2444
- hint: x === "edit" && O ? O : void 0,
2466
+ error: t.fieldErrors?.[u],
2467
+ hint: x === "edit" && E ? E : void 0,
2445
2468
  actions: C,
2446
- copyValue: D,
2469
+ copyValue: T,
2447
2470
  children: S
2448
- }, l);
2471
+ }, u);
2449
2472
  })
2450
2473
  });
2451
2474
  }
2452
2475
  //#endregion
2453
2476
  //#region src/components/detail-layout/PropertiesBlock.tsx
2454
- var Mt = /* @__PURE__ */ new Set([
2477
+ var Ft = /* @__PURE__ */ new Set([
2455
2478
  "string",
2456
2479
  "text",
2457
2480
  "int",
@@ -2459,16 +2482,16 @@ var Mt = /* @__PURE__ */ new Set([
2459
2482
  "decimal",
2460
2483
  "email",
2461
2484
  "url"
2462
- ]), Nt = 500;
2463
- function Pt({ node: e, ctx: t }) {
2485
+ ]), It = 500;
2486
+ function Lt({ node: e, ctx: t }) {
2464
2487
  let { entity: n, objectProperties: r, onSetProperty: i, isNew: a, mode: o, refs: s } = t, c = n.properties ?? {};
2465
2488
  if (a) return null;
2466
2489
  let l = e.properties === !0 || e.properties, u = l === !0 ? Object.entries(c).sort(([e], [t]) => e.localeCompare(t)) : l.filter((e) => c[e] != null).map((e) => [e, c[e]]);
2467
- return u.length === 0 ? null : /* @__PURE__ */ Y(U, {
2490
+ return u.length === 0 ? null : /* @__PURE__ */ Y(me, {
2468
2491
  columns: 2,
2469
2492
  children: u.map(([e, a]) => {
2470
- let c = r?.find((t) => t.property_code === e), l = f(a), u = a.readonly || !i ? "display" : o;
2471
- return /* @__PURE__ */ Y(Ft, {
2493
+ let c = r?.find((t) => t.property_code === e), l = p(a), u = a.readonly || !i ? "display" : o;
2494
+ return /* @__PURE__ */ Y(Rt, {
2472
2495
  propCode: e,
2473
2496
  prop: a,
2474
2497
  field: l,
@@ -2482,42 +2505,42 @@ function Pt({ node: e, ctx: t }) {
2482
2505
  })
2483
2506
  });
2484
2507
  }
2485
- function Ft({ propCode: e, prop: t, field: n, value: r, mode: i, onSetProperty: a, refs: o, entity: s, schema: c }) {
2486
- let l = M(), u = K(null);
2508
+ function Rt({ propCode: e, prop: t, field: n, value: r, mode: i, onSetProperty: a, refs: o, entity: c, schema: l }) {
2509
+ let u = x(), d = K(null);
2487
2510
  G(() => () => {
2488
- u.current && clearTimeout(u.current);
2511
+ d.current && clearTimeout(d.current);
2489
2512
  }, []);
2490
- let d = W((n) => {
2491
- a && (Mt.has(t.type) ? (u.current && clearTimeout(u.current), u.current = setTimeout(() => a(e, n), Nt)) : a(e, n));
2513
+ let f = W((n) => {
2514
+ a && (Ft.has(t.type) ? (d.current && clearTimeout(d.current), d.current = setTimeout(() => a(e, n), It)) : a(e, n));
2492
2515
  }, [
2493
2516
  e,
2494
2517
  t.type,
2495
2518
  a
2496
- ]), f = p(s, e), m = f?.read === "denied", h = f?.write === "denied", g = i === "display" ? m : h || m, _ = i === "edit" && h ? "display" : i;
2497
- return /* @__PURE__ */ Y(R, {
2498
- label: l(t.display?.name ?? t.name),
2499
- mode: _,
2500
- span: P.has(t.type),
2501
- children: g ? /* @__PURE__ */ Y(z, {
2502
- tier: f.classification,
2503
- tierDef: E(c, s, e),
2504
- requiredPermission: f?.required_permission,
2505
- variant: _ === "edit" ? "input" : "value"
2506
- }) : w({
2519
+ ]), p = h(c, e), m = p?.read === "denied", g = p?.write === "denied", _ = i === "display" ? m : g || m, v = i === "edit" && g ? "display" : i;
2520
+ return /* @__PURE__ */ Y(ge, {
2521
+ label: u(t.display?.name ?? t.name),
2522
+ mode: v,
2523
+ span: he.has(t.type),
2524
+ children: _ ? /* @__PURE__ */ Y(F, {
2525
+ tier: p.classification,
2526
+ tierDef: s(l, c, e),
2527
+ requiredPermission: p?.required_permission,
2528
+ variant: v === "edit" ? "input" : "value"
2529
+ }) : k({
2507
2530
  field: n,
2508
2531
  fieldName: e,
2509
2532
  value: r,
2510
- mode: _,
2511
- onChange: _ === "edit" ? d : void 0,
2533
+ mode: v,
2534
+ onChange: v === "edit" ? f : void 0,
2512
2535
  refs: o,
2513
- t: l
2536
+ t: u
2514
2537
  })
2515
2538
  });
2516
2539
  }
2517
2540
  //#endregion
2518
2541
  //#region src/components/shared/StatusStepper.tsx
2519
- function It({ stages: t, current: n, selectable: r, onSelect: i, compact: a = !1 }) {
2520
- let o = t.findIndex((e) => e.code === n);
2542
+ function zt({ stages: e, current: t, selectable: n, onSelect: r, compact: i = !1 }) {
2543
+ let a = e.findIndex((e) => e.code === t);
2521
2544
  return /* @__PURE__ */ Y("div", {
2522
2545
  role: "list",
2523
2546
  style: {
@@ -2528,30 +2551,30 @@ function It({ stages: t, current: n, selectable: r, onSelect: i, compact: a = !1
2528
2551
  border: "1px solid var(--border)",
2529
2552
  background: "var(--surface)"
2530
2553
  },
2531
- children: t.map((n, s) => {
2532
- let c = o >= 0 && s < o, l = s === o, u = o < 0 || s > o, d = !!i && (r?.has(n.code) ?? !1), f = s === 0, p = s === t.length - 1, m = l ? "var(--accent-soft)" : c ? "var(--success-soft)" : "transparent", h = l ? "var(--accent)" : c ? "var(--success)" : "var(--text-3)", g = f && p ? void 0 : f ? "polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%)" : p ? "polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%)" : "polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%)";
2554
+ children: e.map((t, o) => {
2555
+ let s = a >= 0 && o < a, c = o === a, l = a < 0 || o > a, u = !!r && (n?.has(t.code) ?? !1), d = o === 0, f = o === e.length - 1, p = c ? "var(--accent-soft)" : s ? "var(--success-soft)" : "transparent", m = c ? "var(--accent)" : s ? "var(--success)" : "var(--text-3)", h = d && f ? void 0 : d ? "polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%)" : f ? "polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%)" : "polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%)";
2533
2556
  return /* @__PURE__ */ X("button", {
2534
2557
  role: "listitem",
2535
2558
  type: "button",
2536
- disabled: !d,
2537
- onClick: d ? () => i(n.code) : void 0,
2538
- title: n.label,
2559
+ disabled: !u,
2560
+ onClick: u ? () => r(t.code) : void 0,
2561
+ title: t.label,
2539
2562
  style: {
2540
2563
  flex: 1,
2541
2564
  minWidth: 0,
2542
2565
  display: "flex",
2543
2566
  alignItems: "center",
2544
2567
  gap: 6,
2545
- padding: a ? `6px 8px 6px ${f ? 10 : 20}px` : `8px 10px 8px ${f ? 12 : 24}px`,
2568
+ padding: i ? `6px 8px 6px ${d ? 10 : 20}px` : `8px 10px 8px ${d ? 12 : 24}px`,
2546
2569
  border: 0,
2547
- borderLeft: s > 0 ? "1px solid var(--divider)" : "none",
2548
- background: m,
2549
- color: h,
2550
- fontSize: a ? 11.5 : 12.5,
2570
+ borderLeft: o > 0 ? "1px solid var(--divider)" : "none",
2571
+ background: p,
2572
+ color: m,
2573
+ fontSize: i ? 11.5 : 12.5,
2551
2574
  fontFamily: "inherit",
2552
- fontWeight: l ? 600 : 500,
2553
- cursor: d ? "pointer" : "default",
2554
- clipPath: g,
2575
+ fontWeight: c ? 600 : 500,
2576
+ cursor: u ? "pointer" : "default",
2577
+ clipPath: h,
2555
2578
  whiteSpace: "nowrap"
2556
2579
  },
2557
2580
  children: [/* @__PURE__ */ Y("span", {
@@ -2560,31 +2583,31 @@ function It({ stages: t, current: n, selectable: r, onSelect: i, compact: a = !1
2560
2583
  height: 16,
2561
2584
  borderRadius: 999,
2562
2585
  flexShrink: 0,
2563
- background: u ? "transparent" : h,
2564
- border: u ? "1px solid var(--border-strong)" : "none",
2565
- color: u ? "var(--text-4)" : l ? "var(--accent-soft)" : "var(--success-soft)",
2586
+ background: l ? "transparent" : m,
2587
+ border: l ? "1px solid var(--border-strong)" : "none",
2588
+ color: l ? "var(--text-4)" : c ? "var(--accent-soft)" : "var(--success-soft)",
2566
2589
  display: "flex",
2567
2590
  alignItems: "center",
2568
2591
  justifyContent: "center",
2569
2592
  fontSize: 9.5,
2570
2593
  fontWeight: 700
2571
2594
  },
2572
- children: c ? /* @__PURE__ */ Y(e.check, { size: 10 }) : s + 1
2595
+ children: s ? /* @__PURE__ */ Y(w.check, { size: 10 }) : o + 1
2573
2596
  }), /* @__PURE__ */ Y("span", {
2574
2597
  style: {
2575
2598
  overflow: "hidden",
2576
2599
  textOverflow: "ellipsis"
2577
2600
  },
2578
- children: n.label
2601
+ children: t.label
2579
2602
  })]
2580
- }, n.code);
2603
+ }, t.code);
2581
2604
  })
2582
2605
  });
2583
2606
  }
2584
2607
  //#endregion
2585
2608
  //#region src/components/shared/StatusGroupsDisplay.tsx
2586
- function Lt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r, mode: i = "edit" }) {
2587
- let a = M();
2609
+ function Bt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r, mode: i = "edit" }) {
2610
+ let a = x();
2588
2611
  return /* @__PURE__ */ Y("div", {
2589
2612
  style: {
2590
2613
  display: "flex",
@@ -2616,7 +2639,7 @@ function Lt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
2616
2639
  opacity: r ? .6 : 1,
2617
2640
  pointerEvents: r ? "none" : "auto"
2618
2641
  },
2619
- children: /* @__PURE__ */ Y(It, {
2642
+ children: /* @__PURE__ */ Y(zt, {
2620
2643
  stages: o.statuses.map((e) => ({
2621
2644
  code: e.code,
2622
2645
  label: a(e.name)
@@ -2641,7 +2664,7 @@ function Lt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
2641
2664
  color: "var(--text-3)"
2642
2665
  },
2643
2666
  children: [a(o.name), ":"]
2644
- }), c ? /* @__PURE__ */ Y(u, {
2667
+ }), c ? /* @__PURE__ */ Y(D, {
2645
2668
  tone: c.color ?? "slate",
2646
2669
  size: "xs",
2647
2670
  children: a(c.name)
@@ -2688,7 +2711,7 @@ function Lt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
2688
2711
  opacity: r ? .6 : 1,
2689
2712
  pointerEvents: r ? "none" : "auto"
2690
2713
  },
2691
- children: /* @__PURE__ */ Y(T, {
2714
+ children: /* @__PURE__ */ Y(j, {
2692
2715
  value: s ?? "",
2693
2716
  options: l,
2694
2717
  onChange: (t) => n(e, t)
@@ -2700,31 +2723,31 @@ function Lt({ statusGroups: e, objectStatuses: t, onSetStatus: n, isPending: r,
2700
2723
  }
2701
2724
  //#endregion
2702
2725
  //#region src/components/detail-layout/StatusesBlock.tsx
2703
- var Rt = () => {};
2704
- function zt({ node: e, ctx: t }) {
2726
+ var Vt = () => {};
2727
+ function Ht({ node: e, ctx: t }) {
2705
2728
  let { entity: n, objectStatuses: r, onSetStatus: i, isStatusPending: a, isNew: o } = t, s = n.status_groups ?? {};
2706
2729
  if (o) return null;
2707
2730
  let c = e.statuses === !0 || e.statuses, l = Object.fromEntries(Object.entries(s).filter(([e]) => c === !0 || c.includes(e)));
2708
- return Object.keys(l).length === 0 ? null : /* @__PURE__ */ Y(Lt, {
2731
+ return Object.keys(l).length === 0 ? null : /* @__PURE__ */ Y(Bt, {
2709
2732
  statusGroups: l,
2710
2733
  objectStatuses: r,
2711
- onSetStatus: i ?? Rt,
2734
+ onSetStatus: i ?? Vt,
2712
2735
  isPending: a ?? !1,
2713
2736
  mode: t.mode
2714
2737
  });
2715
2738
  }
2716
2739
  //#endregion
2717
2740
  //#region src/components/detail-layout/widgets/canonicalizeJson.ts
2718
- function Bt(e) {
2719
- if (Array.isArray(e)) return e.map(Bt);
2741
+ function Ut(e) {
2742
+ if (Array.isArray(e)) return e.map(Ut);
2720
2743
  if (typeof e == "object" && e) {
2721
2744
  let t = e, n = {};
2722
- for (let e of Object.keys(t).sort()) n[e] = Bt(t[e]);
2745
+ for (let e of Object.keys(t).sort()) n[e] = Ut(t[e]);
2723
2746
  return n;
2724
2747
  }
2725
2748
  return e;
2726
2749
  }
2727
- function Vt(e) {
2750
+ function Wt(e) {
2728
2751
  switch (typeof e) {
2729
2752
  case "string": return e;
2730
2753
  case "number":
@@ -2736,44 +2759,44 @@ function Vt(e) {
2736
2759
  default: return "";
2737
2760
  }
2738
2761
  }
2739
- function Ht(e) {
2762
+ function Gt(e) {
2740
2763
  if (e == null) return "";
2741
2764
  try {
2742
- return JSON.stringify(Bt(e), null, 2) ?? Vt(e);
2765
+ return JSON.stringify(Ut(e), null, 2) ?? Wt(e);
2743
2766
  } catch {
2744
- return Vt(e);
2767
+ return Wt(e);
2745
2768
  }
2746
2769
  }
2747
2770
  //#endregion
2748
2771
  //#region src/components/detail-layout/widgets/JsonDiffWidget.tsx
2749
- function Ut(e) {
2772
+ function Kt(e) {
2750
2773
  return e("record.diff.editor", "Audit change diff");
2751
2774
  }
2752
- var Wt = ge(() => import("./MonacoJson-BG3S3GHX.js").then((e) => ({ default: e.MonacoJsonDiff }))), Gt = ge(() => import("./MonacoJson-BG3S3GHX.js").then((e) => ({ default: e.MonacoJsonSource }))), Kt = ge(() => import("./JsonEditor-Dz1PQHC8.js").then((e) => ({ default: e.JsonEditor })));
2753
- function qt() {
2754
- let e = M();
2775
+ var qt = ve(() => import("./MonacoJson-BG3S3GHX.js").then((e) => ({ default: e.MonacoJsonDiff }))), Jt = ve(() => import("./MonacoJson-BG3S3GHX.js").then((e) => ({ default: e.MonacoJsonSource }))), Yt = ve(() => import("./JsonEditor-Dz1PQHC8.js").then((e) => ({ default: e.JsonEditor })));
2776
+ function Xt() {
2777
+ let e = x();
2755
2778
  return /* @__PURE__ */ Y("div", {
2756
2779
  className: "flex h-full w-full items-center justify-center text-sm text-muted-foreground",
2757
2780
  children: e("record.diff.loading_editor", "Loading editor…")
2758
2781
  });
2759
2782
  }
2760
- function Jt({ before: e, after: t }) {
2761
- let n = M();
2762
- return /* @__PURE__ */ Y(he, {
2763
- fallback: /* @__PURE__ */ Y(qt, {}),
2783
+ function Zt({ before: e, after: t }) {
2784
+ let n = x();
2785
+ return /* @__PURE__ */ Y(_e, {
2786
+ fallback: /* @__PURE__ */ Y(Xt, {}),
2764
2787
  children: /* @__PURE__ */ X("div", {
2765
2788
  className: "flex h-full w-full gap-2",
2766
2789
  role: "group",
2767
- "aria-label": Ut(n),
2790
+ "aria-label": Kt(n),
2768
2791
  children: [/* @__PURE__ */ Y("div", {
2769
2792
  className: "min-w-0 flex-1",
2770
- children: /* @__PURE__ */ Y(Kt, {
2793
+ children: /* @__PURE__ */ Y(Yt, {
2771
2794
  value: e,
2772
2795
  readOnly: !0
2773
2796
  })
2774
2797
  }), /* @__PURE__ */ Y("div", {
2775
2798
  className: "min-w-0 flex-1",
2776
- children: /* @__PURE__ */ Y(Kt, {
2799
+ children: /* @__PURE__ */ Y(Yt, {
2777
2800
  value: t,
2778
2801
  readOnly: !0
2779
2802
  })
@@ -2781,8 +2804,8 @@ function Jt({ before: e, after: t }) {
2781
2804
  })
2782
2805
  });
2783
2806
  }
2784
- function Yt({ mode: e, onChange: t }) {
2785
- let n = M();
2807
+ function Qt({ mode: e, onChange: t }) {
2808
+ let n = x();
2786
2809
  return /* @__PURE__ */ X("div", {
2787
2810
  className: "inline-flex gap-1",
2788
2811
  role: "group",
@@ -2802,13 +2825,13 @@ function Yt({ mode: e, onChange: t }) {
2802
2825
  })]
2803
2826
  });
2804
2827
  }
2805
- function Xt({ values: e, options: t }) {
2806
- let n = M(), r = e.before, i = e.after, a = t?.default_mode === "source" ? "source" : "diff", [o, s] = q(a), c = Ht(r), l = Ht(i);
2828
+ function $t({ values: e, options: t }) {
2829
+ let n = x(), r = e.before, i = e.after, a = t?.default_mode === "source" ? "source" : "diff", [o, s] = q(a), c = Gt(r), l = Gt(i);
2807
2830
  return /* @__PURE__ */ X("div", {
2808
2831
  className: "flex flex-col gap-2",
2809
2832
  children: [/* @__PURE__ */ X("div", {
2810
2833
  className: "flex items-center justify-between",
2811
- children: [/* @__PURE__ */ Y(Yt, {
2834
+ children: [/* @__PURE__ */ Y(Qt, {
2812
2835
  mode: o,
2813
2836
  onChange: s
2814
2837
  }), c === l && /* @__PURE__ */ Y("span", {
@@ -2819,25 +2842,25 @@ function Xt({ values: e, options: t }) {
2819
2842
  }), /* @__PURE__ */ Y("div", {
2820
2843
  className: "h-[480px] w-full overflow-hidden rounded border",
2821
2844
  role: "group",
2822
- "aria-label": Ut(n),
2823
- children: /* @__PURE__ */ Y(L, {
2824
- fallback: /* @__PURE__ */ Y(Jt, {
2845
+ "aria-label": Kt(n),
2846
+ children: /* @__PURE__ */ Y(I, {
2847
+ fallback: /* @__PURE__ */ Y(Zt, {
2825
2848
  before: r,
2826
2849
  after: i
2827
2850
  }),
2828
- children: /* @__PURE__ */ Y(he, {
2829
- fallback: /* @__PURE__ */ Y(qt, {}),
2830
- children: o === "diff" ? /* @__PURE__ */ Y(Wt, {
2851
+ children: /* @__PURE__ */ Y(_e, {
2852
+ fallback: /* @__PURE__ */ Y(Xt, {}),
2853
+ children: o === "diff" ? /* @__PURE__ */ Y(qt, {
2831
2854
  before: c,
2832
2855
  after: l
2833
2856
  }) : /* @__PURE__ */ X("div", {
2834
2857
  className: "flex h-full w-full gap-2",
2835
2858
  children: [/* @__PURE__ */ Y("div", {
2836
2859
  className: "min-w-0 flex-1",
2837
- children: /* @__PURE__ */ Y(Gt, { value: c })
2860
+ children: /* @__PURE__ */ Y(Jt, { value: c })
2838
2861
  }), /* @__PURE__ */ Y("div", {
2839
2862
  className: "min-w-0 flex-1",
2840
- children: /* @__PURE__ */ Y(Gt, { value: l })
2863
+ children: /* @__PURE__ */ Y(Jt, { value: l })
2841
2864
  })]
2842
2865
  })
2843
2866
  })
@@ -2856,7 +2879,7 @@ function $(e) {
2856
2879
  let n = Object.entries(t).filter((e) => typeof e[1] == "string");
2857
2880
  return n.length > 0 ? Object.fromEntries(n) : void 0;
2858
2881
  }
2859
- function Zt(e) {
2882
+ function en(e) {
2860
2883
  return Array.isArray(e) ? e.flatMap((e) => {
2861
2884
  let t = Q(e);
2862
2885
  return !t || typeof t.field != "string" ? [] : [{
@@ -2866,7 +2889,7 @@ function Zt(e) {
2866
2889
  }];
2867
2890
  }) : [];
2868
2891
  }
2869
- function Qt(e) {
2892
+ function tn(e) {
2870
2893
  if (!e || typeof e.entity != "string" || typeof e.scope_field != "string" || typeof e.window_field != "string") return;
2871
2894
  let t = Array.isArray(e.windows) ? e.windows.flatMap((e) => {
2872
2895
  let t = Q(e);
@@ -2901,7 +2924,7 @@ function Qt(e) {
2901
2924
  filter_label: $(r.filter_label),
2902
2925
  all_label: $(r.all_label),
2903
2926
  empty_label: $(r.empty_label),
2904
- columns: Zt(r.columns),
2927
+ columns: en(r.columns),
2905
2928
  sort: typeof r.sort == "string" ? r.sort : void 0,
2906
2929
  limit: typeof r.limit == "number" ? Math.min(500, Math.max(1, r.limit)) : 200
2907
2930
  } : void 0, a = Q(e.drillthrough), o = a && typeof a.route == "string" && typeof a.scope_field == "string" && typeof a.window_field == "string" ? {
@@ -2926,7 +2949,7 @@ function Qt(e) {
2926
2949
  drillthrough: o
2927
2950
  };
2928
2951
  }
2929
- function $t(e, t) {
2952
+ function nn(e, t) {
2930
2953
  let n = (e, n) => new Intl.NumberFormat(t, {
2931
2954
  style: "unit",
2932
2955
  unit: e,
@@ -2934,7 +2957,7 @@ function $t(e, t) {
2934
2957
  }).format(n);
2935
2958
  return e >= 86400 ? n("day", Math.floor(e / 86400)) : e >= 3600 ? n("hour", Math.floor(e / 3600)) : e >= 60 ? n("minute", Math.floor(e / 60)) : n("second", Math.max(0, Math.floor(e)));
2936
2959
  }
2937
- function en(e, t, n) {
2960
+ function rn(e, t, n) {
2938
2961
  let r = e("record.scorecard.not_available", "N/A"), i = e.language;
2939
2962
  if (t == null || t === "") return r;
2940
2963
  if (n === "number") return new Intl.NumberFormat(i).format(Number(t));
@@ -2944,7 +2967,7 @@ function en(e, t, n) {
2944
2967
  }).format(Number(t));
2945
2968
  if (n === "duration_seconds") {
2946
2969
  let e = Number(t);
2947
- return Number.isFinite(e) ? $t(e, i) : r;
2970
+ return Number.isFinite(e) ? nn(e, i) : r;
2948
2971
  }
2949
2972
  if (n === "timestamp") {
2950
2973
  if (typeof t != "string" && typeof t != "number" && !(t instanceof Date)) return r;
@@ -2953,55 +2976,55 @@ function en(e, t, n) {
2953
2976
  }
2954
2977
  return typeof t == "string" ? t : typeof t == "number" || typeof t == "bigint" || typeof t == "boolean" ? String(t) : r;
2955
2978
  }
2956
- function tn(e, t) {
2979
+ function an(e, t) {
2957
2980
  return typeof e.id == "string" || typeof e.id == "number" ? String(e.id) : `row-${t}`;
2958
2981
  }
2959
- function nn(e, t) {
2982
+ function on(e, t) {
2960
2983
  return !t || Object.entries(t).every(([t, n]) => e[t] === n);
2961
2984
  }
2962
- function rn({ values: e, options: t }) {
2963
- let n = M(), r = M("errors"), i = ye(() => Qt(t), [t]), a = ae(), o = e.scope, s = i?.windows.some((e) => e.code === i.default_window) ? i.default_window : i?.windows[0]?.code ?? "", [l, u] = q(s), [d, f] = q("");
2985
+ function sn({ values: e, options: t }) {
2986
+ let n = x(), i = x("errors"), a = xe(() => tn(t), [t]), o = B(), s = e.scope, c = a?.windows.some((e) => e.code === a.default_window) ? a.default_window : a?.windows[0]?.code ?? "", [l, u] = q(c), [d, f] = q("");
2964
2987
  G(() => {
2965
- u(s);
2966
- }, [s]), G(() => {
2988
+ u(c);
2989
+ }, [c]), G(() => {
2967
2990
  f("");
2968
2991
  }, [l]);
2969
- let p = i ? [{
2970
- field: i.scope_field,
2992
+ let p = a ? [{
2993
+ field: a.scope_field,
2971
2994
  op: "eq",
2972
- value: o
2995
+ value: s
2973
2996
  }, {
2974
- field: i.window_field,
2997
+ field: a.window_field,
2975
2998
  op: "eq",
2976
2999
  value: l
2977
- }] : [], m = c(i?.entity, {
3000
+ }] : [], m = g(a?.entity, {
2978
3001
  per_page: 1,
2979
3002
  filters: p
2980
- }, !!(i && o && l)), h = i?.breakdown, g = h ? [{
3003
+ }, !!(a && s && l)), h = a?.breakdown, _ = h ? [{
2981
3004
  field: h.scope_field,
2982
3005
  op: "eq",
2983
- value: o
3006
+ value: s
2984
3007
  }, {
2985
3008
  field: h.window_field,
2986
3009
  op: "eq",
2987
3010
  value: l
2988
- }] : [], _ = c(h?.entity, {
3011
+ }] : [], v = g(h?.entity, {
2989
3012
  per_page: h?.limit ?? 200,
2990
3013
  sort: h?.sort,
2991
- filters: g
2992
- }, !!(h && o && l));
2993
- if (!i || !o) return /* @__PURE__ */ Y("div", {
3014
+ filters: _
3015
+ }, !!(h && s && l));
3016
+ if (!a || !s) return /* @__PURE__ */ Y("div", {
2994
3017
  role: "alert",
2995
3018
  className: "rounded border border-destructive p-3 text-sm text-destructive",
2996
- children: r("record.scorecard_config_invalid", "Invalid entity_scorecard configuration.")
3019
+ children: i("record.scorecard_config_invalid", "Invalid entity_scorecard configuration.")
2997
3020
  });
2998
- let v = m.data?.data?.[0], y = _.data?.data ?? [], b = h?.filter_field ? Array.from(new Set(y.map((e) => e[h.filter_field]).filter((e) => typeof e == "string" && e !== ""))).sort() : [], x = d && h?.filter_field ? y.filter((e) => e[h.filter_field] === d) : y, S = (e) => !d || !e.filtered || !h?.filter_field ? v?.[e.field] : y.find((t) => t[h.filter_field] === d && nn(t, e.filtered?.where))?.[e.filtered.field], C = (e) => {
2999
- let t = i.drillthrough;
3021
+ let y = m.data?.data?.[0], b = v.data?.data ?? [], S = h?.filter_field ? Array.from(new Set(b.map((e) => e[h.filter_field]).filter((e) => typeof e == "string" && e !== ""))).sort() : [], C = d && h?.filter_field ? b.filter((e) => e[h.filter_field] === d) : b, w = (e) => !d || !e.filtered || !h?.filter_field ? y?.[e.field] : b.find((t) => t[h.filter_field] === d && on(t, e.filtered?.where))?.[e.filtered.field], T = (e) => {
3022
+ let t = a.drillthrough;
3000
3023
  if (!t || !e.drillthrough_value) return;
3001
3024
  let n = [{
3002
3025
  field: t.scope_field,
3003
3026
  op: "eq",
3004
- value: o
3027
+ value: s
3005
3028
  }, {
3006
3029
  field: t.window_field,
3007
3030
  op: "eq",
@@ -3015,28 +3038,28 @@ function rn({ values: e, options: t }) {
3015
3038
  field: t.metric_field,
3016
3039
  op: "eq",
3017
3040
  value: e.drillthrough_value
3018
- }), a(t.route, { search: new URLSearchParams({ filters: JSON.stringify(n) }).toString() });
3019
- }, w = m.error ?? _.error, T = n(h?.filter_label) || n("record.scorecard.filter", "Filter");
3041
+ }), o(t.route, { search: new URLSearchParams({ filters: JSON.stringify(n) }).toString() });
3042
+ }, E = m.error ?? v.error, D = n(h?.filter_label) || n("record.scorecard.filter", "Filter");
3020
3043
  return /* @__PURE__ */ X("div", {
3021
3044
  className: "flex min-w-0 flex-col gap-4",
3022
- "aria-label": n(i.title) || n("record.scorecard.title", "Scorecard"),
3045
+ "aria-label": n(a.title) || n("record.scorecard.title", "Scorecard"),
3023
3046
  children: [
3024
3047
  /* @__PURE__ */ X("div", {
3025
3048
  className: "flex flex-wrap items-start justify-between gap-3",
3026
3049
  children: [/* @__PURE__ */ X("div", {
3027
3050
  className: "min-w-0",
3028
3051
  children: [
3029
- i.title && /* @__PURE__ */ Y("h3", {
3052
+ a.title && /* @__PURE__ */ Y("h3", {
3030
3053
  className: "text-base font-semibold text-foreground",
3031
- children: n(i.title)
3054
+ children: n(a.title)
3032
3055
  }),
3033
- i.description && /* @__PURE__ */ Y("p", {
3056
+ a.description && /* @__PURE__ */ Y("p", {
3034
3057
  className: "mt-1 text-sm text-muted-foreground",
3035
- children: n(i.description)
3058
+ children: n(a.description)
3036
3059
  }),
3037
- i.intended_note && /* @__PURE__ */ Y("p", {
3060
+ a.intended_note && /* @__PURE__ */ Y("p", {
3038
3061
  className: "mt-1 text-xs text-muted-foreground",
3039
- children: n(i.intended_note)
3062
+ children: n(a.intended_note)
3040
3063
  })
3041
3064
  ]
3042
3065
  }), /* @__PURE__ */ X("div", {
@@ -3045,7 +3068,7 @@ function rn({ values: e, options: t }) {
3045
3068
  role: "group",
3046
3069
  "aria-label": n("record.scorecard.window", "Scorecard window"),
3047
3070
  className: "inline-flex rounded border border-border p-1",
3048
- children: i.windows.map((e) => /* @__PURE__ */ Y("button", {
3071
+ children: a.windows.map((e) => /* @__PURE__ */ Y("button", {
3049
3072
  type: "button",
3050
3073
  "aria-pressed": l === e.code,
3051
3074
  onClick: () => u(e.code),
@@ -3054,15 +3077,15 @@ function rn({ values: e, options: t }) {
3054
3077
  }, e.code))
3055
3078
  }), h?.filter_field && /* @__PURE__ */ X("label", {
3056
3079
  className: "flex items-center gap-2 text-xs text-muted-foreground",
3057
- children: [T, /* @__PURE__ */ X("select", {
3058
- "aria-label": T,
3080
+ children: [D, /* @__PURE__ */ X("select", {
3081
+ "aria-label": D,
3059
3082
  value: d,
3060
3083
  onChange: (e) => f(e.target.value),
3061
3084
  className: "rounded border border-border bg-background px-2 py-1.5 text-foreground",
3062
3085
  children: [/* @__PURE__ */ Y("option", {
3063
3086
  value: "",
3064
3087
  children: n(h.all_label) || n("record.scorecard.all", "All")
3065
- }), b.map((e) => /* @__PURE__ */ Y("option", {
3088
+ }), S.map((e) => /* @__PURE__ */ Y("option", {
3066
3089
  value: e,
3067
3090
  children: e
3068
3091
  }, e))]
@@ -3070,26 +3093,26 @@ function rn({ values: e, options: t }) {
3070
3093
  })]
3071
3094
  })]
3072
3095
  }),
3073
- w && /* @__PURE__ */ Y("div", {
3096
+ E && /* @__PURE__ */ Y("div", {
3074
3097
  role: "alert",
3075
3098
  className: "rounded border border-destructive p-3 text-sm text-destructive",
3076
- children: re(r, w)
3099
+ children: r(i, E)
3077
3100
  }),
3078
- !w && !m.isLoading && !v && /* @__PURE__ */ Y("div", {
3101
+ !E && !m.isLoading && !y && /* @__PURE__ */ Y("div", {
3079
3102
  className: "rounded border border-border p-6 text-center text-sm text-muted-foreground",
3080
- children: n(i.empty_label) || n("record.scorecard.empty", "No scorecard data.")
3103
+ children: n(a.empty_label) || n("record.scorecard.empty", "No scorecard data.")
3081
3104
  }),
3082
- v && /* @__PURE__ */ Y("div", {
3105
+ y && /* @__PURE__ */ Y("div", {
3083
3106
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
3084
- children: i.metrics.map((e) => {
3085
- let t = S(e), r = !!(i.drillthrough && e.drillthrough_value), a = /* @__PURE__ */ X(J, { children: [
3107
+ children: a.metrics.map((e) => {
3108
+ let t = w(e), r = !!(a.drillthrough && e.drillthrough_value), i = /* @__PURE__ */ X(J, { children: [
3086
3109
  /* @__PURE__ */ Y("span", {
3087
3110
  className: "text-xs font-medium text-muted-foreground",
3088
3111
  children: n(e.label) || e.field
3089
3112
  }),
3090
3113
  /* @__PURE__ */ Y("strong", {
3091
3114
  className: `mt-2 block text-2xl font-semibold ${e.attention && Number(t) > 0 ? "text-destructive" : "text-foreground"}`,
3092
- children: en(n, t, e.format)
3115
+ children: rn(n, t, e.format)
3093
3116
  }),
3094
3117
  e.help && /* @__PURE__ */ Y("span", {
3095
3118
  className: "mt-1 block text-xs text-muted-foreground",
@@ -3098,12 +3121,12 @@ function rn({ values: e, options: t }) {
3098
3121
  ] });
3099
3122
  return r ? /* @__PURE__ */ Y("button", {
3100
3123
  type: "button",
3101
- onClick: () => C(e),
3124
+ onClick: () => T(e),
3102
3125
  className: "rounded border border-border bg-card p-3 text-left hover:bg-surface",
3103
- children: a
3126
+ children: i
3104
3127
  }, e.field) : /* @__PURE__ */ Y("article", {
3105
3128
  className: "rounded border border-border bg-card p-3",
3106
- children: a
3129
+ children: i
3107
3130
  }, e.field);
3108
3131
  })
3109
3132
  }),
@@ -3117,13 +3140,13 @@ function rn({ values: e, options: t }) {
3117
3140
  className: "border-b border-divider px-3 py-2 font-medium",
3118
3141
  children: n(e.label) || e.field
3119
3142
  }, e.field)) })
3120
- }), /* @__PURE__ */ X("tbody", { children: [x.map((e, t) => /* @__PURE__ */ Y("tr", {
3143
+ }), /* @__PURE__ */ X("tbody", { children: [C.map((e, t) => /* @__PURE__ */ Y("tr", {
3121
3144
  className: "border-b border-divider last:border-0",
3122
3145
  children: h.columns.map((t) => /* @__PURE__ */ Y("td", {
3123
3146
  className: "px-3 py-2 text-foreground",
3124
- children: en(n, e[t.field], t.format)
3147
+ children: rn(n, e[t.field], t.format)
3125
3148
  }, t.field))
3126
- }, tn(e, t))), !_.isLoading && x.length === 0 && /* @__PURE__ */ Y("tr", { children: /* @__PURE__ */ Y("td", {
3149
+ }, an(e, t))), !v.isLoading && C.length === 0 && /* @__PURE__ */ Y("tr", { children: /* @__PURE__ */ Y("td", {
3127
3150
  colSpan: Math.max(1, h.columns.length),
3128
3151
  className: "px-3 py-6 text-center text-muted-foreground",
3129
3152
  children: n(h.empty_label) || n("record.scorecard.breakdown_empty", "No breakdown rows.")
@@ -3135,15 +3158,15 @@ function rn({ values: e, options: t }) {
3135
3158
  }
3136
3159
  //#endregion
3137
3160
  //#region src/components/detail-layout/widgets/builtins.ts
3138
- var an = !1;
3139
- function on() {
3140
- an ||= (V("json_diff", Xt), V("entity_scorecard", rn), !0);
3161
+ var cn = !1;
3162
+ function ln() {
3163
+ cn ||= (L("json_diff", $t), L("entity_scorecard", sn), !0);
3141
3164
  }
3142
3165
  //#endregion
3143
3166
  //#region src/components/detail-layout/widgets/WidgetHost.tsx
3144
- on();
3145
- function sn({ config: e, ctx: t }) {
3146
- let n = M("errors"), r = H(e.type);
3167
+ ln();
3168
+ function un({ config: e, ctx: t }) {
3169
+ let n = x("errors"), r = ee(e.type);
3147
3170
  if (!r) return /* @__PURE__ */ X("span", {
3148
3171
  className: "text-sm text-muted-foreground",
3149
3172
  children: [
@@ -3172,45 +3195,45 @@ function sn({ config: e, ctx: t }) {
3172
3195
  }
3173
3196
  //#endregion
3174
3197
  //#region src/components/detail-layout/LayoutRenderer.tsx
3175
- function cn({ nodes: e, ctx: t }) {
3176
- return /* @__PURE__ */ Y(J, { children: e.map((e, n) => /* @__PURE__ */ Y(ln, {
3198
+ function dn({ nodes: e, ctx: t }) {
3199
+ return /* @__PURE__ */ Y(J, { children: e.map((e, n) => /* @__PURE__ */ Y(fn, {
3177
3200
  node: e,
3178
3201
  ctx: t
3179
3202
  }, n)) });
3180
3203
  }
3181
- function ln({ node: e, ctx: t }) {
3182
- return e.row ? /* @__PURE__ */ Y(Te, {
3204
+ function fn({ node: e, ctx: t }) {
3205
+ return e.row ? /* @__PURE__ */ Y(De, {
3183
3206
  config: e.row,
3184
3207
  ctx: t
3185
- }) : e.column ? /* @__PURE__ */ Y(Oe, {
3208
+ }) : e.column ? /* @__PURE__ */ Y(Ae, {
3186
3209
  config: e.column,
3187
3210
  node: e,
3188
3211
  ctx: t
3189
- }) : e.tabs ? /* @__PURE__ */ Y(Me, {
3212
+ }) : e.tabs ? /* @__PURE__ */ Y(Pe, {
3190
3213
  config: e.tabs,
3191
3214
  ctx: t
3192
- }) : e.section ? /* @__PURE__ */ Y(Ne, {
3215
+ }) : e.section ? /* @__PURE__ */ Y(Fe, {
3193
3216
  config: e.section,
3194
3217
  ctx: t
3195
- }) : e.children ? /* @__PURE__ */ Y(At, {
3218
+ }) : e.children ? /* @__PURE__ */ Y(Nt, {
3196
3219
  node: e,
3197
3220
  ctx: t
3198
- }) : e.associated ? /* @__PURE__ */ Y(N, {
3221
+ }) : e.associated ? /* @__PURE__ */ Y(fe, {
3199
3222
  node: e,
3200
3223
  ctx: t
3201
- }) : e.fields ? /* @__PURE__ */ Y(jt, {
3224
+ }) : e.fields ? /* @__PURE__ */ Y(Pt, {
3202
3225
  fields: e.fields,
3203
3226
  ctx: t
3204
- }) : e.properties == null ? e.statuses == null ? e.widget ? /* @__PURE__ */ Y(sn, {
3227
+ }) : e.properties == null ? e.statuses == null ? e.widget ? /* @__PURE__ */ Y(un, {
3205
3228
  config: e.widget,
3206
3229
  ctx: t
3207
- }) : null : /* @__PURE__ */ Y(zt, {
3230
+ }) : null : /* @__PURE__ */ Y(Ht, {
3208
3231
  node: e,
3209
3232
  ctx: t
3210
- }) : /* @__PURE__ */ Y(Pt, {
3233
+ }) : /* @__PURE__ */ Y(Lt, {
3211
3234
  node: e,
3212
3235
  ctx: t
3213
3236
  });
3214
3237
  }
3215
3238
  //#endregion
3216
- export { Lt as n, cn as t };
3239
+ export { Bt as n, dn as t };