@declarion/react 0.141.0 → 0.146.0

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 (459) hide show
  1. package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
  2. package/dist-lib/api/access-expiry.js +1 -2
  3. package/dist-lib/api/agents.js +1 -2
  4. package/dist-lib/api/audience.js +1 -2
  5. package/dist-lib/api/auth-redirect.js +1 -2
  6. package/dist-lib/api/auth.js +1 -2
  7. package/dist-lib/api/batch.js +1 -2
  8. package/dist-lib/api/client.js +27 -28
  9. package/dist-lib/api/data.js +23 -24
  10. package/dist-lib/api/entities.js +36 -37
  11. package/dist-lib/api/events.js +6 -7
  12. package/dist-lib/api/fileReferences.js +1 -2
  13. package/dist-lib/api/params.js +1 -2
  14. package/dist-lib/api/properties.js +1 -2
  15. package/dist-lib/api/request-bounds.js +1 -2
  16. package/dist-lib/api/schema.js +5 -6
  17. package/dist-lib/api/session-renewal.js +6 -7
  18. package/dist-lib/api/status.js +1 -2
  19. package/dist-lib/app.js +154 -155
  20. package/dist-lib/components/actions/ActionButton.js +32 -33
  21. package/dist-lib/components/actions/ActionDialog.js +85 -86
  22. package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
  23. package/dist-lib/components/actions/ActionResultDialog.js +1 -2
  24. package/dist-lib/components/actions/ActionRunner.js +96 -97
  25. package/dist-lib/components/actions/ObjectActionBar.js +49 -50
  26. package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
  27. package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
  28. package/dist-lib/components/actions/RowActionsKebab.js +27 -28
  29. package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
  30. package/dist-lib/components/agents/AgentChatPanel.js +1 -2
  31. package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
  32. package/dist-lib/components/agents/AgentElicitForm.js +13 -14
  33. package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
  34. package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
  35. package/dist-lib/components/agents/AgentPicker.js +1 -2
  36. package/dist-lib/components/agents/ChatAttachments.js +22 -23
  37. package/dist-lib/components/agents/transcript-runs.js +1 -2
  38. package/dist-lib/components/chrome/AssociationTabs.js +44 -45
  39. package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
  40. package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
  41. package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
  42. package/dist-lib/components/chrome/PageHeader.js +12 -13
  43. package/dist-lib/components/chrome/PageShell.js +1 -2
  44. package/dist-lib/components/chrome/RecordHeader.js +1 -2
  45. package/dist-lib/components/chrome/headerActionZone.js +0 -1
  46. package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
  47. package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
  48. package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
  49. package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
  50. package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
  51. package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
  52. package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
  53. package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
  54. package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
  55. package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
  56. package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
  57. package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
  58. package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
  59. package/dist-lib/components/detail-layout/FieldRow.js +11 -12
  60. package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
  61. package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
  62. package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
  63. package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
  64. package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
  65. package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
  66. package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
  67. package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
  68. package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
  69. package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
  70. package/dist-lib/components/detail-layout/blockMeta.js +1 -2
  71. package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
  72. package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
  73. package/dist-lib/components/detail-layout/visibility.js +1 -2
  74. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
  75. package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
  76. package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
  77. package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
  78. package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
  79. package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
  80. package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
  81. package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
  82. package/dist-lib/components/fields/BoolField.js +1 -2
  83. package/dist-lib/components/fields/EmailField.js +5 -6
  84. package/dist-lib/components/fields/EnumField.js +7 -8
  85. package/dist-lib/components/fields/FileReferenceField.js +18 -19
  86. package/dist-lib/components/fields/IntArrayField.js +11 -12
  87. package/dist-lib/components/fields/JsonEditor.js +1 -2
  88. package/dist-lib/components/fields/JsonField.js +1 -2
  89. package/dist-lib/components/fields/MultilangArrayField.js +22 -23
  90. package/dist-lib/components/fields/MultilangField.js +13 -14
  91. package/dist-lib/components/fields/MultilangTextField.js +13 -14
  92. package/dist-lib/components/fields/NumberField.js +5 -6
  93. package/dist-lib/components/fields/PasswordField.js +1 -2
  94. package/dist-lib/components/fields/PhoneField.js +24 -25
  95. package/dist-lib/components/fields/RefCombobox.js +42 -43
  96. package/dist-lib/components/fields/RefField.js +14 -15
  97. package/dist-lib/components/fields/RichTextField.js +29 -30
  98. package/dist-lib/components/fields/SecretField.js +1 -2
  99. package/dist-lib/components/fields/StringArrayField.js +29 -30
  100. package/dist-lib/components/fields/StringField.js +12 -13
  101. package/dist-lib/components/fields/StructureField.js +60 -61
  102. package/dist-lib/components/fields/TextField.js +18 -19
  103. package/dist-lib/components/fields/TimestampField.js +17 -18
  104. package/dist-lib/components/fields/UrlField.js +5 -6
  105. package/dist-lib/components/fields/cells/factories/badge.js +5 -6
  106. package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
  107. package/dist-lib/components/fields/cells/factories/code.js +1 -2
  108. package/dist-lib/components/fields/cells/factories/date.js +1 -2
  109. package/dist-lib/components/fields/cells/factories/email.js +1 -2
  110. package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
  111. package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
  112. package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
  113. package/dist-lib/components/fields/cells/factories/json.js +1 -2
  114. package/dist-lib/components/fields/cells/factories/link.js +10 -11
  115. package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
  116. package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
  117. package/dist-lib/components/fields/cells/factories/money.js +1 -2
  118. package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
  119. package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
  120. package/dist-lib/components/fields/cells/factories/number.js +1 -2
  121. package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
  122. package/dist-lib/components/fields/cells/factories/phone.js +1 -2
  123. package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
  124. package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
  125. package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
  126. package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
  127. package/dist-lib/components/fields/cells/factories/text.js +1 -2
  128. package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
  129. package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
  130. package/dist-lib/components/fields/cells/factories/url.js +13 -14
  131. package/dist-lib/components/fields/cells/registry.js +1 -2
  132. package/dist-lib/components/fields/index.js +19 -20
  133. package/dist-lib/components/fields/langMap.js +1 -2
  134. package/dist-lib/components/fields/secretValue.js +1 -2
  135. package/dist-lib/components/file-widgets/CircleImage.js +1 -2
  136. package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
  137. package/dist-lib/components/file-widgets/FileList.js +35 -36
  138. package/dist-lib/components/file-widgets/Grid.js +119 -120
  139. package/dist-lib/components/file-widgets/GridLazy.js +1 -2
  140. package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
  141. package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
  142. package/dist-lib/components/file-widgets/SquareImage.js +1 -2
  143. package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
  144. package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
  145. package/dist-lib/components/file-widgets/WideBanner.js +1 -2
  146. package/dist-lib/components/file-widgets/builtins.js +1 -2
  147. package/dist-lib/components/file-widgets/cropper.js +1 -2
  148. package/dist-lib/components/file-widgets/draft-scope.js +1 -2
  149. package/dist-lib/components/file-widgets/helpers.js +1 -2
  150. package/dist-lib/components/file-widgets/host.js +33 -34
  151. package/dist-lib/components/file-widgets/payload.js +1 -2
  152. package/dist-lib/components/file-widgets/registry.js +1 -2
  153. package/dist-lib/components/file-widgets/upload.js +41 -42
  154. package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
  155. package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
  156. package/dist-lib/components/file-widgets/value.js +1 -2
  157. package/dist-lib/components/filters/FilterChips.js +15 -16
  158. package/dist-lib/components/filters/FilterConditionValue.js +15 -16
  159. package/dist-lib/components/filters/FilterDrawer.js +141 -142
  160. package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
  161. package/dist-lib/components/filters/filter-op-label.js +1 -2
  162. package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
  163. package/dist-lib/components/layout/CommandPalette.js +1 -2
  164. package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
  165. package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
  166. package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
  167. package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
  168. package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
  169. package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
  170. package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
  171. package/dist-lib/components/layout/Layout.js +132 -140
  172. package/dist-lib/components/layout/Rail.js +11 -12
  173. package/dist-lib/components/layout/Sidebar.js +60 -61
  174. package/dist-lib/components/layout/TabStrip.js +66 -67
  175. package/dist-lib/components/layout/TenantChip.js +21 -22
  176. package/dist-lib/components/layout/TopBar.js +89 -90
  177. package/dist-lib/components/layout/tab-close.js +1 -2
  178. package/dist-lib/components/list/ColumnPicker.js +35 -36
  179. package/dist-lib/components/list/InlineEditCell.js +22 -23
  180. package/dist-lib/components/list/PeekFieldCell.js +7 -8
  181. package/dist-lib/components/list/QuickPeek.js +29 -30
  182. package/dist-lib/components/list/ViewSwitcher.js +44 -45
  183. package/dist-lib/components/list/peekDraftStore.js +1 -2
  184. package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
  185. package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
  186. package/dist-lib/components/pages/DocumentsMenu.js +53 -54
  187. package/dist-lib/components/pages/ExportMenu.js +37 -38
  188. package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
  189. package/dist-lib/components/pages/NoScreensPage.js +1 -2
  190. package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
  191. package/dist-lib/components/pages/NotFoundPage.js +1 -2
  192. package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
  193. package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
  194. package/dist-lib/components/pages/RecordPanels.js +1 -2
  195. package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
  196. package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
  197. package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
  198. package/dist-lib/components/pages/SmartDetailPage.js +1 -2
  199. package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
  200. package/dist-lib/components/pages/SmartListPage.js +1 -2
  201. package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
  202. package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
  203. package/dist-lib/components/pages/auth/AuthShell.js +14 -15
  204. package/dist-lib/components/pages/auth/CodeInput.js +0 -1
  205. package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
  206. package/dist-lib/components/pages/auth/Forgot.js +1 -2
  207. package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
  208. package/dist-lib/components/pages/auth/Reset.js +1 -2
  209. package/dist-lib/components/pages/auth/SignIn.js +44 -45
  210. package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
  211. package/dist-lib/components/pages/auth/SignUp.js +1 -2
  212. package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
  213. package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
  214. package/dist-lib/components/pages/auth/TwoFA.js +1 -2
  215. package/dist-lib/components/pages/auth/icons.js +1 -2
  216. package/dist-lib/components/pages/exportRequest.js +1 -2
  217. package/dist-lib/components/pages/list/DataCell.js +1 -2
  218. package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
  219. package/dist-lib/components/pages/list/ListCardRow.js +53 -54
  220. package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
  221. package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
  222. package/dist-lib/components/pages/list/ListFooter.js +17 -18
  223. package/dist-lib/components/pages/list/ListHeader.js +31 -32
  224. package/dist-lib/components/pages/list/ListNoRows.js +32 -33
  225. package/dist-lib/components/pages/list/ListTable.js +29 -30
  226. package/dist-lib/components/pages/list/ListTableRow.js +1 -2
  227. package/dist-lib/components/pages/list/ListToolbar.js +58 -59
  228. package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
  229. package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
  230. package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
  231. package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
  232. package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
  233. package/dist-lib/components/pages/list/cardProjection.js +16 -17
  234. package/dist-lib/components/pages/list/column-sizing.js +1 -2
  235. package/dist-lib/components/pages/list/columns.js +74 -75
  236. package/dist-lib/components/pages/list/filter-meta.js +1 -2
  237. package/dist-lib/components/pages/list/page-size.js +1 -2
  238. package/dist-lib/components/pages/list/sortable-header.js +1 -2
  239. package/dist-lib/components/pages/list/table-features.js +1 -2
  240. package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
  241. package/dist-lib/components/pages/list/useActiveView.js +1 -2
  242. package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
  243. package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
  244. package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
  245. package/dist-lib/components/pages/list/useListQuery.js +1 -2
  246. package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
  247. package/dist-lib/components/pages/list/useListSelection.js +16 -17
  248. package/dist-lib/components/pages/list/useListSort.js +1 -2
  249. package/dist-lib/components/pages/list/useListViews.js +31 -32
  250. package/dist-lib/components/pages/list/useRowMenu.js +20 -21
  251. package/dist-lib/components/pages/list/visible-filters.js +1 -2
  252. package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
  253. package/dist-lib/components/pages/profile/Preferences.js +1 -2
  254. package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
  255. package/dist-lib/components/pages/profile/Profile.js +1 -2
  256. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
  257. package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
  258. package/dist-lib/components/params/ParamsBlock.js +30 -31
  259. package/dist-lib/components/params/param-editors.js +58 -59
  260. package/dist-lib/components/primitives/Avatar.js +1 -2
  261. package/dist-lib/components/primitives/BoolToggle.js +1 -2
  262. package/dist-lib/components/primitives/BrandGlyph.js +1 -2
  263. package/dist-lib/components/primitives/BrandLogo.js +1 -2
  264. package/dist-lib/components/primitives/Btn.js +1 -2
  265. package/dist-lib/components/primitives/Check.js +1 -2
  266. package/dist-lib/components/primitives/Chip.js +1 -2
  267. package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
  268. package/dist-lib/components/primitives/Dropdown.js +2 -3
  269. package/dist-lib/components/primitives/Fields.js +128 -129
  270. package/dist-lib/components/primitives/HoverCard.js +2 -3
  271. package/dist-lib/components/primitives/IconBtn.js +1 -2
  272. package/dist-lib/components/primitives/Icons.js +1 -2
  273. package/dist-lib/components/primitives/Kbd.js +1 -2
  274. package/dist-lib/components/primitives/MenuItem.js +1 -2
  275. package/dist-lib/components/primitives/Pill.js +1 -2
  276. package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
  277. package/dist-lib/components/primitives/RetryButton.js +5 -6
  278. package/dist-lib/components/primitives/RowField.js +1 -2
  279. package/dist-lib/components/primitives/SectionCard.js +1 -2
  280. package/dist-lib/components/primitives/Spinner.js +1 -2
  281. package/dist-lib/components/primitives/StatTile.js +1 -2
  282. package/dist-lib/components/primitives/Tooltip.js +1 -2
  283. package/dist-lib/components/primitives/dataTableStyles.js +1 -2
  284. package/dist-lib/components/shared/BlankScreen.js +1 -2
  285. package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
  286. package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
  287. package/dist-lib/components/shared/ConfirmDialog.js +7 -8
  288. package/dist-lib/components/shared/ConnectionNotice.js +1 -2
  289. package/dist-lib/components/shared/CopyButton.js +1 -2
  290. package/dist-lib/components/shared/DynamicIcon.js +1 -2
  291. package/dist-lib/components/shared/EmptyState.js +1 -2
  292. package/dist-lib/components/shared/ErrorBoundary.js +10 -11
  293. package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
  294. package/dist-lib/components/shared/LucideIcon.js +1 -2
  295. package/dist-lib/components/shared/Markdown.js +1 -2
  296. package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
  297. package/dist-lib/components/shared/ModalFrame.js +1 -2
  298. package/dist-lib/components/shared/RefreshControl.js +6 -7
  299. package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
  300. package/dist-lib/components/shared/StatusStepper.js +1 -2
  301. package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
  302. package/dist-lib/components/shared/useOwnRefresh.js +1 -2
  303. package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
  304. package/dist-lib/embed/EmbedContext.js +1 -2
  305. package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
  306. package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
  307. package/dist-lib/embed/EmbedLocationReporter.js +11 -12
  308. package/dist-lib/embed/EmbedResizeReporter.js +9 -10
  309. package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
  310. package/dist-lib/embed/embed-dirty.js +1 -2
  311. package/dist-lib/embed/embed-history.js +1 -2
  312. package/dist-lib/embed/embed-nav-guard.js +1 -2
  313. package/dist-lib/embed/file-src.js +12 -13
  314. package/dist-lib/embed/handshake.js +1 -2
  315. package/dist-lib/embed/params.js +1 -2
  316. package/dist-lib/embed/protocol.js +1 -2
  317. package/dist-lib/embed/screen-location.js +1 -2
  318. package/dist-lib/embed/theme.js +1 -2
  319. package/dist-lib/embed/token.js +1 -2
  320. package/dist-lib/embed/useEmbedNavigate.js +25 -26
  321. package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
  322. package/dist-lib/hooks/useActionData.js +1 -2
  323. package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
  324. package/dist-lib/hooks/useAgentConversation.js +122 -123
  325. package/dist-lib/hooks/useAggregate.js +1 -2
  326. package/dist-lib/hooks/useAllEntityData.js +9 -10
  327. package/dist-lib/hooks/useAssociatedData.js +1 -2
  328. package/dist-lib/hooks/useAuth.js +26 -27
  329. package/dist-lib/hooks/useBranding.js +1 -2
  330. package/dist-lib/hooks/useBrandingChrome.js +16 -17
  331. package/dist-lib/hooks/useChildrenData.js +4 -5
  332. package/dist-lib/hooks/useColumns.js +1 -2
  333. package/dist-lib/hooks/useConnectionNotice.js +16 -17
  334. package/dist-lib/hooks/useCurrentLocation.js +1 -2
  335. package/dist-lib/hooks/useCurrentScreen.js +1 -2
  336. package/dist-lib/hooks/useCursorEntityData.js +1 -2
  337. package/dist-lib/hooks/useDebounce.js +1 -2
  338. package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
  339. package/dist-lib/hooks/useDocumentTitle.js +5 -6
  340. package/dist-lib/hooks/useEntity.js +1 -2
  341. package/dist-lib/hooks/useEntityData.js +1 -2
  342. package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
  343. package/dist-lib/hooks/useFilters.js +5 -6
  344. package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
  345. package/dist-lib/hooks/useImpersonation.js +15 -16
  346. package/dist-lib/hooks/useIntentPrefetch.js +6 -7
  347. package/dist-lib/hooks/useJsonSnapshot.js +1 -2
  348. package/dist-lib/hooks/useLanguage.js +11 -12
  349. package/dist-lib/hooks/useLiveObject.js +6 -7
  350. package/dist-lib/hooks/useLongPress.js +1 -2
  351. package/dist-lib/hooks/useMutations.js +31 -32
  352. package/dist-lib/hooks/useObject.js +1 -2
  353. package/dist-lib/hooks/useObjectStatus.js +4 -5
  354. package/dist-lib/hooks/usePageState.js +9 -10
  355. package/dist-lib/hooks/usePageStateRuntime.js +16 -17
  356. package/dist-lib/hooks/usePageStateTtl.js +1 -2
  357. package/dist-lib/hooks/useParams.js +58 -59
  358. package/dist-lib/hooks/useProperties.js +5 -6
  359. package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
  360. package/dist-lib/hooks/useRefRecords.js +31 -32
  361. package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
  362. package/dist-lib/hooks/useResponsiveMode.js +1 -2
  363. package/dist-lib/hooks/useRowTenant.js +1 -2
  364. package/dist-lib/hooks/useSSE.js +100 -101
  365. package/dist-lib/hooks/useSchema.js +16 -17
  366. package/dist-lib/hooks/useScreen.js +1 -2
  367. package/dist-lib/hooks/useScreenBack.js +17 -18
  368. package/dist-lib/hooks/useScreenTab.js +1 -2
  369. package/dist-lib/hooks/useTabNavigate.js +25 -26
  370. package/dist-lib/hooks/useTabSearchMirror.js +6 -7
  371. package/dist-lib/hooks/useTabTitle.js +10 -11
  372. package/dist-lib/hooks/useText.js +6 -7
  373. package/dist-lib/hooks/useTimelineData.js +5 -6
  374. package/dist-lib/hooks/useUiPreferences.js +31 -32
  375. package/dist-lib/hooks/useUnsavedInput.js +1 -2
  376. package/dist-lib/hooks/useVersionWatcher.js +16 -17
  377. package/dist-lib/hooks/useViews.js +16 -17
  378. package/dist-lib/hooks/useWindowConversation.js +1 -2
  379. package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
  380. package/dist-lib/icons.d.ts +2 -4
  381. package/dist-lib/icons.js +5 -5
  382. package/dist-lib/index.d.ts +4 -272
  383. package/dist-lib/index.js +129 -129
  384. package/dist-lib/lib/action-dispatch.js +1 -2
  385. package/dist-lib/lib/actions.js +26 -27
  386. package/dist-lib/lib/anchor.js +1 -2
  387. package/dist-lib/lib/brand-tokens.js +1 -2
  388. package/dist-lib/lib/branding.js +1 -2
  389. package/dist-lib/lib/canonical-url.js +1 -2
  390. package/dist-lib/lib/capabilityPrefetch.js +1 -2
  391. package/dist-lib/lib/child-config.js +1 -2
  392. package/dist-lib/lib/children-validation.js +2 -3
  393. package/dist-lib/lib/date-text.js +1 -2
  394. package/dist-lib/lib/decimal-text.js +1 -2
  395. package/dist-lib/lib/display-value.js +1 -2
  396. package/dist-lib/lib/document-templates.js +1 -2
  397. package/dist-lib/lib/download.js +13 -14
  398. package/dist-lib/lib/evidence-verdict.js +1 -2
  399. package/dist-lib/lib/failure.js +4 -5
  400. package/dist-lib/lib/field-classification.js +1 -2
  401. package/dist-lib/lib/field-regions.js +1 -2
  402. package/dist-lib/lib/filter-evaluator.js +1 -2
  403. package/dist-lib/lib/filters.js +1 -2
  404. package/dist-lib/lib/format-count.js +1 -2
  405. package/dist-lib/lib/html-state.js +1 -2
  406. package/dist-lib/lib/language.js +1 -2
  407. package/dist-lib/lib/longPressGesture.js +0 -1
  408. package/dist-lib/lib/mass-edit.js +1 -2
  409. package/dist-lib/lib/money-text.js +1 -2
  410. package/dist-lib/lib/number-text.js +1 -2
  411. package/dist-lib/lib/page-inset.js +1 -2
  412. package/dist-lib/lib/phone.js +1 -2
  413. package/dist-lib/lib/profile.js +1 -2
  414. package/dist-lib/lib/query-retry.js +1 -2
  415. package/dist-lib/lib/quick-add.js +1 -2
  416. package/dist-lib/lib/read-display-state.js +1 -2
  417. package/dist-lib/lib/realtime-query-keys.js +2 -3
  418. package/dist-lib/lib/realtime-reconcile.js +32 -33
  419. package/dist-lib/lib/realtime-resync.js +40 -41
  420. package/dist-lib/lib/record-documents-key.js +1 -2
  421. package/dist-lib/lib/ref-choices.js +1 -2
  422. package/dist-lib/lib/refetch-when-idle.js +1 -2
  423. package/dist-lib/lib/rich-text.js +1 -2
  424. package/dist-lib/lib/role-label.js +1 -2
  425. package/dist-lib/lib/rowClickGesture.js +1 -2
  426. package/dist-lib/lib/safe-url.js +1 -2
  427. package/dist-lib/lib/schema-routing.js +1 -2
  428. package/dist-lib/lib/screen-back.js +1 -2
  429. package/dist-lib/lib/scroll-restoration.js +21 -22
  430. package/dist-lib/lib/shortcut.js +1 -2
  431. package/dist-lib/lib/size-value.js +1 -2
  432. package/dist-lib/lib/sort.js +1 -2
  433. package/dist-lib/lib/timestamp.js +1 -2
  434. package/dist-lib/lib/toast.js +1 -2
  435. package/dist-lib/lib/ui-actions.js +43 -44
  436. package/dist-lib/lib/utils.js +1 -2
  437. package/dist-lib/lib/variants.js +1 -2
  438. package/dist-lib/lib/versionTracker.js +26 -27
  439. package/dist-lib/lib/viewport-category.js +1 -2
  440. package/dist-lib/lib/window-election.js +1 -2
  441. package/dist-lib/stores/auth.js +32 -33
  442. package/dist-lib/stores/icon-registry.js +1 -2
  443. package/dist-lib/stores/list-layout.js +0 -1
  444. package/dist-lib/stores/page-state.js +1 -2
  445. package/dist-lib/stores/preferences.js +1 -2
  446. package/dist-lib/stores/realtime.js +1 -2
  447. package/dist-lib/stores/screen-registry.js +1 -2
  448. package/dist-lib/stores/tabs.js +1 -2
  449. package/dist-lib/test/seed-schema.js +4 -5
  450. package/dist-lib/testing.d.ts +2 -4
  451. package/dist-lib/testing.js +49 -50
  452. package/dist-lib/types/api.js +1 -2
  453. package/dist-lib/types/fieldType.js +1 -2
  454. package/dist-lib/types/ordmap.js +1 -2
  455. package/dist-lib/types/schema.js +1 -2
  456. package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
  457. package/dist-lib/vite/index.d.ts +0 -2
  458. package/dist-lib/vite/index.js +1 -2
  459. package/package.json +11 -11
@@ -1,87 +1,87 @@
1
- import { ApiError as e } from "../../types/api.js";
2
- import { coerceDisplayString as t } from "../../lib/display-value.js";
3
- import { formatOffsetTimestamp as n, formatWireDateTime as r } from "../../lib/timestamp.js";
4
- import { entityAllowsCreateRoute as i, entityAllowsMutation as a, extractPkValues as o, fieldDisplayName as s, getDisplayValue as c, getPrimaryKeyFields as l, isUserEditableField as u, pkValuesFromId as d, pkValuesToId as f, resolveRefRecordLabel as p, rowAllowsMutation as m, rowSetInTenant as ee } from "../../types/schema.js";
5
- import { useEmbed as te } from "../../embed/EmbedContext.js";
6
- import { useFirstScreenSettled as ne } from "../../lib/capabilityPrefetch.js";
7
- import { useAuthStore as re } from "../../stores/auth.js";
8
- import { useSchema as ie } from "../../hooks/useSchema.js";
9
- import { buildActionBody as ae, executeAction as oe } from "../../api/data.js";
10
- import { failureTitle as se } from "../../lib/failure.js";
11
- import { Icon as h } from "../primitives/Icons.js";
12
- import { Btn as g } from "../primitives/Btn.js";
13
- import { IconBtn as ce } from "../primitives/IconBtn.js";
14
- import { useText as le } from "../../hooks/useText.js";
15
- import { RetryButton as ue } from "../primitives/RetryButton.js";
16
- import { useResponsiveMode as de } from "../../hooks/useResponsiveMode.js";
17
- import { Spinner as fe } from "../primitives/Spinner.js";
18
- import { readDisplayState as pe } from "../../lib/read-display-state.js";
19
- import { DynamicIcon as me } from "../shared/DynamicIcon.js";
20
- import { useTabStore as he } from "../../stores/tabs.js";
21
- import { useReportEmbedDirty as ge } from "../../embed/embed-dirty.js";
22
- import { useEmbedNavigate as _e } from "../../embed/useEmbedNavigate.js";
23
- import { useTabNavigate as _ } from "../../hooks/useTabNavigate.js";
24
- import { usePageStateStore as ve } from "../../stores/page-state.js";
25
- import { applyRowState as ye, resolveActionLayoutForSlot as v } from "../../lib/actions.js";
26
- import { useScreenIsLive as y } from "../../stores/realtime.js";
27
- import { useActionRunner as be } from "../actions/ActionRunner.js";
28
- import { canonicalUrl as xe } from "../../lib/canonical-url.js";
29
- import { useRegisterRetainedQuery as Se } from "../../hooks/usePageStateRuntime.js";
30
- import { useBrandingChrome as b } from "../../hooks/useBrandingChrome.js";
31
- import { objectQueryKey as Ce, useObject as we } from "../../hooks/useObject.js";
32
- import { discardFile as Te } from "../file-widgets/upload.js";
33
- import { FileDraftScope as x, useFileDraftScope as Ee } from "../file-widgets/draft-scope.js";
34
- import { getEntityFileField as De, getSchemaFieldValue as Oe, serializeSchemaFieldValue as S } from "../file-widgets/host.js";
35
- import { buildFilesPayload as ke, collectCommittedFileIds as Ae } from "../file-widgets/payload.js";
36
- import { useCreateObject as je, useRestoreEntity as Me, useUpdateObject as Ne } from "../../hooks/useMutations.js";
37
- import { useScreenBack as Pe } from "../../hooks/useScreenBack.js";
38
- import { usePlainScrollRestoration as Fe } from "../../lib/scroll-restoration.js";
39
- import { DetailSkeleton as Ie } from "../shared/LoadingSkeleton.js";
40
- import { dispatchAction as C } from "../../lib/action-dispatch.js";
41
- import { ResponsiveActionBar as Le } from "../actions/ResponsiveActionBar.js";
42
- import { useRowTenant as Re } from "../../hooks/useRowTenant.js";
43
- import { effectiveScreenForRecord as ze, variantActionCodesForRecord as Be } from "../../lib/variants.js";
44
- import { RefreshControl as w } from "../shared/RefreshControl.js";
45
- import { useUnsavedInput as Ve } from "../../hooks/useUnsavedInput.js";
46
- import { AssociationTabs as He } from "../chrome/AssociationTabs.js";
47
- import { DocumentsMenu as T } from "./DocumentsMenu.js";
48
- import { canManageDocumentTemplates as Ue } from "../../lib/document-templates.js";
49
- import { RecordPanels as We } from "./RecordPanels.js";
50
- import { showsOnNewRecord as Ge } from "../../lib/child-config.js";
51
- import { StatusGroupsDisplay as Ke } from "../shared/StatusGroupsDisplay.js";
52
- import { LayoutRenderer as qe } from "../detail-layout/LayoutRenderer.js";
53
- import { ErrorSummary as Je } from "../detail-layout/ErrorSummary.js";
54
- import { DetailHighlights as Ye, highlightedFieldCodes as Xe } from "../detail-layout/DetailHighlights.js";
55
- import { DetailAuditStrip as Ze } from "../detail-layout/DetailAuditStrip.js";
56
- import { EvidenceBlock as Qe } from "../detail-layout/EvidenceBlock.js";
57
- import { RecordHeader as E } from "../chrome/RecordHeader.js";
58
- import { PageShell as $e } from "../chrome/PageShell.js";
59
- import { findInvalidEmailFields as et, findMissingRequiredFields as tt, validatePendingChildren as nt } from "../../lib/children-validation.js";
60
- import { takePeekDraft as rt } from "../list/peekDraftStore.js";
61
- import { resolveCard as it } from "./list/cardProjection.js";
62
- import { useCallback as D, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
63
- import { Fragment as at, jsx as M, jsxs as N } from "react/jsx-runtime";
64
- import { useLocation as ot, useParams as st, useSearchParams as ct } from "react-router";
65
- //#region src/components/pages/SmartDetailPage.impl.tsx
66
- var lt = () => {}, ut = { expand: ["evidence"] };
67
- function P(e, t) {
1
+ import { useFirstScreenSettled as e } from "../../lib/capabilityPrefetch.js";
2
+ import { formatOffsetTimestamp as t, formatWireDateTime as n } from "../../lib/timestamp.js";
3
+ import { Btn as r } from "../primitives/Btn.js";
4
+ import { Icon as i } from "../primitives/Icons.js";
5
+ import { IconBtn as a } from "../primitives/IconBtn.js";
6
+ import { Spinner as o } from "../primitives/Spinner.js";
7
+ import { RetryButton as s } from "../primitives/RetryButton.js";
8
+ import { readDisplayState as c } from "../../lib/read-display-state.js";
9
+ import { failureTitle as l } from "../../lib/failure.js";
10
+ import { useSchema as u } from "../../hooks/useSchema.js";
11
+ import { useAuthStore as ee } from "../../stores/auth.js";
12
+ import { objectQueryKey as d, useObject as f } from "../../hooks/useObject.js";
13
+ import { useRegisterRetainedQuery as p } from "../../hooks/usePageStateRuntime.js";
14
+ import { usePlainScrollRestoration as te } from "../../lib/scroll-restoration.js";
15
+ import { canonicalUrl as ne } from "../../lib/canonical-url.js";
16
+ import { usePageStateStore as re } from "../../stores/page-state.js";
17
+ import { useCreateObject as m, useRestoreEntity as h, useUpdateObject as ie } from "../../hooks/useMutations.js";
18
+ import { useResponsiveMode as ae } from "../../hooks/useResponsiveMode.js";
19
+ import { useBrandingChrome as oe } from "../../hooks/useBrandingChrome.js";
20
+ import { ApiError as se } from "../../types/api.js";
21
+ import { DetailSkeleton as ce } from "../shared/LoadingSkeleton.js";
22
+ import { useActionRunner as le } from "../actions/ActionRunner.js";
23
+ import { buildActionBody as g, executeAction as ue } from "../../api/data.js";
24
+ import { AssociationTabs as de } from "../chrome/AssociationTabs.js";
25
+ import { useTabStore as fe } from "../../stores/tabs.js";
26
+ import { applyRowState as pe, resolveActionLayoutForSlot as _ } from "../../lib/actions.js";
27
+ import { effectiveScreenForRecord as me, variantActionCodesForRecord as he } from "../../lib/variants.js";
28
+ import { dispatchAction as v } from "../../lib/action-dispatch.js";
29
+ import { ResponsiveActionBar as y } from "../actions/ResponsiveActionBar.js";
30
+ import { RefreshControl as b } from "../shared/RefreshControl.js";
31
+ import { DocumentsMenu as x } from "./DocumentsMenu.js";
32
+ import { RecordPanels as ge } from "./RecordPanels.js";
33
+ import { canManageDocumentTemplates as _e } from "../../lib/document-templates.js";
34
+ import { useTabNavigate as S } from "../../hooks/useTabNavigate.js";
35
+ import { useScreenBack as ve } from "../../hooks/useScreenBack.js";
36
+ import { useEmbed as ye } from "../../embed/EmbedContext.js";
37
+ import { useEmbedNavigate as be } from "../../embed/useEmbedNavigate.js";
38
+ import { useReportEmbedDirty as xe } from "../../embed/embed-dirty.js";
39
+ import { useScreenIsLive as C } from "../../stores/realtime.js";
40
+ import { entityAllowsCreateRoute as Se, entityAllowsMutation as Ce, extractPkValues as we, fieldDisplayName as w, getDisplayValue as Te, getPrimaryKeyFields as Ee, isUserEditableField as De, pkValuesFromId as Oe, pkValuesToId as ke, resolveRefRecordLabel as T, rowAllowsMutation as Ae, rowSetInTenant as je } from "../../types/schema.js";
41
+ import { LayoutRenderer as E } from "../detail-layout/LayoutRenderer.js";
42
+ import { ErrorSummary as Me } from "../detail-layout/ErrorSummary.js";
43
+ import { DetailHighlights as Ne, highlightedFieldCodes as Pe } from "../detail-layout/DetailHighlights.js";
44
+ import { DetailAuditStrip as Fe } from "../detail-layout/DetailAuditStrip.js";
45
+ import { StatusGroupsDisplay as Ie } from "../shared/StatusGroupsDisplay.js";
46
+ import { EvidenceBlock as Le } from "../detail-layout/EvidenceBlock.js";
47
+ import { RecordHeader as Re } from "../chrome/RecordHeader.js";
48
+ import { PageShell as ze } from "../chrome/PageShell.js";
49
+ import { DynamicIcon as Be } from "../shared/DynamicIcon.js";
50
+ import { findInvalidEmailFields as Ve, findMissingRequiredFields as He, validatePendingChildren as Ue } from "../../lib/children-validation.js";
51
+ import { takePeekDraft as We } from "../list/peekDraftStore.js";
52
+ import { coerceDisplayString as D } from "../../lib/display-value.js";
53
+ import { FileDraftScope as O, useFileDraftScope as Ge } from "../file-widgets/draft-scope.js";
54
+ import { discardFile as Ke } from "../file-widgets/upload.js";
55
+ import { buildFilesPayload as qe, collectCommittedFileIds as Je } from "../file-widgets/payload.js";
56
+ import { getEntityFileField as Ye, getSchemaFieldValue as Xe, serializeSchemaFieldValue as k } from "../file-widgets/host.js";
57
+ import { resolveCard as Ze } from "./list/cardProjection.js";
58
+ import { useText as Qe } from "../../hooks/useText.js";
59
+ import { useRowTenant as $e } from "../../hooks/useRowTenant.js";
60
+ import { useUnsavedInput as et } from "../../hooks/useUnsavedInput.js";
61
+ import { showsOnNewRecord as tt } from "../../lib/child-config.js";
62
+ import { useCallback as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
63
+ import { Fragment as nt, jsx as F, jsxs as I } from "react/jsx-runtime";
64
+ import { useLocation as rt, useParams as it, useSearchParams as at } from "react-router";
65
+ // src/components/pages/SmartDetailPage.impl.tsx
66
+ var ot = () => {}, st = { expand: ["evidence"] };
67
+ function L(e, t) {
68
68
  return e.length === t.length && JSON.stringify(e) === JSON.stringify(t);
69
69
  }
70
- function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
71
- let c = {}, l = ke({
70
+ function ct({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
71
+ let c = {}, l = qe({
72
72
  entity: e,
73
73
  formData: t,
74
74
  record: n,
75
75
  isNew: r
76
- }), u = Ae(l);
76
+ }), u = Je(l);
77
77
  if (r) for (let [n, r] of Object.entries(t)) {
78
78
  if (e.files?.has(n)) continue;
79
- let t = S(e, n, r);
79
+ let t = k(e, n, r);
80
80
  t !== "" && t != null && (c[n] = t);
81
81
  }
82
82
  else for (let [r, i] of Object.entries(t)) {
83
83
  if (e.files?.has(r)) continue;
84
- let t = n ? Oe(e, n, r) : void 0, a = S(e, r, i), o = S(e, r, t);
84
+ let t = n ? Xe(e, n, r) : void 0, a = k(e, r, i), o = k(e, r, t);
85
85
  (a === "" ? null : a) !== (o === "" || o === void 0 ? null : o) && (c[r] = a);
86
86
  }
87
87
  if (Object.keys(l).length > 0 && (c.$files = l), Object.keys(i).length > 0 && (c.$statuses = Object.entries(i).map(([e, t]) => ({
@@ -97,7 +97,7 @@ function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
97
97
  let { _key: t, _deleted: n, _dirty: r, ...i } = e;
98
98
  return i;
99
99
  }), a = s?.[t] ?? [];
100
- (r || !P(i, a)) && (e[t] = i);
100
+ (r || !L(i, a)) && (e[t] = i);
101
101
  }
102
102
  Object.keys(e).length > 0 && (c.$children = e);
103
103
  }
@@ -106,322 +106,322 @@ function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
106
106
  committedFileIds: u
107
107
  };
108
108
  }
109
- function ft(e, n) {
109
+ function lt(e, t) {
110
110
  if (e) {
111
- let t = o(e, n), r = f(t);
111
+ let n = we(e, t), r = ke(n);
112
112
  if (r.replace(/^\|+|\|+$/g, "")) return r;
113
113
  }
114
- return n.id == null ? crypto.randomUUID() : t(n.id);
114
+ return t.id == null ? crypto.randomUUID() : D(t.id);
115
115
  }
116
- function pt({ screenCode: e }) {
117
- return /* @__PURE__ */ M(x, { children: /* @__PURE__ */ M(mt, { screenCode: e }) });
116
+ function ut({ screenCode: e }) {
117
+ return /* @__PURE__ */ F(O, { children: /* @__PURE__ */ F(dt, { screenCode: e }) });
118
118
  }
119
- function mt({ screenCode: t }) {
120
- let p = le(), ae = le("errors"), { id: oe } = st(), g = _e(), [fe, me] = ct(), { data: _ } = ie(), ye = re((e) => e.user), v = Ee(), be = de(), b = _?.screens[t], x = b?.entity ? _?.entities[b.entity] : void 0, S = b?.entity, C = a(x, "create"), Le = Re(x), Be = (() => {
119
+ function dt({ screenCode: r }) {
120
+ let o = Qe(), oe = Qe("errors"), { id: le } = it(), g = be(), [ue, pe] = at(), { data: _ } = u(), he = ee((e) => e.user), v = Ge(), y = ae(), b = _?.screens[r], x = b?.entity ? _?.entities[b.entity] : void 0, S = b?.entity, T = Ce(x, "create"), Re = $e(x), Be = (() => {
121
121
  if (!x || !x.singleton || !x.prefilter) return;
122
- let e = l(x);
122
+ let e = Ee(x);
123
123
  if (e.length !== 1) return;
124
124
  let t = x.prefilter[e[0]];
125
- if (t === "$caller.user_id") return ye?.id;
126
- if (t === "$caller.tenant_id") return ye?.tenant?.id;
127
- })(), w = Be !== void 0, T = w ? Be : oe, E = !w && T === "new", P = k(() => {
128
- if (!T || E) return;
129
- if (!x) return T;
130
- let e = l(x);
131
- if (e.length === 1) return { [e[0]]: T };
132
- let t = d(T, e.length);
125
+ if (t === "$caller.user_id") return he?.id;
126
+ if (t === "$caller.tenant_id") return he?.tenant?.id;
127
+ })(), D = Be !== void 0, O = D ? Be : le, k = !D && O === "new", L = M(() => {
128
+ if (!O || k) return;
129
+ if (!x) return O;
130
+ let e = Ee(x);
131
+ if (e.length === 1) return { [e[0]]: O };
132
+ let t = Oe(O, e.length);
133
133
  if (!t) return;
134
134
  let n = {};
135
135
  for (let r = 0; r < e.length; r++) n[e[r]] = t[r] ?? "";
136
136
  return n;
137
137
  }, [
138
- T,
139
- E,
138
+ O,
139
+ k,
140
140
  x
141
- ]), pt = k(() => {
142
- if (P) return typeof P == "string" ? P : f(P);
143
- }, [P]), mt = we(S, P, ut), { data: F, isLoading: gt, error: vt } = mt, I = pe(mt), xt = !E && I.error !== null && !(I.error instanceof e && I.error.status === 404);
144
- ne(!gt);
145
- let St = y(x?.realtime, S ?? ""), Ct = S ? St : !1;
146
- Se(Ce(S, P, ut), !E);
147
- let wt = je(S ?? ""), Tt = Ne(S ?? ""), Et = Me(S ?? ""), Dt = Object.keys(x?.status_groups ?? {}).length > 0, L = F?.data, R = m(x, "update", L, Le.tenantId), Ot = !!L && a(x, "update") && !ee(x, L, Le.tenantId), kt = m(x, "restore", L, Le.tenantId), At = L?.$statuses, jt = L?.$properties, Mt = fe.get("edit") === "true", [Nt, Pt] = j(E || Mt), [z, Ft] = j({}), [B, It] = j({}), [V, Lt] = j({}), [H, U] = j(void 0), [Rt, zt] = j(!1), [Bt, W] = j(void 0), [Vt, Ht] = j(!1), Ut = E ? C : R, G = Nt && Ut, Wt = te();
148
- ge(G && !E, Wt.enabled);
149
- let [Gt, Kt] = j(() => {
141
+ ]), ut = M(() => {
142
+ if (L) return typeof L == "string" ? L : ke(L);
143
+ }, [L]), dt = f(S, L, st), { data: R, isLoading: pt, error: ht } = dt, z = c(dt), vt = !k && z.error !== null && !(z.error instanceof se && z.error.status === 404);
144
+ e(!pt);
145
+ let yt = C(x?.realtime, S ?? ""), bt = S ? yt : !1;
146
+ p(d(S, L, st), !k);
147
+ let xt = m(S ?? ""), St = ie(S ?? ""), Ct = h(S ?? ""), wt = Object.keys(x?.status_groups ?? {}).length > 0, B = R?.data, V = Ae(x, "update", B, Re.tenantId), Tt = !!B && Ce(x, "update") && !je(x, B, Re.tenantId), Et = Ae(x, "restore", B, Re.tenantId), Dt = B?.$statuses, Ot = B?.$properties, kt = ue.get("edit") === "true", [At, jt] = P(k || kt), [H, Mt] = P({}), [U, Nt] = P({}), [Pt, Ft] = P({}), [W, G] = P(void 0), [It, Lt] = P(!1), [Rt, zt] = P(void 0), [Bt, Vt] = P(!1), Ht = k ? T : V, K = At && Ht, Ut = ye();
148
+ xe(K && !k, Ut.enabled);
149
+ let [Wt, Gt] = P(() => {
150
150
  let e = parseInt(b?.sidebar_width || "380", 10);
151
151
  return isNaN(e) ? 380 : e;
152
- }), qt = A(null), K = A(null), Jt = D((e) => {
152
+ }), Kt = N(null), q = N(null), qt = A((e) => {
153
153
  e.preventDefault();
154
- let t = qt.current;
154
+ let t = Kt.current;
155
155
  if (!t) return;
156
156
  let n = t.offsetWidth;
157
- K.current = {
157
+ q.current = {
158
158
  startX: e.clientX,
159
159
  startW: n
160
160
  };
161
161
  let r = (e) => {
162
- if (!K.current) return;
163
- let n = K.current.startX - e.clientX, r = Math.max(280, Math.min(800, K.current.startW + n));
162
+ if (!q.current) return;
163
+ let n = q.current.startX - e.clientX, r = Math.max(280, Math.min(800, q.current.startW + n));
164
164
  t.style.width = `${r}px`;
165
165
  }, i = () => {
166
- K.current && t && Kt(parseInt(t.style.width, 10) || K.current.startW), K.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
166
+ q.current && t && Gt(parseInt(t.style.width, 10) || q.current.startW), q.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
167
167
  };
168
168
  document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
169
- }, []), q = F?.data, J = ze(x, b, q ?? {});
170
- O(() => {
171
- let e = parseInt(J?.sidebar_width || "380", 10);
172
- Kt(Number.isNaN(e) ? 380 : e);
173
- }, [J?.sidebar_width]);
174
- let Y = typeof q?.$row_version == "string" ? q.$row_version : void 0, Yt = q?.$refs, Xt = A(Y);
175
- O(() => {
176
- if (!Y) return;
177
- let e = Xt.current;
178
- Xt.current = Y, e && e !== Y && Nt && zt(!0);
179
- }, [Nt, Y]);
180
- let Zt = !!x?.soft_delete && q != null && q[x.soft_delete] != null, X = ot(), Qt = A(null);
181
- Fe({ scrollElementRef: Qt });
182
- let $t = !E && vt instanceof e && vt.status === 404, en = E && !i(x), tn = A(null);
183
- O(() => {
184
- if (!$t) return;
185
- let e = xe(X);
186
- tn.current !== e && (tn.current = e, ve.getState().kill(e));
187
- }, [$t, X]);
188
- let { openTab: nn, updateTabTitle: rn, findTabByPathname: an } = he();
189
- O(() => {
190
- if (!x || w || Wt.enabled) return;
191
- let e = X.pathname, t = p(J?.display?.name) || p(x.display.name), n = J?.display?.icon || x.display.icon;
192
- nn({
169
+ }, []), J = R?.data, Y = me(x, b, J ?? {});
170
+ j(() => {
171
+ let e = parseInt(Y?.sidebar_width || "380", 10);
172
+ Gt(Number.isNaN(e) ? 380 : e);
173
+ }, [Y?.sidebar_width]);
174
+ let X = typeof J?.$row_version == "string" ? J.$row_version : void 0, Jt = J?.$refs, Yt = N(X);
175
+ j(() => {
176
+ if (!X) return;
177
+ let e = Yt.current;
178
+ Yt.current = X, e && e !== X && At && Lt(!0);
179
+ }, [At, X]);
180
+ let Xt = !!x?.soft_delete && J != null && J[x.soft_delete] != null, Z = rt(), Zt = N(null);
181
+ te({ scrollElementRef: Zt });
182
+ let Qt = !k && ht instanceof se && ht.status === 404, $t = k && !Se(x), en = N(null);
183
+ j(() => {
184
+ if (!Qt) return;
185
+ let e = ne(Z);
186
+ en.current !== e && (en.current = e, re.getState().kill(e));
187
+ }, [Qt, Z]);
188
+ let { openTab: tn, updateTabTitle: nn, findTabByPathname: rn } = fe();
189
+ j(() => {
190
+ if (!x || D || Ut.enabled) return;
191
+ let e = Z.pathname, t = o(Y?.display?.name) || o(x.display.name), n = Y?.display?.icon || x.display.icon;
192
+ tn({
193
193
  pathname: e,
194
194
  search: "",
195
- title: E ? p("record.new_title", "New {name}", { name: t }) : t,
196
- derivedTitle: !E,
195
+ title: k ? o("record.new_title", "New {name}", { name: t }) : t,
196
+ derivedTitle: !k,
197
197
  icon: n,
198
198
  closable: !0
199
199
  });
200
200
  }, [
201
- X.pathname,
202
- p,
203
- J?.display?.icon,
201
+ Z.pathname,
202
+ o,
203
+ Y?.display?.icon,
204
204
  x?.display.icon,
205
- E,
206
- w,
207
- Wt.enabled
208
- ]), O(() => {
209
- if (!q || !x || w || Wt.enabled) return;
210
- let e = an(X.pathname);
205
+ k,
206
+ D,
207
+ Ut.enabled
208
+ ]), j(() => {
209
+ if (!J || !x || D || Ut.enabled) return;
210
+ let e = rn(Z.pathname);
211
211
  if (e) {
212
- let t = p(J?.display?.name) || p(x.display.name), n = c(p, q, x), r = n && !String(n).startsWith("/") ? String(n) : t;
213
- rn(e.id, r, r === t);
212
+ let t = o(Y?.display?.name) || o(x.display.name), n = Te(o, J, x), r = n && !String(n).startsWith("/") ? String(n) : t;
213
+ nn(e.id, r, r === t);
214
214
  }
215
215
  }, [
216
- q,
217
- p,
216
+ J,
217
+ o,
218
218
  x?.display.display_field,
219
- X.pathname,
220
- w,
221
- Wt.enabled
219
+ Z.pathname,
220
+ D,
221
+ Ut.enabled
222
222
  ]);
223
- let on = k(() => {
224
- if (!x || !Ut) return /* @__PURE__ */ new Set();
223
+ let an = M(() => {
224
+ if (!x || !Ht) return /* @__PURE__ */ new Set();
225
225
  let e = /* @__PURE__ */ new Set();
226
- for (let [t, n] of x.fields) u(n) && e.add(t);
226
+ for (let [t, n] of x.fields) De(n) && e.add(t);
227
227
  for (let [t] of x.files ?? []) e.add(t);
228
228
  return e;
229
- }, [x, Ut]), sn = A(null);
230
- O(() => {
231
- if (Mt && q && x && R && sn.current !== X.key) {
232
- if (sn.current = X.key, Nt || Pt(!0), Object.keys(z).length === 0) {
233
- let e = T ? rt(T) : null;
229
+ }, [x, Ht]), on = N(null);
230
+ j(() => {
231
+ if (kt && J && x && V && on.current !== Z.key) {
232
+ if (on.current = Z.key, At || jt(!0), Object.keys(H).length === 0) {
233
+ let e = O ? We(O) : null;
234
234
  if (e) {
235
- let t = ke({
235
+ let t = qe({
236
236
  entity: x,
237
237
  formData: e,
238
238
  record: void 0,
239
239
  isNew: !0
240
240
  });
241
- Ae(t).forEach((e) => {
241
+ Je(t).forEach((e) => {
242
242
  v.registerDraft({
243
243
  fileId: e,
244
- discard: () => Te(e)
244
+ discard: () => Ke(e)
245
245
  });
246
246
  });
247
247
  }
248
248
  let t = {};
249
- on.forEach((n) => {
249
+ an.forEach((n) => {
250
250
  let r = e ? e[n] : void 0;
251
251
  if (r !== void 0) {
252
252
  t[n] = r;
253
253
  return;
254
254
  }
255
- let i = Oe(x, q, n);
256
- t[n] = De(x, n) ? i ?? null : i ?? "";
257
- }), Ft(t);
255
+ let i = Xe(x, J, n);
256
+ t[n] = Ye(x, n) ? i ?? null : i ?? "";
257
+ }), Mt(t);
258
258
  }
259
- if (x.children !== void 0 && x.children.length > 0 && H === void 0) {
260
- let e = q.$children;
259
+ if (x.children !== void 0 && x.children.length > 0 && W === void 0) {
260
+ let e = J.$children;
261
261
  if (e && Object.keys(e).length > 0) {
262
262
  let t = {};
263
263
  for (let [n, r] of Object.entries(e)) {
264
264
  let e = _?.entities[n];
265
265
  t[n] = r.map((t) => ({
266
266
  ...t,
267
- _key: ft(e, t)
267
+ _key: lt(e, t)
268
268
  }));
269
269
  }
270
- U(t), W(e);
271
- } else U({}), W({});
270
+ G(t), zt(e);
271
+ } else G({}), zt({});
272
272
  }
273
- me((e) => {
273
+ pe((e) => {
274
274
  let t = new URLSearchParams(e);
275
275
  return t.delete("edit"), t;
276
276
  }, { replace: !0 });
277
277
  }
278
278
  }, [
279
- Mt,
280
- q,
281
- on,
282
- R,
279
+ kt,
280
+ J,
281
+ an,
282
+ V,
283
283
  x,
284
- H,
284
+ W,
285
285
  _,
286
- X.key
287
- ]), O(() => {
288
- E && C && x?.children && x.children.length !== 0 && H === void 0 && (U({}), W({}));
286
+ Z.key
287
+ ]), j(() => {
288
+ k && T && x?.children && x.children.length !== 0 && W === void 0 && (G({}), zt({}));
289
289
  }, [
290
- E,
291
- C,
290
+ k,
291
+ T,
292
292
  x?.children
293
293
  ]);
294
- let cn = D(async () => {
295
- if (await v.flushAllDrafts(), E) {
296
- let e = J?.route?.replace("/:id", "") ?? "/";
294
+ let sn = A(async () => {
295
+ if (await v.flushAllDrafts(), k) {
296
+ let e = Y?.route?.replace("/:id", "") ?? "/";
297
297
  g(e);
298
- } else Pt(!1), Ft({}), It({}), Lt({}), U(void 0), W(void 0), Ht(!1);
298
+ } else jt(!1), Mt({}), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
299
299
  }, [
300
300
  v,
301
- E,
302
- J,
301
+ k,
302
+ Y,
303
303
  g
304
- ]), ln = D((e, t) => {
305
- Ft((n) => ({
304
+ ]), cn = A((e, t) => {
305
+ Mt((n) => ({
306
306
  ...n,
307
307
  [e]: t
308
308
  }));
309
- }, []), Z = k(() => {
310
- if (!J?.route) return "/";
311
- let e = J.route.split("/");
309
+ }, []), Q = M(() => {
310
+ if (!Y?.route) return "/";
311
+ let e = Y.route.split("/");
312
312
  return e.pop(), e.join("/") || "/";
313
- }, [J]), un = k(() => !_?.screens || !Z || Z === "/" ? !1 : Object.values(_.screens).some((e) => e.route === Z), [_, Z]), dn = D(() => {
314
- if (!un) {
313
+ }, [Y]), ln = M(() => !_?.screens || !Q || Q === "/" ? !1 : Object.values(_.screens).some((e) => e.route === Q), [_, Q]), un = A(() => {
314
+ if (!ln) {
315
315
  g("/");
316
316
  return;
317
317
  }
318
- let e = an(Z)?.search ?? "";
319
- g(e ? `${Z}?${e}` : Z);
318
+ let e = rn(Q)?.search ?? "";
319
+ g(e ? `${Q}?${e}` : Q);
320
320
  }, [
321
- un,
322
- Z,
323
- an,
321
+ ln,
322
+ Q,
323
+ rn,
324
324
  g
325
- ]), Q = Pe({ fallback: dn }), fn = !w && (Q.hasOriginBack || Q.allowFallbackBack && !!un), pn = k(() => {
325
+ ]), dn = ve({ fallback: un }), fn = !D && (dn.hasOriginBack || dn.allowFallbackBack && !!ln), pn = M(() => {
326
326
  if (!x) return {};
327
327
  let e = {};
328
- for (let t of tt(x, z, E)) on.has(t) && (e[t] = p("record.field.required", "Required"));
329
- for (let t of et(x, z)) on.has(t) && (e[t] = ae("record.email_invalid", "This is not a valid email address."));
328
+ for (let t of He(x, H, k)) an.has(t) && (e[t] = o("record.field.required", "Required"));
329
+ for (let t of Ve(x, H)) an.has(t) && (e[t] = oe("record.email_invalid", "This is not a valid email address."));
330
330
  return e;
331
331
  }, [
332
- p,
333
- ae,
332
+ o,
333
+ oe,
334
334
  x,
335
- z,
336
- E,
337
- on
338
- ]), mn = Object.keys(pn).length > 0, hn = k(() => x ? dt({
335
+ H,
336
+ k,
337
+ an
338
+ ]), mn = Object.keys(pn).length > 0, hn = M(() => x ? ct({
339
339
  entity: x,
340
- formData: z,
341
- record: q,
342
- isNew: E,
343
- pendingStatuses: B,
344
- pendingProperties: V,
345
- pendingChildren: H,
346
- childrenSnapshot: Bt
340
+ formData: H,
341
+ record: J,
342
+ isNew: k,
343
+ pendingStatuses: U,
344
+ pendingProperties: Pt,
345
+ pendingChildren: W,
346
+ childrenSnapshot: Rt
347
347
  }) : {
348
348
  payload: {},
349
349
  committedFileIds: []
350
350
  }, [
351
351
  x,
352
- z,
353
- q,
354
- E,
355
- B,
356
- V,
357
352
  H,
358
- Bt
359
- ]), gn = Object.keys(hn.payload).length > 0, _n = G && (E || gn);
360
- Ve(_n);
361
- let vn = D(() => {
362
- if (!S || !x || E && !C || !E && !R || (Ht(!0), mn)) return;
363
- let t = { ...hn.payload }, { committedFileIds: n } = hn;
364
- if (!E && !gn) {
365
- Pt(!1), It({}), Lt({}), U(void 0), W(void 0), Ht(!1);
353
+ J,
354
+ k,
355
+ U,
356
+ Pt,
357
+ W,
358
+ Rt
359
+ ]), gn = Object.keys(hn.payload).length > 0, _n = K && (k || gn);
360
+ et(_n);
361
+ let vn = A(() => {
362
+ if (!S || !x || k && !T || !k && !V || (Vt(!0), mn)) return;
363
+ let e = { ...hn.payload }, { committedFileIds: t } = hn;
364
+ if (!k && !gn) {
365
+ jt(!1), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
366
366
  return;
367
367
  }
368
- !E && Y && (t.$row_version = Y);
369
- let r = () => {
370
- Pt(!1), zt(!1), Ht(!1), It({}), Lt({}), U(void 0), W(void 0);
368
+ !k && X && (e.$row_version = X);
369
+ let n = () => {
370
+ jt(!1), Lt(!1), Vt(!1), Nt({}), Ft({}), G(void 0), zt(void 0);
371
371
  };
372
- E ? wt.mutate(t, { onSuccess: (e) => {
373
- n.forEach((e) => v.markCommitted(e));
374
- let t = e.data, i = x ? o(x, t) : {}, a = f(i);
375
- g(a ? `${Z}/${encodeURIComponent(a)}` : Z, { replace: !0 }), r();
376
- } }) : P && Tt.mutate({
377
- pkValues: P,
378
- data: t
372
+ k ? xt.mutate(e, { onSuccess: (e) => {
373
+ t.forEach((e) => v.markCommitted(e));
374
+ let r = e.data, i = x ? we(x, r) : {}, a = ke(i);
375
+ g(a ? `${Q}/${encodeURIComponent(a)}` : Q, { replace: !0 }), n();
376
+ } }) : L && St.mutate({
377
+ pkValues: L,
378
+ data: e
379
379
  }, {
380
380
  onSuccess: () => {
381
- n.forEach((e) => v.markCommitted(e)), r();
381
+ t.forEach((e) => v.markCommitted(e)), n();
382
382
  },
383
- onError: (t) => {
384
- t instanceof e && t.code === "entity.stale_object" && zt(!0);
383
+ onError: (e) => {
384
+ e instanceof se && e.code === "entity.stale_object" && Lt(!0);
385
385
  }
386
386
  });
387
387
  }, [
388
388
  v,
389
- E,
390
- C,
391
- R,
389
+ k,
390
+ T,
391
+ V,
392
392
  S,
393
393
  mn,
394
394
  hn,
395
395
  gn,
396
- wt,
397
- Tt,
396
+ xt,
397
+ St,
398
398
  x,
399
399
  g,
400
- Z,
401
- Y,
402
- P
403
- ]), yn = D((e, t) => {
404
- U((n) => ({
400
+ Q,
401
+ X,
402
+ L
403
+ ]), yn = A((e, t) => {
404
+ G((n) => ({
405
405
  ...n ?? {},
406
406
  [e]: t
407
407
  }));
408
- }, []), bn = D(() => {
409
- P && !E && kt && Et.mutate(P);
408
+ }, []), bn = A(() => {
409
+ L && !k && Et && Ct.mutate(L);
410
410
  }, [
411
- P,
412
- E,
413
- kt,
414
- Et
415
- ]), xn = k(() => nt(H, _), [H, _]), Sn = Object.keys(xn).length > 0;
416
- if (!J || !x) return null;
417
- if (!E && I.loading) return /* @__PURE__ */ M(Ie, {});
418
- if (xt && !F) return /* @__PURE__ */ N("div", {
411
+ L,
412
+ k,
413
+ Et,
414
+ Ct
415
+ ]), xn = M(() => Ue(W, _), [W, _]), Sn = Object.keys(xn).length > 0;
416
+ if (!Y || !x) return null;
417
+ if (!k && z.loading) return /* @__PURE__ */ F(ce, {});
418
+ if (vt && !R) return /* @__PURE__ */ I("div", {
419
419
  style: { padding: 24 },
420
- children: [fn && /* @__PURE__ */ M(ce, {
421
- icon: /* @__PURE__ */ M(h.back, { size: 14 }),
422
- onClick: Q.goBack,
423
- title: p("record.back", "Back")
424
- }), /* @__PURE__ */ N("p", {
420
+ children: [fn && /* @__PURE__ */ F(a, {
421
+ icon: /* @__PURE__ */ F(i.back, { size: 14 }),
422
+ onClick: dn.goBack,
423
+ title: o("record.back", "Back")
424
+ }), /* @__PURE__ */ I("p", {
425
425
  role: "alert",
426
426
  style: {
427
427
  color: "var(--danger)",
@@ -430,91 +430,91 @@ function mt({ screenCode: t }) {
430
430
  gap: 8
431
431
  },
432
432
  children: [
433
- se(ae, I.error),
433
+ l(oe, z.error),
434
434
  " ",
435
- /* @__PURE__ */ M(ue, { onRetry: I.retry })
435
+ /* @__PURE__ */ F(s, { onRetry: z.retry })
436
436
  ]
437
437
  })]
438
438
  });
439
- if (en) return /* @__PURE__ */ N("div", {
439
+ if ($t) return /* @__PURE__ */ I("div", {
440
440
  style: { padding: 24 },
441
- children: [/* @__PURE__ */ N("div", {
441
+ children: [/* @__PURE__ */ I("div", {
442
442
  style: {
443
443
  display: "flex",
444
444
  alignItems: "center",
445
445
  gap: 8,
446
446
  marginBottom: 8
447
447
  },
448
- children: [fn && /* @__PURE__ */ M(ce, {
449
- icon: /* @__PURE__ */ M(h.back, { size: 14 }),
450
- onClick: Q.goBack,
451
- title: p("record.back", "Back")
452
- }), /* @__PURE__ */ M("h1", {
448
+ children: [fn && /* @__PURE__ */ F(a, {
449
+ icon: /* @__PURE__ */ F(i.back, { size: 14 }),
450
+ onClick: dn.goBack,
451
+ title: o("record.back", "Back")
452
+ }), /* @__PURE__ */ F("h1", {
453
453
  style: {
454
454
  margin: 0,
455
455
  fontSize: 18,
456
456
  fontWeight: 600,
457
457
  color: "var(--text)"
458
458
  },
459
- children: p("record.create_closed.title", "Not Available")
459
+ children: o("record.create_closed.title", "Not Available")
460
460
  })]
461
- }), /* @__PURE__ */ M("p", {
461
+ }), /* @__PURE__ */ F("p", {
462
462
  style: { color: "var(--text-3)" },
463
- children: p("record.create_closed.body", "This record type is not created from a form.")
463
+ children: o("record.create_closed.body", "This record type is not created from a form.")
464
464
  })]
465
465
  });
466
- if (!E && !q || $t) return /* @__PURE__ */ N("div", {
466
+ if (!k && !J || Qt) return /* @__PURE__ */ I("div", {
467
467
  style: { padding: 24 },
468
- children: [/* @__PURE__ */ N("div", {
468
+ children: [/* @__PURE__ */ I("div", {
469
469
  style: {
470
470
  display: "flex",
471
471
  alignItems: "center",
472
472
  gap: 8,
473
473
  marginBottom: 8
474
474
  },
475
- children: [fn && /* @__PURE__ */ M(ce, {
476
- icon: /* @__PURE__ */ M(h.back, { size: 14 }),
477
- onClick: Q.goBack,
478
- title: p("record.back", "Back")
479
- }), /* @__PURE__ */ M("h1", {
475
+ children: [fn && /* @__PURE__ */ F(a, {
476
+ icon: /* @__PURE__ */ F(i.back, { size: 14 }),
477
+ onClick: dn.goBack,
478
+ title: o("record.back", "Back")
479
+ }), /* @__PURE__ */ F("h1", {
480
480
  style: {
481
481
  margin: 0,
482
482
  fontSize: 18,
483
483
  fontWeight: 600,
484
484
  color: "var(--text)"
485
485
  },
486
- children: p("record.missing.title", "Not Found")
486
+ children: o("record.missing.title", "Not Found")
487
487
  })]
488
- }), /* @__PURE__ */ M("p", {
488
+ }), /* @__PURE__ */ F("p", {
489
489
  style: { color: "var(--text-3)" },
490
- children: ae("entity.not_found", "This record does not exist.")
490
+ children: oe("entity.not_found", "This record does not exist.")
491
491
  })]
492
492
  });
493
- let Cn = x.display, wn = p(J.display?.name) || p(Cn.name), Tn = c(p, q, x), En = E ? p("record.new_title", "New {name}", { name: wn }) : Tn ? String(Tn) : wn, Dn = wt.isPending || Tt.isPending, On = J.responsive?.[be.category]?.layout, kn = On?.tabs ?? (be.isPhone ? "sections" : void 0), An = On?.header_card === !0 ? it({
493
+ let Cn = x.display, wn = o(Y.display?.name) || o(Cn.name), Tn = Te(o, J, x), En = k ? o("record.new_title", "New {name}", { name: wn }) : Tn ? String(Tn) : wn, Dn = xt.isPending || St.isPending, On = Y.responsive?.[y.category]?.layout, kn = On?.tabs ?? (y.isPhone ? "sections" : void 0), An = On?.header_card === !0 ? Ze({
494
494
  entity: x,
495
- screen: J
495
+ screen: Y
496
496
  }) : void 0, $ = {
497
497
  schema: _,
498
498
  entity: x,
499
499
  entityCode: S,
500
- recordId: pt ?? T ?? "",
501
- record: G ? {
502
- ...q ?? {},
503
- ...z
504
- } : q ?? {},
505
- isNew: E,
506
- mode: G ? "edit" : "display",
507
- onFieldChange: G ? ln : void 0,
508
- refs: Yt,
509
- headerFields: !E && q ? Xe(J, x) : void 0,
500
+ recordId: ut ?? O ?? "",
501
+ record: K ? {
502
+ ...J ?? {},
503
+ ...H
504
+ } : J ?? {},
505
+ isNew: k,
506
+ mode: K ? "edit" : "display",
507
+ onFieldChange: K ? cn : void 0,
508
+ refs: Jt,
509
+ headerFields: !k && J ? Pe(Y, x) : void 0,
510
510
  objectProperties: (() => {
511
- let e = jt ?? [];
512
- if (!G || Object.keys(V).length === 0) return e.length > 0 ? e : void 0;
513
- let t = e.map((e) => V[e.property_code] === void 0 ? e : {
511
+ let e = Ot ?? [];
512
+ if (!K || Object.keys(Pt).length === 0) return e.length > 0 ? e : void 0;
513
+ let t = e.map((e) => Pt[e.property_code] === void 0 ? e : {
514
514
  ...e,
515
- value: V[e.property_code]
515
+ value: Pt[e.property_code]
516
516
  });
517
- for (let [n, r] of Object.entries(V)) e.some((e) => e.property_code === n) || t.push({
517
+ for (let [n, r] of Object.entries(Pt)) e.some((e) => e.property_code === n) || t.push({
518
518
  property_code: n,
519
519
  name: {},
520
520
  type: "string",
@@ -522,96 +522,96 @@ function mt({ screenCode: t }) {
522
522
  });
523
523
  return t;
524
524
  })(),
525
- onSetProperty: E || !R ? void 0 : G ? (e, t) => Lt((n) => ({
525
+ onSetProperty: k || !V ? void 0 : K ? (e, t) => Ft((n) => ({
526
526
  ...n,
527
527
  [e]: t
528
528
  })) : void 0,
529
529
  isPropertyPending: !1,
530
530
  objectStatuses: (() => {
531
- let e = At ?? [];
532
- if (!G || Object.keys(B).length === 0) return e.length > 0 ? e : void 0;
533
- let t = e.map((e) => B[e.group_code] === void 0 ? e : {
531
+ let e = Dt ?? [];
532
+ if (!K || Object.keys(U).length === 0) return e.length > 0 ? e : void 0;
533
+ let t = e.map((e) => U[e.group_code] === void 0 ? e : {
534
534
  ...e,
535
- status_code: B[e.group_code]
535
+ status_code: U[e.group_code]
536
536
  });
537
- for (let [n, i] of Object.entries(B)) e.some((e) => e.group_code === n) || t.push({
538
- group_code: n,
537
+ for (let [r, i] of Object.entries(U)) e.some((e) => e.group_code === r) || t.push({
538
+ group_code: r,
539
539
  status_code: i,
540
540
  status_name: {},
541
- set_at: r()
541
+ set_at: n()
542
542
  });
543
543
  return t;
544
544
  })(),
545
- onSetStatus: E || !R ? void 0 : G ? (e, t) => It((n) => ({
545
+ onSetStatus: k || !V ? void 0 : K ? (e, t) => Nt((n) => ({
546
546
  ...n,
547
547
  [e]: t
548
548
  })) : void 0,
549
549
  isStatusPending: !1,
550
- pendingChildren: G ? H : void 0,
551
- onChildrenChange: G ? yn : void 0,
552
- childValidationErrors: G ? xn : void 0,
553
- fieldErrors: G && Vt ? pn : void 0,
550
+ pendingChildren: K ? W : void 0,
551
+ onChildrenChange: K ? yn : void 0,
552
+ childValidationErrors: K ? xn : void 0,
553
+ fieldErrors: K && Bt ? pn : void 0,
554
554
  detailTabsPresentation: kn,
555
555
  relatedRecordsPresentation: On?.related_records
556
- }, jn = !!J.sidebar && (E ? J.sidebar.some((e) => Ge(e, x, _?.entities ?? {})) : J.sidebar.length > 0), Mn = On?.sidebar === "hidden", Nn = jn && !Mn && !be.isDesktop, Pn = jn && !Mn && be.isDesktop, Fn = !E && q ? /* @__PURE__ */ M(Ye, {
557
- screen: J,
556
+ }, jn = !!Y.sidebar && (k ? Y.sidebar.some((e) => tt(e, x, _?.entities ?? {})) : Y.sidebar.length > 0), Mn = On?.sidebar === "hidden", Nn = jn && !Mn && !y.isDesktop, Pn = jn && !Mn && y.isDesktop, Fn = !k && J ? /* @__PURE__ */ F(Ne, {
557
+ screen: Y,
558
558
  entity: x,
559
559
  entityCode: S,
560
- record: q,
561
- refs: Yt,
562
- objectStatuses: At,
560
+ record: J,
561
+ refs: Jt,
562
+ objectStatuses: Dt,
563
563
  schema: _
564
- }) : void 0, In = /* @__PURE__ */ M(_t, {
564
+ }) : void 0, In = /* @__PURE__ */ F(mt, {
565
565
  title: En,
566
- editing: G,
567
- isNew: E,
568
- isRecordDeleted: Zt,
566
+ editing: K,
567
+ isNew: k,
568
+ isRecordDeleted: Xt,
569
569
  dirty: _n,
570
570
  isSaving: Dn,
571
571
  hasChildErrors: Sn,
572
- hasFieldErrors: Vt && mn,
573
- canRestore: kt,
572
+ hasFieldErrors: Bt && mn,
573
+ canRestore: Et,
574
574
  entity: x,
575
- screen: J,
575
+ screen: Y,
576
576
  globalActions: _?.actions,
577
577
  entityCode: S,
578
- record: q,
579
- id: T,
580
- listRoute: Z,
581
- listRouteExists: !!un,
578
+ record: J,
579
+ id: O,
580
+ listRoute: Q,
581
+ listRouteExists: !!ln,
582
582
  highlights: Fn,
583
583
  showBack: fn,
584
- onBack: Q.goBack,
585
- onCancelEdit: cn,
584
+ onBack: dn.goBack,
585
+ onCancelEdit: sn,
586
586
  onSave: vn,
587
587
  onRestore: bn,
588
- isRestoring: Et.isPending,
588
+ isRestoring: Ct.isPending,
589
589
  refreshControl: {
590
- refetch: mt.refetch,
591
- isLoading: mt.isLoading,
592
- isLive: Ct
590
+ refetch: dt.refetch,
591
+ isLoading: dt.isLoading,
592
+ isLive: bt
593
593
  },
594
594
  isRealtimeEntity: x?.realtime === !0,
595
- canManageTemplates: Ue(_)
596
- }), Ln = Zt && /* @__PURE__ */ M(yt, {
595
+ canManageTemplates: _e(_)
596
+ }), Ln = Xt && /* @__PURE__ */ F(gt, {
597
597
  tone: "danger",
598
- children: p("record.deleted_banner", "This record was deleted on {date}", { date: n(String(q[x.soft_delete]), {
599
- zone: p.timeZone,
598
+ children: o("record.deleted_banner", "This record was deleted on {date}", { date: t(String(J[x.soft_delete]), {
599
+ zone: o.timeZone,
600
600
  declared: !!(x.fields.get(x.soft_delete)?.timezone || x.default_timezone)
601
601
  }) })
602
- }), Rn = Rt && /* @__PURE__ */ M(yt, {
602
+ }), Rn = It && /* @__PURE__ */ F(gt, {
603
603
  tone: "warn",
604
- children: p("record.changed_on_server", "This record changed on the server while you were viewing or editing it.")
605
- }), zn = Ot && q ? bt(p, x, q, Yt) : void 0, Bn = Ot && /* @__PURE__ */ M(yt, {
604
+ children: o("record.changed_on_server", "This record changed on the server while you were viewing or editing it.")
605
+ }), zn = Tt && J ? _t(o, x, J, Jt) : void 0, Bn = Tt && /* @__PURE__ */ F(gt, {
606
606
  tone: "info",
607
607
  testId: "record-other-tenant-banner",
608
- children: zn ? p("record.other_tenant_banner_named", "This record is set in the tenant {tenant}. Change it from that tenant.", { tenant: zn }) : p("record.other_tenant_banner", "This record is set in another tenant. Change it from that tenant.")
609
- }), Vn = G && Vt && mn && /* @__PURE__ */ M(Je, {
608
+ children: zn ? o("record.other_tenant_banner_named", "This record is set in the tenant {tenant}. Change it from that tenant.", { tenant: zn }) : o("record.other_tenant_banner", "This record is set in another tenant. Change it from that tenant.")
609
+ }), Vn = K && Bt && mn && /* @__PURE__ */ F(Me, {
610
610
  errors: Object.entries(pn).map(([e, t]) => {
611
611
  let n = x.fields.get(e);
612
612
  return {
613
613
  name: e,
614
- label: n ? s(p, n, e, _?.entities) : e,
614
+ label: n ? w(o, n, e, _?.entities) : e,
615
615
  message: t
616
616
  };
617
617
  }),
@@ -622,55 +622,55 @@ function mt({ screenCode: t }) {
622
622
  behavior: "smooth"
623
623
  }), t.focus?.());
624
624
  }
625
- }), Hn = Dt && !E && !(J.items && J.items.length > 0) && /* @__PURE__ */ M("div", {
625
+ }), Hn = wt && !k && !(Y.items && Y.items.length > 0) && /* @__PURE__ */ F("div", {
626
626
  className: "mb-4",
627
- children: /* @__PURE__ */ M(Ke, {
627
+ children: /* @__PURE__ */ F(Ie, {
628
628
  statusGroups: x.status_groups ?? {},
629
629
  objectStatuses: $.objectStatuses,
630
- onSetStatus: R && G ? (e, t) => It((n) => ({
630
+ onSetStatus: V && K ? (e, t) => Nt((n) => ({
631
631
  ...n,
632
632
  [e]: t
633
- })) : lt,
633
+ })) : ot,
634
634
  isPending: !1,
635
- mode: G ? "edit" : "display"
635
+ mode: K ? "edit" : "display"
636
636
  })
637
- }), Un = x.evidence_covered && !E && q && /* @__PURE__ */ M("div", {
637
+ }), Un = x.evidence_covered && !k && J && /* @__PURE__ */ F("div", {
638
638
  className: "mb-4",
639
- children: /* @__PURE__ */ M(Qe, { evidence: q.$evidence })
640
- }), Wn = /* @__PURE__ */ N(at, { children: [
641
- An && (q || E) && /* @__PURE__ */ M(ht, {
639
+ children: /* @__PURE__ */ F(Le, { evidence: J.$evidence })
640
+ }), Wn = /* @__PURE__ */ I(nt, { children: [
641
+ An && (J || k) && /* @__PURE__ */ F(ft, {
642
642
  card: An,
643
643
  entity: x,
644
644
  record: $.record,
645
645
  objectStatuses: $.objectStatuses,
646
646
  objectProperties: $.objectProperties
647
647
  }),
648
- J.items && J.items.length > 0 && (q || E) && _ && /* @__PURE__ */ M(qe, {
649
- nodes: J.items,
648
+ Y.items && Y.items.length > 0 && (J || k) && _ && /* @__PURE__ */ F(E, {
649
+ nodes: Y.items,
650
650
  ctx: $
651
651
  }),
652
- !E && T && S && x.associations && Object.keys(x.associations).length > 0 && _ && /* @__PURE__ */ M(He, {
652
+ !k && O && S && x.associations && Object.keys(x.associations).length > 0 && _ && /* @__PURE__ */ F(de, {
653
653
  entityCode: S,
654
- recordId: pt ?? T ?? "",
654
+ recordId: ut ?? O ?? "",
655
655
  associations: x.associations,
656
656
  schema: _
657
657
  }),
658
- !E && T && S && /* @__PURE__ */ M(We, {
658
+ !k && O && S && /* @__PURE__ */ F(ge, {
659
659
  entity: x,
660
660
  entityCode: S,
661
- objectId: pt ?? T,
661
+ objectId: ut ?? O,
662
662
  schema: _
663
663
  }),
664
- !E && q && _ && /* @__PURE__ */ M(Ze, {
665
- screen: J,
664
+ !k && J && _ && /* @__PURE__ */ F(Fe, {
665
+ screen: Y,
666
666
  entity: x,
667
667
  entityCode: S,
668
- record: q,
669
- recordId: pt ?? T,
670
- refs: Yt,
668
+ record: J,
669
+ recordId: ut ?? O,
670
+ refs: Jt,
671
671
  schema: _
672
672
  })
673
- ] }), Gn = /* @__PURE__ */ N(at, { children: [
673
+ ] }), Gn = /* @__PURE__ */ I(nt, { children: [
674
674
  In,
675
675
  Rn,
676
676
  Ln,
@@ -679,7 +679,7 @@ function mt({ screenCode: t }) {
679
679
  Hn,
680
680
  Un
681
681
  ] });
682
- return Pn ? /* @__PURE__ */ N("div", {
682
+ return Pn ? /* @__PURE__ */ I("div", {
683
683
  style: {
684
684
  height: "100%",
685
685
  display: "flex",
@@ -687,23 +687,23 @@ function mt({ screenCode: t }) {
687
687
  background: "var(--background)"
688
688
  },
689
689
  children: [
690
- /* @__PURE__ */ M("div", {
690
+ /* @__PURE__ */ F("div", {
691
691
  style: {
692
692
  flex: 1,
693
693
  minWidth: 0,
694
694
  height: "100%"
695
695
  },
696
- children: /* @__PURE__ */ M($e, {
697
- scrollRef: Qt,
696
+ children: /* @__PURE__ */ F(ze, {
697
+ scrollRef: Zt,
698
698
  header: Gn,
699
699
  children: Wn
700
700
  })
701
701
  }),
702
- /* @__PURE__ */ M("div", {
702
+ /* @__PURE__ */ F("div", {
703
703
  className: "detail-resize-handle",
704
- onMouseDown: Jt,
705
- title: p("record.layout.drag_to_resize", "Drag to resize"),
706
- children: /* @__PURE__ */ M("div", { style: {
704
+ onMouseDown: qt,
705
+ title: o("record.layout.drag_to_resize", "Drag to resize"),
706
+ children: /* @__PURE__ */ F("div", { style: {
707
707
  position: "absolute",
708
708
  top: 0,
709
709
  bottom: 0,
@@ -713,23 +713,23 @@ function mt({ screenCode: t }) {
713
713
  background: "var(--border)"
714
714
  } })
715
715
  }),
716
- /* @__PURE__ */ M("div", {
717
- ref: qt,
716
+ /* @__PURE__ */ F("div", {
717
+ ref: Kt,
718
718
  style: {
719
719
  flexShrink: 0,
720
720
  height: "100%",
721
- width: `${Gt}px`
721
+ width: `${Wt}px`
722
722
  },
723
- children: (q || E) && _ && /* @__PURE__ */ M(qe, {
724
- nodes: J.sidebar,
723
+ children: (J || k) && _ && /* @__PURE__ */ F(E, {
724
+ nodes: Y.sidebar,
725
725
  ctx: $
726
726
  })
727
727
  })
728
728
  ]
729
- }) : /* @__PURE__ */ N($e, {
730
- scrollRef: Qt,
729
+ }) : /* @__PURE__ */ I(ze, {
730
+ scrollRef: Zt,
731
731
  header: Gn,
732
- children: [Wn, Nn && (q || E) && _ && /* @__PURE__ */ M("div", {
732
+ children: [Wn, Nn && (J || k) && _ && /* @__PURE__ */ F("div", {
733
733
  "data-testid": "detail-sidebar-inline",
734
734
  style: {
735
735
  display: "flex",
@@ -737,25 +737,25 @@ function mt({ screenCode: t }) {
737
737
  gap: 16,
738
738
  minWidth: 0
739
739
  },
740
- children: /* @__PURE__ */ M(qe, {
741
- nodes: J.sidebar,
740
+ children: /* @__PURE__ */ F(E, {
741
+ nodes: Y.sidebar,
742
742
  ctx: $
743
743
  })
744
744
  })]
745
745
  });
746
746
  }
747
- function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties: a }) {
748
- let o = le(), s = (e) => {
749
- let s = F(o, n, e, r, i, a);
750
- return s != null && t(s) !== "";
751
- }, l = (e) => {
752
- let s = F(o, n, e, r, i, a);
753
- return t(s) || /* @__PURE__ */ M("span", {
747
+ function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
748
+ let a = Qe(), o = (e) => {
749
+ let o = R(a, t, e, n, r, i);
750
+ return o != null && D(o) !== "";
751
+ }, s = (e) => {
752
+ let o = R(a, t, e, n, r, i);
753
+ return D(o) || /* @__PURE__ */ F("span", {
754
754
  style: { color: "var(--text-3)" },
755
755
  children: "-"
756
756
  });
757
- }, u = e.titleUsesDisplay ? c(o, r, n) : e.titleField ? F(o, n, e.titleField, r, i, a) : void 0, d = t(u) || o(n.display?.name) || o("record.fallback_title", "Record"), f = e.badgeFields.filter((t) => !e.hideEmptyFields || s(t)), p = e.bodyFields.filter((t) => !e.hideEmptyFields || s(t)), m = e.metaFields.filter((t) => !e.hideEmptyFields || s(t));
758
- return /* @__PURE__ */ N("section", {
757
+ }, c = e.titleUsesDisplay ? Te(a, n, t) : e.titleField ? R(a, t, e.titleField, n, r, i) : void 0, l = D(c) || a(t.display?.name) || a("record.fallback_title", "Record"), u = e.badgeFields.filter((t) => !e.hideEmptyFields || o(t)), ee = e.bodyFields.filter((t) => !e.hideEmptyFields || o(t)), d = e.metaFields.filter((t) => !e.hideEmptyFields || o(t));
758
+ return /* @__PURE__ */ I("section", {
759
759
  "data-testid": "detail-header-card",
760
760
  style: {
761
761
  width: "100%",
@@ -768,9 +768,9 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
768
768
  boxSizing: "border-box"
769
769
  },
770
770
  children: [
771
- /* @__PURE__ */ N("div", {
771
+ /* @__PURE__ */ I("div", {
772
772
  style: { minWidth: 0 },
773
- children: [/* @__PURE__ */ M("div", {
773
+ children: [/* @__PURE__ */ F("div", {
774
774
  style: {
775
775
  fontSize: 15,
776
776
  lineHeight: 1.25,
@@ -778,8 +778,8 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
778
778
  color: "var(--text)",
779
779
  overflowWrap: "anywhere"
780
780
  },
781
- children: d
782
- }), e.subtitleField && /* @__PURE__ */ M("div", {
781
+ children: l
782
+ }), e.subtitleField && /* @__PURE__ */ F("div", {
783
783
  style: {
784
784
  marginTop: 4,
785
785
  fontSize: 12.5,
@@ -787,17 +787,17 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
787
787
  color: "var(--text-3)",
788
788
  overflowWrap: "anywhere"
789
789
  },
790
- children: l(e.subtitleField)
790
+ children: s(e.subtitleField)
791
791
  })]
792
792
  }),
793
- f.length > 0 && /* @__PURE__ */ M("div", {
793
+ u.length > 0 && /* @__PURE__ */ F("div", {
794
794
  style: {
795
795
  display: "flex",
796
796
  flexWrap: "wrap",
797
797
  gap: 6,
798
798
  marginTop: 10
799
799
  },
800
- children: f.map((e) => /* @__PURE__ */ M("span", {
800
+ children: u.map((e) => /* @__PURE__ */ F("span", {
801
801
  style: {
802
802
  minWidth: 0,
803
803
  maxWidth: "100%",
@@ -809,10 +809,10 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
809
809
  lineHeight: 1.4,
810
810
  overflowWrap: "anywhere"
811
811
  },
812
- children: l(e)
812
+ children: s(e)
813
813
  }, e))
814
814
  }),
815
- p.length > 0 && /* @__PURE__ */ M("dl", {
815
+ ee.length > 0 && /* @__PURE__ */ F("dl", {
816
816
  style: {
817
817
  display: "grid",
818
818
  gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
@@ -821,23 +821,23 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
821
821
  fontSize: 12.5,
822
822
  lineHeight: 1.35
823
823
  },
824
- children: p.map((e) => /* @__PURE__ */ N("div", {
824
+ children: ee.map((e) => /* @__PURE__ */ I("div", {
825
825
  style: { display: "contents" },
826
- children: [/* @__PURE__ */ M("dt", {
826
+ children: [/* @__PURE__ */ F("dt", {
827
827
  style: { color: "var(--text-3)" },
828
- children: gt(o, n, e)
829
- }), /* @__PURE__ */ M("dd", {
828
+ children: pt(a, t, e)
829
+ }), /* @__PURE__ */ F("dd", {
830
830
  style: {
831
831
  margin: 0,
832
832
  color: "var(--text-2)",
833
833
  minWidth: 0,
834
834
  overflowWrap: "anywhere"
835
835
  },
836
- children: l(e)
836
+ children: s(e)
837
837
  })]
838
838
  }, e))
839
839
  }),
840
- m.length > 0 && /* @__PURE__ */ M("div", {
840
+ d.length > 0 && /* @__PURE__ */ F("div", {
841
841
  style: {
842
842
  display: "flex",
843
843
  flexWrap: "wrap",
@@ -846,22 +846,22 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
846
846
  color: "var(--text-3)",
847
847
  fontSize: 11.5
848
848
  },
849
- children: m.map((e) => /* @__PURE__ */ N("span", {
849
+ children: d.map((e) => /* @__PURE__ */ I("span", {
850
850
  style: {
851
851
  minWidth: 0,
852
852
  overflowWrap: "anywhere"
853
853
  },
854
854
  children: [
855
- gt(o, n, e),
855
+ pt(a, t, e),
856
856
  ": ",
857
- l(e)
857
+ s(e)
858
858
  ]
859
859
  }, e))
860
860
  })
861
861
  ]
862
862
  });
863
863
  }
864
- function F(e, t, n, r, i, a) {
864
+ function R(e, t, n, r, i, a) {
865
865
  if (n.startsWith("$status.")) {
866
866
  let t = n.slice(8), r = i?.find((e) => e.group_code === t);
867
867
  return e(r?.status_name) || r?.status_code;
@@ -870,68 +870,68 @@ function F(e, t, n, r, i, a) {
870
870
  let e = n.slice(10);
871
871
  return a?.find((t) => t.property_code === e)?.value;
872
872
  }
873
- return Oe(t, r, n);
873
+ return Xe(t, r, n);
874
874
  }
875
- function gt(e, t, n) {
875
+ function pt(e, t, n) {
876
876
  if (n.startsWith("$status.")) return n.slice(8);
877
877
  if (n.startsWith("$property.")) return n.slice(10);
878
878
  let r = t.fields.get(n);
879
- return r ? s(e, r, n) : n;
879
+ return r ? w(e, r, n) : n;
880
880
  }
881
- function _t({ title: e, editing: t, isNew: n, isRecordDeleted: r, dirty: i, isSaving: a, hasChildErrors: o, hasFieldErrors: s, canRestore: c, entity: l, screen: u, globalActions: d, entityCode: f, record: p, id: m, listRoute: ee, listRouteExists: te, highlights: ne, showBack: re, onBack: ie, onCancelEdit: se, onSave: ce, onRestore: ue, isRestoring: de, refreshControl: pe, isRealtimeEntity: he, canManageTemplates: ge }) {
882
- let y = le(), Se = le("errors"), Ce = Re(l), { run: we } = be(), Te = b("detail"), x = _(), Ee = _e(), De = v(u?.action_layout, l?.action_layout, l?.actions, d, "detail_toolbar"), Oe = v(u?.action_layout, l?.action_layout, l?.actions, d, "detail"), S = ye(y, Oe, l?.actions, d, p ?? {}, [], Ce, Be(l, p ?? {})), ke = ye(y, De, l?.actions, d, p ?? {}, [], Ce, Be(l, p ?? {})), Ae = k(() => {
883
- if (!l) return;
884
- let e = m ? [m] : [];
881
+ function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSaving: c, hasChildErrors: l, hasFieldErrors: u, canRestore: ee, entity: d, screen: f, globalActions: p, entityCode: te, record: m, id: h, listRoute: ie, listRouteExists: ae, highlights: se, showBack: ce, onBack: de, onCancelEdit: fe, onSave: me, onRestore: ge, isRestoring: _e, refreshControl: ve, isRealtimeEntity: ye, canManageTemplates: xe }) {
882
+ let C = Qe(), Se = Qe("errors"), Ce = $e(d), { run: we } = le(), w = oe("detail"), Te = S(), Ee = be(), De = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail_toolbar"), Oe = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail"), ke = pe(C, Oe, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), T = pe(C, De, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), Ae = M(() => {
883
+ if (!d) return;
884
+ let e = h ? [h] : [];
885
885
  return {
886
- entity: l,
887
- entityCode: f ?? "",
888
- screen: u,
889
- screenRoute: u?.route ?? "",
890
- selectedRows: p ? [p] : [],
886
+ entity: d,
887
+ entityCode: te ?? "",
888
+ screen: f,
889
+ screenRoute: f?.route ?? "",
890
+ selectedRows: m ? [m] : [],
891
891
  selectedIds: e,
892
- t: y,
893
- tabNavigate: (e, t) => x(e, {
892
+ t: C,
893
+ tabNavigate: (e, t) => Te(e, {
894
894
  title: t?.title,
895
895
  icon: t?.icon,
896
896
  search: t?.search
897
897
  }),
898
- runActionApi: (e, t) => oe(e, t),
899
- recordHref: (e) => e === m && u?.route ? u.route.replace(":id", encodeURIComponent(e)) : null
898
+ runActionApi: (e, t) => ue(e, t),
899
+ recordHref: (e) => e === h && f?.route ? f.route.replace(":id", encodeURIComponent(e)) : null
900
900
  };
901
901
  }, [
902
- l,
902
+ d,
903
+ te,
903
904
  f,
904
- u,
905
+ h,
905
906
  m,
906
- p,
907
- y,
908
- x
907
+ C,
908
+ Te
909
909
  ]), je = (e, t) => {
910
- let n = C(Se, e, t, { row: p ?? void 0 });
910
+ let n = v(Se, e, t, { row: m ?? void 0 });
911
911
  if (n === null) return;
912
- let r = m ? [m] : [], i = e === "__delete" && te ? ee : null;
912
+ let r = h ? [h] : [], i = e === "__delete" && ae ? ie : null;
913
913
  return we({
914
914
  action: t,
915
- title: y(t.display?.name) || e,
916
- row: p ?? void 0,
917
- execute: (e) => oe(n, ae(e, r)),
915
+ title: C(t.display?.name) || e,
916
+ row: m ?? void 0,
917
+ execute: (e) => ue(n, g(e, r)),
918
918
  onSuccess: i ? () => {
919
- ve.getState().kill(xe(location)), Ee(i, { replace: !0 });
919
+ re.getState().kill(ne(location)), Ee(i, { replace: !0 });
920
920
  } : void 0
921
921
  });
922
- }, Me = Te.isVisible("show_actions") && !n && m && S.length > 0 ? /* @__PURE__ */ M(Le, {
923
- layout: S,
924
- row: p,
922
+ }, E = w.isVisible("show_actions") && !n && h && ke.length > 0 ? /* @__PURE__ */ F(y, {
923
+ layout: ke,
924
+ row: m,
925
925
  onRun: je,
926
926
  kind: "detail",
927
- entityActions: l?.actions,
928
- globalActions: d,
927
+ entityActions: d?.actions,
928
+ globalActions: p,
929
929
  reservedRightWidth: 0,
930
930
  widgetContext: Ae
931
- }) : null, Ne = !n && m ? /* @__PURE__ */ M(w, {
932
- liveObject: pe,
933
- realtime: he
934
- }) : null, Pe = Te.isVisible("show_actions") && !n && m && ke.length > 0 ? /* @__PURE__ */ N("div", {
931
+ }) : null, Me = !n && h ? /* @__PURE__ */ F(b, {
932
+ liveObject: ve,
933
+ realtime: ye
934
+ }) : null, Ne = w.isVisible("show_actions") && !n && h && T.length > 0 ? /* @__PURE__ */ I("div", {
935
935
  style: {
936
936
  display: "flex",
937
937
  justifyContent: "flex-end",
@@ -939,63 +939,63 @@ function _t({ title: e, editing: t, isNew: n, isRecordDeleted: r, dirty: i, isSa
939
939
  gap: 8,
940
940
  marginTop: 10
941
941
  },
942
- children: [Me ? null : Ne, /* @__PURE__ */ M(Le, {
943
- layout: ke,
944
- row: p,
942
+ children: [E ? null : Me, /* @__PURE__ */ F(y, {
943
+ layout: T,
944
+ row: m,
945
945
  onRun: je,
946
946
  kind: "detail",
947
- entityActions: l?.actions,
948
- globalActions: d,
947
+ entityActions: d?.actions,
948
+ globalActions: p,
949
949
  reservedRightWidth: 0,
950
950
  widgetContext: Ae,
951
- ariaLabel: Me ? y("record.toolbar_actions", "Detail toolbar actions") : y("record.page_actions", "Page actions")
951
+ ariaLabel: E ? C("record.toolbar_actions", "Detail toolbar actions") : C("record.page_actions", "Page actions")
952
952
  })]
953
- }) : null, Fe = Te.isVisible("show_actions") && !n && m && f ? /* @__PURE__ */ M(T, {
954
- entityCode: f,
953
+ }) : null, Pe = w.isVisible("show_actions") && !n && h && te ? /* @__PURE__ */ F(x, {
954
+ entityCode: te,
955
955
  scope: "detail",
956
- objectIds: [m],
957
- capability: l?.documents,
958
- canManageTemplates: ge
959
- }) : null, Ie = r ? c ? /* @__PURE__ */ M(g, {
956
+ objectIds: [h],
957
+ capability: d?.documents,
958
+ canManageTemplates: xe
959
+ }) : null, Fe = a ? ee ? /* @__PURE__ */ F(r, {
960
960
  kind: "primary",
961
- icon: M(de ? fe : h.refresh, { size: 13 }),
962
- onClick: ue,
963
- disabled: de,
964
- children: de ? y("record.restoring", "Restoring…") : y("record.restore", "Restore")
965
- }) : null : t ? /* @__PURE__ */ N(at, { children: [/* @__PURE__ */ M(g, {
966
- icon: /* @__PURE__ */ M(h.x, { size: 13 }),
967
- onClick: se,
968
- disabled: a,
969
- children: y("dialog.cancel", "Cancel")
970
- }), /* @__PURE__ */ M(g, {
961
+ icon: F(_e ? o : i.refresh, { size: 13 }),
962
+ onClick: ge,
963
+ disabled: _e,
964
+ children: _e ? C("record.restoring", "Restoring…") : C("record.restore", "Restore")
965
+ }) : null : t ? /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(r, {
966
+ icon: /* @__PURE__ */ F(i.x, { size: 13 }),
967
+ onClick: fe,
968
+ disabled: c,
969
+ children: C("dialog.cancel", "Cancel")
970
+ }), /* @__PURE__ */ F(r, {
971
971
  kind: "primary",
972
- icon: M(a ? fe : h.save, { size: 13 }),
973
- onClick: ce,
974
- disabled: a || o || s,
975
- title: o ? y("record.save.fix_child_rows", "Fix errors in child rows") : s ? y("record.save.fix_fields", "Fix the highlighted fields") : void 0,
976
- children: a ? y("dialog.saving", "Saving…") : y("dialog.save", "Save")
977
- })] }) : !n && m ? Me ? /* @__PURE__ */ N("span", {
972
+ icon: F(c ? o : i.save, { size: 13 }),
973
+ onClick: me,
974
+ disabled: c || l || u,
975
+ title: l ? C("record.save.fix_child_rows", "Fix errors in child rows") : u ? C("record.save.fix_fields", "Fix the highlighted fields") : void 0,
976
+ children: c ? C("dialog.saving", "Saving…") : C("dialog.save", "Save")
977
+ })] }) : !n && h ? E ? /* @__PURE__ */ I("span", {
978
978
  style: { display: "contents" },
979
- children: [Fe, Me]
980
- }) : Fe : null;
981
- return /* @__PURE__ */ N(at, { children: [/* @__PURE__ */ M(E, {
982
- icon: l?.display.icon ? /* @__PURE__ */ M(me, {
983
- name: l.display.icon,
979
+ children: [Pe, E]
980
+ }) : Pe : null;
981
+ return /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(Re, {
982
+ icon: d?.display.icon ? /* @__PURE__ */ F(Be, {
983
+ name: d.display.icon,
984
984
  size: 16
985
985
  }) : void 0,
986
986
  title: e,
987
- description: y(u?.display?.description) || y(l?.display?.description),
988
- highlights: ne,
989
- identityControls: !r && !t && !n ? Ne : null,
987
+ description: C(f?.display?.description) || C(d?.display?.description),
988
+ highlights: se,
989
+ identityControls: !a && !t && !n ? Me : null,
990
990
  mode: n ? "create" : t ? "edit" : "display",
991
- dirty: i,
992
- showBack: re,
993
- onBack: ie,
994
- right: Ie,
995
- showTitle: Te.isVisible("show_title")
996
- }), Pe] });
991
+ dirty: s,
992
+ showBack: ce,
993
+ onBack: de,
994
+ right: Fe,
995
+ showTitle: w.isVisible("show_title")
996
+ }), Ne] });
997
997
  }
998
- var vt = {
998
+ var ht = {
999
999
  danger: {
1000
1000
  border: "var(--danger)",
1001
1001
  background: "var(--danger-soft)",
@@ -1012,9 +1012,9 @@ var vt = {
1012
1012
  color: "var(--accent)"
1013
1013
  }
1014
1014
  };
1015
- function yt({ tone: e, testId: t, children: n }) {
1016
- let r = vt[e];
1017
- return /* @__PURE__ */ N("div", {
1015
+ function gt({ tone: e, testId: t, children: n }) {
1016
+ let r = ht[e];
1017
+ return /* @__PURE__ */ I("div", {
1018
1018
  "data-testid": t,
1019
1019
  style: {
1020
1020
  display: "flex",
@@ -1028,14 +1028,13 @@ function yt({ tone: e, testId: t, children: n }) {
1028
1028
  color: r.color,
1029
1029
  fontSize: 12.5
1030
1030
  },
1031
- children: [M(e === "info" ? h.info : h.warning, { size: 14 }), /* @__PURE__ */ M("span", { children: n })]
1031
+ children: [F(e === "info" ? i.info : i.warning, { size: 14 }), /* @__PURE__ */ F("span", { children: n })]
1032
1032
  });
1033
1033
  }
1034
- function bt(e, t, n, r) {
1034
+ function _t(e, t, n, r) {
1035
1035
  let i = t.tenant_key, a = i ? t.fields.get(i) : void 0;
1036
1036
  if (!i || !a?.ref?.entity) return;
1037
1037
  let o = r?.[a.ref.entity]?.[String(n[i])];
1038
- if (o) return p(e, o, a.display?.ref_display_field || "$display", "") || void 0;
1038
+ if (o) return T(e, o, a.display?.ref_display_field || "$display", "") || void 0;
1039
1039
  }
1040
- //#endregion
1041
- export { pt as SmartDetailPage };
1040
+ export { ut as SmartDetailPage };