@declarion/react 0.142.0 → 0.147.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,35 +1,35 @@
1
1
  import { OrderedMap as e } from "../../types/ordmap.js";
2
- import { coerceDisplayString as t } from "../../lib/display-value.js";
3
- import { entityAllowsMutation as n, extractPkValues as r, fieldDisplayName as i, getPrimaryKeyFields as a, isUserEditableField as o, resolveDetailRoute as s, rowSetInTenant as c } from "../../types/schema.js";
4
- import { buildActionBody as l, createEntity as u, deleteObject as d, encodeObjectId as f, executeAction as p, updateEntity as m } from "../../api/data.js";
5
- import { failureTitle as h } from "../../lib/failure.js";
6
- import { Icon as g } from "../primitives/Icons.js";
7
- import { Btn as _ } from "../primitives/Btn.js";
8
- import { IconBtn as v } from "../primitives/IconBtn.js";
9
- import { useText as y } from "../../hooks/useText.js";
10
- import { SectionCard as b } from "../primitives/SectionCard.js";
11
- import { RetryButton as x } from "../primitives/RetryButton.js";
12
- import { useResponsiveMode as S } from "../../hooks/useResponsiveMode.js";
13
- import { Spinner as C } from "../primitives/Spinner.js";
14
- import { readDisplayState as w } from "../../lib/read-display-state.js";
15
- import { DynamicIcon as T } from "../shared/DynamicIcon.js";
16
- import { useTabNavigate as E } from "../../hooks/useTabNavigate.js";
17
- import { applyRowState as D, defaultFlatForSlot as O } from "../../lib/actions.js";
18
- import { ENTITY_CHILDREN_KEY as k, useChildrenData as A } from "../../hooks/useChildrenData.js";
19
- import { useActionRunner as j } from "../actions/ActionRunner.js";
20
- import { renderField as M } from "../fields/index.js";
21
- import { dispatchAction as N } from "../../lib/action-dispatch.js";
22
- import { ResponsiveActionBar as P } from "../actions/ResponsiveActionBar.js";
23
- import { useRowTenant as ee } from "../../hooks/useRowTenant.js";
24
- import { dataTableCellStyle as F, dataTableHeadCellStyle as te, dataTableStyle as ne } from "../primitives/dataTableStyles.js";
25
- import { ActionButton as re } from "../actions/ActionButton.js";
26
- import { useAssociatedData as I } from "../../hooks/useAssociatedData.js";
27
- import { RowActionsKebab as L } from "../actions/RowActionsKebab.js";
28
- import { AssociatedToolbar as R } from "./AssociatedToolbar.js";
2
+ import { Btn as t } from "../primitives/Btn.js";
3
+ import { Icon as n } from "../primitives/Icons.js";
4
+ import { IconBtn as r } from "../primitives/IconBtn.js";
5
+ import { SectionCard as i } from "../primitives/SectionCard.js";
6
+ import { Spinner as a } from "../primitives/Spinner.js";
7
+ import { dataTableCellStyle as o, dataTableHeadCellStyle as s, dataTableStyle as c } from "../primitives/dataTableStyles.js";
8
+ import { DynamicIcon as l } from "../shared/DynamicIcon.js";
9
+ import { entityAllowsMutation as u, extractPkValues as d, fieldDisplayName as f, getPrimaryKeyFields as p, isUserEditableField as m, resolveDetailRoute as h, rowSetInTenant as g } from "../../types/schema.js";
10
+ import { renderField as _ } from "../fields/index.js";
11
+ import { ENTITY_CHILDREN_KEY as v, useChildrenData as y } from "../../hooks/useChildrenData.js";
12
+ import { useAssociatedData as b } from "../../hooks/useAssociatedData.js";
13
+ import { readDisplayState as x } from "../../lib/read-display-state.js";
14
+ import { RetryButton as S } from "../primitives/RetryButton.js";
15
+ import { buildActionBody as C, createEntity as w, deleteObject as T, encodeObjectId as E, executeAction as D, updateEntity as O } from "../../api/data.js";
16
+ import { useTabNavigate as k } from "../../hooks/useTabNavigate.js";
17
+ import { ActionButton as A } from "../actions/ActionButton.js";
18
+ import { RowActionsKebab as j } from "../actions/RowActionsKebab.js";
19
+ import { AssociatedToolbar as M } from "./AssociatedToolbar.js";
20
+ import { applyRowState as N, defaultFlatForSlot as P } from "../../lib/actions.js";
21
+ import { coerceDisplayString as F } from "../../lib/display-value.js";
22
+ import { ResponsiveActionBar as I } from "../actions/ResponsiveActionBar.js";
23
+ import { useActionRunner as ee } from "../actions/ActionRunner.js";
24
+ import { dispatchAction as te } from "../../lib/action-dispatch.js";
25
+ import { useResponsiveMode as ne } from "../../hooks/useResponsiveMode.js";
26
+ import { useText as L } from "../../hooks/useText.js";
27
+ import { useRowTenant as re } from "../../hooks/useRowTenant.js";
28
+ import { failureTitle as R } from "../../lib/failure.js";
29
29
  import { useCallback as z, useEffect as B, useId as ie, useMemo as V, useRef as ae, useState as H } from "react";
30
30
  import { useQueryClient as U } from "@tanstack/react-query";
31
31
  import { Fragment as oe, jsx as W, jsxs as G } from "react/jsx-runtime";
32
- //#region src/components/detail-layout/AssociatedBlock.tsx
32
+ // src/components/detail-layout/AssociatedBlock.tsx
33
33
  function se(e) {
34
34
  if (!e) return [];
35
35
  let t = [];
@@ -88,17 +88,17 @@ function ce(e, t, n) {
88
88
  return null;
89
89
  }
90
90
  function q(e, t, n, r, i) {
91
- let o = e.fields.get(t)?.ref?.field;
92
- if (!o || a(n).includes(o)) return i;
93
- let s = r[o];
94
- return typeof s == "string" || typeof s == "number" ? String(s) : "";
91
+ let a = e.fields.get(t)?.ref?.field;
92
+ if (!a || p(n).includes(a)) return i;
93
+ let o = r[a];
94
+ return typeof o == "string" || typeof o == "number" ? String(o) : "";
95
95
  }
96
96
  function le(e, t, n) {
97
- let r = new Set(a(e));
97
+ let r = new Set(p(e));
98
98
  return new Set(t.filter((t) => {
99
99
  if (t === n || r.has(t)) return !1;
100
100
  let i = e.fields.get(t);
101
- return i ? o(i) : !1;
101
+ return i ? m(i) : !1;
102
102
  }));
103
103
  }
104
104
  function ue(e, t, n) {
@@ -119,7 +119,7 @@ function de(e, t, n, r) {
119
119
  return i;
120
120
  }
121
121
  function J({ node: e, ctx: t }) {
122
- let n = y("errors"), r = e.associated;
122
+ let n = L("errors"), r = e.associated;
123
123
  if (!r || t.isNew) return null;
124
124
  let i = t.schema.entities[r];
125
125
  if (!i) return null;
@@ -145,67 +145,67 @@ function J({ node: e, ctx: t }) {
145
145
  ]
146
146
  });
147
147
  }
148
- function Y({ node: e, ctx: t, assocCode: r, assocEntity: i, fkField: a }) {
149
- let o = y(), s = y("errors"), c = e.columns && e.columns.length > 0 ? e.columns.filter((e) => e !== a && !!i.fields.get(e)) : i.fields.names().filter((e) => {
150
- if (e === a) return !1;
151
- let t = i.fields.get(e);
148
+ function Y({ node: e, ctx: r, assocCode: a, assocEntity: o, fkField: s }) {
149
+ let c = L(), d = L("errors"), f = e.columns && e.columns.length > 0 ? e.columns.filter((e) => e !== s && !!o.fields.get(e)) : o.fields.names().filter((e) => {
150
+ if (e === s) return !1;
151
+ let t = o.fields.get(e);
152
152
  return !(!t || t.primary || t.display?.is_listable === !1);
153
- }), u = n(i, "update"), d = ee(i), f = e.interaction ?? "navigate", m = (f === "inline_edit" || f === "row_edit") && u && e.editable !== !1, h = o(i.display?.name_plural) || o(i.display?.name) || r, v = e.searchable === !0 || e.filters && e.filters.length > 0, x = q(i, a, t.entity, t.record, t.recordId), S = V(() => K(i.actions, a, x), [
154
- i.actions,
155
- a,
156
- x
157
- ]), C = V(() => {
153
+ }), p = u(o, "update"), m = re(o), h = e.interaction ?? "navigate", g = (h === "inline_edit" || h === "row_edit") && p && e.editable !== !1, _ = c(o.display?.name_plural) || c(o.display?.name) || a, v = e.searchable === !0 || e.filters && e.filters.length > 0, y = q(o, s, r.entity, r.record, r.recordId), b = V(() => K(o.actions, s, y), [
154
+ o.actions,
155
+ s,
156
+ y
157
+ ]), x = V(() => {
158
158
  let e = {};
159
- for (let { code: t, action: n } of S) e[t] = n;
159
+ for (let { code: t, action: n } of b) e[t] = n;
160
160
  return e;
161
- }, [S]), w = V(() => {
162
- let e = i.action_layout ?? null;
163
- return D(o, e ?? O(C, "list_toolbar"), C, void 0, {}, [], d);
161
+ }, [b]), S = V(() => {
162
+ let e = o.action_layout ?? null;
163
+ return N(c, e ?? P(x, "list_toolbar"), x, void 0, {}, [], m);
164
164
  }, [
165
- o,
166
- i.action_layout,
167
- C,
168
- d
169
- ]), { run: k } = j(), A = E(), M = V(() => ({
170
- entity: i,
171
- entityCode: r,
165
+ c,
166
+ o.action_layout,
167
+ x,
168
+ m
169
+ ]), { run: w } = ee(), T = k(), E = V(() => ({
170
+ entity: o,
171
+ entityCode: a,
172
172
  screenRoute: typeof window < "u" ? window.location.pathname : "",
173
173
  selectedRows: [],
174
174
  selectedIds: [],
175
- t: o,
176
- tabNavigate: (e, t) => A(e, {
175
+ t: c,
176
+ tabNavigate: (e, t) => T(e, {
177
177
  title: t?.title,
178
178
  icon: t?.icon,
179
179
  search: t?.search
180
180
  }),
181
- runActionApi: (e, t) => p(e, t)
181
+ runActionApi: (e, t) => D(e, t)
182
182
  }), [
183
- i,
184
- r,
185
183
  o,
186
- A
187
- ]), F = U(), te = z(() => {
188
- F.invalidateQueries({ predicate: (e) => {
184
+ a,
185
+ c,
186
+ T
187
+ ]), O = U(), j = z(() => {
188
+ O.invalidateQueries({ predicate: (e) => {
189
189
  let t = e.queryKey;
190
- return t[0] === "entity-children" && t[3] === r;
190
+ return t[0] === "entity-children" && t[3] === a;
191
191
  } });
192
- }, [F, r]), ne = z((e, t) => {
193
- let n = N(s, e, t, {}, r);
194
- if (n !== null) return k({
192
+ }, [O, a]), M = z((e, t) => {
193
+ let n = te(d, e, t, {}, a);
194
+ if (n !== null) return w({
195
195
  action: t,
196
- title: o(t.display?.name) || e,
196
+ title: c(t.display?.name) || e,
197
197
  execute: async (e) => {
198
- let t = await p(n, l(e, void 0));
199
- return te(), t;
198
+ let t = await D(n, C(e, void 0));
199
+ return j(), t;
200
200
  }
201
201
  });
202
202
  }, [
203
- o,
204
- s,
205
- k,
206
- r,
207
- te
208
- ]), [I, L] = H(0), R = /* @__PURE__ */ G("div", {
203
+ c,
204
+ d,
205
+ w,
206
+ a,
207
+ j
208
+ ]), [F, ne] = H(0), R = /* @__PURE__ */ G("div", {
209
209
  style: {
210
210
  display: "flex",
211
211
  alignItems: "center",
@@ -214,65 +214,65 @@ function Y({ node: e, ctx: t, assocCode: r, assocEntity: i, fkField: a }) {
214
214
  minWidth: 0,
215
215
  justifyContent: "flex-end"
216
216
  },
217
- children: [i.action_layout ? w.length > 0 && /* @__PURE__ */ W(P, {
217
+ children: [o.action_layout ? S.length > 0 && /* @__PURE__ */ W(I, {
218
218
  kind: "toolbar",
219
- layout: w,
220
- entityActions: C,
221
- onRun: ne,
222
- widgetContext: M,
223
- ariaLabel: o("record.associated.toolbar_actions", "{name} toolbar actions", { name: h })
224
- }) : S.map(({ code: e, action: t }) => /* @__PURE__ */ W(re, {
219
+ layout: S,
220
+ entityActions: x,
221
+ onRun: M,
222
+ widgetContext: E,
223
+ ariaLabel: c("record.associated.toolbar_actions", "{name} toolbar actions", { name: _ })
224
+ }) : b.map(({ code: e, action: t }) => /* @__PURE__ */ W(A, {
225
225
  actionCode: e,
226
226
  action: t,
227
- entityCode: r,
227
+ entityCode: a,
228
228
  variant: "ghost",
229
229
  size: "sm",
230
- onSuccess: te
231
- }, e)), m && /* @__PURE__ */ W(_, {
230
+ onSuccess: j
231
+ }, e)), g && /* @__PURE__ */ W(t, {
232
232
  kind: "ghost",
233
233
  size: "xs",
234
- icon: /* @__PURE__ */ W(g.plus, { size: 12 }),
235
- onClick: () => L((e) => e + 1),
236
- children: o("record.row.add", "Add row")
234
+ icon: /* @__PURE__ */ W(n.plus, { size: 12 }),
235
+ onClick: () => ne((e) => e + 1),
236
+ children: c("record.row.add", "Add row")
237
237
  })]
238
238
  }), B = v ? /* @__PURE__ */ W(X, {
239
- entityCode: r,
240
- entity: i,
241
- parentEntity: t.entityCode,
242
- parentId: x,
243
- foreignKey: a,
244
- columns: c,
245
- editable: m,
246
- interaction: f,
247
- ctx: t,
239
+ entityCode: a,
240
+ entity: o,
241
+ parentEntity: r.entityCode,
242
+ parentId: y,
243
+ foreignKey: s,
244
+ columns: f,
245
+ editable: g,
246
+ interaction: h,
247
+ ctx: r,
248
248
  searchable: e.searchable,
249
249
  filterFields: e.filters,
250
250
  sort: e.sort,
251
- startDraftSignal: I
251
+ startDraftSignal: F
252
252
  }) : /* @__PURE__ */ W(fe, {
253
- entityCode: r,
254
- entity: i,
255
- parentEntity: t.entityCode,
256
- parentId: x,
257
- foreignKey: a,
258
- columns: c,
259
- editable: m,
260
- interaction: f,
261
- ctx: t,
253
+ entityCode: a,
254
+ entity: o,
255
+ parentEntity: r.entityCode,
256
+ parentId: y,
257
+ foreignKey: s,
258
+ columns: f,
259
+ editable: g,
260
+ interaction: h,
261
+ ctx: r,
262
262
  sort: e.sort,
263
- startDraftSignal: I
263
+ startDraftSignal: F
264
264
  });
265
- return t.withinCard ? /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("div", {
265
+ return r.withinCard ? /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("div", {
266
266
  style: {
267
267
  display: "flex",
268
268
  justifyContent: "flex-end",
269
269
  marginBottom: 8
270
270
  },
271
271
  children: R
272
- }), B] }) : /* @__PURE__ */ W(b, {
273
- title: h,
274
- icon: i.display?.icon ? /* @__PURE__ */ W(T, {
275
- name: i.display.icon,
272
+ }), B] }) : /* @__PURE__ */ W(i, {
273
+ title: _,
274
+ icon: o.display?.icon ? /* @__PURE__ */ W(l, {
275
+ name: o.display.icon,
276
276
  size: 14
277
277
  }) : void 0,
278
278
  right: R,
@@ -280,9 +280,9 @@ function Y({ node: e, ctx: t, assocCode: r, assocEntity: i, fkField: a }) {
280
280
  });
281
281
  }
282
282
  function fe({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, sort: l, startDraftSignal: u }) {
283
- let d = U(), f = A(n, r, e, i, l), p = f.data, m = w(f), h = p?.data ?? [], g = p?.$refs, _ = z(() => {
283
+ let d = U(), f = y(n, r, e, i, l), p = f.data, m = x(f), h = p?.data ?? [], g = p?.$refs, _ = z(() => {
284
284
  d.invalidateQueries({ queryKey: [
285
- k,
285
+ v,
286
286
  n,
287
287
  r,
288
288
  e
@@ -311,15 +311,15 @@ function fe({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey
311
311
  startDraftSignal: u
312
312
  });
313
313
  }
314
- function X({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, searchable: l, filterFields: u, sort: d, startDraftSignal: f }) {
315
- let p = y(), m = U(), [h, g] = H(""), [v, b] = H(""), [x, S] = H({}), T = ae(void 0);
314
+ function X({ entityCode: e, entity: n, parentEntity: r, parentId: i, foreignKey: o, columns: s, editable: c, interaction: l, ctx: u, searchable: d, filterFields: f, sort: p, startDraftSignal: m }) {
315
+ let h = L(), g = U(), [_, v] = H(""), [y, S] = H(""), [C, w] = H({}), T = ae(void 0);
316
316
  B(() => (T.current && clearTimeout(T.current), T.current = setTimeout(() => {
317
- b(h);
317
+ S(_);
318
318
  }, 300), () => {
319
319
  T.current && clearTimeout(T.current);
320
- }), [h]);
320
+ }), [_]);
321
321
  let E = z((e, t) => {
322
- S((n) => {
322
+ w((n) => {
323
323
  if (t === "__all__") {
324
324
  let { [e]: t, ...r } = n;
325
325
  return r;
@@ -329,7 +329,7 @@ function X({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey:
329
329
  [e]: t
330
330
  };
331
331
  });
332
- }, []), D = V(() => Object.keys(x).length > 0 ? x : void 0, [x]), O = I(n, r, e, i, d, void 0, v || void 0, D), { data: k, hasNextPage: A, fetchNextPage: j, isFetchingNextPage: M } = O, N = w(O), { rows: P, refs: ee } = V(() => {
332
+ }, []), D = V(() => Object.keys(C).length > 0 ? C : void 0, [C]), O = b(r, i, e, o, p, void 0, y || void 0, D), { data: k, hasNextPage: A, fetchNextPage: j, isFetchingNextPage: N } = O, P = x(O), { rows: F, refs: I } = V(() => {
333
333
  if (!k?.pages) return {
334
334
  rows: [],
335
335
  refs: void 0
@@ -346,82 +346,82 @@ function X({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey:
346
346
  rows: e,
347
347
  refs: t
348
348
  };
349
- }, [k]), F = z(() => {
350
- m.invalidateQueries({ predicate: (t) => {
349
+ }, [k]), ee = z(() => {
350
+ g.invalidateQueries({ predicate: (t) => {
351
351
  let n = t.queryKey;
352
352
  return n[0] === "entity-children" && n[3] === e;
353
353
  } });
354
- }, [m, e]);
354
+ }, [g, e]);
355
355
  return /* @__PURE__ */ G("div", { children: [
356
- /* @__PURE__ */ W(R, {
357
- entity: t,
358
- searchable: l,
359
- filterFields: u,
360
- searchValue: h,
361
- onSearchChange: g,
362
- filters: x,
356
+ /* @__PURE__ */ W(M, {
357
+ entity: n,
358
+ searchable: d,
359
+ filterFields: f,
360
+ searchValue: _,
361
+ onSearchChange: v,
362
+ filters: C,
363
363
  onFilterChange: E,
364
- allEntities: c.schema.entities
364
+ allEntities: u.schema.entities
365
365
  }),
366
366
  /* @__PURE__ */ W(Z, {
367
367
  entityCode: e,
368
- entity: t,
369
- parentId: r,
370
- foreignKey: i,
371
- columns: a,
372
- editable: o,
373
- interaction: s,
374
- ctx: c,
375
- rows: P,
376
- refs: ee,
377
- isLoading: N.loading,
378
- isError: N.error !== null,
379
- onRetry: N.retry,
380
- invalidateQuery: F,
381
- startDraftSignal: f
368
+ entity: n,
369
+ parentId: i,
370
+ foreignKey: o,
371
+ columns: s,
372
+ editable: c,
373
+ interaction: l,
374
+ ctx: u,
375
+ rows: F,
376
+ refs: I,
377
+ isLoading: P.loading,
378
+ isError: P.error !== null,
379
+ onRetry: P.retry,
380
+ invalidateQuery: ee,
381
+ startDraftSignal: m
382
382
  }),
383
383
  A && /* @__PURE__ */ W("div", {
384
384
  style: { marginTop: 4 },
385
- children: /* @__PURE__ */ W(_, {
385
+ children: /* @__PURE__ */ W(t, {
386
386
  kind: "ghost",
387
387
  size: "xs",
388
- icon: M ? /* @__PURE__ */ W(C, { size: 12 }) : void 0,
388
+ icon: N ? /* @__PURE__ */ W(a, { size: 12 }) : void 0,
389
389
  onClick: () => j(),
390
- disabled: M,
391
- children: p("record.associated.load_more", "Load more")
390
+ disabled: N,
391
+ children: h("record.associated.load_more", "Load more")
392
392
  })
393
393
  })
394
394
  ] });
395
395
  }
396
- function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, editable: l, interaction: p, ctx: g, rows: _, refs: v, isLoading: b, isError: C, onRetry: w, invalidateQuery: T, startDraftSignal: E }) {
397
- let D = y(), O = y("errors"), k = S(), A = ee(t), M = k.isPhone && g.relatedRecordsPresentation === "table", N = o.find((e) => e !== a), P = V(() => p === "navigate" ? s(void 0, t, g.schema.screens) : null, [
398
- p,
399
- t,
400
- g.schema.screens
401
- ]), F = V(() => l ? le(t, o, a) : /* @__PURE__ */ new Set(), [
396
+ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: r, columns: i, editable: a, interaction: o, ctx: l, rows: u, refs: p, isLoading: m, isError: _, onRetry: v, invalidateQuery: y, startDraftSignal: b }) {
397
+ let x = L(), C = L("errors"), D = ne(), k = re(t), A = D.isPhone && l.relatedRecordsPresentation === "table", j = i.find((e) => e !== r), M = V(() => o === "navigate" ? h(void 0, t, l.schema.screens) : null, [
402
398
  o,
403
- a,
404
399
  t,
405
- l
406
- ]), re = V(() => ue(t, o, a), [
407
- o,
408
- a,
400
+ l.schema.screens
401
+ ]), N = V(() => a ? le(t, i, r) : /* @__PURE__ */ new Set(), [
402
+ i,
403
+ r,
404
+ t,
405
+ a
406
+ ]), P = V(() => ue(t, i, r), [
407
+ i,
408
+ r,
409
409
  t
410
- ]), I = V(() => {
410
+ ]), F = V(() => {
411
411
  let e = /* @__PURE__ */ new Map();
412
- for (let n of _) {
413
- let i = r(t, n);
414
- e.set(f(i), i);
412
+ for (let n of u) {
413
+ let r = d(t, n);
414
+ e.set(E(r), r);
415
415
  }
416
416
  return e;
417
- }, [_, t]), L = V(() => {
417
+ }, [u, t]), I = V(() => {
418
418
  let e = /* @__PURE__ */ new Map();
419
- for (let n of _) {
420
- let i = n.$row_version;
421
- typeof i == "string" && i !== "" && e.set(f(r(t, n)), i);
419
+ for (let n of u) {
420
+ let r = n.$row_version;
421
+ typeof r == "string" && r !== "" && e.set(E(d(t, n)), r);
422
422
  }
423
423
  return e;
424
- }, [_, t]), R = V(() => se(t.actions), [t.actions]), [ie, U] = H(null), [oe, K] = H(null), [ce, q] = H([]), [J, Y] = H({}), fe = ae(J);
424
+ }, [u, t]), te = V(() => se(t.actions), [t.actions]), [ie, U] = H(null), [oe, K] = H(null), [ce, q] = H([]), [J, Y] = H({}), fe = ae(J);
425
425
  fe.current = J;
426
426
  let X = ae({});
427
427
  B(() => {
@@ -430,7 +430,7 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
430
430
  for (let t of Object.values(e)) clearTimeout(t);
431
431
  };
432
432
  }, []);
433
- let [Z, Q] = H(null), [he, $] = H([]), [ve, ye] = H(!1), { run: be } = j(), [xe, Se] = H(/* @__PURE__ */ new Set()), Ce = z(async (t, n, r) => {
433
+ let [Z, Q] = H(null), [he, $] = H([]), [ve, ye] = H(!1), { run: be } = ee(), [xe, Se] = H(/* @__PURE__ */ new Set()), Ce = z(async (t, n, r) => {
434
434
  Y((e) => ({
435
435
  ...e,
436
436
  [t]: {
@@ -440,11 +440,11 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
440
440
  }
441
441
  }));
442
442
  try {
443
- let i = L.get(t), a = i ? {
443
+ let i = I.get(t), a = i ? {
444
444
  ...n,
445
445
  $row_version: i
446
446
  } : n;
447
- return await m(e, I.get(t) ?? t, a), Y((e) => {
447
+ return await O(e, F.get(t) ?? t, a), Y((e) => {
448
448
  let n = e[t];
449
449
  if (!n) return e;
450
450
  if (n.ver > r) return {
@@ -456,9 +456,9 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
456
456
  };
457
457
  let { [t]: i, ...a } = e;
458
458
  return a;
459
- }), T(), !0;
459
+ }), y(), !0;
460
460
  } catch (e) {
461
- let n = h(O, e);
461
+ let n = R(C, e);
462
462
  return Y((e) => ({
463
463
  ...e,
464
464
  [t]: {
@@ -470,10 +470,10 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
470
470
  }
471
471
  }, [
472
472
  e,
473
- O,
474
- T,
475
- I,
476
- L
473
+ C,
474
+ y,
475
+ F,
476
+ I
477
477
  ]), we = z((e, t, n) => {
478
478
  Y((r) => {
479
479
  let i = r[e] ?? {
@@ -492,41 +492,41 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
492
492
  ver: a
493
493
  }
494
494
  };
495
- }), p === "inline_edit" && (X.current[e] && clearTimeout(X.current[e]), X.current[e] = setTimeout(() => {
495
+ }), o === "inline_edit" && (X.current[e] && clearTimeout(X.current[e]), X.current[e] = setTimeout(() => {
496
496
  let t = fe.current[e];
497
497
  t && Object.keys(t.buffer).length > 0 && Ce(e, { ...t.buffer }, t.ver);
498
498
  }, 500));
499
- }, [Ce, p]), Te = z(() => {
499
+ }, [Ce, o]), Te = z(() => {
500
500
  let e = {};
501
- e[a] = n;
502
- for (let n of o) {
501
+ e[r] = n;
502
+ for (let n of i) {
503
503
  let r = t.fields.get(n);
504
504
  r && (r.default === void 0 ? r.type === "bool" && (e[n] = !1) : e[n] = r.default);
505
505
  }
506
506
  Q(e), $([]);
507
507
  }, [
508
- a,
508
+ r,
509
509
  n,
510
- o,
510
+ i,
511
511
  t.fields
512
- ]), Ee = ae(E);
512
+ ]), Ee = ae(b);
513
513
  B(() => {
514
- E !== void 0 && E !== Ee.current && (Ee.current = E, !Z && Te());
514
+ b !== void 0 && b !== Ee.current && (Ee.current = b, Z || Te());
515
515
  }, [
516
- E,
516
+ b,
517
517
  Z,
518
518
  Te
519
519
  ]);
520
520
  let De = z(async () => {
521
521
  if (!Z) return;
522
- let n = de(Z, o, t, a);
522
+ let n = de(Z, i, t, r);
523
523
  if (n.length > 0) $(n);
524
524
  else {
525
525
  ye(!0);
526
526
  try {
527
- await u(e, Z), Q(null), $([]), T();
527
+ await w(e, Z), Q(null), $([]), y();
528
528
  } catch (e) {
529
- let t = h(O, e);
529
+ let t = R(C, e);
530
530
  $([`_error:${t}`]);
531
531
  } finally {
532
532
  ye(!1);
@@ -534,30 +534,30 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
534
534
  }
535
535
  }, [
536
536
  Z,
537
- o,
537
+ i,
538
538
  t,
539
- a,
539
+ r,
540
540
  e,
541
- O,
542
- T
541
+ C,
542
+ y
543
543
  ]), Oe = z((e) => {
544
544
  Y({}), q([]), K(e);
545
545
  }, []), ke = z(async (e) => {
546
- let n = fe.current[e], i = n?.buffer ?? {};
547
- if (Object.keys(i).length === 0) {
546
+ let n = fe.current[e], a = n?.buffer ?? {};
547
+ if (Object.keys(a).length === 0) {
548
548
  K(null), q([]);
549
549
  return;
550
550
  }
551
- let s = de({
552
- ..._.find((n) => f(r(t, n)) === e) ?? {},
553
- ...i
554
- }, o, t, a);
555
- s.length > 0 ? q(s) : await Ce(e, { ...i }, n?.ver ?? 0) && (K(null), q([]));
551
+ let o = de({
552
+ ...u.find((n) => E(d(t, n)) === e) ?? {},
553
+ ...a
554
+ }, i, t, r);
555
+ o.length > 0 ? q(o) : await Ce(e, { ...a }, n?.ver ?? 0) && (K(null), q([]));
556
556
  }, [
557
- _,
557
+ u,
558
558
  t,
559
- o,
560
- a,
559
+ i,
560
+ r,
561
561
  Ce
562
562
  ]), Ae = z((e) => {
563
563
  Y((t) => {
@@ -566,17 +566,17 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
566
566
  return r;
567
567
  }), q([]), K(null);
568
568
  }, []), je = z((n, r) => {
569
- let i = I.get(n) ?? n;
569
+ let i = F.get(n) ?? n;
570
570
  return be({
571
571
  action: t.actions?.__delete,
572
572
  destructive: !0,
573
- title: D(t.display?.name) || D("record.action.delete", "Delete"),
573
+ title: x(t.display?.name) || x("record.action.delete", "Delete"),
574
574
  row: r,
575
575
  entity: e,
576
576
  execute: async () => {
577
577
  Se((e) => new Set(e).add(n));
578
578
  try {
579
- return await d(e, i);
579
+ return await T(e, i);
580
580
  } finally {
581
581
  Se((e) => {
582
582
  let t = new Set(e);
@@ -584,29 +584,29 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
584
584
  });
585
585
  }
586
586
  },
587
- onSuccess: () => T()
587
+ onSuccess: () => y()
588
588
  });
589
589
  }, [
590
- D,
590
+ x,
591
591
  be,
592
592
  t,
593
593
  e,
594
- T,
595
- I
594
+ y,
595
+ F
596
596
  ]);
597
- if (C) return /* @__PURE__ */ G("div", {
597
+ if (_) return /* @__PURE__ */ G("div", {
598
598
  style: {
599
599
  fontSize: 12.5,
600
600
  color: "var(--danger)",
601
601
  padding: "8px 0"
602
602
  },
603
603
  children: [
604
- O("record.related_rows_unreadable", "The related records could not be loaded."),
604
+ C("record.related_rows_unreadable", "The related records could not be loaded."),
605
605
  " ",
606
- /* @__PURE__ */ W(x, { onRetry: w })
606
+ /* @__PURE__ */ W(S, { onRetry: v })
607
607
  ]
608
608
  });
609
- if (b) return /* @__PURE__ */ G("div", {
609
+ if (m) return /* @__PURE__ */ G("div", {
610
610
  style: {
611
611
  display: "flex",
612
612
  flexDirection: "column",
@@ -623,56 +623,56 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
623
623
  borderRadius: "var(--radius-md)"
624
624
  } })]
625
625
  });
626
- let Me = _.length === 0 && !Z;
627
- return k.isPhone && !M ? /* @__PURE__ */ G("div", { children: [Me && /* @__PURE__ */ W("div", {
626
+ let Me = u.length === 0 && !Z;
627
+ return D.isPhone && !A ? /* @__PURE__ */ G("div", { children: [Me && /* @__PURE__ */ W("div", {
628
628
  style: {
629
629
  fontSize: 12.5,
630
630
  color: "var(--text-3)",
631
631
  padding: "12px 0"
632
632
  },
633
- children: D("record.related.empty", "No records yet.")
633
+ children: x("record.related.empty", "No records yet.")
634
634
  }), !Me && /* @__PURE__ */ G("div", {
635
635
  style: {
636
636
  display: "flex",
637
637
  flexDirection: "column",
638
638
  gap: 10
639
639
  },
640
- children: [_.map((n) => {
641
- let i = f(r(t, n)), a = xe.has(i), s = J[i], u = P && i ? P.replace(/:\w+/, i) : void 0;
640
+ children: [u.map((n) => {
641
+ let r = E(d(t, n)), s = xe.has(r), c = J[r], u = M && r ? M.replace(/:\w+/, r) : void 0;
642
642
  return /* @__PURE__ */ W(pe, {
643
- rowId: i,
643
+ rowId: r,
644
644
  row: n,
645
645
  entity: t,
646
- entities: g.schema.entities,
647
- screens: g.schema.screens,
648
- columns: o,
649
- editableColumns: F,
650
- editable: l && c(t, n, A.tenantId),
651
- interaction: p,
652
- isEditing: oe === i,
646
+ entities: l.schema.entities,
647
+ screens: l.schema.screens,
648
+ columns: i,
649
+ editableColumns: N,
650
+ editable: a && g(t, n, k.tenantId),
651
+ interaction: o,
652
+ isEditing: oe === r,
653
653
  editErrors: ce,
654
- isDeleting: a,
654
+ isDeleting: s,
655
655
  activeCell: ie,
656
656
  setActiveCell: U,
657
- rowState: s,
657
+ rowState: c,
658
658
  onCellChange: we,
659
659
  onDeleteClick: (e) => void je(e, n),
660
660
  onStartEdit: Oe,
661
661
  onConfirmEdit: ke,
662
662
  onCancelEdit: Ae,
663
- refs: v,
664
- identityCol: N,
663
+ refs: p,
664
+ identityCol: j,
665
665
  href: u,
666
- rowActions: R,
666
+ rowActions: te,
667
667
  entityCode: e,
668
- onRowActionSuccess: T
669
- }, i);
668
+ onRowActionSuccess: y
669
+ }, r);
670
670
  }), Z && /* @__PURE__ */ W(_e, {
671
671
  draftRow: Z,
672
672
  entity: t,
673
- columns: o,
674
- editableColumns: re,
675
- foreignKey: a,
673
+ columns: i,
674
+ editableColumns: P,
675
+ foreignKey: r,
676
676
  draftErrors: he,
677
677
  draftSaving: ve,
678
678
  onChange: (e, t) => Q((n) => n && {
@@ -683,7 +683,7 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
683
683
  onCancel: () => {
684
684
  Q(null), $([]);
685
685
  },
686
- refs: v
686
+ refs: p
687
687
  })]
688
688
  })] }) : /* @__PURE__ */ G("div", { children: [Me && /* @__PURE__ */ W("div", {
689
689
  style: {
@@ -691,63 +691,63 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
691
691
  color: "var(--text-3)",
692
692
  padding: "12px 0"
693
693
  },
694
- children: D("record.related.empty", "No records yet.")
694
+ children: x("record.related.empty", "No records yet.")
695
695
  }), !Me && /* @__PURE__ */ W("div", {
696
696
  style: { overflowX: "auto" },
697
697
  children: /* @__PURE__ */ G("table", {
698
- style: ne,
698
+ style: c,
699
699
  children: [/* @__PURE__ */ W("thead", { children: /* @__PURE__ */ G("tr", { children: [
700
- o.map((e) => {
700
+ i.map((e) => {
701
701
  let n = t.fields.get(e);
702
702
  return /* @__PURE__ */ W("th", {
703
- style: te,
704
- children: n ? i(D, n, e, g.schema.entities) : e
703
+ style: s,
704
+ children: n ? f(x, n, e, l.schema.entities) : e
705
705
  }, e);
706
706
  }),
707
- l && /* @__PURE__ */ W("th", { style: {
707
+ a && /* @__PURE__ */ W("th", { style: {
708
708
  height: 30,
709
709
  width: 72
710
710
  } }),
711
- !l && R.length > 0 && /* @__PURE__ */ W("th", { style: {
711
+ !a && te.length > 0 && /* @__PURE__ */ W("th", { style: {
712
712
  height: 30,
713
713
  width: 40
714
714
  } })
715
- ] }) }), /* @__PURE__ */ G("tbody", { children: [_.map((n) => {
716
- let i = f(r(t, n)), a = xe.has(i), s = J[i], u = P && i ? P.replace(/:\w+/, i) : void 0;
715
+ ] }) }), /* @__PURE__ */ G("tbody", { children: [u.map((n) => {
716
+ let r = E(d(t, n)), s = xe.has(r), c = J[r], u = M && r ? M.replace(/:\w+/, r) : void 0;
717
717
  return /* @__PURE__ */ W(me, {
718
- rowId: i,
718
+ rowId: r,
719
719
  row: n,
720
720
  entity: t,
721
- entities: g.schema.entities,
722
- screens: g.schema.screens,
723
- columns: o,
724
- editableColumns: F,
725
- editable: l && c(t, n, A.tenantId),
726
- interaction: p,
727
- isEditing: oe === i,
721
+ entities: l.schema.entities,
722
+ screens: l.schema.screens,
723
+ columns: i,
724
+ editableColumns: N,
725
+ editable: a && g(t, n, k.tenantId),
726
+ interaction: o,
727
+ isEditing: oe === r,
728
728
  editErrors: ce,
729
- isDeleting: a,
729
+ isDeleting: s,
730
730
  activeCell: ie,
731
731
  setActiveCell: U,
732
- rowState: s,
732
+ rowState: c,
733
733
  onCellChange: we,
734
734
  onDeleteClick: (e) => void je(e, n),
735
735
  onStartEdit: Oe,
736
736
  onConfirmEdit: ke,
737
737
  onCancelEdit: Ae,
738
- refs: v,
739
- identityCol: N,
738
+ refs: p,
739
+ identityCol: j,
740
740
  href: u,
741
- rowActions: R,
741
+ rowActions: te,
742
742
  entityCode: e,
743
- onRowActionSuccess: T
744
- }, i);
743
+ onRowActionSuccess: y
744
+ }, r);
745
745
  }), Z && /* @__PURE__ */ W(ge, {
746
746
  draftRow: Z,
747
747
  entity: t,
748
- columns: o,
749
- editableColumns: re,
750
- foreignKey: a,
748
+ columns: i,
749
+ editableColumns: P,
750
+ foreignKey: r,
751
751
  draftErrors: he,
752
752
  draftSaving: ve,
753
753
  onChange: (e, t) => Q((n) => n && {
@@ -758,29 +758,29 @@ function Z({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: o, e
758
758
  onCancel: () => {
759
759
  Q(null), $([]);
760
760
  },
761
- refs: v
761
+ refs: p
762
762
  })] })]
763
763
  })
764
764
  })] });
765
765
  }
766
- function pe({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: s, editableColumns: c, editable: l, interaction: u, isEditing: d, editErrors: f, isDeleting: p, rowState: m, onCellChange: h, onDeleteClick: _, onStartEdit: b, onConfirmEdit: x, onCancelEdit: S, refs: w, identityCol: T, href: E, rowActions: D, onRowActionSuccess: O }) {
767
- let k = y(), A = ie(), j = V(() => !m || Object.keys(m.buffer).length === 0 ? n : {
768
- ...n,
769
- ...m.buffer
770
- }, [n, m]);
771
- if (u === "row_edit" && d) {
772
- let t = m?.error ? [...f, `_error:${m.error}`] : f;
766
+ function pe({ rowId: e, row: t, entity: i, entities: o, screens: s, columns: c, editableColumns: l, editable: u, interaction: d, isEditing: p, editErrors: m, isDeleting: h, rowState: g, onCellChange: v, onDeleteClick: y, onStartEdit: b, onConfirmEdit: x, onCancelEdit: S, refs: C, identityCol: w, href: T, rowActions: E, onRowActionSuccess: D }) {
767
+ let O = L(), k = ie(), A = V(() => !g || Object.keys(g.buffer).length === 0 ? t : {
768
+ ...t,
769
+ ...g.buffer
770
+ }, [t, g]);
771
+ if (d === "row_edit" && p) {
772
+ let t = g?.error ? [...m, `_error:${g.error}`] : m;
773
773
  return /* @__PURE__ */ W(he, {
774
- values: j,
775
- entity: r,
776
- columns: s,
777
- editableColumns: c,
774
+ values: A,
775
+ entity: i,
776
+ columns: c,
777
+ editableColumns: l,
778
778
  errors: t,
779
- saving: m?.saving ?? !1,
780
- onChange: (t, n) => h(e, t, n),
779
+ saving: g?.saving ?? !1,
780
+ onChange: (t, n) => v(e, t, n),
781
781
  onConfirm: () => x(e),
782
782
  onCancel: () => S(e),
783
- refs: w
783
+ refs: C
784
784
  });
785
785
  }
786
786
  return /* @__PURE__ */ G("div", {
@@ -788,7 +788,7 @@ function pe({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: s,
788
788
  border: "1px solid var(--border)",
789
789
  borderRadius: "var(--radius-md)",
790
790
  background: "var(--surface)",
791
- opacity: p ? .58 : 1,
791
+ opacity: h ? .58 : 1,
792
792
  overflow: "hidden"
793
793
  },
794
794
  children: [/* @__PURE__ */ W("div", {
@@ -798,27 +798,27 @@ function pe({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: s,
798
798
  flexDirection: "column",
799
799
  gap: 12
800
800
  },
801
- children: s.map((n) => {
802
- let s = r.fields.get(n), d = l && u === "inline_edit" && c.has(n), f = E && n === T, p = s ? i(k, s, n, a) : n, m = `${A}-${e}-${n}`, g = `${m}-label`, _ = {
801
+ children: c.map((t) => {
802
+ let n = i.fields.get(t), r = u && d === "inline_edit" && l.has(t), a = T && t === w, c = n ? f(O, n, t, o) : t, p = `${k}-${e}-${t}`, m = `${p}-label`, h = {
803
803
  fontSize: 11.5,
804
804
  fontWeight: 600,
805
805
  color: "var(--text-3)"
806
- }, v = s ? M({
807
- field: s,
808
- fieldName: n,
809
- value: j[n],
810
- mode: d ? "edit" : "display",
811
- onChange: d ? (t) => h(e, n, t) : void 0,
812
- record: j,
813
- refs: w,
814
- compact: d,
815
- entity: r,
816
- entities: a,
817
- screens: f ? void 0 : o,
818
- fieldId: m,
819
- labelId: g,
820
- t: k
821
- }) : t(j[n]);
806
+ }, g = n ? _({
807
+ field: n,
808
+ fieldName: t,
809
+ value: A[t],
810
+ mode: r ? "edit" : "display",
811
+ onChange: r ? (n) => v(e, t, n) : void 0,
812
+ record: A,
813
+ refs: C,
814
+ compact: r,
815
+ entity: i,
816
+ entities: o,
817
+ screens: a ? void 0 : s,
818
+ fieldId: p,
819
+ labelId: m,
820
+ t: O
821
+ }) : F(A[t]);
822
822
  return /* @__PURE__ */ G("div", {
823
823
  style: {
824
824
  display: "flex",
@@ -826,30 +826,30 @@ function pe({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: s,
826
826
  gap: 5,
827
827
  minWidth: 0
828
828
  },
829
- children: [d && s ? /* @__PURE__ */ W("label", {
830
- id: g,
831
- htmlFor: m,
832
- style: _,
833
- children: p
829
+ children: [r && n ? /* @__PURE__ */ W("label", {
830
+ id: m,
831
+ htmlFor: p,
832
+ style: h,
833
+ children: c
834
834
  }) : /* @__PURE__ */ W("div", {
835
- id: g,
836
- style: _,
837
- children: p
835
+ id: m,
836
+ style: h,
837
+ children: c
838
838
  }), /* @__PURE__ */ W("div", {
839
839
  style: { minWidth: 0 },
840
- children: f && !d ? /* @__PURE__ */ W("a", {
841
- href: E,
840
+ children: a && !r ? /* @__PURE__ */ W("a", {
841
+ href: T,
842
842
  style: {
843
843
  color: "var(--accent-text)",
844
844
  textDecoration: "none",
845
845
  fontWeight: 500
846
846
  },
847
- children: v
848
- }) : v
847
+ children: g
848
+ }) : g
849
849
  })]
850
- }, n);
850
+ }, t);
851
851
  })
852
- }), (l || D && D.length > 0) && /* @__PURE__ */ G("div", {
852
+ }), (u || E && E.length > 0) && /* @__PURE__ */ G("div", {
853
853
  style: {
854
854
  minHeight: 42,
855
855
  padding: "6px 8px",
@@ -859,104 +859,104 @@ function pe({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: s,
859
859
  justifyContent: "flex-end",
860
860
  gap: 6
861
861
  },
862
- children: [l && /* @__PURE__ */ G(oe, { children: [
863
- m?.saving && /* @__PURE__ */ W(C, { size: 12 }),
864
- m?.error && /* @__PURE__ */ W("span", {
862
+ children: [u && /* @__PURE__ */ G(oe, { children: [
863
+ g?.saving && /* @__PURE__ */ W(a, { size: 12 }),
864
+ g?.error && /* @__PURE__ */ W("span", {
865
865
  style: {
866
866
  fontSize: 11,
867
867
  color: "var(--danger)"
868
868
  },
869
- title: m.error,
869
+ title: g.error,
870
870
  children: "!"
871
871
  }),
872
- u === "row_edit" && /* @__PURE__ */ W(v, {
872
+ d === "row_edit" && /* @__PURE__ */ W(r, {
873
873
  size: 32,
874
- icon: /* @__PURE__ */ W(g.edit, { size: 14 }),
874
+ icon: /* @__PURE__ */ W(n.edit, { size: 14 }),
875
875
  onClick: () => b(e),
876
- title: k("record.row.edit", "Edit row")
876
+ title: O("record.row.edit", "Edit row")
877
877
  }),
878
- /* @__PURE__ */ W(v, {
878
+ /* @__PURE__ */ W(r, {
879
879
  size: 32,
880
- icon: /* @__PURE__ */ W(g.trash, { size: 14 }),
881
- onClick: () => _(e),
882
- title: k("record.row.delete", "Delete row")
880
+ icon: /* @__PURE__ */ W(n.trash, { size: 14 }),
881
+ onClick: () => y(e),
882
+ title: O("record.row.delete", "Delete row")
883
883
  })
884
- ] }), !l && D && D.length > 0 && /* @__PURE__ */ W(L, {
885
- entity: r,
886
- actions: D,
884
+ ] }), !u && E && E.length > 0 && /* @__PURE__ */ W(j, {
885
+ entity: i,
886
+ actions: E,
887
887
  objectIds: [e],
888
- row: j,
889
- onSuccess: O
888
+ row: A,
889
+ onSuccess: D
890
890
  })]
891
891
  })]
892
892
  });
893
893
  }
894
- function me({ rowId: e, row: n, entity: r, entities: i, screens: a, columns: o, editableColumns: s, editable: c, interaction: l, isEditing: u, editErrors: d, isDeleting: f, activeCell: p, setActiveCell: m, rowState: h, onCellChange: _, onDeleteClick: b, onStartEdit: x, onConfirmEdit: S, onCancelEdit: w, refs: T, identityCol: E, href: D, rowActions: O, onRowActionSuccess: k }) {
895
- let A = y(), j = V(() => !h || Object.keys(h.buffer).length === 0 ? n : {
896
- ...n,
897
- ...h.buffer
898
- }, [n, h]);
899
- if (l === "row_edit" && u) {
900
- let t = h?.error ? [...d, `_error:${h.error}`] : d;
894
+ function me({ rowId: e, row: t, entity: i, entities: s, screens: c, columns: l, editableColumns: u, editable: d, interaction: f, isEditing: p, editErrors: m, isDeleting: h, activeCell: g, setActiveCell: v, rowState: y, onCellChange: b, onDeleteClick: x, onStartEdit: S, onConfirmEdit: C, onCancelEdit: w, refs: T, identityCol: E, href: D, rowActions: O, onRowActionSuccess: k }) {
895
+ let A = L(), M = V(() => !y || Object.keys(y.buffer).length === 0 ? t : {
896
+ ...t,
897
+ ...y.buffer
898
+ }, [t, y]);
899
+ if (f === "row_edit" && p) {
900
+ let t = y?.error ? [...m, `_error:${y.error}`] : m;
901
901
  return /* @__PURE__ */ W(Q, {
902
- values: j,
903
- entity: r,
904
- columns: o,
905
- editableColumns: s,
902
+ values: M,
903
+ entity: i,
904
+ columns: l,
905
+ editableColumns: u,
906
906
  errors: t,
907
- saving: h?.saving ?? !1,
908
- onChange: (t, n) => _(e, t, n),
909
- onConfirm: () => S(e),
907
+ saving: y?.saving ?? !1,
908
+ onChange: (t, n) => b(e, t, n),
909
+ onConfirm: () => C(e),
910
910
  onCancel: () => w(e),
911
911
  refs: T
912
912
  });
913
913
  }
914
- let N = F, P = {
914
+ let N = o, P = {
915
915
  padding: "4px 4px",
916
916
  borderBottom: "1px solid var(--divider)",
917
917
  verticalAlign: "middle"
918
- }, ee = l === "inline_edit";
918
+ }, I = f === "inline_edit";
919
919
  return /* @__PURE__ */ G("tr", {
920
- style: { opacity: f ? .5 : 1 },
920
+ style: { opacity: h ? .5 : 1 },
921
921
  children: [
922
- o.map((n) => {
923
- let o = r.fields.get(n), c = s.has(n);
924
- if (ee && p?.rowId === e && p?.col === n && c) return /* @__PURE__ */ W("td", {
922
+ l.map((t) => {
923
+ let n = i.fields.get(t), r = u.has(t);
924
+ if (I && g?.rowId === e && g?.col === t && r) return /* @__PURE__ */ W("td", {
925
925
  style: P,
926
- children: o ? M({
927
- field: o,
928
- fieldName: n,
929
- value: j[n],
926
+ children: n ? _({
927
+ field: n,
928
+ fieldName: t,
929
+ value: M[t],
930
930
  mode: "edit",
931
- onChange: (t) => _(e, n, t),
932
- record: j,
931
+ onChange: (n) => b(e, t, n),
932
+ record: M,
933
933
  refs: T,
934
934
  compact: !0,
935
935
  t: A
936
- }) : t(j[n])
937
- }, n);
938
- let l = D && n === E, u = o ? M({
939
- field: o,
940
- fieldName: n,
941
- value: j[n],
936
+ }) : F(M[t])
937
+ }, t);
938
+ let a = D && t === E, o = n ? _({
939
+ field: n,
940
+ fieldName: t,
941
+ value: M[t],
942
942
  mode: "display",
943
- record: j,
943
+ record: M,
944
944
  refs: T,
945
- entity: r,
946
- entities: i,
947
- screens: l ? void 0 : a,
945
+ entity: i,
946
+ entities: s,
947
+ screens: a ? void 0 : c,
948
948
  t: A
949
- }) : t(j[n]), d = ee && c && !f;
949
+ }) : F(M[t]), l = I && r && !h;
950
950
  return /* @__PURE__ */ W("td", {
951
951
  style: {
952
952
  ...N,
953
- cursor: d ? "pointer" : "default"
953
+ cursor: l ? "pointer" : "default"
954
954
  },
955
- onClick: d ? () => m({
955
+ onClick: l ? () => v({
956
956
  rowId: e,
957
- col: n
957
+ col: t
958
958
  }) : void 0,
959
- children: l ? /* @__PURE__ */ W("a", {
959
+ children: a ? /* @__PURE__ */ W("a", {
960
960
  href: D,
961
961
  style: {
962
962
  color: "var(--accent-text)",
@@ -965,11 +965,11 @@ function me({ rowId: e, row: n, entity: r, entities: i, screens: a, columns: o,
965
965
  },
966
966
  onMouseEnter: (e) => e.currentTarget.style.textDecoration = "underline",
967
967
  onMouseLeave: (e) => e.currentTarget.style.textDecoration = "none",
968
- children: u
969
- }) : u
970
- }, n);
968
+ children: o
969
+ }) : o
970
+ }, t);
971
971
  }),
972
- c && /* @__PURE__ */ W("td", {
972
+ d && /* @__PURE__ */ W("td", {
973
973
  style: {
974
974
  padding: "4px 8px",
975
975
  borderBottom: "1px solid var(--divider)",
@@ -982,97 +982,97 @@ function me({ rowId: e, row: n, entity: r, entities: i, screens: a, columns: o,
982
982
  gap: 4
983
983
  },
984
984
  children: [
985
- h?.saving && /* @__PURE__ */ W(C, { size: 12 }),
986
- h?.error && /* @__PURE__ */ W("span", {
985
+ y?.saving && /* @__PURE__ */ W(a, { size: 12 }),
986
+ y?.error && /* @__PURE__ */ W("span", {
987
987
  style: {
988
988
  fontSize: 11,
989
989
  color: "var(--danger)"
990
990
  },
991
- title: h.error,
991
+ title: y.error,
992
992
  children: "!"
993
993
  }),
994
- l === "row_edit" && /* @__PURE__ */ W(v, {
994
+ f === "row_edit" && /* @__PURE__ */ W(r, {
995
995
  size: 24,
996
- icon: /* @__PURE__ */ W(g.edit, { size: 12 }),
997
- onClick: () => x(e),
996
+ icon: /* @__PURE__ */ W(n.edit, { size: 12 }),
997
+ onClick: () => S(e),
998
998
  title: A("record.row.edit", "Edit row")
999
999
  }),
1000
- /* @__PURE__ */ W(v, {
1000
+ /* @__PURE__ */ W(r, {
1001
1001
  size: 24,
1002
- icon: /* @__PURE__ */ W(g.trash, { size: 12 }),
1003
- onClick: () => b(e),
1002
+ icon: /* @__PURE__ */ W(n.trash, { size: 12 }),
1003
+ onClick: () => x(e),
1004
1004
  title: A("record.row.delete", "Delete row")
1005
1005
  })
1006
1006
  ]
1007
1007
  })
1008
1008
  }),
1009
- !c && O && O.length > 0 && /* @__PURE__ */ W("td", {
1009
+ !d && O && O.length > 0 && /* @__PURE__ */ W("td", {
1010
1010
  style: {
1011
1011
  padding: "4px 8px",
1012
1012
  borderBottom: "1px solid var(--divider)",
1013
1013
  verticalAlign: "middle"
1014
1014
  },
1015
- children: /* @__PURE__ */ W(L, {
1016
- entity: r,
1015
+ children: /* @__PURE__ */ W(j, {
1016
+ entity: i,
1017
1017
  actions: O,
1018
1018
  objectIds: [e],
1019
- row: j,
1019
+ row: M,
1020
1020
  onSuccess: k
1021
1021
  })
1022
1022
  })
1023
1023
  ]
1024
1024
  });
1025
1025
  }
1026
- function Q({ values: e, entity: n, columns: r, editableColumns: i, errors: a, saving: o, onChange: s, onConfirm: c, onCancel: l, refs: u, accent: d }) {
1027
- let f = y(), p = a.find((e) => e.startsWith("_error:")), m = new Set(a.filter((e) => !e.startsWith("_error:"))), h = {
1026
+ function Q({ values: e, entity: t, columns: i, editableColumns: o, errors: s, saving: c, onChange: l, onConfirm: u, onCancel: d, refs: f, accent: p }) {
1027
+ let m = L(), h = s.find((e) => e.startsWith("_error:")), g = new Set(s.filter((e) => !e.startsWith("_error:"))), v = {
1028
1028
  padding: "6px 12px",
1029
1029
  borderBottom: "1px solid var(--divider)",
1030
1030
  verticalAlign: "middle",
1031
1031
  height: 40,
1032
1032
  minWidth: 0
1033
- }, _ = {
1033
+ }, y = {
1034
1034
  display: "block",
1035
1035
  width: "100%",
1036
1036
  maxWidth: "100%",
1037
1037
  minWidth: 0
1038
1038
  };
1039
1039
  return /* @__PURE__ */ G("tr", {
1040
- style: d ? { boxShadow: "inset 3px 0 0 var(--accent)" } : void 0,
1040
+ style: p ? { boxShadow: "inset 3px 0 0 var(--accent)" } : void 0,
1041
1041
  onKeyDown: (e) => {
1042
- e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), c()) : e.key === "Escape" && (e.preventDefault(), l());
1042
+ e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), u()) : e.key === "Escape" && (e.preventDefault(), d());
1043
1043
  },
1044
- children: [r.map((r) => {
1045
- let a = n.fields.get(r), o = i.has(r), c = m.has(r);
1046
- return o ? /* @__PURE__ */ W("td", {
1044
+ children: [i.map((n) => {
1045
+ let r = t.fields.get(n), i = o.has(n), a = g.has(n);
1046
+ return i ? /* @__PURE__ */ W("td", {
1047
1047
  style: {
1048
- ...h,
1049
- outline: c ? "1px solid var(--danger)" : "none",
1048
+ ...v,
1049
+ outline: a ? "1px solid var(--danger)" : "none",
1050
1050
  outlineOffset: -1
1051
1051
  },
1052
- title: c ? f("record.row.field_required", "{field} is required", { field: r }) : void 0,
1052
+ title: a ? m("record.row.field_required", "{field} is required", { field: n }) : void 0,
1053
1053
  children: /* @__PURE__ */ W("div", {
1054
- style: _,
1055
- children: a ? M({
1056
- field: a,
1057
- fieldName: r,
1058
- value: e[r],
1054
+ style: y,
1055
+ children: r ? _({
1056
+ field: r,
1057
+ fieldName: n,
1058
+ value: e[n],
1059
1059
  mode: "edit",
1060
- onChange: (e) => s(r, e),
1060
+ onChange: (e) => l(n, e),
1061
1061
  record: e,
1062
- refs: u,
1062
+ refs: f,
1063
1063
  compact: !0,
1064
- t: f
1065
- }) : t(e[r])
1064
+ t: m
1065
+ }) : F(e[n])
1066
1066
  })
1067
- }, r) : /* @__PURE__ */ W("td", {
1067
+ }, n) : /* @__PURE__ */ W("td", {
1068
1068
  style: {
1069
- ...h,
1069
+ ...v,
1070
1070
  color: "var(--text-3)"
1071
1071
  },
1072
- children: a?.auto ? "—" : t(e[r])
1073
- }, r);
1072
+ children: r?.auto ? "—" : F(e[n])
1073
+ }, n);
1074
1074
  }), /* @__PURE__ */ W("td", {
1075
- style: h,
1075
+ style: v,
1076
1076
  children: /* @__PURE__ */ G("div", {
1077
1077
  style: {
1078
1078
  display: "flex",
@@ -1081,43 +1081,43 @@ function Q({ values: e, entity: n, columns: r, editableColumns: i, errors: a, sa
1081
1081
  justifyContent: "flex-end"
1082
1082
  },
1083
1083
  children: [
1084
- p && /* @__PURE__ */ W("span", {
1084
+ h && /* @__PURE__ */ W("span", {
1085
1085
  style: {
1086
1086
  fontSize: 11,
1087
1087
  color: "var(--danger)"
1088
1088
  },
1089
- title: p.slice(7),
1089
+ title: h.slice(7),
1090
1090
  children: "!"
1091
1091
  }),
1092
- /* @__PURE__ */ W(v, {
1092
+ /* @__PURE__ */ W(r, {
1093
1093
  size: 24,
1094
- icon: W(o ? C : g.check, { size: 12 }),
1095
- onClick: c,
1096
- title: f("record.row.confirm", "Confirm (Enter)")
1094
+ icon: W(c ? a : n.check, { size: 12 }),
1095
+ onClick: u,
1096
+ title: m("record.row.confirm", "Confirm (Enter)")
1097
1097
  }),
1098
- /* @__PURE__ */ W(v, {
1098
+ /* @__PURE__ */ W(r, {
1099
1099
  size: 24,
1100
- icon: /* @__PURE__ */ W(g.x, { size: 12 }),
1101
- onClick: l,
1102
- title: f("record.row.cancel", "Cancel (Esc)")
1100
+ icon: /* @__PURE__ */ W(n.x, { size: 12 }),
1101
+ onClick: d,
1102
+ title: m("record.row.cancel", "Cancel (Esc)")
1103
1103
  })
1104
1104
  ]
1105
1105
  })
1106
1106
  })]
1107
1107
  });
1108
1108
  }
1109
- function he({ values: e, entity: n, columns: r, editableColumns: a, errors: o, saving: s, onChange: c, onConfirm: l, onCancel: u, refs: d, accent: f }) {
1110
- let p = y(), m = ie(), h = o.find((e) => e.startsWith("_error:")), _ = new Set(o.filter((e) => !e.startsWith("_error:")));
1109
+ function he({ values: e, entity: t, columns: i, editableColumns: o, errors: s, saving: c, onChange: l, onConfirm: u, onCancel: d, refs: p, accent: m }) {
1110
+ let h = L(), g = ie(), v = s.find((e) => e.startsWith("_error:")), y = new Set(s.filter((e) => !e.startsWith("_error:")));
1111
1111
  return /* @__PURE__ */ G("div", {
1112
1112
  style: {
1113
1113
  border: "1px solid var(--border)",
1114
1114
  borderRadius: "var(--radius-md)",
1115
1115
  background: "var(--surface)",
1116
1116
  overflow: "hidden",
1117
- boxShadow: f ? "inset 3px 0 0 var(--accent)" : void 0
1117
+ boxShadow: m ? "inset 3px 0 0 var(--accent)" : void 0
1118
1118
  },
1119
1119
  onKeyDown: (e) => {
1120
- e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), l()) : e.key === "Escape" && (e.preventDefault(), u());
1120
+ e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), u()) : e.key === "Escape" && (e.preventDefault(), d());
1121
1121
  },
1122
1122
  children: [/* @__PURE__ */ W("div", {
1123
1123
  style: {
@@ -1126,8 +1126,8 @@ function he({ values: e, entity: n, columns: r, editableColumns: a, errors: o, s
1126
1126
  flexDirection: "column",
1127
1127
  gap: 12
1128
1128
  },
1129
- children: r.map((r) => {
1130
- let o = n.fields.get(r), s = a.has(r), l = _.has(r), u = o ? i(p, o, r) : r, f = `${m}-${r}`, h = `${f}-label`, g = {
1129
+ children: i.map((n) => {
1130
+ let r = t.fields.get(n), i = o.has(n), a = y.has(n), s = r ? f(h, r, n) : n, c = `${g}-${n}`, u = `${c}-label`, d = {
1131
1131
  fontSize: 11.5,
1132
1132
  fontWeight: 600,
1133
1133
  color: "var(--text-3)"
@@ -1139,38 +1139,38 @@ function he({ values: e, entity: n, columns: r, editableColumns: a, errors: o, s
1139
1139
  gap: 5,
1140
1140
  minWidth: 0
1141
1141
  },
1142
- children: [s && o ? /* @__PURE__ */ W("label", {
1143
- id: h,
1144
- htmlFor: f,
1145
- style: g,
1146
- children: u
1142
+ children: [i && r ? /* @__PURE__ */ W("label", {
1143
+ id: u,
1144
+ htmlFor: c,
1145
+ style: d,
1146
+ children: s
1147
1147
  }) : /* @__PURE__ */ W("div", {
1148
- id: h,
1149
- style: g,
1150
- children: u
1148
+ id: u,
1149
+ style: d,
1150
+ children: s
1151
1151
  }), /* @__PURE__ */ W("div", {
1152
1152
  style: {
1153
1153
  minWidth: 0,
1154
- outline: l ? "1px solid var(--danger)" : "none",
1154
+ outline: a ? "1px solid var(--danger)" : "none",
1155
1155
  outlineOffset: 3,
1156
- borderRadius: l ? "var(--radius-sm)" : 0
1156
+ borderRadius: a ? "var(--radius-sm)" : 0
1157
1157
  },
1158
- title: l ? p("record.row.field_required", "{field} is required", { field: r }) : void 0,
1159
- children: s ? o ? M({
1160
- field: o,
1161
- fieldName: r,
1162
- value: e[r],
1158
+ title: a ? h("record.row.field_required", "{field} is required", { field: n }) : void 0,
1159
+ children: i ? r ? _({
1160
+ field: r,
1161
+ fieldName: n,
1162
+ value: e[n],
1163
1163
  mode: "edit",
1164
- onChange: (e) => c(r, e),
1164
+ onChange: (e) => l(n, e),
1165
1165
  record: e,
1166
- refs: d,
1166
+ refs: p,
1167
1167
  compact: !0,
1168
- fieldId: f,
1169
- labelId: h,
1170
- t: p
1171
- }) : t(e[r]) : o?.auto ? "—" : t(e[r])
1168
+ fieldId: c,
1169
+ labelId: u,
1170
+ t: h
1171
+ }) : F(e[n]) : r?.auto ? "—" : F(e[n])
1172
1172
  })]
1173
- }, r);
1173
+ }, n);
1174
1174
  })
1175
1175
  }), /* @__PURE__ */ G("div", {
1176
1176
  style: {
@@ -1183,25 +1183,25 @@ function he({ values: e, entity: n, columns: r, editableColumns: a, errors: o, s
1183
1183
  gap: 6
1184
1184
  },
1185
1185
  children: [
1186
- h && /* @__PURE__ */ W("span", {
1186
+ v && /* @__PURE__ */ W("span", {
1187
1187
  style: {
1188
1188
  fontSize: 11,
1189
1189
  color: "var(--danger)"
1190
1190
  },
1191
- title: h.slice(7),
1191
+ title: v.slice(7),
1192
1192
  children: "!"
1193
1193
  }),
1194
- /* @__PURE__ */ W(v, {
1194
+ /* @__PURE__ */ W(r, {
1195
1195
  size: 32,
1196
- icon: W(s ? C : g.check, { size: 14 }),
1197
- onClick: l,
1198
- title: p("record.row.confirm", "Confirm (Enter)")
1196
+ icon: W(c ? a : n.check, { size: 14 }),
1197
+ onClick: u,
1198
+ title: h("record.row.confirm", "Confirm (Enter)")
1199
1199
  }),
1200
- /* @__PURE__ */ W(v, {
1200
+ /* @__PURE__ */ W(r, {
1201
1201
  size: 32,
1202
- icon: /* @__PURE__ */ W(g.x, { size: 14 }),
1203
- onClick: u,
1204
- title: p("record.row.cancel", "Cancel (Esc)")
1202
+ icon: /* @__PURE__ */ W(n.x, { size: 14 }),
1203
+ onClick: d,
1204
+ title: h("record.row.cancel", "Cancel (Esc)")
1205
1205
  })
1206
1206
  ]
1207
1207
  })]
@@ -1245,5 +1245,4 @@ function _e({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey
1245
1245
  accent: !0
1246
1246
  });
1247
1247
  }
1248
- //#endregion
1249
1248
  export { J as AssociatedBlock, ue as associatedDraftEditableColumns, le as associatedEditableColumns, q as associatedParentValue, de as findMissingRequiredAssociatedFields, ce as resolveAssociatedForeignKey, se as resolveAssociatedRowActions, K as resolveAssociatedToolbarActions };