@declarion/react 0.61.1 → 0.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/dist-lib/ActionDialog-uiuse5W8.js +374 -0
  2. package/dist-lib/ActionResultDialog.impl-BUBm9Ck3.js +273 -0
  3. package/dist-lib/ActionRunner-DAxgnKB3.js +1440 -0
  4. package/dist-lib/AdminCatalogPage.impl-BJGn7EvA.js +441 -0
  5. package/dist-lib/{AgentChatPanel.impl-rgkewyMl.js → AgentChatPanel.impl-8bw8J-xV.js} +358 -319
  6. package/dist-lib/AgentOpenFollower.impl-Cga1q7_e.js +81 -0
  7. package/dist-lib/AssociatedBlock-D6qDYmRO.js +1515 -0
  8. package/dist-lib/AuthShell-DdiughRT.js +361 -0
  9. package/dist-lib/ChangePasswordDialog-DFe7lVQg.js +12 -0
  10. package/dist-lib/ChangePasswordDialog.impl-DtSIaP-A.js +194 -0
  11. package/dist-lib/CommandPalette.impl-Db3AFA5w.js +383 -0
  12. package/dist-lib/CopyButton-C0iEvaT1.js +119 -0
  13. package/dist-lib/DirtyTabsCloseDialog.impl-DWaFaWKn.js +191 -0
  14. package/dist-lib/{DraggableChildrenTable-DruYOxKm.js → DraggableChildrenTable-Cy8uevS_.js} +45 -44
  15. package/dist-lib/DynamicIcon-DuBSz6TZ.js +133 -0
  16. package/dist-lib/FieldRow-BXBBFOZh.js +157 -0
  17. package/dist-lib/FilterChips-8fMDBXHp.js +1031 -0
  18. package/dist-lib/Forgot.impl-CmT5A__V.js +105 -0
  19. package/dist-lib/{Grid-Dsf3I0xG.js → Grid-Cg29k0jv.js} +98 -99
  20. package/dist-lib/Icons-Dzl-AkD_.d.ts +159 -0
  21. package/dist-lib/Icons-lt-7lhYR.js +151 -0
  22. package/dist-lib/ImpersonationBanner.impl-CBJJx6an.js +76 -0
  23. package/dist-lib/ImpersonationStartModal.impl-RaZcsJpG.js +158 -0
  24. package/dist-lib/Kbd-CNttVu0z.js +23 -0
  25. package/dist-lib/{LayoutRenderer-QN7Wp2W6.js → LayoutRenderer-DEHtYtzV.js} +965 -942
  26. package/dist-lib/{ListCardsBody-CNaZ0xwz.js → ListCardsBody-BAwFR3yO.js} +46 -52
  27. package/dist-lib/{MarkdownRenderer-BuO5hYJh.js → MarkdownRenderer-kNEMr6K_.js} +15 -16
  28. package/dist-lib/MenuItem-CfkVXPvC.js +140 -0
  29. package/dist-lib/NotFoundPage.impl-ZSBn4WWb.js +68 -0
  30. package/dist-lib/PageHeader-tw4pX3lI.js +71 -0
  31. package/dist-lib/PageShell-tI-mm0C5.js +47 -0
  32. package/dist-lib/Pill-D-wsfRhx.js +42 -0
  33. package/dist-lib/Preferences.impl-BG9XBZDf.js +162 -0
  34. package/dist-lib/Profile.impl-CbzSzxyG.js +527 -0
  35. package/dist-lib/PropertyGridEditor-BTjscqfz.js +4378 -0
  36. package/dist-lib/RecordHeader-Bv9nJXnG.js +217 -0
  37. package/dist-lib/RecordIdBadge-C3MgoZvt.js +25 -0
  38. package/dist-lib/RefreshControl-Ce-T_wSQ.js +195 -0
  39. package/dist-lib/Reset.impl-Cesyqt5p.js +168 -0
  40. package/dist-lib/SSOCallbackPage.impl-BC_W9nQA.js +31 -0
  41. package/dist-lib/SectionCard-VonaiLrx.js +150 -0
  42. package/dist-lib/SignUp.impl-C1KCQbfZ.js +212 -0
  43. package/dist-lib/SmartDetailPage.impl-8iOAMYQh.js +1609 -0
  44. package/dist-lib/SmartListPage.impl-Cc4Zwz5f.js +2818 -0
  45. package/dist-lib/SmartRecordListPage.impl-xTSohkqG.js +795 -0
  46. package/dist-lib/{SortHeaderMenu-BV-aQbPy.js → SortHeaderMenu-BKTrq0Wb.js} +23 -23
  47. package/dist-lib/TenantParamsPage.impl-DMuSs3eP.js +306 -0
  48. package/dist-lib/TwoFA.impl-BClZ3ndk.js +125 -0
  49. package/dist-lib/{cardProjection-BnmWukxk.js → cardProjection-Cr7fG6wJ.js} +134 -133
  50. package/dist-lib/declarion-react.css +1 -1
  51. package/dist-lib/format-count-CSEFw2ht.js +943 -0
  52. package/dist-lib/headerActionZone-bef-tZZ7.js +14 -0
  53. package/dist-lib/{stores/icon-registry.d.ts → icon-registry-CUT4eF63.d.ts} +14 -11
  54. package/dist-lib/icons.d.ts +20 -4
  55. package/dist-lib/icons.js +3 -2
  56. package/dist-lib/index.d.ts +2516 -150
  57. package/dist-lib/index.js +1588 -5117
  58. package/dist-lib/page-inset-D_kkVwwN.js +9 -0
  59. package/dist-lib/page-state-eA6J_KIR.js +124 -0
  60. package/dist-lib/param-editors-9yJr7xmN.js +201 -0
  61. package/dist-lib/payload-B2wODLAX.js +86 -0
  62. package/dist-lib/{peekDraftStore-Dk1Ha5u3.js → peekDraftStore-D4GRsRKW.js} +44 -43
  63. package/dist-lib/registry-BpzE8-h8.js +119 -0
  64. package/dist-lib/screen-back-Cs4kzeqD.js +44 -0
  65. package/dist-lib/testing.d.ts +53 -56
  66. package/dist-lib/testing.js +54 -55
  67. package/dist-lib/use-filter-value-labels-DuqvAIVG.js +413 -0
  68. package/dist-lib/{useAgentConversation-nT5UypJX.js → useAgentConversation-D210VDCQ.js} +158 -169
  69. package/dist-lib/useAuth-CR2YKKXb.js +49 -0
  70. package/dist-lib/useBranding-Ckp_AuJb.js +41 -0
  71. package/dist-lib/useBrandingChrome-bKTXXDLy.js +170 -0
  72. package/dist-lib/useCurrentLocation-BdngVeQv.js +22 -0
  73. package/dist-lib/useCurrentScreen--UovgvRj.js +2511 -0
  74. package/dist-lib/useImpersonation-DNV23Ks1.js +35 -0
  75. package/dist-lib/useObject-1OCeV34A.js +26 -0
  76. package/dist-lib/useOwnRefresh-DkOuM4yo.js +435 -0
  77. package/dist-lib/useParams-ei6w4I7w.js +133 -0
  78. package/dist-lib/useProperties-CbdhlhZd.js +81 -0
  79. package/dist-lib/useResponsiveMode-DIR1bZfo.d.ts +1786 -0
  80. package/dist-lib/useScreenBack-J861tbwn.js +71 -0
  81. package/dist-lib/useTabNavigate-BZiW4q3M.js +78 -0
  82. package/dist-lib/useTabTitle-CZZnWIQi.js +22 -0
  83. package/dist-lib/utils-D_QDpB8_.js +11 -0
  84. package/dist-lib/{value-Dwfyghtj.js → value-CDCeHgOv.js} +8 -22
  85. package/dist-lib/{action-dispatch-gWmOYjOP.js → variants-CbAwl3Mn.js} +734 -740
  86. package/dist-lib/vite/index.d.ts +42 -16
  87. package/dist-lib/window-election-CHIvIZwx.js +45 -0
  88. package/package.json +16 -23
  89. package/dist-lib/DetailAuditStrip-CSXZoy7v.js +0 -288
  90. package/dist-lib/DynamicIcon-DW5krHuX.js +0 -280
  91. package/dist-lib/RefreshControl-DO9rYcdq.js +0 -399
  92. package/dist-lib/SmartDetailPage.impl-DFIIx80b.js +0 -1565
  93. package/dist-lib/SmartListPage.impl-D694R32H.js +0 -3051
  94. package/dist-lib/SmartRecordListPage.impl-CB5cuQJV.js +0 -780
  95. package/dist-lib/api/agents.d.ts +0 -140
  96. package/dist-lib/api/auth-redirect.d.ts +0 -3
  97. package/dist-lib/api/auth.d.ts +0 -26
  98. package/dist-lib/api/batch.d.ts +0 -25
  99. package/dist-lib/api/client.d.ts +0 -51
  100. package/dist-lib/api/data.d.ts +0 -153
  101. package/dist-lib/api/entities.d.ts +0 -149
  102. package/dist-lib/api/events.d.ts +0 -91
  103. package/dist-lib/api/params.d.ts +0 -28
  104. package/dist-lib/api/properties.d.ts +0 -3
  105. package/dist-lib/api/schema.d.ts +0 -2
  106. package/dist-lib/api/status.d.ts +0 -2
  107. package/dist-lib/app.d.ts +0 -1
  108. package/dist-lib/components/actions/ActionButton.d.ts +0 -18
  109. package/dist-lib/components/actions/ActionDialog.d.ts +0 -20
  110. package/dist-lib/components/actions/ActionResultDialog.d.ts +0 -22
  111. package/dist-lib/components/actions/ActionRunner.d.ts +0 -62
  112. package/dist-lib/components/actions/ObjectActionBar.d.ts +0 -29
  113. package/dist-lib/components/actions/PropertyGridEditor.d.ts +0 -20
  114. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +0 -259
  115. package/dist-lib/components/actions/RowActionsKebab.d.ts +0 -20
  116. package/dist-lib/components/agents/AgentChatPanel.d.ts +0 -3
  117. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +0 -14
  118. package/dist-lib/components/agents/AgentConversationDrawer.d.ts +0 -11
  119. package/dist-lib/components/agents/AgentElicitForm.d.ts +0 -27
  120. package/dist-lib/components/agents/AgentPicker.d.ts +0 -8
  121. package/dist-lib/components/agents/transcript-runs.d.ts +0 -29
  122. package/dist-lib/components/chrome/AssociationTabs.d.ts +0 -9
  123. package/dist-lib/components/chrome/AuditMetaStrip.d.ts +0 -11
  124. package/dist-lib/components/chrome/Breadcrumbs.d.ts +0 -14
  125. package/dist-lib/components/chrome/HighlightsStrip.d.ts +0 -10
  126. package/dist-lib/components/chrome/PageHeader.d.ts +0 -16
  127. package/dist-lib/components/chrome/PageShell.d.ts +0 -7
  128. package/dist-lib/components/chrome/RecordHeader.d.ts +0 -17
  129. package/dist-lib/components/chrome/headerActionZone.d.ts +0 -27
  130. package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +0 -20
  131. package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +0 -13
  132. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +0 -16
  133. package/dist-lib/components/detail-layout/ChildrenCards.d.ts +0 -2
  134. package/dist-lib/components/detail-layout/ChildrenList.d.ts +0 -2
  135. package/dist-lib/components/detail-layout/ChildrenTable.d.ts +0 -2
  136. package/dist-lib/components/detail-layout/ChildrenTimeline.d.ts +0 -2
  137. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +0 -12
  138. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +0 -14
  139. package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +0 -16
  140. package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +0 -16
  141. package/dist-lib/components/detail-layout/ErrorSummary.d.ts +0 -11
  142. package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +0 -6
  143. package/dist-lib/components/detail-layout/FieldRow.d.ts +0 -23
  144. package/dist-lib/components/detail-layout/FieldsBlock.d.ts +0 -8
  145. package/dist-lib/components/detail-layout/LayoutColumn.d.ts +0 -9
  146. package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +0 -46
  147. package/dist-lib/components/detail-layout/LayoutRow.d.ts +0 -8
  148. package/dist-lib/components/detail-layout/LayoutTabs.d.ts +0 -8
  149. package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +0 -8
  150. package/dist-lib/components/detail-layout/QuickAddForm.d.ts +0 -10
  151. package/dist-lib/components/detail-layout/SectionBlock.d.ts +0 -8
  152. package/dist-lib/components/detail-layout/StatusesBlock.d.ts +0 -8
  153. package/dist-lib/components/detail-layout/TimelineComposer.d.ts +0 -10
  154. package/dist-lib/components/detail-layout/blockMeta.d.ts +0 -5
  155. package/dist-lib/components/detail-layout/index.d.ts +0 -21
  156. package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +0 -25
  157. package/dist-lib/components/detail-layout/useQuickAdd.d.ts +0 -16
  158. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.d.ts +0 -2
  159. package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.d.ts +0 -2
  160. package/dist-lib/components/detail-layout/widgets/MonacoJson.d.ts +0 -9
  161. package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +0 -9
  162. package/dist-lib/components/detail-layout/widgets/builtins.d.ts +0 -1
  163. package/dist-lib/components/detail-layout/widgets/canonicalizeJson.d.ts +0 -1
  164. package/dist-lib/components/detail-layout/widgets/monacoBootstrap.d.ts +0 -1
  165. package/dist-lib/components/detail-layout/widgets/registry.d.ts +0 -14
  166. package/dist-lib/components/fields/BoolField.d.ts +0 -2
  167. package/dist-lib/components/fields/EmailField.d.ts +0 -2
  168. package/dist-lib/components/fields/EnumField.d.ts +0 -2
  169. package/dist-lib/components/fields/IntArrayField.d.ts +0 -2
  170. package/dist-lib/components/fields/JsonEditor.d.ts +0 -10
  171. package/dist-lib/components/fields/JsonField.d.ts +0 -3
  172. package/dist-lib/components/fields/MultilangArrayField.d.ts +0 -2
  173. package/dist-lib/components/fields/MultilangField.d.ts +0 -2
  174. package/dist-lib/components/fields/MultilangTextField.d.ts +0 -2
  175. package/dist-lib/components/fields/NumberField.d.ts +0 -2
  176. package/dist-lib/components/fields/PasswordField.d.ts +0 -2
  177. package/dist-lib/components/fields/PhoneField.d.ts +0 -2
  178. package/dist-lib/components/fields/RefCombobox.d.ts +0 -45
  179. package/dist-lib/components/fields/RefField.d.ts +0 -2
  180. package/dist-lib/components/fields/RichTextField.d.ts +0 -2
  181. package/dist-lib/components/fields/SecretField.d.ts +0 -2
  182. package/dist-lib/components/fields/StringArrayField.d.ts +0 -2
  183. package/dist-lib/components/fields/StringField.d.ts +0 -2
  184. package/dist-lib/components/fields/StructureField.d.ts +0 -2
  185. package/dist-lib/components/fields/TextField.d.ts +0 -2
  186. package/dist-lib/components/fields/TimestampField.d.ts +0 -2
  187. package/dist-lib/components/fields/UrlField.d.ts +0 -2
  188. package/dist-lib/components/fields/cells/factories/badge.d.ts +0 -2
  189. package/dist-lib/components/fields/cells/factories/boolPill.d.ts +0 -2
  190. package/dist-lib/components/fields/cells/factories/code.d.ts +0 -2
  191. package/dist-lib/components/fields/cells/factories/date.d.ts +0 -2
  192. package/dist-lib/components/fields/cells/factories/email.d.ts +0 -2
  193. package/dist-lib/components/fields/cells/factories/emptyCell.d.ts +0 -2
  194. package/dist-lib/components/fields/cells/factories/host-icons.d.ts +0 -17
  195. package/dist-lib/components/fields/cells/factories/json.d.ts +0 -2
  196. package/dist-lib/components/fields/cells/factories/link.d.ts +0 -2
  197. package/dist-lib/components/fields/cells/factories/markdown.d.ts +0 -2
  198. package/dist-lib/components/fields/cells/factories/markdownPreview.d.ts +0 -9
  199. package/dist-lib/components/fields/cells/factories/money.d.ts +0 -2
  200. package/dist-lib/components/fields/cells/factories/multilangInline.d.ts +0 -2
  201. package/dist-lib/components/fields/cells/factories/nextRun.d.ts +0 -2
  202. package/dist-lib/components/fields/cells/factories/number.d.ts +0 -2
  203. package/dist-lib/components/fields/cells/factories/passwordMask.d.ts +0 -2
  204. package/dist-lib/components/fields/cells/factories/phone.d.ts +0 -2
  205. package/dist-lib/components/fields/cells/factories/refLink.d.ts +0 -2
  206. package/dist-lib/components/fields/cells/factories/richTextPreview.d.ts +0 -2
  207. package/dist-lib/components/fields/cells/factories/statusPill.d.ts +0 -2
  208. package/dist-lib/components/fields/cells/factories/tagList.d.ts +0 -2
  209. package/dist-lib/components/fields/cells/factories/text.d.ts +0 -2
  210. package/dist-lib/components/fields/cells/factories/timestamp.d.ts +0 -3
  211. package/dist-lib/components/fields/cells/factories/url-helpers.d.ts +0 -12
  212. package/dist-lib/components/fields/cells/factories/url.d.ts +0 -2
  213. package/dist-lib/components/fields/cells/registry.d.ts +0 -21
  214. package/dist-lib/components/fields/index.d.ts +0 -28
  215. package/dist-lib/components/fields/langMap.d.ts +0 -2
  216. package/dist-lib/components/fields/secretValue.d.ts +0 -2
  217. package/dist-lib/components/file-widgets/CircleImage.d.ts +0 -2
  218. package/dist-lib/components/file-widgets/DocumentCard.d.ts +0 -2
  219. package/dist-lib/components/file-widgets/FileList.d.ts +0 -2
  220. package/dist-lib/components/file-widgets/Grid.d.ts +0 -2
  221. package/dist-lib/components/file-widgets/GridLazy.d.ts +0 -2
  222. package/dist-lib/components/file-widgets/ImageWidget.d.ts +0 -12
  223. package/dist-lib/components/file-widgets/LabeledSlots.d.ts +0 -2
  224. package/dist-lib/components/file-widgets/SquareImage.d.ts +0 -2
  225. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +0 -3
  226. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +0 -4
  227. package/dist-lib/components/file-widgets/WideBanner.d.ts +0 -2
  228. package/dist-lib/components/file-widgets/builtins.d.ts +0 -1
  229. package/dist-lib/components/file-widgets/cropper.d.ts +0 -14
  230. package/dist-lib/components/file-widgets/draft-scope.d.ts +0 -22
  231. package/dist-lib/components/file-widgets/helpers.d.ts +0 -15
  232. package/dist-lib/components/file-widgets/host.d.ts +0 -28
  233. package/dist-lib/components/file-widgets/index.d.ts +0 -16
  234. package/dist-lib/components/file-widgets/payload.d.ts +0 -21
  235. package/dist-lib/components/file-widgets/registry.d.ts +0 -5
  236. package/dist-lib/components/file-widgets/types.d.ts +0 -17
  237. package/dist-lib/components/file-widgets/upload.d.ts +0 -45
  238. package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +0 -42
  239. package/dist-lib/components/file-widgets/value.d.ts +0 -4
  240. package/dist-lib/components/filters/FilterChips.d.ts +0 -14
  241. package/dist-lib/components/filters/FilterDrawer.d.ts +0 -32
  242. package/dist-lib/components/filters/filter-op-label.d.ts +0 -3
  243. package/dist-lib/components/layout/CommandPalette.d.ts +0 -21
  244. package/dist-lib/components/layout/DirtyTabsCloseDialog.d.ts +0 -9
  245. package/dist-lib/components/layout/ImpersonationBanner.d.ts +0 -11
  246. package/dist-lib/components/layout/ImpersonationFrame.d.ts +0 -11
  247. package/dist-lib/components/layout/ImpersonationStartModal.d.ts +0 -22
  248. package/dist-lib/components/layout/Layout.d.ts +0 -6
  249. package/dist-lib/components/layout/Rail.d.ts +0 -22
  250. package/dist-lib/components/layout/Sidebar.d.ts +0 -12
  251. package/dist-lib/components/layout/TabStrip.d.ts +0 -6
  252. package/dist-lib/components/layout/TenantChip.d.ts +0 -26
  253. package/dist-lib/components/layout/TopBar.d.ts +0 -22
  254. package/dist-lib/components/layout/tab-close.d.ts +0 -13
  255. package/dist-lib/components/list/ColumnPicker.d.ts +0 -20
  256. package/dist-lib/components/list/InlineEditCell.d.ts +0 -15
  257. package/dist-lib/components/list/PeekFieldCell.d.ts +0 -16
  258. package/dist-lib/components/list/QuickPeek.d.ts +0 -59
  259. package/dist-lib/components/list/ViewSwitcher.d.ts +0 -24
  260. package/dist-lib/components/list/peekDraftStore.d.ts +0 -6
  261. package/dist-lib/components/pages/AdminCatalogPage.d.ts +0 -1
  262. package/dist-lib/components/pages/DocumentsMenu.d.ts +0 -21
  263. package/dist-lib/components/pages/ExportMenu.d.ts +0 -30
  264. package/dist-lib/components/pages/NotFoundPage.d.ts +0 -1
  265. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +0 -41
  266. package/dist-lib/components/pages/SSOCallbackPage.d.ts +0 -1
  267. package/dist-lib/components/pages/SmartDetailPage.d.ts +0 -2
  268. package/dist-lib/components/pages/SmartDetailPage.impl.d.ts +0 -4
  269. package/dist-lib/components/pages/SmartListPage.d.ts +0 -2
  270. package/dist-lib/components/pages/SmartListPage.impl.d.ts +0 -4
  271. package/dist-lib/components/pages/SmartRecordListPage.d.ts +0 -2
  272. package/dist-lib/components/pages/SmartRecordListPage.impl.d.ts +0 -4
  273. package/dist-lib/components/pages/auth/AuthShell.d.ts +0 -18
  274. package/dist-lib/components/pages/auth/Forgot.d.ts +0 -1
  275. package/dist-lib/components/pages/auth/Reset.d.ts +0 -1
  276. package/dist-lib/components/pages/auth/SignIn.d.ts +0 -1
  277. package/dist-lib/components/pages/auth/SignUp.d.ts +0 -1
  278. package/dist-lib/components/pages/auth/TwoFA.d.ts +0 -1
  279. package/dist-lib/components/pages/auth/icons.d.ts +0 -6
  280. package/dist-lib/components/pages/exportRequest.d.ts +0 -69
  281. package/dist-lib/components/pages/list/DataCell.d.ts +0 -4
  282. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +0 -8
  283. package/dist-lib/components/pages/list/ListCardRow.d.ts +0 -39
  284. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -33
  285. package/dist-lib/components/pages/list/ListFloatbar.d.ts +0 -29
  286. package/dist-lib/components/pages/list/ListFooter.d.ts +0 -26
  287. package/dist-lib/components/pages/list/ListHeader.d.ts +0 -26
  288. package/dist-lib/components/pages/list/ListNoRows.d.ts +0 -31
  289. package/dist-lib/components/pages/list/ListTable.d.ts +0 -33
  290. package/dist-lib/components/pages/list/ListTableRow.d.ts +0 -17
  291. package/dist-lib/components/pages/list/ListToolbar.d.ts +0 -46
  292. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +0 -10
  293. package/dist-lib/components/pages/list/RowActionsCell.d.ts +0 -34
  294. package/dist-lib/components/pages/list/RowContextMenu.d.ts +0 -28
  295. package/dist-lib/components/pages/list/SaveViewDialog.d.ts +0 -10
  296. package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +0 -14
  297. package/dist-lib/components/pages/list/cardProjection.d.ts +0 -67
  298. package/dist-lib/components/pages/list/column-sizing.d.ts +0 -14
  299. package/dist-lib/components/pages/list/columns.d.ts +0 -46
  300. package/dist-lib/components/pages/list/filter-meta.d.ts +0 -25
  301. package/dist-lib/components/pages/list/page-size.d.ts +0 -3
  302. package/dist-lib/components/pages/list/sortable-header.d.ts +0 -2
  303. package/dist-lib/components/pages/list/table-features.d.ts +0 -14
  304. package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +0 -24
  305. package/dist-lib/components/pages/list/useActiveView.d.ts +0 -45
  306. package/dist-lib/components/pages/list/useHeaderReorder.d.ts +0 -26
  307. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +0 -38
  308. package/dist-lib/components/pages/list/useListQuery.d.ts +0 -67
  309. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +0 -61
  310. package/dist-lib/components/pages/list/useListSelection.d.ts +0 -31
  311. package/dist-lib/components/pages/list/useListSort.d.ts +0 -46
  312. package/dist-lib/components/pages/list/useListViews.d.ts +0 -57
  313. package/dist-lib/components/pages/list/useRowMenu.d.ts +0 -46
  314. package/dist-lib/components/pages/profile/Preferences.d.ts +0 -1
  315. package/dist-lib/components/pages/profile/Profile.d.ts +0 -7
  316. package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +0 -2
  317. package/dist-lib/components/params/ParamsBlock.d.ts +0 -13
  318. package/dist-lib/components/params/param-editors.d.ts +0 -20
  319. package/dist-lib/components/primitives/Avatar.d.ts +0 -6
  320. package/dist-lib/components/primitives/BoolToggle.d.ts +0 -7
  321. package/dist-lib/components/primitives/BrandGlyph.d.ts +0 -8
  322. package/dist-lib/components/primitives/BrandLogo.d.ts +0 -12
  323. package/dist-lib/components/primitives/Btn.d.ts +0 -19
  324. package/dist-lib/components/primitives/Check.d.ts +0 -7
  325. package/dist-lib/components/primitives/Chip.d.ts +0 -9
  326. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +0 -9
  327. package/dist-lib/components/primitives/Dropdown.d.ts +0 -20
  328. package/dist-lib/components/primitives/Fields.d.ts +0 -111
  329. package/dist-lib/components/primitives/HoverCard.d.ts +0 -15
  330. package/dist-lib/components/primitives/IconBtn.d.ts +0 -11
  331. package/dist-lib/components/primitives/Icons.d.ts +0 -136
  332. package/dist-lib/components/primitives/Kbd.d.ts +0 -4
  333. package/dist-lib/components/primitives/MenuItem.d.ts +0 -14
  334. package/dist-lib/components/primitives/Pill.d.ts +0 -11
  335. package/dist-lib/components/primitives/RecordIdBadge.d.ts +0 -8
  336. package/dist-lib/components/primitives/RowField.d.ts +0 -10
  337. package/dist-lib/components/primitives/SectionCard.d.ts +0 -24
  338. package/dist-lib/components/primitives/Spinner.d.ts +0 -3
  339. package/dist-lib/components/primitives/Tooltip.d.ts +0 -34
  340. package/dist-lib/components/primitives/dataTableStyles.d.ts +0 -4
  341. package/dist-lib/components/primitives/index.d.ts +0 -37
  342. package/dist-lib/components/shared/ChangePasswordDialog.d.ts +0 -9
  343. package/dist-lib/components/shared/ConfirmDialog.d.ts +0 -11
  344. package/dist-lib/components/shared/CopyButton.d.ts +0 -8
  345. package/dist-lib/components/shared/DynamicIcon.d.ts +0 -20
  346. package/dist-lib/components/shared/EmptyState.d.ts +0 -9
  347. package/dist-lib/components/shared/ErrorBoundary.d.ts +0 -17
  348. package/dist-lib/components/shared/LoadingSkeleton.d.ts +0 -6
  349. package/dist-lib/components/shared/LucideIcon.d.ts +0 -16
  350. package/dist-lib/components/shared/Markdown.d.ts +0 -3
  351. package/dist-lib/components/shared/MarkdownRenderer.d.ts +0 -11
  352. package/dist-lib/components/shared/RefreshControl.d.ts +0 -25
  353. package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +0 -11
  354. package/dist-lib/components/shared/StatusStepper.d.ts +0 -13
  355. package/dist-lib/components/shared/toast/DeclarionToast.d.ts +0 -31
  356. package/dist-lib/components/shared/useOwnRefresh.d.ts +0 -9
  357. package/dist-lib/embed/EmbedAuthBootstrap.d.ts +0 -8
  358. package/dist-lib/embed/EmbedContext.d.ts +0 -50
  359. package/dist-lib/embed/EmbedDirtyReporter.d.ts +0 -10
  360. package/dist-lib/embed/EmbedHistoryTracker.d.ts +0 -1
  361. package/dist-lib/embed/EmbedLocationReporter.d.ts +0 -8
  362. package/dist-lib/embed/EmbedResizeReporter.d.ts +0 -6
  363. package/dist-lib/embed/EmbedUnsavedGuard.d.ts +0 -7
  364. package/dist-lib/embed/embed-dirty.d.ts +0 -24
  365. package/dist-lib/embed/embed-history.d.ts +0 -19
  366. package/dist-lib/embed/embed-nav-guard.d.ts +0 -20
  367. package/dist-lib/embed/file-src.d.ts +0 -63
  368. package/dist-lib/embed/handshake.d.ts +0 -57
  369. package/dist-lib/embed/index.d.ts +0 -19
  370. package/dist-lib/embed/params.d.ts +0 -75
  371. package/dist-lib/embed/protocol.d.ts +0 -165
  372. package/dist-lib/embed/screen-location.d.ts +0 -50
  373. package/dist-lib/embed/theme.d.ts +0 -34
  374. package/dist-lib/embed/token.d.ts +0 -57
  375. package/dist-lib/embed/useEmbedNavigate.d.ts +0 -48
  376. package/dist-lib/embed/useGlobalLinkInterceptor.d.ts +0 -66
  377. package/dist-lib/failure-BUxXuP4c.js +0 -158
  378. package/dist-lib/format-count-bXVfHzbI.js +0 -1771
  379. package/dist-lib/hooks/useActionData.d.ts +0 -61
  380. package/dist-lib/hooks/useAgentConversation.d.ts +0 -24
  381. package/dist-lib/hooks/useAllEntityData.d.ts +0 -16
  382. package/dist-lib/hooks/useAssociatedData.d.ts +0 -10
  383. package/dist-lib/hooks/useAuth.d.ts +0 -22
  384. package/dist-lib/hooks/useBranding.d.ts +0 -8
  385. package/dist-lib/hooks/useBrandingChrome.d.ts +0 -59
  386. package/dist-lib/hooks/useChildrenData.d.ts +0 -3
  387. package/dist-lib/hooks/useColumns.d.ts +0 -13
  388. package/dist-lib/hooks/useCurrentScreen.d.ts +0 -34
  389. package/dist-lib/hooks/useCursorEntityData.d.ts +0 -79
  390. package/dist-lib/hooks/useDebounce.d.ts +0 -1
  391. package/dist-lib/hooks/useEntity.d.ts +0 -2
  392. package/dist-lib/hooks/useEntityData.d.ts +0 -41
  393. package/dist-lib/hooks/useFilters.d.ts +0 -14
  394. package/dist-lib/hooks/useImpersonation.d.ts +0 -23
  395. package/dist-lib/hooks/useLanguage.d.ts +0 -4
  396. package/dist-lib/hooks/useLiveObject.d.ts +0 -9
  397. package/dist-lib/hooks/useLongPress.d.ts +0 -29
  398. package/dist-lib/hooks/useMutations.d.ts +0 -13
  399. package/dist-lib/hooks/useObject.d.ts +0 -11
  400. package/dist-lib/hooks/useObjectStatus.d.ts +0 -5
  401. package/dist-lib/hooks/usePageState.d.ts +0 -32
  402. package/dist-lib/hooks/usePageStateRuntime.d.ts +0 -27
  403. package/dist-lib/hooks/usePageStateTtl.d.ts +0 -11
  404. package/dist-lib/hooks/useParams.d.ts +0 -49
  405. package/dist-lib/hooks/useProperties.d.ts +0 -5
  406. package/dist-lib/hooks/useRealtimeThresholds.d.ts +0 -1
  407. package/dist-lib/hooks/useRegisterScreenTab.d.ts +0 -11
  408. package/dist-lib/hooks/useResponsiveMode.d.ts +0 -27
  409. package/dist-lib/hooks/useSSE.d.ts +0 -31
  410. package/dist-lib/hooks/useSchema.d.ts +0 -1
  411. package/dist-lib/hooks/useScreen.d.ts +0 -2
  412. package/dist-lib/hooks/useScreenBack.d.ts +0 -21
  413. package/dist-lib/hooks/useScreenTab.d.ts +0 -10
  414. package/dist-lib/hooks/useTabNavigate.d.ts +0 -34
  415. package/dist-lib/hooks/useTabSearchMirror.d.ts +0 -1
  416. package/dist-lib/hooks/useTabTitle.d.ts +0 -2
  417. package/dist-lib/hooks/useText.d.ts +0 -3
  418. package/dist-lib/hooks/useTimelineData.d.ts +0 -10
  419. package/dist-lib/hooks/useVersionWatcher.d.ts +0 -30
  420. package/dist-lib/hooks/useViews.d.ts +0 -26
  421. package/dist-lib/lib/action-dispatch.d.ts +0 -8
  422. package/dist-lib/lib/actions.d.ts +0 -254
  423. package/dist-lib/lib/anchor.d.ts +0 -36
  424. package/dist-lib/lib/brand-tokens.d.ts +0 -43
  425. package/dist-lib/lib/branding.d.ts +0 -20
  426. package/dist-lib/lib/canonical-url.d.ts +0 -27
  427. package/dist-lib/lib/capabilityPrefetch.d.ts +0 -6
  428. package/dist-lib/lib/child-config.d.ts +0 -24
  429. package/dist-lib/lib/children-validation.d.ts +0 -5
  430. package/dist-lib/lib/decimal-text.d.ts +0 -1
  431. package/dist-lib/lib/display-value.d.ts +0 -1
  432. package/dist-lib/lib/document-templates.d.ts +0 -11
  433. package/dist-lib/lib/download.d.ts +0 -21
  434. package/dist-lib/lib/evidence-verdict.d.ts +0 -11
  435. package/dist-lib/lib/failure.d.ts +0 -2
  436. package/dist-lib/lib/field-classification.d.ts +0 -61
  437. package/dist-lib/lib/field-regions.d.ts +0 -8
  438. package/dist-lib/lib/filter-evaluator.d.ts +0 -16
  439. package/dist-lib/lib/filters.d.ts +0 -93
  440. package/dist-lib/lib/format-count.d.ts +0 -41
  441. package/dist-lib/lib/html-state.d.ts +0 -11
  442. package/dist-lib/lib/language.d.ts +0 -19
  443. package/dist-lib/lib/longPressGesture.d.ts +0 -55
  444. package/dist-lib/lib/mass-edit.d.ts +0 -32
  445. package/dist-lib/lib/page-inset.d.ts +0 -3
  446. package/dist-lib/lib/quick-add.d.ts +0 -2
  447. package/dist-lib/lib/realtime-query-keys.d.ts +0 -22
  448. package/dist-lib/lib/realtime-reconcile.d.ts +0 -33
  449. package/dist-lib/lib/realtime-resync.d.ts +0 -23
  450. package/dist-lib/lib/record-documents-key.d.ts +0 -1
  451. package/dist-lib/lib/rich-text.d.ts +0 -14
  452. package/dist-lib/lib/rowClickGesture.d.ts +0 -26
  453. package/dist-lib/lib/safe-url.d.ts +0 -15
  454. package/dist-lib/lib/schema-routing.d.ts +0 -3
  455. package/dist-lib/lib/screen-back.d.ts +0 -70
  456. package/dist-lib/lib/scroll-restoration.d.ts +0 -90
  457. package/dist-lib/lib/size-value.d.ts +0 -16
  458. package/dist-lib/lib/sort.d.ts +0 -72
  459. package/dist-lib/lib/timestamp.d.ts +0 -53
  460. package/dist-lib/lib/toast.d.ts +0 -49
  461. package/dist-lib/lib/ui-actions.d.ts +0 -12
  462. package/dist-lib/lib/utils.d.ts +0 -9
  463. package/dist-lib/lib/variants.d.ts +0 -7
  464. package/dist-lib/lib/versionTracker.d.ts +0 -72
  465. package/dist-lib/lib/viewport-category.d.ts +0 -44
  466. package/dist-lib/main.d.ts +0 -1
  467. package/dist-lib/registry-nSeHd5si.js +0 -1956
  468. package/dist-lib/safe-url-oSJw5pzO.js +0 -34
  469. package/dist-lib/stores/auth.d.ts +0 -16
  470. package/dist-lib/stores/list-layout.d.ts +0 -85
  471. package/dist-lib/stores/page-state.d.ts +0 -61
  472. package/dist-lib/stores/preferences.d.ts +0 -37
  473. package/dist-lib/stores/realtime.d.ts +0 -96
  474. package/dist-lib/stores/screen-registry.d.ts +0 -17
  475. package/dist-lib/stores/tabs.d.ts +0 -73
  476. package/dist-lib/types/api.d.ts +0 -579
  477. package/dist-lib/types/fieldType.d.ts +0 -2
  478. package/dist-lib/types/files.d.ts +0 -79
  479. package/dist-lib/types/ordmap.d.ts +0 -39
  480. package/dist-lib/types/schema.d.ts +0 -1089
  481. package/dist-lib/useCurrentScreen-0WBj7wT6.js +0 -7860
  482. package/dist-lib/useListQuery-C7dq_sEo.js +0 -103
  483. package/dist-lib/useOwnRefresh-q80kCMMh.js +0 -1167
  484. package/dist-lib/useProperties-CeGKtq7Q.js +0 -83
  485. package/dist-lib/useTabSearchMirror-CzNAj82Q.js +0 -175
  486. package/dist-lib/useText-BsedsJ-J.js +0 -952
  487. package/dist-lib/vite/fingerprint-plugin.d.ts +0 -44
@@ -1,8 +1,11 @@
1
- import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
2
- import { $ as n, Dn as r, Jn as i, L as a, On as o, R as s, U as c, Wn as l, dt as u, fn as d, ft as f, gt as p, ht as m, lt as h, mt as g, pn as _, pt as v, qn as y, rt as b, st as x, tt as S, ut as C, yt as w } from "./useCurrentScreen-0WBj7wT6.js";
3
- import { i as T, r as E, t as D, u as O } from "./useText-BsedsJ-J.js";
4
- import { a as k, c as A, d as j, f as M, i as ee, l as te, m as N, n as P, o as F, p as I, r as L, s as R, t as z, u as ne } from "./value-Dwfyghtj.js";
5
- import { Fragment as re, Suspense as B, lazy as V, useCallback as H, useEffect as U, useLayoutEffect as W, useMemo as ie, useRef as G, useState as K } from "react";
1
+ import { Dt as e, Et as t, Nt as n, V as r, k as i, on as a, sn as o, wt as s, z as c } from "./useCurrentScreen--UovgvRj.js";
2
+ import { t as l } from "./Icons-lt-7lhYR.js";
3
+ import { n as u, r as d } from "./CopyButton-C0iEvaT1.js";
4
+ import { n as f, t as p } from "./MenuItem-CfkVXPvC.js";
5
+ import { C as m, O as h, Q as g, S as _, T as v, b as y, f as b, g as x, l as S, s as C, v as w, w as T, x as E, y as D } from "./PropertyGridEditor-BTjscqfz.js";
6
+ import { t as O } from "./DynamicIcon-DuBSz6TZ.js";
7
+ import { a as k, c as A, d as j, f as M, i as N, l as ee, m as P, n as F, o as I, p as L, r as te, s as R, t as z, u as ne } from "./value-CDCeHgOv.js";
8
+ import { Fragment as B, Suspense as V, lazy as H, useCallback as U, useEffect as W, useLayoutEffect as re, useMemo as ie, useRef as G, useState as K } from "react";
6
9
  import { Fragment as q, jsx as J, jsxs as Y } from "react/jsx-runtime";
7
10
  //#region src/components/file-widgets/registry.ts
8
11
  var X = /* @__PURE__ */ new Map();
@@ -36,30 +39,30 @@ function de(e) {
36
39
  let t = e.trim().split(/\s+/).filter(Boolean);
37
40
  return t.length === 1 ? t[0].slice(0, 2).toUpperCase() : (t[0][0] + t[1][0]).toUpperCase();
38
41
  }
39
- function fe(e) {
40
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, alt: o, recordTitle: s, disabled: c, visual: l, uploadFieldCode: u, uploadSlotCode: d } = e, p = P(r), [_, y] = K("idle"), [b, S] = K(null), [w, O] = K(null), [k, A] = K(null), [F, L] = K(!1), z = G(null), ne = G(!1), re = G(null), { register: B, unregister: V, isDraft: W } = x(), q = D(), X = D("errors");
41
- U(() => () => {
42
+ function fe(n) {
43
+ let { field: r, fieldName: i, value: a, onChange: o, mode: c, alt: l, recordTitle: u, disabled: d, visual: f, uploadFieldCode: p, uploadSlotCode: h } = n, g = F(a), [v, y] = K("idle"), [b, S] = K(null), [C, O] = K(null), [k, A] = K(null), [I, te] = K(!1), z = G(null), ne = G(!1), B = G(null), { register: V, unregister: H, isDraft: re } = x(), q = s(), X = s("errors");
44
+ W(() => () => {
42
45
  z.current && z.current.abort();
43
46
  }, []);
44
- let Z = T(), ae = E(), oe = ie(() => M(p, o, n, Z, ae), [
45
- o,
46
- n,
47
- p,
47
+ let Z = e(), ae = t(), oe = ie(() => M(g, l, i, Z, ae), [
48
+ l,
49
+ i,
50
+ g,
48
51
  Z,
49
52
  ae
50
- ]), se = t.display?.initials ? s?.trim() : void 0, ce = (t.accepts ?? ["image/*"]).join(","), le = H(async (r) => {
51
- let a = m(r, t.accepts, t.max_size_bytes);
52
- if (a) {
53
- O(f(q, X, a)), y("error");
53
+ ]), se = r.display?.initials ? u?.trim() : void 0, ce = (r.accepts ?? ["image/*"]).join(","), le = U(async (e) => {
54
+ let t = T(e, r.accepts, r.max_size_bytes);
55
+ if (t) {
56
+ O(E(q, X, t)), y("error");
54
57
  return;
55
58
  }
56
- let o = r;
57
- if (t.display?.crop_on_upload) try {
58
- let { blob: e, filename: n } = await Q()({
59
- file: r,
60
- aspectRatio: ge(t.display.aspect_ratio)
59
+ let a = e;
60
+ if (r.display?.crop_on_upload) try {
61
+ let { blob: t, filename: n } = await Q()({
62
+ file: e,
63
+ aspectRatio: ge(r.display.aspect_ratio)
61
64
  });
62
- o = new File([e], n, { type: e.type || r.type });
65
+ a = new File([t], n, { type: t.type || e.type });
63
66
  } catch {
64
67
  O({
65
68
  code: "file.crop_failed",
@@ -69,155 +72,155 @@ function fe(e) {
69
72
  }
70
73
  O(null), ne.current = !1, y("uploading"), S({
71
74
  loaded: 0,
72
- total: o.size,
75
+ total: a.size,
73
76
  pct: 0
74
77
  });
75
78
  let s = new AbortController();
76
79
  z.current = s;
77
80
  try {
78
- let r = await g({
79
- file: o,
80
- entityCode: e.entityCode,
81
- fieldCode: u ?? n,
82
- slotCode: d,
81
+ let e = await m({
82
+ file: a,
83
+ entityCode: n.entityCode,
84
+ fieldCode: p ?? i,
85
+ slotCode: h,
83
86
  signal: s.signal,
84
87
  onProgress: S
85
88
  });
86
89
  if (ne.current) {
87
- C(r.id).catch(() => {}), V(r.id);
90
+ D(e.id).catch(() => {}), H(e.id);
88
91
  return;
89
92
  }
90
- p && W(p.id) && (C(p.id).catch(() => {}), V(p.id)), B(r.id, () => C(r.id)), A(r.id), y("idle"), S(null);
91
- let a = {
92
- id: r.id,
93
- filename: r.filename,
94
- content_type: r.content_type,
95
- size_bytes: r.size_bytes,
96
- sha256: r.sha256,
97
- width: r.width,
98
- height: r.height,
99
- url: r.url,
100
- metadata: r.metadata
93
+ g && re(g.id) && (D(g.id).catch(() => {}), H(g.id)), V(e.id, () => D(e.id)), A(e.id), y("idle"), S(null);
94
+ let t = {
95
+ id: e.id,
96
+ filename: e.filename,
97
+ content_type: e.content_type,
98
+ size_bytes: e.size_bytes,
99
+ sha256: e.sha256,
100
+ width: e.width,
101
+ height: e.height,
102
+ url: e.url,
103
+ metadata: e.metadata
101
104
  };
102
- i?.(t.mode === "array" ? [a] : a);
105
+ o?.(r.mode === "array" ? [t] : t);
103
106
  } catch (e) {
104
- if (e instanceof h && e.code === "ABORTED") return;
105
- O(v(q, X, e)), y("error"), S(null);
107
+ if (e instanceof w && e.code === "ABORTED") return;
108
+ O(_(q, X, e)), y("error"), S(null);
106
109
  }
107
110
  }, [
108
111
  X,
109
112
  q,
110
- t.accepts,
111
- t.max_size_bytes,
112
- t.display?.crop_on_upload,
113
- t.display?.aspect_ratio,
114
- t.mode,
115
- n,
113
+ r.accepts,
114
+ r.max_size_bytes,
115
+ r.display?.crop_on_upload,
116
+ r.display?.aspect_ratio,
117
+ r.mode,
116
118
  i,
117
- e.entityCode,
118
- B,
119
- W,
120
- p,
119
+ o,
120
+ n.entityCode,
121
121
  V,
122
- u,
123
- d
124
- ]), de = H(() => {
125
- _ === "uploading" && z.current && (ne.current = !0, z.current.abort(), z.current = null, y("idle"), S(null)), k && (C(k).catch(() => {}), V(k), A(null));
122
+ re,
123
+ g,
124
+ H,
125
+ p,
126
+ h
127
+ ]), de = U(() => {
128
+ v === "uploading" && z.current && (ne.current = !0, z.current.abort(), z.current = null, y("idle"), S(null)), k && (D(k).catch(() => {}), H(k), A(null));
126
129
  }, [
127
- _,
130
+ v,
128
131
  k,
129
- V
130
- ]), fe = H(() => {
131
- p && W(p.id) && (C(p.id).catch(() => {}), V(p.id), A(null)), i?.(t.mode === "array" ? [] : null);
132
+ H
133
+ ]), fe = U(() => {
134
+ g && re(g.id) && (D(g.id).catch(() => {}), H(g.id), A(null)), o?.(r.mode === "array" ? [] : null);
132
135
  }, [
133
- p,
134
- t.mode,
135
- W,
136
- i,
137
- V
138
- ]), ye = H(() => {
139
- O(null), y("idle"), re.current?.click();
140
- }, []), be = H(() => {
141
- c || re.current?.click();
142
- }, [c]), xe = H((e) => {
143
- c || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), be());
144
- }, [c, be]), Se = H((e) => {
145
- c || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
146
- }, [c]), Ce = H((e) => {
147
- if (c) return;
136
+ g,
137
+ r.mode,
138
+ re,
139
+ o,
140
+ H
141
+ ]), ye = U(() => {
142
+ O(null), y("idle"), B.current?.click();
143
+ }, []), be = U(() => {
144
+ d || B.current?.click();
145
+ }, [d]), xe = U((e) => {
146
+ d || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), be());
147
+ }, [d, be]), Se = U((e) => {
148
+ d || (e.preventDefault(), e.dataTransfer.dropEffect = "copy");
149
+ }, [d]), Ce = U((e) => {
150
+ if (d) return;
148
151
  e.preventDefault();
149
152
  let t = e.dataTransfer.files?.[0];
150
153
  t && le(t);
151
- }, [c, le]), we = H((e) => {
154
+ }, [d, le]), we = U((e) => {
152
155
  let t = e.target.files?.[0];
153
156
  e.target.value = "", t && le(t);
154
- }, [le]), Te = l.aspectRatio ?? he(l.shape, t.display?.aspect_ratio), Ee = j(p), De = {
157
+ }, [le]), Te = f.aspectRatio ?? he(f.shape, r.display?.aspect_ratio), Ee = j(g), De = {
155
158
  aspectRatio: Te,
156
- width: l.width ?? (l.shape === "wide" ? "100%" : "120px")
157
- }, Oe = !!p, ke = ue(p, t.display?.listable_thumbnail), Ae = te(p, t.display?.listable_thumbnail), je = ee(p?.id, Ae, ke), Me = a === "display", Ne = H((e) => {
158
- e.stopPropagation(), L((e) => !e);
159
- }, []), Pe = H((e) => {
160
- if (!p || !F) return;
161
- let n = e.currentTarget.getBoundingClientRect(), r = n.width > 0 ? (e.clientX - n.left) / n.width : .5, a = n.height > 0 ? (e.clientY - n.top) / n.height : .5, o = I(p, {
162
- x: Math.max(0, Math.min(1, r)),
163
- y: Math.max(0, Math.min(1, a))
159
+ width: f.width ?? (f.shape === "wide" ? "100%" : "120px")
160
+ }, Oe = !!g, ke = ue(g, r.display?.listable_thumbnail), Ae = ee(g, r.display?.listable_thumbnail), je = N(g?.id, Ae, ke), Me = c === "display", Ne = U((e) => {
161
+ e.stopPropagation(), te((e) => !e);
162
+ }, []), Pe = U((e) => {
163
+ if (!g || !I) return;
164
+ let t = e.currentTarget.getBoundingClientRect(), n = t.width > 0 ? (e.clientX - t.left) / t.width : .5, i = t.height > 0 ? (e.clientY - t.top) / t.height : .5, a = L(g, {
165
+ x: Math.max(0, Math.min(1, n)),
166
+ y: Math.max(0, Math.min(1, i))
164
167
  });
165
- i?.(t.mode === "array" ? [o] : o), L(!1);
168
+ o?.(r.mode === "array" ? [a] : a), te(!1);
166
169
  }, [
167
- t.mode,
168
- p,
169
- F,
170
- i
170
+ r.mode,
171
+ g,
172
+ I,
173
+ o
171
174
  ]);
172
175
  return Me ? /* @__PURE__ */ J("div", {
173
- className: pe(l.shape, !1),
176
+ className: pe(f.shape, !1),
174
177
  style: De,
175
178
  "aria-label": oe,
176
179
  children: Oe && je ? /* @__PURE__ */ J("img", {
177
180
  src: je,
178
181
  alt: oe,
179
- className: me(l.shape),
182
+ className: me(f.shape),
180
183
  style: { objectPosition: R(Ee) },
181
184
  loading: "lazy"
182
185
  }) : /* @__PURE__ */ J(_e, {
183
- shape: l.shape,
186
+ shape: f.shape,
184
187
  initialsTitle: se
185
188
  })
186
189
  }) : /* @__PURE__ */ Y("div", {
187
- className: pe(l.shape, !c),
190
+ className: pe(f.shape, !d),
188
191
  style: De,
189
- tabIndex: c ? -1 : 0,
192
+ tabIndex: d ? -1 : 0,
190
193
  role: "button",
191
194
  "aria-label": oe,
192
- "aria-disabled": c || void 0,
193
- "aria-busy": _ === "uploading" || void 0,
194
- "aria-invalid": _ === "error" || void 0,
195
- onClick: _ === "idle" && !Oe ? be : void 0,
196
- onMouseDown: F ? Pe : void 0,
195
+ "aria-disabled": d || void 0,
196
+ "aria-busy": v === "uploading" || void 0,
197
+ "aria-invalid": v === "error" || void 0,
198
+ onClick: v === "idle" && !Oe ? be : void 0,
199
+ onMouseDown: I ? Pe : void 0,
197
200
  onKeyDown: xe,
198
201
  onDragOver: Se,
199
202
  onDrop: Ce,
200
- "data-testid": F ? "focal-point-target" : `file-widget-${n}`,
203
+ "data-testid": I ? "focal-point-target" : `file-widget-${i}`,
201
204
  children: [
202
205
  /* @__PURE__ */ J("input", {
203
- ref: re,
206
+ ref: B,
204
207
  type: "file",
205
208
  accept: ce,
206
209
  onChange: we,
207
210
  style: { display: "none" },
208
- "data-testid": `file-input-${n}`
211
+ "data-testid": `file-input-${i}`
209
212
  }),
210
213
  Oe && je ? /* @__PURE__ */ J("img", {
211
214
  src: je,
212
215
  alt: oe,
213
- className: me(l.shape),
216
+ className: me(f.shape),
214
217
  style: { objectPosition: R(Ee) },
215
218
  loading: "lazy"
216
- }) : _ === "uploading" ? null : /* @__PURE__ */ J(_e, {
217
- shape: l.shape,
219
+ }) : v === "uploading" ? null : /* @__PURE__ */ J(_e, {
220
+ shape: f.shape,
218
221
  initialsTitle: se
219
222
  }),
220
- _ === "uploading" && /* @__PURE__ */ J(ve, {
223
+ v === "uploading" && /* @__PURE__ */ J(ve, {
221
224
  pct: b?.pct ?? 0,
222
225
  label: q("file.upload.progress", "Uploading {pct}%", { pct: Math.round(b?.pct ?? 0) })
223
226
  }),
@@ -226,15 +229,15 @@ function fe(e) {
226
229
  "aria-hidden": "true",
227
230
  "data-testid": "draft-indicator"
228
231
  }),
229
- Oe && _ === "idle" && !c && /* @__PURE__ */ Y("div", {
232
+ Oe && v === "idle" && !d && /* @__PURE__ */ Y("div", {
230
233
  className: "absolute inset-0 flex items-center justify-center gap-2 bg-black/40 opacity-0 transition-opacity hover:opacity-100 focus-within:opacity-100",
231
234
  children: [
232
- t.display?.focal_point && /* @__PURE__ */ J("button", {
235
+ r.display?.focal_point && /* @__PURE__ */ J("button", {
233
236
  type: "button",
234
237
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
235
238
  onClick: Ne,
236
239
  "data-testid": "focal-point-toggle",
237
- children: F ? q("file.image.focus_cancel", "Cancel focus") : q("file.image.focus_set", "Set focus")
240
+ children: I ? q("file.image.focus_cancel", "Cancel focus") : q("file.image.focus_set", "Set focus")
238
241
  }),
239
242
  /* @__PURE__ */ J("button", {
240
243
  type: "button",
@@ -262,7 +265,7 @@ function fe(e) {
262
265
  },
263
266
  "data-testid": "focal-point-marker"
264
267
  }),
265
- _ === "uploading" && /* @__PURE__ */ J("button", {
268
+ v === "uploading" && /* @__PURE__ */ J("button", {
266
269
  type: "button",
267
270
  className: "absolute bottom-1 right-1 rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
268
271
  onClick: (e) => {
@@ -271,13 +274,13 @@ function fe(e) {
271
274
  "data-testid": "cancel-upload",
272
275
  children: q("file.upload.cancel", "Cancel")
273
276
  }),
274
- _ === "error" && w && /* @__PURE__ */ Y("div", {
277
+ v === "error" && C && /* @__PURE__ */ Y("div", {
275
278
  className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-destructive-soft px-2 py-1 text-xs text-destructive",
276
279
  role: "alert",
277
280
  children: [/* @__PURE__ */ J("span", {
278
281
  className: "truncate",
279
- title: w.message,
280
- children: /* @__PURE__ */ J(N, { failure: w })
282
+ title: C.message,
283
+ children: /* @__PURE__ */ J(P, { failure: C })
281
284
  }), /* @__PURE__ */ J("button", {
282
285
  type: "button",
283
286
  className: "underline",
@@ -312,7 +315,7 @@ function ge(e) {
312
315
  if (n && r) return n / r;
313
316
  }
314
317
  function _e({ shape: e, initialsTitle: t }) {
315
- let n = D();
318
+ let n = s();
316
319
  return t ? /* @__PURE__ */ J("div", {
317
320
  className: "flex h-full w-full items-center justify-center bg-surface-3 text-text-3",
318
321
  children: /* @__PURE__ */ J("span", {
@@ -395,12 +398,12 @@ function xe(e) {
395
398
  }
396
399
  //#endregion
397
400
  //#region src/components/file-widgets/GridLazy.tsx
398
- var Se = V(() => import("./Grid-Dsf3I0xG.js").then((e) => ({ default: e.Grid })));
401
+ var Se = H(() => import("./Grid-Cg29k0jv.js").then((e) => ({ default: e.Grid })));
399
402
  function Ce() {
400
403
  return /* @__PURE__ */ J("div", { className: "h-24 w-full rounded-md bg-muted animate-pulse" });
401
404
  }
402
405
  function we(e) {
403
- return /* @__PURE__ */ J(B, {
406
+ return /* @__PURE__ */ J(V, {
404
407
  fallback: /* @__PURE__ */ J(Ce, {}),
405
408
  children: /* @__PURE__ */ J(Se, { ...e })
406
409
  });
@@ -408,119 +411,119 @@ function we(e) {
408
411
  //#endregion
409
412
  //#region src/components/file-widgets/DocumentCard.tsx
410
413
  function Te({ contentType: e }) {
411
- let t = D(), n = e ? e.includes("pdf") ? "PDF" : e.includes("word") ? "DOC" : e.includes("sheet") || e.includes("excel") ? "XLS" : e.startsWith("image/") ? "IMG" : e.split("/")[1]?.slice(0, 4).toUpperCase() ?? t("file.document.type_other", "FILE") : t("file.document.type_other", "FILE");
414
+ let t = s(), n = e ? e.includes("pdf") ? "PDF" : e.includes("word") ? "DOC" : e.includes("sheet") || e.includes("excel") ? "XLS" : e.startsWith("image/") ? "IMG" : e.split("/")[1]?.slice(0, 4).toUpperCase() ?? t("file.document.type_other", "FILE") : t("file.document.type_other", "FILE");
412
415
  return /* @__PURE__ */ J("div", {
413
416
  className: "flex h-16 w-16 flex-none items-center justify-center rounded-md border border-border bg-surface-3 text-xs font-medium text-muted-foreground",
414
417
  children: n
415
418
  });
416
419
  }
417
420
  function Ee(e) {
418
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o, uploadFieldCode: s, uploadSlotCode: c } = e, l = P(r), [d, p] = K("idle"), [_, y] = K(null), [b, S] = K(null), [w, T] = K(!1), [E, A] = K(l?.filename ?? ""), j = G(null), M = G(!1), ee = G(null), { register: te, unregister: I, isDraft: R } = x(), z = D(), re = D("errors"), { open: B } = L();
419
- U(() => () => {
421
+ let { field: t, fieldName: r, value: i, onChange: a, mode: o, disabled: c, uploadFieldCode: l, uploadSlotCode: u } = e, d = F(i), [f, p] = K("idle"), [h, g] = K(null), [v, b] = K(null), [S, C] = K(!1), [O, A] = K(d?.filename ?? ""), j = G(null), M = G(!1), N = G(null), { register: ee, unregister: L, isDraft: R } = x(), z = s(), B = s("errors"), { open: V } = te();
422
+ W(() => () => {
420
423
  j.current && j.current.abort();
421
- }, []), U(() => {
422
- A(l?.filename ?? "");
423
- }, [l?.filename]);
424
- let V = (t.accepts ?? []).join(","), W = H(async (r) => {
425
- let a = m(r, t.accepts, t.max_size_bytes);
426
- if (a) {
427
- S(f(z, re, a)), p("error");
424
+ }, []), W(() => {
425
+ A(d?.filename ?? "");
426
+ }, [d?.filename]);
427
+ let H = (t.accepts ?? []).join(","), re = U(async (n) => {
428
+ let i = T(n, t.accepts, t.max_size_bytes);
429
+ if (i) {
430
+ b(E(z, B, i)), p("error");
428
431
  return;
429
432
  }
430
- S(null), M.current = !1, p("uploading"), y({
433
+ b(null), M.current = !1, p("uploading"), g({
431
434
  loaded: 0,
432
- total: r.size,
435
+ total: n.size,
433
436
  pct: 0
434
437
  });
435
438
  let o = new AbortController();
436
439
  j.current = o;
437
440
  try {
438
- let a = await g({
439
- file: r,
441
+ let i = await m({
442
+ file: n,
440
443
  entityCode: e.entityCode,
441
- fieldCode: s ?? n,
442
- slotCode: c,
444
+ fieldCode: l ?? r,
445
+ slotCode: u,
443
446
  signal: o.signal,
444
- onProgress: y
447
+ onProgress: g
445
448
  });
446
449
  if (M.current) {
447
- C(a.id).catch(() => {}), I(a.id);
450
+ D(i.id).catch(() => {}), L(i.id);
448
451
  return;
449
452
  }
450
- l && R(l.id) && (C(l.id).catch(() => {}), I(l.id)), te(a.id, () => C(a.id)), p("idle"), y(null);
451
- let u = {
452
- id: a.id,
453
- filename: a.filename,
454
- content_type: a.content_type,
455
- size_bytes: a.size_bytes,
456
- sha256: a.sha256,
457
- width: a.width,
458
- height: a.height,
459
- url: a.url,
460
- metadata: a.metadata
453
+ d && R(d.id) && (D(d.id).catch(() => {}), L(d.id)), ee(i.id, () => D(i.id)), p("idle"), g(null);
454
+ let s = {
455
+ id: i.id,
456
+ filename: i.filename,
457
+ content_type: i.content_type,
458
+ size_bytes: i.size_bytes,
459
+ sha256: i.sha256,
460
+ width: i.width,
461
+ height: i.height,
462
+ url: i.url,
463
+ metadata: i.metadata
461
464
  };
462
- i?.(t.mode === "array" ? [u] : u);
465
+ a?.(t.mode === "array" ? [s] : s);
463
466
  } catch (e) {
464
- if (e instanceof h && e.code === "ABORTED") return;
465
- S(v(z, re, e)), p("error"), y(null);
467
+ if (e instanceof w && e.code === "ABORTED") return;
468
+ b(_(z, B, e)), p("error"), g(null);
466
469
  }
467
470
  }, [
468
- re,
471
+ B,
469
472
  z,
470
473
  t.accepts,
471
474
  t.max_size_bytes,
472
475
  t.mode,
473
- n,
474
- l,
476
+ r,
477
+ d,
475
478
  R,
476
- i,
479
+ a,
477
480
  e.entityCode,
478
- te,
479
- I,
480
- s,
481
- c
482
- ]), ie = H(() => {
483
- o || ee.current?.click();
484
- }, [o]), X = H((e) => {
481
+ ee,
482
+ L,
483
+ l,
484
+ u
485
+ ]), ie = U(() => {
486
+ c || N.current?.click();
487
+ }, [c]), X = U((e) => {
485
488
  let t = e.target.files?.[0];
486
- e.target.value = "", t && W(t);
487
- }, [W]), Z = H(() => {
488
- l && R(l.id) && (C(l.id).catch(() => {}), I(l.id)), i?.(t.mode === "array" ? [] : null);
489
+ e.target.value = "", t && re(t);
490
+ }, [re]), Z = U(() => {
491
+ d && R(d.id) && (D(d.id).catch(() => {}), L(d.id)), a?.(t.mode === "array" ? [] : null);
489
492
  }, [
490
- l,
493
+ d,
491
494
  t.mode,
492
495
  R,
493
- i,
494
- I
495
- ]), ae = H(() => {
496
- d === "uploading" && j.current && (M.current = !0, j.current.abort(), j.current = null, p("idle"), y(null));
497
- }, [d]), oe = H(() => {
498
- l && B(l.id, "download", F(l));
499
- }, [l, B]), se = l ? k(l) : !1, ce = H(() => {
500
- l && k(l) && B(l.id, "preview", ne(l));
501
- }, [l, B]), le = H(() => {
502
- if (!l) {
503
- T(!1);
496
+ a,
497
+ L
498
+ ]), ae = U(() => {
499
+ f === "uploading" && j.current && (M.current = !0, j.current.abort(), j.current = null, p("idle"), g(null));
500
+ }, [f]), oe = U(() => {
501
+ d && V(d.id, "download", I(d));
502
+ }, [d, V]), se = d ? k(d) : !1, ce = U(() => {
503
+ d && k(d) && V(d.id, "preview", ne(d));
504
+ }, [d, V]), le = U(() => {
505
+ if (!d) {
506
+ C(!1);
504
507
  return;
505
508
  }
506
- let e = E.trim();
507
- if (T(!1), !e || e === l.filename) {
508
- A(l.filename);
509
+ let e = O.trim();
510
+ if (C(!1), !e || e === d.filename) {
511
+ A(d.filename);
509
512
  return;
510
513
  }
511
514
  let n = {
512
- ...l,
515
+ ...d,
513
516
  filename: e
514
517
  };
515
- i?.(t.mode === "array" ? [n] : n);
518
+ a?.(t.mode === "array" ? [n] : n);
516
519
  }, [
517
- E,
518
- l,
519
- i,
520
+ O,
521
+ d,
522
+ a,
520
523
  t.mode
521
- ]), Q = a === "display";
522
- return !l && d !== "uploading" ? /* @__PURE__ */ Y("div", {
523
- "data-testid": `file-widget-${n}`,
524
+ ]), Q = o === "display";
525
+ return !d && f !== "uploading" ? /* @__PURE__ */ Y("div", {
526
+ "data-testid": `file-widget-${r}`,
524
527
  className: "flex items-center gap-3 rounded-md border border-dashed border-border bg-surface p-3",
525
528
  children: [
526
529
  /* @__PURE__ */ J(Te, {}),
@@ -533,90 +536,90 @@ function Ee(e) {
533
536
  type: "button",
534
537
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
535
538
  onClick: ie,
536
- disabled: o,
539
+ disabled: c,
537
540
  "data-testid": "upload",
538
541
  children: z("file.document.upload", "Upload")
539
542
  })]
540
543
  }),
541
544
  !Q && /* @__PURE__ */ J("input", {
542
- ref: ee,
545
+ ref: N,
543
546
  type: "file",
544
- accept: V || void 0,
547
+ accept: H || void 0,
545
548
  onChange: X,
546
549
  style: { display: "none" },
547
- "data-testid": `file-input-${n}`
550
+ "data-testid": `file-input-${r}`
548
551
  }),
549
- d === "error" && b && /* @__PURE__ */ J("div", {
552
+ f === "error" && v && /* @__PURE__ */ J("div", {
550
553
  className: "ml-auto text-xs text-destructive",
551
554
  role: "alert",
552
- children: /* @__PURE__ */ J(N, { failure: b })
555
+ children: /* @__PURE__ */ J(P, { failure: v })
553
556
  })
554
557
  ]
555
558
  }) : /* @__PURE__ */ Y("div", {
556
- "data-testid": `file-widget-${n}`,
559
+ "data-testid": `file-widget-${r}`,
557
560
  className: "flex items-center gap-3 rounded-md border border-border bg-surface p-3",
558
- "aria-busy": d === "uploading" || void 0,
559
- "aria-invalid": d === "error" || void 0,
561
+ "aria-busy": f === "uploading" || void 0,
562
+ "aria-invalid": f === "error" || void 0,
560
563
  children: [
561
- /* @__PURE__ */ J(Te, { contentType: l?.content_type }),
564
+ /* @__PURE__ */ J(Te, { contentType: d?.content_type }),
562
565
  /* @__PURE__ */ Y("div", {
563
566
  className: "flex min-w-0 flex-1 flex-col gap-1",
564
567
  children: [
565
- w && l ? /* @__PURE__ */ J("input", {
568
+ S && d ? /* @__PURE__ */ J("input", {
566
569
  type: "text",
567
570
  className: "rounded-sm border border-border bg-card px-1 py-0.5 text-sm text-foreground",
568
- value: E,
571
+ value: O,
569
572
  autoFocus: !0,
570
573
  onChange: (e) => A(e.target.value),
571
574
  onBlur: le,
572
575
  onKeyDown: (e) => {
573
- e.key === "Enter" ? le() : e.key === "Escape" && (T(!1), A(l.filename));
576
+ e.key === "Enter" ? le() : e.key === "Escape" && (C(!1), A(d.filename));
574
577
  },
575
578
  "data-testid": "filename-input"
576
579
  }) : /* @__PURE__ */ J("button", {
577
580
  type: "button",
578
581
  className: "truncate text-left text-sm font-medium text-foreground hover:underline",
579
- onClick: () => !Q && l && T(!0),
580
- disabled: Q || o || !l,
581
- title: l?.filename,
582
+ onClick: () => !Q && d && C(!0),
583
+ disabled: Q || c || !d,
584
+ title: d?.filename,
582
585
  "data-testid": "filename",
583
- children: l?.filename ?? z("file.document.uploading", "Uploading…")
586
+ children: d?.filename ?? z("file.document.uploading", "Uploading…")
584
587
  }),
585
588
  /* @__PURE__ */ Y("div", {
586
589
  className: "flex flex-wrap gap-2 text-xs text-muted-foreground",
587
590
  children: [
588
- l && /* @__PURE__ */ J("span", { children: u(l.size_bytes) }),
589
- l?.page_count != null && /* @__PURE__ */ J("span", { children: O(z, "file.document.pages", l.page_count, {
591
+ d && /* @__PURE__ */ J("span", { children: y(d.size_bytes) }),
592
+ d?.page_count != null && /* @__PURE__ */ J("span", { children: n(z, "file.document.pages", d.page_count, {
590
593
  one: "{count} page",
591
594
  other: "{count} pages"
592
595
  }) }),
593
- l?.uploaded_at && /* @__PURE__ */ J("span", { children: De(l.uploaded_at) }),
594
- l?.uploaded_by && /* @__PURE__ */ J("span", { children: z("file.document.uploaded_by", "by {user}", { user: l.uploaded_by }) }),
595
- l?.version?.number != null && /* @__PURE__ */ J("span", {
596
+ d?.uploaded_at && /* @__PURE__ */ J("span", { children: De(d.uploaded_at) }),
597
+ d?.uploaded_by && /* @__PURE__ */ J("span", { children: z("file.document.uploaded_by", "by {user}", { user: d.uploaded_by }) }),
598
+ d?.version?.number != null && /* @__PURE__ */ J("span", {
596
599
  "data-testid": "version-badge",
597
- children: z("file.document.version", "v{number}", { number: l.version.number })
600
+ children: z("file.document.version", "v{number}", { number: d.version.number })
598
601
  })
599
602
  ]
600
603
  }),
601
- d === "uploading" && /* @__PURE__ */ J("div", {
604
+ f === "uploading" && /* @__PURE__ */ J("div", {
602
605
  className: "text-xs text-muted-foreground",
603
606
  role: "progressbar",
604
- "aria-valuenow": _?.pct ?? 0,
607
+ "aria-valuenow": h?.pct ?? 0,
605
608
  "aria-valuemin": 0,
606
609
  "aria-valuemax": 100,
607
610
  "data-testid": "upload-progress",
608
- children: z("file.upload.progress", "Uploading {pct}%", { pct: _?.pct ?? 0 })
611
+ children: z("file.upload.progress", "Uploading {pct}%", { pct: h?.pct ?? 0 })
609
612
  }),
610
- d === "error" && b && /* @__PURE__ */ J("div", {
613
+ f === "error" && v && /* @__PURE__ */ J("div", {
611
614
  className: "text-xs text-destructive",
612
615
  role: "alert",
613
- children: /* @__PURE__ */ J(N, { failure: b })
616
+ children: /* @__PURE__ */ J(P, { failure: v })
614
617
  })
615
618
  ]
616
619
  }),
617
620
  /* @__PURE__ */ Y("div", {
618
621
  className: "flex flex-none items-center gap-1",
619
- children: [l && d !== "uploading" && /* @__PURE__ */ Y(q, { children: [
622
+ children: [d && f !== "uploading" && /* @__PURE__ */ Y(q, { children: [
620
623
  /* @__PURE__ */ J("button", {
621
624
  type: "button",
622
625
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
@@ -637,18 +640,18 @@ function Ee(e) {
637
640
  type: "button",
638
641
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
639
642
  onClick: ie,
640
- disabled: o,
643
+ disabled: c,
641
644
  "data-testid": "replace",
642
645
  children: z("file.document.replace", "Replace")
643
646
  }), /* @__PURE__ */ J("button", {
644
647
  type: "button",
645
648
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs text-destructive hover:bg-surface-2",
646
649
  onClick: Z,
647
- disabled: o,
650
+ disabled: c,
648
651
  "data-testid": "remove",
649
652
  children: z("file.remove", "Remove")
650
653
  })] })
651
- ] }), d === "uploading" && /* @__PURE__ */ J("button", {
654
+ ] }), f === "uploading" && /* @__PURE__ */ J("button", {
652
655
  type: "button",
653
656
  className: "rounded-sm border border-border bg-card px-2 py-1 text-xs",
654
657
  onClick: ae,
@@ -657,12 +660,12 @@ function Ee(e) {
657
660
  })]
658
661
  }),
659
662
  !Q && /* @__PURE__ */ J("input", {
660
- ref: ee,
663
+ ref: N,
661
664
  type: "file",
662
- accept: V || void 0,
665
+ accept: H || void 0,
663
666
  onChange: X,
664
667
  style: { display: "none" },
665
- "data-testid": `file-input-${n}`
668
+ "data-testid": `file-input-${r}`
666
669
  })
667
670
  ]
668
671
  });
@@ -677,104 +680,103 @@ function Oe(e) {
677
680
  return e ? (e.split("/")[1] ?? e).toUpperCase().slice(0, 6) : "";
678
681
  }
679
682
  function ke(e) {
680
- let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o } = e, s = z(r), [c, l] = K([]), { register: d, unregister: p, isDraft: _ } = x(), y = D(), b = D("errors"), S = G(s);
681
- S.current = s;
682
- let w = G(null), T = G(/* @__PURE__ */ new Set()), E = G([]);
683
- E.current = c;
684
- let { open: O } = L();
685
- U(() => () => {
686
- E.current.forEach((e) => e.abort());
683
+ let { field: t, fieldName: n, value: r, onChange: i, mode: a, disabled: o } = e, c = z(r), [l, u] = K([]), { register: d, unregister: f, isDraft: p } = x(), h = s(), g = s("errors"), v = G(c);
684
+ v.current = c;
685
+ let b = G(null), S = G(/* @__PURE__ */ new Set()), C = G([]);
686
+ C.current = l;
687
+ let { open: O } = te();
688
+ W(() => () => {
689
+ C.current.forEach((e) => e.abort());
687
690
  }, []);
688
- let k = (t.accepts ?? []).join(","), A = a === "display", j = H(async (r) => {
689
- let a = m(r, t.accepts, t.max_size_bytes), o = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, s = new AbortController();
690
- if (a) {
691
- l((e) => [...e, {
692
- localId: o,
693
- filename: r.name,
694
- progress: null,
695
- error: f(y, b, a),
696
- abort: () => {}
697
- }]);
698
- return;
699
- }
700
- l((e) => [...e, {
691
+ let k = (t.accepts ?? []).join(","), A = a === "display", j = U(async (r) => {
692
+ let a = T(r, t.accepts, t.max_size_bytes), o = `row-${Math.random().toString(36).slice(2)}-${Date.now()}`, s = new AbortController();
693
+ if (a) u((e) => [...e, {
701
694
  localId: o,
702
695
  filename: r.name,
703
- progress: {
704
- loaded: 0,
705
- total: r.size,
706
- pct: 0
707
- },
708
- error: null,
709
- abort: () => s.abort()
696
+ progress: null,
697
+ error: E(h, g, a),
698
+ abort: () => {}
710
699
  }]);
711
- try {
712
- let t = await g({
713
- file: r,
714
- entityCode: e.entityCode,
715
- fieldCode: n,
716
- signal: s.signal,
717
- onProgress: (e) => l((t) => t.map((t) => t.localId === o ? {
718
- ...t,
719
- progress: e
720
- } : t))
721
- });
722
- if (T.current.delete(o)) {
723
- C(t.id).catch(() => {}), p(t.id);
724
- return;
725
- }
726
- d(t.id, () => C(t.id));
727
- let a = {
728
- id: t.id,
729
- filename: t.filename,
730
- content_type: t.content_type,
731
- size_bytes: t.size_bytes,
732
- sha256: t.sha256,
733
- width: t.width,
734
- height: t.height,
735
- url: t.url,
736
- metadata: t.metadata
737
- }, c = [...S.current, a];
738
- S.current = c, i?.(c), l((e) => e.filter((e) => e.localId !== o));
739
- } catch (e) {
740
- if (e instanceof h && e.code === "ABORTED") {
741
- l((e) => e.filter((e) => e.localId !== o));
742
- return;
700
+ else {
701
+ u((e) => [...e, {
702
+ localId: o,
703
+ filename: r.name,
704
+ progress: {
705
+ loaded: 0,
706
+ total: r.size,
707
+ pct: 0
708
+ },
709
+ error: null,
710
+ abort: () => s.abort()
711
+ }]);
712
+ try {
713
+ let t = await m({
714
+ file: r,
715
+ entityCode: e.entityCode,
716
+ fieldCode: n,
717
+ signal: s.signal,
718
+ onProgress: (e) => u((t) => t.map((t) => t.localId === o ? {
719
+ ...t,
720
+ progress: e
721
+ } : t))
722
+ });
723
+ if (S.current.delete(o)) {
724
+ D(t.id).catch(() => {}), f(t.id);
725
+ return;
726
+ }
727
+ d(t.id, () => D(t.id));
728
+ let a = {
729
+ id: t.id,
730
+ filename: t.filename,
731
+ content_type: t.content_type,
732
+ size_bytes: t.size_bytes,
733
+ sha256: t.sha256,
734
+ width: t.width,
735
+ height: t.height,
736
+ url: t.url,
737
+ metadata: t.metadata
738
+ }, c = [...v.current, a];
739
+ v.current = c, i?.(c), u((e) => e.filter((e) => e.localId !== o));
740
+ } catch (e) {
741
+ if (e instanceof w && e.code === "ABORTED") {
742
+ u((e) => e.filter((e) => e.localId !== o));
743
+ return;
744
+ }
745
+ let t = _(h, g, e);
746
+ u((e) => e.map((e) => e.localId === o ? {
747
+ ...e,
748
+ error: t,
749
+ progress: null,
750
+ abort: () => {}
751
+ } : e));
743
752
  }
744
- let t = v(y, b, e);
745
- l((e) => e.map((e) => e.localId === o ? {
746
- ...e,
747
- error: t,
748
- progress: null,
749
- abort: () => {}
750
- } : e));
751
753
  }
752
754
  }, [
753
- b,
754
- y,
755
+ g,
756
+ h,
755
757
  t.accepts,
756
758
  t.max_size_bytes,
757
759
  n,
758
760
  i,
759
761
  e.entityCode,
760
762
  d,
761
- p
762
- ]), M = H((e) => {
763
+ f
764
+ ]), M = U((e) => {
763
765
  Array.from(e).forEach((e) => void j(e));
764
- }, [j]), ee = H(() => {
765
- o || w.current?.click();
766
- }, [o]), te = H((e) => {
766
+ }, [j]), N = U(() => {
767
+ o || b.current?.click();
768
+ }, [o]), ee = U((e) => {
767
769
  let t = e.target.files;
768
770
  e.target.value = "", t && t.length > 0 && M(t);
769
- }, [M]), P = H((e) => {
770
- _(e) && (C(e).catch(() => {}), p(e)), i?.(s.filter((t) => t.id !== e));
771
+ }, [M]), F = U((e) => {
772
+ p(e) && (D(e).catch(() => {}), f(e)), i?.(c.filter((t) => t.id !== e));
771
773
  }, [
772
- _,
773
- s,
774
+ p,
775
+ c,
774
776
  i,
775
- p
776
- ]), I = H((e) => {
777
- O(e.id, "download", F(e));
777
+ f
778
+ ]), L = U((e) => {
779
+ O(e.id, "download", I(e));
778
780
  }, [O]);
779
781
  return /* @__PURE__ */ Y("div", {
780
782
  "data-testid": `file-widget-${n}`,
@@ -782,11 +784,11 @@ function ke(e) {
782
784
  children: [/* @__PURE__ */ Y("ul", {
783
785
  className: "flex flex-col divide-y divide-divider rounded-md border border-border bg-surface",
784
786
  children: [
785
- s.length === 0 && c.length === 0 && /* @__PURE__ */ J("li", {
787
+ c.length === 0 && l.length === 0 && /* @__PURE__ */ J("li", {
786
788
  className: "px-3 py-4 text-center text-sm text-muted-foreground",
787
- children: y(t.display?.placeholder) || y("file.list.empty", "No files")
789
+ children: h(t.display?.placeholder) || h("file.list.empty", "No files")
788
790
  }),
789
- s.map((e) => /* @__PURE__ */ Y("li", {
791
+ c.map((e) => /* @__PURE__ */ Y("li", {
790
792
  className: "flex items-center gap-3 px-3 py-2",
791
793
  "data-testid": `row-${e.id}`,
792
794
  children: [
@@ -796,33 +798,33 @@ function ke(e) {
796
798
  }),
797
799
  /* @__PURE__ */ J("button", {
798
800
  type: "button",
799
- onClick: () => I(e),
801
+ onClick: () => L(e),
800
802
  className: "min-w-0 flex-1 truncate text-left text-sm text-foreground hover:underline",
801
803
  title: e.filename,
802
804
  children: e.filename
803
805
  }),
804
806
  /* @__PURE__ */ J("span", {
805
807
  className: "flex-none text-xs text-muted-foreground",
806
- children: u(e.size_bytes)
808
+ children: y(e.size_bytes)
807
809
  }),
808
810
  /* @__PURE__ */ J("button", {
809
811
  type: "button",
810
812
  className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs text-foreground hover:bg-surface-2",
811
- onClick: () => I(e),
813
+ onClick: () => L(e),
812
814
  "data-testid": `download-${e.id}`,
813
- children: y("file.download", "Download")
815
+ children: h("file.download", "Download")
814
816
  }),
815
817
  !A && /* @__PURE__ */ J("button", {
816
818
  type: "button",
817
819
  className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs text-destructive hover:bg-surface-2",
818
- onClick: () => P(e.id),
820
+ onClick: () => F(e.id),
819
821
  disabled: o,
820
822
  "data-testid": `remove-${e.id}`,
821
- children: y("file.remove", "Remove")
823
+ children: h("file.remove", "Remove")
822
824
  })
823
825
  ]
824
826
  }, e.id)),
825
- c.map((e) => /* @__PURE__ */ Y("li", {
827
+ l.map((e) => /* @__PURE__ */ Y("li", {
826
828
  className: "flex items-center gap-3 px-3 py-2",
827
829
  "data-testid": `pending-row-${e.localId}`,
828
830
  "aria-busy": !e.error,
@@ -837,7 +839,7 @@ function ke(e) {
837
839
  e.error ? /* @__PURE__ */ J("span", {
838
840
  role: "alert",
839
841
  className: "text-xs text-destructive",
840
- children: /* @__PURE__ */ J(N, { failure: e.error })
842
+ children: /* @__PURE__ */ J(P, { failure: e.error })
841
843
  }) : /* @__PURE__ */ Y("span", {
842
844
  className: "text-xs text-muted-foreground",
843
845
  role: "progressbar",
@@ -850,9 +852,9 @@ function ke(e) {
850
852
  type: "button",
851
853
  className: "flex-none rounded-sm border border-border bg-card px-2 py-0.5 text-xs",
852
854
  onClick: () => {
853
- e.abort(), T.current.add(e.localId), l((t) => t.filter((t) => t.localId !== e.localId));
855
+ e.abort(), S.current.add(e.localId), u((t) => t.filter((t) => t.localId !== e.localId));
854
856
  },
855
- children: e.error ? y("file.upload.dismiss", "Dismiss") : y("file.upload.cancel", "Cancel")
857
+ children: e.error ? h("file.upload.dismiss", "Dismiss") : h("file.upload.cancel", "Cancel")
856
858
  })
857
859
  ]
858
860
  }, e.localId))
@@ -860,16 +862,16 @@ function ke(e) {
860
862
  }), !A && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J("button", {
861
863
  type: "button",
862
864
  className: "self-start rounded-sm border border-border bg-card px-2 py-1 text-xs text-foreground hover:bg-surface-2",
863
- onClick: ee,
865
+ onClick: N,
864
866
  disabled: o,
865
867
  "data-testid": "add-files",
866
- children: y("file.list.add", "Add files")
868
+ children: h("file.list.add", "Add files")
867
869
  }), /* @__PURE__ */ J("input", {
868
- ref: w,
870
+ ref: b,
869
871
  type: "file",
870
872
  accept: k || void 0,
871
873
  multiple: !0,
872
- onChange: te,
874
+ onChange: ee,
873
875
  style: { display: "none" },
874
876
  "data-testid": `file-input-${n}`
875
877
  })] })]
@@ -878,7 +880,7 @@ function ke(e) {
878
880
  //#endregion
879
881
  //#region src/components/file-widgets/UnknownFileWidget.tsx
880
882
  function Ae({ widgetCode: e }) {
881
- let t = D(), n = D("errors");
883
+ let t = s(), n = s("errors");
882
884
  return e ? /* @__PURE__ */ Y("span", {
883
885
  className: "text-sm text-muted-foreground",
884
886
  children: [
@@ -918,32 +920,32 @@ function Ne(e, t, n, r) {
918
920
  };
919
921
  }
920
922
  function Pe(e) {
921
- let { field: t, fieldName: n, entityCode: r, value: i, recordTitle: a, onChange: o, mode: s, disabled: c } = e, l = Object.entries(t.slots ?? {}), u = je(i), d = D();
922
- return l.length === 0 ? /* @__PURE__ */ J("span", {
923
+ let { field: t, fieldName: n, entityCode: r, value: i, recordTitle: a, onChange: o, mode: c, disabled: l } = e, u = Object.entries(t.slots ?? {}), d = je(i), f = s();
924
+ return u.length === 0 ? /* @__PURE__ */ J("span", {
923
925
  className: "text-sm text-muted-foreground",
924
- children: d("file.slots.empty", "No slots configured")
926
+ children: f("file.slots.empty", "No slots configured")
925
927
  }) : /* @__PURE__ */ J("div", {
926
928
  className: "grid gap-3",
927
- children: l.map(([e, i]) => {
928
- let l = u[e] ?? null, f = Ne(t, e, i, l), p = f.display?.widget ?? "document_card", m = ae(p);
929
+ children: u.map(([e, i]) => {
930
+ let s = d[e] ?? null, u = Ne(t, e, i, s), p = u.display?.widget ?? "document_card", m = ae(p);
929
931
  return m ? /* @__PURE__ */ Y("div", {
930
932
  className: "grid gap-1.5",
931
933
  children: [/* @__PURE__ */ J("div", {
932
934
  className: "text-xs font-semibold text-text-2",
933
- children: d(i.name)
935
+ children: f(i.name)
934
936
  }), /* @__PURE__ */ J(m, {
935
- field: f,
937
+ field: u,
936
938
  fieldName: e,
937
939
  entityCode: r,
938
- value: l,
940
+ value: s,
939
941
  recordTitle: a,
940
- mode: s,
941
- disabled: c,
942
+ mode: c,
943
+ disabled: l,
942
944
  uploadFieldCode: n,
943
945
  uploadSlotCode: e,
944
946
  onChange: (t) => {
945
947
  o && o({
946
- ...u,
948
+ ...d,
947
949
  [e]: t ?? null
948
950
  });
949
951
  }
@@ -952,7 +954,7 @@ function Pe(e) {
952
954
  className: "grid gap-1.5",
953
955
  children: [/* @__PURE__ */ J("div", {
954
956
  className: "text-xs font-semibold text-text-2",
955
- children: d(i.name)
957
+ children: f(i.name)
956
958
  }), /* @__PURE__ */ J(Ae, { widgetCode: p })]
957
959
  }, e);
958
960
  })
@@ -976,19 +978,23 @@ function Re(e, t) {
976
978
  function ze(e, t, n) {
977
979
  if (Le(e, n)) return Re(t, n);
978
980
  let r = e.fields.get(n);
979
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? p(t[n], Re(t, n)) : t[n];
981
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? v(t[n], Re(t, n)) : t[n];
980
982
  }
981
983
  function Be(e, t, n) {
984
+ let r = ze(e, t, n);
985
+ return r == null || r === "" ? !1 : Array.isArray(r) ? r.length > 0 : typeof r != "object" || Object.keys(r).length > 0;
986
+ }
987
+ function Ve(e, t, n) {
982
988
  let r = e.fields.get(t);
983
- return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? w(n) : n;
989
+ return r?.type === "rich_text" && r.files?.mode === "rich_text_inline" ? h(n) : n;
984
990
  }
985
- function Ve(e, t, n, i) {
986
- let a = Le(t, n);
987
- if (a) return a.name || n;
991
+ function He(e, t, n, r) {
992
+ let i = Le(t, n);
993
+ if (i) return i.name || n;
988
994
  let o = t.fields.get(n);
989
- return o ? r(e, o, n, i) : n;
995
+ return o ? a(e, o, n, r) : n;
990
996
  }
991
- function He(e) {
997
+ function Ue(e) {
992
998
  let { entity: t, entityCode: n, fieldName: r, record: i, mode: a, onChange: s, refs: c, disabled: l, surface: u, entities: d, screens: f, t: p, fieldId: m, labelId: h, structure: g, detailScreen: _ } = e, v = Le(t, r);
993
999
  if (v) {
994
1000
  let e = v.display?.widget ?? "", c = ae(e);
@@ -1028,70 +1034,63 @@ function He(e) {
1028
1034
  }) : null;
1029
1035
  }
1030
1036
  //#endregion
1037
+ //#region src/lib/action-dispatch.ts
1038
+ function We(e, t, n, r, i) {
1039
+ return S(n) ? (C(e, n.ui_steps, r), null) : n.entity ? `${n.entity}.${t}` : i ? `${i}.${t}` : t;
1040
+ }
1041
+ //#endregion
1031
1042
  //#region src/components/actions/ResponsiveActionBar.tsx
1032
- function Ue(e, t) {
1043
+ function Ge(e, t) {
1033
1044
  return e.replace(/\$\{([^}]+)\}/g, (e, n) => Object.prototype.hasOwnProperty.call(t, n) ? t[n] : e);
1034
1045
  }
1035
- function We(e) {
1046
+ function Ke(e) {
1036
1047
  return e.widget ? "widget" : e.href ? "href" : e.handler ? "handler" : e.association ? "association" : e.ui_steps && e.ui_steps.length > 0 ? "ui_steps" : "unknown";
1037
1048
  }
1038
- function Ge(e, t, n, r, i) {
1039
- let a = We(t), o = S(n, r?.entity), s = r?.entityCode ?? "";
1040
- if (e === "__peek") return i?.({
1049
+ function qe(e, t, n, i, a) {
1050
+ let o = Ke(t), s = r(n, i?.entity), c = i?.entityCode ?? "";
1051
+ if (e === "__peek") return a?.({
1041
1052
  code: e,
1042
- entity: s,
1053
+ entity: c,
1043
1054
  mode: "peek",
1044
- rowId: o
1045
- }), r?.openPeek?.(n), !0;
1046
- if (i?.({
1055
+ rowId: s
1056
+ }), i?.openPeek?.(n), !0;
1057
+ if (a?.({
1047
1058
  code: e,
1048
- entity: s,
1049
- mode: a,
1050
- rowId: o
1051
- }), a === "widget") return console.warn(`[ResponsiveActionBar] widget "${t.widget}" requested for action "${e}" but the SDK has no widget registry yet; falling back to onRun.`), !1;
1052
- if (a === "href" && r) {
1053
- let e = Ue(t.href ?? "", {
1054
- entity: s,
1055
- id: encodeURIComponent(o)
1056
- }), n = e.indexOf("?");
1057
- return n === -1 ? r.tabNavigate(e) : r.tabNavigate(e.slice(0, n), { search: e.slice(n + 1) }), !0;
1059
+ entity: c,
1060
+ mode: o,
1061
+ rowId: s
1062
+ }), o === "widget") return console.warn(`[ResponsiveActionBar] widget "${t.widget}" requested for action "${e}" but the SDK has no widget registry yet; falling back to onRun.`), !1;
1063
+ if (o === "href" && i) {
1064
+ let n = e === "__open" || e === "__edit" ? i.recordHref?.(s) : null, r = n ? e === "__edit" ? `${n}?edit=true` : n : Ge(t.href ?? "", {
1065
+ entity: c,
1066
+ id: encodeURIComponent(s)
1067
+ }), a = r.indexOf("?");
1068
+ return a === -1 ? i.tabNavigate(r) : i.tabNavigate(r.slice(0, a), { search: r.slice(a + 1) }), !0;
1058
1069
  }
1059
- return a === "handler" || a === "association" || a === "ui_steps" || a === "unknown" && console.warn(`[ResponsiveActionBar] no dispatch mode set on action "${e}" (none of handler/association/widget/href/ui_steps).`), !1;
1070
+ return o === "handler" || o === "association" || o === "ui_steps" || o === "unknown" && console.warn(`[ResponsiveActionBar] no dispatch mode set on action "${e}" (none of handler/association/widget/href/ui_steps).`), !1;
1060
1071
  }
1061
- function Ke(e) {
1072
+ function Je(e) {
1062
1073
  let t = 0;
1063
- for (let n of e) n.kind === "action" ? t++ : t += Ke(n.items);
1074
+ for (let n of e) n.kind === "action" ? t++ : t += Je(n.items);
1064
1075
  return t;
1065
1076
  }
1066
- function qe(e, t, n) {
1077
+ function Ye(e, t, n) {
1067
1078
  let r = [], i = [];
1068
- for (let a of e) a.kind === "action" && Ye(a.code, t, n)?.destructive ? i.push(a) : r.push(a);
1079
+ for (let a of e) a.kind === "action" && Ze(a.code, t, n)?.destructive ? i.push(a) : r.push(a);
1069
1080
  return {
1070
1081
  normal: r,
1071
1082
  destructive: i
1072
1083
  };
1073
1084
  }
1074
- function Je(e, t, n) {
1085
+ function Xe(e, t, n) {
1075
1086
  let r = [], i = [], a = [];
1076
1087
  for (let o of e) {
1077
1088
  if (o.kind !== "action") {
1078
1089
  i.push(o);
1079
1090
  continue;
1080
1091
  }
1081
- let e = Ye(o.code, t, n), s = e?.destructive === !0, c = e?.display?.primary === !0;
1082
- if (s && c) {
1083
- console.warn(`[ResponsiveActionBar] action "${o.code}" declares both primary and destructive; treating as destructive.`), a.push(o);
1084
- continue;
1085
- }
1086
- if (s) {
1087
- a.push(o);
1088
- continue;
1089
- }
1090
- if (c) {
1091
- r.push(o);
1092
- continue;
1093
- }
1094
- i.push(o);
1092
+ let e = Ze(o.code, t, n), s = e?.destructive === !0, c = e?.display?.primary === !0;
1093
+ s && c ? (console.warn(`[ResponsiveActionBar] action "${o.code}" declares both primary and destructive; treating as destructive.`), a.push(o)) : s ? a.push(o) : c ? r.push(o) : i.push(o);
1095
1094
  }
1096
1095
  return {
1097
1096
  primary: r,
@@ -1099,40 +1098,40 @@ function Je(e, t, n) {
1099
1098
  destructive: a
1100
1099
  };
1101
1100
  }
1102
- function Ye(e, t, n) {
1101
+ function Ze(e, t, n) {
1103
1102
  if (t && e in t) return t[e];
1104
1103
  if (n && e in n) return n[e];
1105
1104
  }
1106
- function Xe(e, t, n, r) {
1107
- return e(Ye(t, n, r)?.display?.name) || t;
1105
+ function Qe(e, t, n, r) {
1106
+ return e(Ze(t, n, r)?.display?.name) || t;
1108
1107
  }
1109
- function Ze(e, t, n) {
1110
- return Ye(e, t, n)?.display?.icon || void 0;
1108
+ function $e(e, t, n) {
1109
+ return Ze(e, t, n)?.display?.icon || void 0;
1111
1110
  }
1112
- function Qe(e) {
1111
+ function et(e) {
1113
1112
  return `action-tooltip-${e}`;
1114
1113
  }
1115
- function $e({ leaf: e, entityActions: n, globalActions: r, onRun: a, loading: o, onLoadingChange: s, measureRef: l, style: u, row: f, widgetContext: p, onActionClick: m, iconOnly: h = !1 }) {
1116
- let g = D(), _ = Ye(e.code, n, r), v = Xe(g, e.code, n, r), y = Ze(e.code, n, r), b = _?.destructive ?? !1, x = !b && _?.display?.primary === !0, S = !e.enabled, C = S ? Qe(e.code) : void 0, w = H(async () => {
1117
- if (!(!_ || S || o)) {
1118
- s(!0);
1114
+ function tt({ leaf: e, entityActions: t, globalActions: n, onRun: r, loading: a, onLoadingChange: o, measureRef: c, style: l, row: u, widgetContext: f, onActionClick: p, iconOnly: m = !1 }) {
1115
+ let h = s(), _ = Ze(e.code, t, n), v = Qe(h, e.code, t, n), y = $e(e.code, t, n), b = _?.destructive ?? !1, x = !b && _?.display?.primary === !0, S = !e.enabled, C = S ? et(e.code) : void 0, w = U(async () => {
1116
+ if (!(!_ || S || a)) {
1117
+ o(!0);
1119
1118
  try {
1120
- Ge(e.code, _, f, p, m) || await Promise.resolve(a(e.code, _));
1119
+ qe(e.code, _, u, f, p) || await Promise.resolve(r(e.code, _));
1121
1120
  } finally {
1122
- s(!1);
1121
+ o(!1);
1123
1122
  }
1124
1123
  }
1125
1124
  }, [
1126
1125
  _,
1127
1126
  S,
1128
- o,
1129
1127
  a,
1128
+ r,
1130
1129
  e.code,
1131
- s,
1130
+ o,
1131
+ u,
1132
1132
  f,
1133
- p,
1134
- m
1135
- ]), T = o ? /* @__PURE__ */ J(d, { size: 12 }) : y ? /* @__PURE__ */ J(t, {
1133
+ p
1134
+ ]), T = a ? /* @__PURE__ */ J(g, { size: 12 }) : y ? /* @__PURE__ */ J(O, {
1136
1135
  name: y,
1137
1136
  size: 12
1138
1137
  }) : null;
@@ -1147,40 +1146,40 @@ function $e({ leaf: e, entityActions: n, globalActions: r, onRun: a, loading: o,
1147
1146
  clip: "rect(0,0,0,0)"
1148
1147
  },
1149
1148
  children: e.reason
1150
- }), /* @__PURE__ */ J(i, {
1151
- ref: l,
1149
+ }), /* @__PURE__ */ J(d, {
1150
+ ref: c,
1152
1151
  kind: x ? "primary" : "default",
1153
1152
  danger: b,
1154
1153
  icon: T,
1155
- disabled: S || o,
1154
+ disabled: S || a,
1156
1155
  "aria-disabled": S ? "true" : void 0,
1157
1156
  "aria-describedby": C,
1158
- "aria-label": h ? v : void 0,
1159
- title: c(g, _, v, S, e.reason, h),
1157
+ "aria-label": m ? v : void 0,
1158
+ title: i(h, _, v, S, e.reason, m),
1160
1159
  onClick: w,
1161
- style: u,
1162
- children: h ? null : v
1160
+ style: l,
1161
+ children: m ? null : v
1163
1162
  })] });
1164
1163
  }
1165
- function et({ group: n, entityActions: r, globalActions: a, onRun: o, loading: s, onLoadingChange: c, measureRef: u, style: f, row: p, widgetContext: m, onActionClick: h }) {
1166
- let g = D(), _ = G(null), [v, y] = K(!1), b = n.name ? g(n.name) : g("action.menu.title", "Actions"), x = H((e) => {
1167
- _.current = e, u?.(e);
1168
- }, [u]), S = H((e, t) => (y(!1), o(e, t)), [o]);
1169
- return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(i, {
1164
+ function nt({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, measureRef: o, style: c, row: u, widgetContext: p, onActionClick: m }) {
1165
+ let h = s(), _ = G(null), [v, y] = K(!1), b = e.name ? h(e.name) : h("action.menu.title", "Actions"), x = U((e) => {
1166
+ _.current = e, o?.(e);
1167
+ }, [o]), S = U((e, t) => (y(!1), r(e, t)), [r]);
1168
+ return /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(d, {
1170
1169
  ref: x,
1171
1170
  kind: "default",
1172
- icon: s == null ? n.icon ? /* @__PURE__ */ J(t, {
1173
- name: n.icon,
1171
+ icon: i == null ? e.icon ? /* @__PURE__ */ J(O, {
1172
+ name: e.icon,
1174
1173
  size: 12
1175
- }) : void 0 : /* @__PURE__ */ J(d, { size: 12 }),
1176
- iconRight: /* @__PURE__ */ J(e.down, { size: 10 }),
1174
+ }) : void 0 : /* @__PURE__ */ J(g, { size: 12 }),
1175
+ iconRight: /* @__PURE__ */ J(l.down, { size: 10 }),
1177
1176
  "aria-haspopup": "menu",
1178
1177
  "aria-expanded": v ? "true" : "false",
1179
1178
  title: b,
1180
1179
  onClick: () => y((e) => !e),
1181
- style: f,
1180
+ style: c,
1182
1181
  children: b
1183
- }), /* @__PURE__ */ J(l, {
1182
+ }), /* @__PURE__ */ J(f, {
1184
1183
  open: v,
1185
1184
  anchor: _.current,
1186
1185
  onClose: () => y(!1),
@@ -1189,33 +1188,33 @@ function et({ group: n, entityActions: r, globalActions: a, onRun: o, loading: s
1189
1188
  children: /* @__PURE__ */ J("div", {
1190
1189
  role: "menu",
1191
1190
  "aria-label": b,
1192
- children: n.items.map((e) => e.kind === "action" ? /* @__PURE__ */ J(tt, {
1191
+ children: e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ J(rt, {
1193
1192
  leaf: e,
1194
- entityActions: r,
1195
- globalActions: a,
1193
+ entityActions: t,
1194
+ globalActions: n,
1196
1195
  onRun: S,
1197
- loading: s === e.code,
1198
- onLoadingChange: (t) => c(t ? e.code : null),
1199
- row: p,
1200
- widgetContext: m,
1201
- onActionClick: h
1202
- }, e.code) : /* @__PURE__ */ J(nt, {
1196
+ loading: i === e.code,
1197
+ onLoadingChange: (t) => a(t ? e.code : null),
1198
+ row: u,
1199
+ widgetContext: p,
1200
+ onActionClick: m
1201
+ }, e.code) : /* @__PURE__ */ J(it, {
1203
1202
  group: e,
1204
- entityActions: r,
1205
- globalActions: a,
1203
+ entityActions: t,
1204
+ globalActions: n,
1206
1205
  onRun: S,
1207
- loading: s,
1208
- onLoadingChange: c,
1209
- row: p,
1210
- widgetContext: m,
1211
- onActionClick: h
1206
+ loading: i,
1207
+ onLoadingChange: a,
1208
+ row: u,
1209
+ widgetContext: p,
1210
+ onActionClick: m
1212
1211
  }, e.items[0]?.kind === "action" ? e.items[0].code : e.icon ?? "group"))
1213
1212
  })
1214
1213
  })] });
1215
1214
  }
1216
- function tt({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a, onLoadingChange: o, row: s, widgetContext: l, onActionClick: u }) {
1217
- let f = D(), p = Ye(e.code, n, r), m = Xe(f, e.code, n, r), h = Ze(e.code, n, r), g = p?.destructive ?? !1, _ = !e.enabled, v = _ ? Qe(e.code) : void 0, y = a ? /* @__PURE__ */ J(d, { size: 12 }) : h ? /* @__PURE__ */ J(t, {
1218
- name: h,
1215
+ function rt({ leaf: e, entityActions: t, globalActions: n, onRun: r, loading: a, onLoadingChange: o, row: c, widgetContext: l, onActionClick: u }) {
1216
+ let d = s(), f = Ze(e.code, t, n), p = Qe(d, e.code, t, n), m = $e(e.code, t, n), h = f?.destructive ?? !1, _ = !e.enabled, v = _ ? et(e.code) : void 0, y = a ? /* @__PURE__ */ J(g, { size: 12 }) : m ? /* @__PURE__ */ J(O, {
1217
+ name: m,
1219
1218
  size: 12
1220
1219
  }) : null;
1221
1220
  return /* @__PURE__ */ Y(q, { children: [v && e.reason && /* @__PURE__ */ J("span", {
@@ -1233,12 +1232,12 @@ function tt({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
1233
1232
  role: "menuitem",
1234
1233
  "aria-disabled": _ ? "true" : void 0,
1235
1234
  "aria-describedby": v,
1236
- title: c(f, p, m, _, e.reason),
1235
+ title: i(d, f, p, _, e.reason),
1237
1236
  onClick: async () => {
1238
- if (!(!p || _ || a)) {
1237
+ if (!(!f || _ || a)) {
1239
1238
  o(!0);
1240
1239
  try {
1241
- Ge(e.code, p, s, l, u) || await Promise.resolve(i(e.code, p));
1240
+ qe(e.code, f, c, l, u) || await Promise.resolve(r(e.code, f));
1242
1241
  } finally {
1243
1242
  o(!1);
1244
1243
  }
@@ -1251,7 +1250,7 @@ function tt({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
1251
1250
  padding: "6px 10px",
1252
1251
  borderRadius: 5,
1253
1252
  fontSize: 12.5,
1254
- color: g ? "var(--danger)" : _ ? "var(--text-3)" : "var(--text-2)",
1253
+ color: h ? "var(--danger)" : _ ? "var(--text-3)" : "var(--text-2)",
1255
1254
  cursor: _ ? "not-allowed" : "pointer",
1256
1255
  opacity: _ ? .6 : 1
1257
1256
  },
@@ -1263,19 +1262,19 @@ function tt({ leaf: e, entityActions: n, globalActions: r, onRun: i, loading: a,
1263
1262
  },
1264
1263
  children: [y && /* @__PURE__ */ J("span", {
1265
1264
  style: {
1266
- color: g ? "var(--danger)" : "var(--text-3)",
1265
+ color: h ? "var(--danger)" : "var(--text-3)",
1267
1266
  display: "flex"
1268
1267
  },
1269
1268
  children: y
1270
1269
  }), /* @__PURE__ */ J("span", {
1271
1270
  style: { flex: 1 },
1272
- children: m
1271
+ children: p
1273
1272
  })]
1274
1273
  })] });
1275
1274
  }
1276
- function nt({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c }) {
1277
- let l = D(), u = e.name ? l(e.name) : void 0;
1278
- return /* @__PURE__ */ Y(q, { children: [u && /* @__PURE__ */ J("div", {
1275
+ function it({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: c, onActionClick: l }) {
1276
+ let u = s(), d = e.name ? u(e.name) : void 0;
1277
+ return /* @__PURE__ */ Y(q, { children: [d && /* @__PURE__ */ J("div", {
1279
1278
  style: {
1280
1279
  padding: "4px 10px 2px",
1281
1280
  fontSize: 10.5,
@@ -1284,8 +1283,8 @@ function nt({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
1284
1283
  textTransform: "uppercase",
1285
1284
  letterSpacing: "0.05em"
1286
1285
  },
1287
- children: u
1288
- }), e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ J(tt, {
1286
+ children: d
1287
+ }), e.items.map((e) => e.kind === "action" ? /* @__PURE__ */ J(rt, {
1289
1288
  leaf: e,
1290
1289
  entityActions: t,
1291
1290
  globalActions: n,
@@ -1293,9 +1292,9 @@ function nt({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
1293
1292
  loading: i === e.code,
1294
1293
  onLoadingChange: (t) => a(t ? e.code : null),
1295
1294
  row: o,
1296
- widgetContext: s,
1297
- onActionClick: c
1298
- }, e.code) : /* @__PURE__ */ J(nt, {
1295
+ widgetContext: c,
1296
+ onActionClick: l
1297
+ }, e.code) : /* @__PURE__ */ J(it, {
1299
1298
  group: e,
1300
1299
  entityActions: t,
1301
1300
  globalActions: n,
@@ -1303,52 +1302,52 @@ function nt({ group: e, entityActions: t, globalActions: n, onRun: r, loading: i
1303
1302
  loading: i,
1304
1303
  onLoadingChange: a,
1305
1304
  row: o,
1306
- widgetContext: s,
1307
- onActionClick: c
1305
+ widgetContext: c,
1306
+ onActionClick: l
1308
1307
  }, e.icon ?? "nested"))] });
1309
1308
  }
1310
- function rt({ layout: t, entityActions: n, globalActions: r, onRun: i, row: a, widgetContext: o, onActionClick: s }) {
1311
- let c = D(), u = G(null), [f, p] = K(!1), [m, h] = K(null), g = H((e, t) => (p(!1), i(e, t)), [i]);
1312
- return Ke(t) === 0 ? null : /* @__PURE__ */ Y("div", {
1313
- "data-open": f ? "true" : void 0,
1309
+ function at({ layout: e, entityActions: t, globalActions: n, onRun: r, row: i, widgetContext: a, onActionClick: o }) {
1310
+ let c = s(), d = G(null), [p, m] = K(!1), [h, _] = K(null), v = U((e, t) => (m(!1), r(e, t)), [r]);
1311
+ return Je(e) === 0 ? null : /* @__PURE__ */ Y("div", {
1312
+ "data-open": p ? "true" : void 0,
1314
1313
  style: {
1315
1314
  display: "inline-flex",
1316
1315
  alignItems: "center"
1317
1316
  },
1318
- children: [/* @__PURE__ */ J(y, {
1319
- ref: u,
1320
- icon: J(m == null ? e.more : d, { size: 14 }),
1317
+ children: [/* @__PURE__ */ J(u, {
1318
+ ref: d,
1319
+ icon: J(h == null ? l.more : g, { size: 14 }),
1321
1320
  title: c("action.menu.title", "Actions"),
1322
1321
  size: 28,
1323
- onClick: () => p((e) => !e)
1324
- }), /* @__PURE__ */ J(l, {
1325
- open: f,
1326
- anchor: u.current,
1327
- onClose: () => p(!1),
1322
+ onClick: () => m((e) => !e)
1323
+ }), /* @__PURE__ */ J(f, {
1324
+ open: p,
1325
+ anchor: d.current,
1326
+ onClose: () => m(!1),
1328
1327
  align: "end",
1329
1328
  width: 220,
1330
- children: /* @__PURE__ */ J(at, {
1331
- layout: t,
1332
- entityActions: n,
1333
- globalActions: r,
1334
- onRun: g,
1335
- loading: m,
1336
- onLoadingChange: h,
1337
- row: a,
1338
- widgetContext: o,
1339
- onActionClick: s
1329
+ children: /* @__PURE__ */ J(st, {
1330
+ layout: e,
1331
+ entityActions: t,
1332
+ globalActions: n,
1333
+ onRun: v,
1334
+ loading: h,
1335
+ onLoadingChange: _,
1336
+ row: i,
1337
+ widgetContext: a,
1338
+ onActionClick: o
1340
1339
  })
1341
1340
  })]
1342
1341
  });
1343
1342
  }
1344
- function it(e) {
1343
+ function ot(e) {
1345
1344
  let t = 0;
1346
- for (let r of e) if (r.kind === "action" && n(r.code)) t++;
1345
+ for (let n of e) if (n.kind === "action" && c(n.code)) t++;
1347
1346
  else break;
1348
1347
  return t;
1349
1348
  }
1350
- function at({ layout: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: s, onActionClick: c, ariaLabel: l }) {
1351
- let u = D(), { normal: d, destructive: f } = qe(e, t, n), p = it(d), m = d.slice(0, p), h = d.slice(p), g = f.length > 0, v = h.length > 0, y = (e) => /* @__PURE__ */ J(tt, {
1349
+ function st({ layout: e, entityActions: t, globalActions: n, onRun: r, loading: i, onLoadingChange: a, row: o, widgetContext: c, onActionClick: l, ariaLabel: u }) {
1350
+ let d = s(), { normal: f, destructive: m } = Ye(e, t, n), h = ot(f), g = f.slice(0, h), _ = f.slice(h), v = m.length > 0, y = _.length > 0, b = (e) => /* @__PURE__ */ J(rt, {
1352
1351
  leaf: e,
1353
1352
  entityActions: t,
1354
1353
  globalActions: n,
@@ -1356,16 +1355,16 @@ function at({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
1356
1355
  loading: i === e.code,
1357
1356
  onLoadingChange: (t) => a(t ? e.code : null),
1358
1357
  row: o,
1359
- widgetContext: s,
1360
- onActionClick: c
1358
+ widgetContext: c,
1359
+ onActionClick: l
1361
1360
  }, e.code);
1362
1361
  return /* @__PURE__ */ Y("div", {
1363
1362
  role: "menu",
1364
- "aria-label": l ?? u("action.menu.row_actions", "Row actions"),
1363
+ "aria-label": u ?? d("action.menu.row_actions", "Row actions"),
1365
1364
  children: [
1366
- m.map((e) => e.kind === "action" ? y(e) : null),
1367
- m.length > 0 && v && /* @__PURE__ */ J(_, { divider: !0 }),
1368
- h.map((e) => e.kind === "action" ? y(e) : /* @__PURE__ */ J(nt, {
1365
+ g.map((e) => e.kind === "action" ? b(e) : null),
1366
+ g.length > 0 && y && /* @__PURE__ */ J(p, { divider: !0 }),
1367
+ _.map((e) => e.kind === "action" ? b(e) : /* @__PURE__ */ J(it, {
1369
1368
  group: e,
1370
1369
  entityActions: t,
1371
1370
  globalActions: n,
@@ -1373,50 +1372,50 @@ function at({ layout: e, entityActions: t, globalActions: n, onRun: r, loading:
1373
1372
  loading: i,
1374
1373
  onLoadingChange: a,
1375
1374
  row: o,
1376
- widgetContext: s,
1377
- onActionClick: c
1375
+ widgetContext: c,
1376
+ onActionClick: l
1378
1377
  }, e.icon ?? "group")),
1379
- g && /* @__PURE__ */ J(_, { divider: !0 }),
1380
- f.map((e) => y(e))
1378
+ v && /* @__PURE__ */ J(p, { divider: !0 }),
1379
+ m.map((e) => b(e))
1381
1380
  ]
1382
1381
  });
1383
1382
  }
1384
- var ot = "__overflow_trigger__", st = 90, ct = 4, lt = 8;
1385
- function ut(e) {
1383
+ var ct = "__overflow_trigger__", lt = 90, ut = 4, dt = 8;
1384
+ function ft(e) {
1386
1385
  return `icon:${$(e)}`;
1387
1386
  }
1388
- function dt() {
1389
- return lt;
1387
+ function pt() {
1388
+ return dt;
1390
1389
  }
1391
- function ft(e, t, n) {
1390
+ function mt(e, t, n) {
1392
1391
  return [
1393
1392
  ...e,
1394
1393
  ...t,
1395
1394
  ...n
1396
1395
  ];
1397
1396
  }
1398
- var pt = () => {}, mt = () => Promise.resolve();
1399
- function ht(e) {
1397
+ var ht = () => {}, gt = () => Promise.resolve();
1398
+ function _t(e) {
1400
1399
  return (t) => {
1401
1400
  t && (t.setAttribute("data-node-key", e), t.setAttribute("tabindex", "-1"));
1402
1401
  };
1403
1402
  }
1404
- function gt(e, t) {
1403
+ function vt(e, t) {
1405
1404
  if (e.size !== t.size) return !1;
1406
1405
  for (let [n, r] of t) if (e.get(n) !== r) return !1;
1407
1406
  return !0;
1408
1407
  }
1409
- function _t(e, t) {
1408
+ function yt(e, t) {
1410
1409
  return t.get($(e)) ?? 0;
1411
1410
  }
1412
- function vt(e, t) {
1413
- return t.get(ut(e));
1411
+ function bt(e, t) {
1412
+ return t.get(ft(e));
1414
1413
  }
1415
- function yt(e, t, n, r, i, a, o, s, c) {
1416
- let { primary: l, regular: u, destructive: d } = Je(e, i, a), f = ct, p = r.get(ot) ?? st, m = t - n, h = ft(l, u, d), g = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
1414
+ function xt(e, t, n, r, i, a, o, s, c) {
1415
+ let { primary: l, regular: u, destructive: d } = Xe(e, i, a), f = ut, p = r.get(ct) ?? lt, m = t - n, h = mt(l, u, d), g = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
1417
1416
  if (o) for (let e of h) o(e) && g.add($(e));
1418
1417
  else {
1419
- let e = (e, t) => t ? vt(e, r) ?? _t(e, r) : _t(e, r), t = (e) => s ? e.filter((e) => !s.has($(e))).length * dt() : 0, n = (e, t) => c ? e.slice(0, t).filter((e) => c.has($(e))).length * dt() : 0, i = (r, i) => {
1418
+ let e = (e, t) => t ? bt(e, r) ?? yt(e, r) : yt(e, r), t = (e) => s ? e.filter((e) => !s.has($(e))).length * pt() : 0, n = (e, t) => c ? e.slice(0, t).filter((e) => c.has($(e))).length * pt() : 0, i = (r, i) => {
1420
1419
  let a = r.length < h.length ? p + f : 0, o = r.length > 1 ? (r.length - 1) * f : 0;
1421
1420
  return r.reduce((t, n, r) => t + e(n, r >= i), 0) + o + a + t(r) + n(r, i) <= m;
1422
1421
  }, a = 0, o = !1;
@@ -1444,149 +1443,149 @@ function yt(e, t, n, r, i, a, o, s, c) {
1444
1443
  function $(e) {
1445
1444
  return e.kind === "action" ? `action:${e.code}` : `group:${JSON.stringify(e.name ?? {})}`;
1446
1445
  }
1447
- function bt(e) {
1446
+ function St(e) {
1448
1447
  let t = e.parentElement;
1449
1448
  for (; t && getComputedStyle(t).display === "contents";) t = t.parentElement;
1450
1449
  if (!t) return !1;
1451
1450
  let n = getComputedStyle(t);
1452
1451
  return !(parseFloat(n.flexGrow) > 0 || n.display === "block" || n.display === "flow-root" || n.width !== "auto" || n.maxWidth !== "none");
1453
1452
  }
1454
- function xt({ layout: t, entityActions: n, globalActions: r, onRun: a, reservedRightWidth: o = 0, measurementOverride: s, ariaLabel: c, align: u = "trailing", constrain: d = !0, row: f, widgetContext: p, onActionClick: m }) {
1455
- let h = D(), g = G(null), v = G(null), [y, b] = K(0), [x, S] = K(/* @__PURE__ */ new Map()), [C, w] = K(!1), [T, E] = K(null), [O, k] = K(() => typeof document < "u" && document.documentElement.dir === "rtl");
1456
- U(() => {
1453
+ function Ct({ layout: e, entityActions: t, globalActions: n, onRun: r, reservedRightWidth: i = 0, measurementOverride: a, ariaLabel: o, align: c = "trailing", constrain: u = !0, row: m, widgetContext: h, onActionClick: g }) {
1454
+ let _ = s(), v = G(null), y = G(null), [b, x] = K(0), [S, C] = K(/* @__PURE__ */ new Map()), [w, T] = K(!1), [E, D] = K(null), [O, k] = K(() => typeof document < "u" && document.documentElement.dir === "rtl");
1455
+ W(() => {
1457
1456
  if (typeof MutationObserver > "u") return;
1458
1457
  let e = new MutationObserver((e) => {
1459
- for (let t of e) t.attributeName === "dir" && k(document.documentElement.dir === "rtl"), t.attributeName === "lang" && w(!1);
1458
+ for (let t of e) t.attributeName === "dir" && k(document.documentElement.dir === "rtl"), t.attributeName === "lang" && T(!1);
1460
1459
  });
1461
1460
  return e.observe(document.documentElement, {
1462
1461
  attributes: !0,
1463
1462
  attributeFilter: ["dir", "lang"]
1464
1463
  }), () => e.disconnect();
1465
1464
  }, []);
1466
- let A = G(null), [j, M] = K(!1), ee = H((e, t) => (M(!1), a(e, t)), [a]), te = Ke(t), N = !!s, P = H(() => {
1467
- if (N || !v.current) return;
1468
- let e = Array.from(v.current.children), t = /* @__PURE__ */ new Map();
1465
+ let A = G(null), [j, M] = K(!1), N = U((e, t) => (M(!1), r(e, t)), [r]), ee = Je(e), P = !!a, F = U(() => {
1466
+ if (P || !y.current) return;
1467
+ let e = Array.from(y.current.children), t = /* @__PURE__ */ new Map();
1469
1468
  e.forEach((e) => {
1470
1469
  let n = e.dataset.nodeKey;
1471
1470
  n && t.set(n, e.getBoundingClientRect().width || e.offsetWidth);
1472
- }), S((e) => gt(e, t) ? e : t), w(!0);
1473
- }, [N]), F = ie(() => JSON.stringify(t.map((e) => $(e))), [t]);
1474
- U(() => {
1475
- if (N) return;
1476
- let e = v.current;
1471
+ }), C((e) => vt(e, t) ? e : t), T(!0);
1472
+ }, [P]), I = ie(() => JSON.stringify(e.map((e) => $(e))), [e]);
1473
+ W(() => {
1474
+ if (P) return;
1475
+ let e = y.current;
1477
1476
  if (!e || typeof ResizeObserver > "u") return;
1478
- let t = new ResizeObserver(() => P());
1477
+ let t = new ResizeObserver(() => F());
1479
1478
  t.observe(e);
1480
1479
  for (let n of Array.from(e.children)) t.observe(n);
1481
1480
  return () => t.disconnect();
1482
1481
  }, [
1482
+ F,
1483
1483
  P,
1484
- N,
1485
- F
1486
- ]), W(() => {
1487
- if (N) {
1488
- w(!0);
1484
+ I
1485
+ ]), re(() => {
1486
+ if (P) {
1487
+ T(!0);
1489
1488
  return;
1490
1489
  }
1491
- w(!1);
1490
+ T(!1);
1492
1491
  let e = requestAnimationFrame(() => {
1493
- P();
1492
+ F();
1494
1493
  });
1495
1494
  return () => cancelAnimationFrame(e);
1496
1495
  }, [
1496
+ I,
1497
1497
  F,
1498
- P,
1499
- N
1500
- ]), U(() => {
1501
- if (N || C) return;
1498
+ P
1499
+ ]), W(() => {
1500
+ if (P || w) return;
1502
1501
  let e = setTimeout(() => {
1503
- P(), w(!0);
1502
+ F(), T(!0);
1504
1503
  }, 16);
1505
1504
  return () => clearTimeout(e);
1506
1505
  }, [
1507
- C,
1508
- P,
1509
- N
1510
- ]), U(() => {
1511
- if (N || !d || !C || y === 0) return;
1512
- let e = g.current;
1513
- if (!e || !bt(e)) return;
1506
+ w,
1507
+ F,
1508
+ P
1509
+ ]), W(() => {
1510
+ if (P || !u || !w || b === 0) return;
1511
+ let e = v.current;
1512
+ if (!e || !St(e)) return;
1514
1513
  let t = [...e.children].filter((e) => e.getAttribute("aria-hidden") !== "true"), n = t.length > 1 ? (t.length - 1) * 4 : 0, r = t.reduce((e, t) => e + t.getBoundingClientRect().width, 0) + n;
1515
- r > 0 && Math.abs(y - r) < 1 && console.error(`[declarion] ResponsiveActionBar is measuring itself: its container is ${Math.round(y)}px, exactly the width of what it just rendered. The slot holding this bar is sized by its own content, so it cannot tell the bar how much room there is. Give that slot \`flex: 1 1 auto; min-width: 0\` (and justify its content to the edge the buttons sit on), or pass \`constrain={false}\` if it genuinely has no row to take space from.`);
1514
+ r > 0 && Math.abs(b - r) < 1 && console.error(`[declarion] ResponsiveActionBar is measuring itself: its container is ${Math.round(b)}px, exactly the width of what it just rendered. The slot holding this bar is sized by its own content, so it cannot tell the bar how much room there is. Give that slot \`flex: 1 1 auto; min-width: 0\` (and justify its content to the edge the buttons sit on), or pass \`constrain={false}\` if it genuinely has no row to take space from.`);
1516
1515
  }, [
1517
- N,
1518
- d,
1519
- C,
1520
- y,
1521
- x
1522
- ]), U(() => {
1523
- if (N) return;
1524
- let e = g.current;
1516
+ P,
1517
+ u,
1518
+ w,
1519
+ b,
1520
+ S
1521
+ ]), W(() => {
1522
+ if (P) return;
1523
+ let e = v.current;
1525
1524
  if (!e) return;
1526
1525
  if (typeof ResizeObserver > "u") {
1527
- b(e.getBoundingClientRect().width);
1526
+ x(e.getBoundingClientRect().width);
1528
1527
  return;
1529
1528
  }
1530
1529
  let t = new ResizeObserver((e) => {
1531
1530
  let t = e[0];
1532
- t && b(t.contentRect.width);
1531
+ t && x(t.contentRect.width);
1533
1532
  });
1534
- return t.observe(e), b(e.getBoundingClientRect().width), () => t.disconnect();
1535
- }, [N]);
1536
- let I = G(void 0), L = G(void 0);
1537
- U(() => {
1538
- I.current = void 0, L.current = void 0;
1539
- }, [F]);
1540
- let R = ie(() => N || !d ? yt(t, 2 ** 53 - 1, o, x, n, r, s) : C ? y === 0 ? yt(t, 2 ** 53 - 1, o, x, n, r, s) : yt(t, y, o, x, n, r, s, I.current, L.current) : {
1533
+ return t.observe(e), x(e.getBoundingClientRect().width), () => t.disconnect();
1534
+ }, [P]);
1535
+ let L = G(void 0), te = G(void 0);
1536
+ W(() => {
1537
+ L.current = void 0, te.current = void 0;
1538
+ }, [I]);
1539
+ let R = ie(() => P || !u ? xt(e, 2 ** 53 - 1, i, S, t, n, a) : w ? b === 0 ? xt(e, 2 ** 53 - 1, i, S, t, n, a) : xt(e, b, i, S, t, n, a, L.current, te.current) : {
1541
1540
  primaryInline: [],
1542
1541
  inline: [],
1543
1542
  overflow: [],
1544
1543
  destructiveInline: [],
1545
1544
  iconOnly: /* @__PURE__ */ new Set()
1546
1545
  }, [
1547
- N,
1548
- d,
1549
- C,
1550
- y,
1546
+ P,
1547
+ u,
1548
+ w,
1549
+ b,
1550
+ e,
1551
+ i,
1552
+ S,
1551
1553
  t,
1552
- o,
1553
- x,
1554
1554
  n,
1555
- r,
1556
- s
1555
+ a
1557
1556
  ]);
1558
- if (U(() => {
1559
- (C || N) && (I.current = new Set([
1557
+ if (W(() => {
1558
+ (w || P) && (L.current = new Set([
1560
1559
  ...R.primaryInline,
1561
1560
  ...R.inline,
1562
1561
  ...R.destructiveInline
1563
- ].map($)), L.current = new Set(R.iconOnly));
1562
+ ].map($)), te.current = new Set(R.iconOnly));
1564
1563
  }, [
1565
1564
  R,
1566
- C,
1567
- N
1568
- ]), te === 0) return null;
1569
- let z = R.overflow.length > 0, { normal: ne, destructive: B } = qe(R.overflow, n, r);
1565
+ w,
1566
+ P
1567
+ ]), ee === 0) return null;
1568
+ let z = R.overflow.length > 0, { normal: ne, destructive: V } = Ye(R.overflow, t, n);
1570
1569
  return /* @__PURE__ */ Y("div", {
1571
- ref: g,
1570
+ ref: v,
1572
1571
  role: "toolbar",
1573
- "aria-label": c ?? h("action.menu.title", "Actions"),
1572
+ "aria-label": o ?? _("action.menu.title", "Actions"),
1574
1573
  style: {
1575
1574
  display: "flex",
1576
1575
  flexDirection: O ? "row-reverse" : "row",
1577
1576
  alignItems: "center",
1578
- gap: ct,
1577
+ gap: ut,
1579
1578
  flexWrap: "wrap",
1580
- visibility: C || N ? "visible" : "hidden",
1579
+ visibility: w || P ? "visible" : "hidden",
1581
1580
  position: "relative",
1582
- flex: d ? "1 1 auto" : "0 1 auto",
1583
- justifyContent: u === "trailing" ? "flex-end" : "flex-start",
1581
+ flex: u ? "1 1 auto" : "0 1 auto",
1582
+ justifyContent: c === "trailing" ? "flex-end" : "flex-start",
1584
1583
  minWidth: 0,
1585
1584
  boxSizing: "border-box"
1586
1585
  },
1587
1586
  children: [
1588
1587
  /* @__PURE__ */ Y("div", {
1589
- ref: v,
1588
+ ref: y,
1590
1589
  "aria-hidden": "true",
1591
1590
  inert: !0,
1592
1591
  style: {
@@ -1600,94 +1599,94 @@ function xt({ layout: t, entityActions: n, globalActions: r, onRun: a, reservedR
1600
1599
  width: "max-content",
1601
1600
  flexWrap: "nowrap"
1602
1601
  },
1603
- children: [/* @__PURE__ */ J(i, {
1604
- "data-node-key": ot,
1605
- iconRight: /* @__PURE__ */ J(e.down, { size: 10 }),
1602
+ children: [/* @__PURE__ */ J(d, {
1603
+ "data-node-key": ct,
1604
+ iconRight: /* @__PURE__ */ J(l.down, { size: 10 }),
1606
1605
  tabIndex: -1,
1607
- children: h("action.menu.title", "Actions")
1608
- }, ot), t.map((e) => {
1609
- let t = $(e);
1610
- return e.kind === "action" ? /* @__PURE__ */ Y(re, { children: [/* @__PURE__ */ J($e, {
1606
+ children: _("action.menu.title", "Actions")
1607
+ }, ct), e.map((e) => {
1608
+ let r = $(e);
1609
+ return e.kind === "action" ? /* @__PURE__ */ Y(B, { children: [/* @__PURE__ */ J(tt, {
1611
1610
  leaf: e,
1612
- entityActions: n,
1613
- globalActions: r,
1614
- onRun: mt,
1611
+ entityActions: t,
1612
+ globalActions: n,
1613
+ onRun: gt,
1615
1614
  loading: !1,
1616
- onLoadingChange: pt,
1617
- row: f,
1618
- widgetContext: p,
1619
- measureRef: ht(t)
1620
- }), Ze(e.code, n, r) && /* @__PURE__ */ J($e, {
1615
+ onLoadingChange: ht,
1616
+ row: m,
1617
+ widgetContext: h,
1618
+ measureRef: _t(r)
1619
+ }), $e(e.code, t, n) && /* @__PURE__ */ J(tt, {
1621
1620
  leaf: e,
1622
- entityActions: n,
1623
- globalActions: r,
1624
- onRun: mt,
1621
+ entityActions: t,
1622
+ globalActions: n,
1623
+ onRun: gt,
1625
1624
  loading: !1,
1626
- onLoadingChange: pt,
1627
- row: f,
1628
- widgetContext: p,
1625
+ onLoadingChange: ht,
1626
+ row: m,
1627
+ widgetContext: h,
1629
1628
  iconOnly: !0,
1630
- measureRef: ht(ut(e))
1631
- })] }, t) : /* @__PURE__ */ J(et, {
1629
+ measureRef: _t(ft(e))
1630
+ })] }, r) : /* @__PURE__ */ J(nt, {
1632
1631
  group: e,
1633
- entityActions: n,
1634
- globalActions: r,
1635
- onRun: mt,
1632
+ entityActions: t,
1633
+ globalActions: n,
1634
+ onRun: gt,
1636
1635
  loading: null,
1637
- onLoadingChange: pt,
1638
- row: f,
1639
- widgetContext: p,
1640
- onActionClick: m,
1641
- measureRef: ht(t)
1642
- }, t);
1636
+ onLoadingChange: ht,
1637
+ row: m,
1638
+ widgetContext: h,
1639
+ onActionClick: g,
1640
+ measureRef: _t(r)
1641
+ }, r);
1643
1642
  })]
1644
1643
  }),
1645
- R.primaryInline.map((e) => /* @__PURE__ */ J($e, {
1644
+ R.primaryInline.map((e) => /* @__PURE__ */ J(tt, {
1646
1645
  leaf: e,
1647
- entityActions: n,
1648
- globalActions: r,
1649
- onRun: a,
1650
- loading: T === e.code,
1651
- onLoadingChange: (t) => E(t ? e.code : null),
1652
- row: f,
1653
- widgetContext: p,
1654
- onActionClick: m,
1646
+ entityActions: t,
1647
+ globalActions: n,
1648
+ onRun: r,
1649
+ loading: E === e.code,
1650
+ onLoadingChange: (t) => D(t ? e.code : null),
1651
+ row: m,
1652
+ widgetContext: h,
1653
+ onActionClick: g,
1655
1654
  iconOnly: R.iconOnly.has($(e))
1656
1655
  }, $(e))),
1657
1656
  R.inline.map((e) => {
1658
- let t = $(e);
1659
- return e.kind === "action" ? /* @__PURE__ */ J($e, {
1657
+ let i = $(e);
1658
+ return e.kind === "action" ? /* @__PURE__ */ J(tt, {
1660
1659
  leaf: e,
1661
- entityActions: n,
1662
- globalActions: r,
1663
- onRun: a,
1664
- loading: T === e.code,
1665
- onLoadingChange: (t) => E(t ? e.code : null),
1666
- row: f,
1667
- widgetContext: p,
1668
- onActionClick: m,
1669
- iconOnly: R.iconOnly.has(t)
1670
- }, t) : /* @__PURE__ */ J(et, {
1660
+ entityActions: t,
1661
+ globalActions: n,
1662
+ onRun: r,
1663
+ loading: E === e.code,
1664
+ onLoadingChange: (t) => D(t ? e.code : null),
1665
+ row: m,
1666
+ widgetContext: h,
1667
+ onActionClick: g,
1668
+ iconOnly: R.iconOnly.has(i)
1669
+ }, i) : /* @__PURE__ */ J(nt, {
1671
1670
  group: e,
1672
- entityActions: n,
1673
- globalActions: r,
1674
- onRun: a,
1675
- loading: T,
1676
- onLoadingChange: E,
1677
- row: f,
1678
- widgetContext: p,
1679
- onActionClick: m
1680
- }, t);
1671
+ entityActions: t,
1672
+ globalActions: n,
1673
+ onRun: r,
1674
+ loading: E,
1675
+ onLoadingChange: D,
1676
+ row: m,
1677
+ widgetContext: h,
1678
+ onActionClick: g
1679
+ }, i);
1681
1680
  }),
1682
- z && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(i, {
1681
+ z && /* @__PURE__ */ Y(q, { children: [/* @__PURE__ */ J(d, {
1683
1682
  ref: A,
1684
1683
  kind: "default",
1685
- iconRight: /* @__PURE__ */ J(e.down, { size: 10 }),
1684
+ iconRight: /* @__PURE__ */ J(l.down, { size: 10 }),
1686
1685
  "aria-haspopup": "menu",
1687
1686
  "aria-expanded": j ? "true" : "false",
1688
1687
  onClick: () => M((e) => !e),
1689
- children: h("action.menu.title", "Actions")
1690
- }), /* @__PURE__ */ J(l, {
1688
+ children: _("action.menu.title", "Actions")
1689
+ }), /* @__PURE__ */ J(f, {
1691
1690
  open: j,
1692
1691
  anchor: A.current,
1693
1692
  onClose: () => M(!1),
@@ -1695,50 +1694,50 @@ function xt({ layout: t, entityActions: n, globalActions: r, onRun: a, reservedR
1695
1694
  width: 220,
1696
1695
  children: /* @__PURE__ */ J("div", {
1697
1696
  role: "menu",
1698
- "aria-label": h("action.menu.more", "More actions"),
1697
+ "aria-label": _("action.menu.more", "More actions"),
1699
1698
  children: [
1700
1699
  ...ne,
1701
- ...B.length > 0 ? [null] : [],
1702
- ...B
1703
- ].map((e, t) => e === null ? /* @__PURE__ */ J(_, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ J(tt, {
1700
+ ...V.length > 0 ? [null] : [],
1701
+ ...V
1702
+ ].map((e, r) => e === null ? /* @__PURE__ */ J(p, { divider: !0 }, "destructive-divider") : e.kind === "action" ? /* @__PURE__ */ J(rt, {
1704
1703
  leaf: e,
1705
- entityActions: n,
1706
- globalActions: r,
1707
- onRun: ee,
1708
- loading: T === e.code,
1709
- onLoadingChange: (t) => E(t ? e.code : null),
1710
- row: f,
1711
- widgetContext: p,
1712
- onActionClick: m
1713
- }, e.code) : /* @__PURE__ */ J(nt, {
1704
+ entityActions: t,
1705
+ globalActions: n,
1706
+ onRun: N,
1707
+ loading: E === e.code,
1708
+ onLoadingChange: (t) => D(t ? e.code : null),
1709
+ row: m,
1710
+ widgetContext: h,
1711
+ onActionClick: g
1712
+ }, e.code) : /* @__PURE__ */ J(it, {
1714
1713
  group: e,
1715
- entityActions: n,
1716
- globalActions: r,
1717
- onRun: ee,
1718
- loading: T,
1719
- onLoadingChange: E,
1720
- row: f,
1721
- widgetContext: p,
1722
- onActionClick: m
1723
- }, `${$(e)}-${t}`))
1714
+ entityActions: t,
1715
+ globalActions: n,
1716
+ onRun: N,
1717
+ loading: E,
1718
+ onLoadingChange: D,
1719
+ row: m,
1720
+ widgetContext: h,
1721
+ onActionClick: g
1722
+ }, `${$(e)}-${r}`))
1724
1723
  })
1725
1724
  })] }),
1726
- R.destructiveInline.map((e) => /* @__PURE__ */ J($e, {
1725
+ R.destructiveInline.map((e) => /* @__PURE__ */ J(tt, {
1727
1726
  leaf: e,
1728
- entityActions: n,
1729
- globalActions: r,
1730
- onRun: a,
1731
- loading: T === e.code,
1732
- onLoadingChange: (t) => E(t ? e.code : null),
1733
- row: f,
1734
- widgetContext: p,
1735
- onActionClick: m,
1727
+ entityActions: t,
1728
+ globalActions: n,
1729
+ onRun: r,
1730
+ loading: E === e.code,
1731
+ onLoadingChange: (t) => D(t ? e.code : null),
1732
+ row: m,
1733
+ widgetContext: h,
1734
+ onActionClick: g,
1736
1735
  iconOnly: R.iconOnly.has($(e))
1737
1736
  }, $(e)))
1738
1737
  ]
1739
1738
  });
1740
1739
  }
1741
- function St({ layout: e, rowSelection: t = [], ...n }) {
1740
+ function wt({ layout: e, rowSelection: t = [], ...n }) {
1742
1741
  let r = t.length > 0;
1743
1742
  return /* @__PURE__ */ Y("div", {
1744
1743
  style: {
@@ -1754,7 +1753,7 @@ function St({ layout: e, rowSelection: t = [], ...n }) {
1754
1753
  flex: "1 1 auto",
1755
1754
  minWidth: 0
1756
1755
  },
1757
- children: /* @__PURE__ */ J(xt, {
1756
+ children: /* @__PURE__ */ J(Ct, {
1758
1757
  layout: e,
1759
1758
  rowSelection: [],
1760
1759
  ...n
@@ -1766,7 +1765,7 @@ function St({ layout: e, rowSelection: t = [], ...n }) {
1766
1765
  flex: "1 1 auto",
1767
1766
  minWidth: 0
1768
1767
  },
1769
- children: /* @__PURE__ */ J(xt, {
1768
+ children: /* @__PURE__ */ J(Ct, {
1770
1769
  layout: e,
1771
1770
  rowSelection: t,
1772
1771
  ...n
@@ -1774,9 +1773,9 @@ function St({ layout: e, rowSelection: t = [], ...n }) {
1774
1773
  })]
1775
1774
  });
1776
1775
  }
1777
- function Ct({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth: i = 0, kind: a = "toolbar", align: o = "trailing", constrain: s = !0, measurementOverride: c, entityActions: l, globalActions: u, ariaLabel: d, widgetContext: f, onActionClick: p }) {
1778
- let m = Ke(e);
1779
- return a === "row" ? /* @__PURE__ */ J(rt, {
1776
+ function Tt({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth: i = 0, kind: a = "toolbar", align: o = "trailing", constrain: s = !0, measurementOverride: c, entityActions: l, globalActions: u, ariaLabel: d, widgetContext: f, onActionClick: p }) {
1777
+ let m = Je(e);
1778
+ return a === "row" ? /* @__PURE__ */ J(at, {
1780
1779
  layout: e,
1781
1780
  entityActions: l,
1782
1781
  globalActions: u,
@@ -1784,7 +1783,7 @@ function Ct({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth:
1784
1783
  row: t,
1785
1784
  widgetContext: f,
1786
1785
  onActionClick: p
1787
- }) : m === 0 ? null : J(a === "toolbar" ? St : xt, {
1786
+ }) : m === 0 ? null : J(a === "toolbar" ? wt : Ct, {
1788
1787
  layout: e,
1789
1788
  row: t,
1790
1789
  rowSelection: n,
@@ -1802,94 +1801,94 @@ function Ct({ layout: e, row: t, rowSelection: n, onRun: r, reservedRightWidth:
1802
1801
  }
1803
1802
  //#endregion
1804
1803
  //#region src/lib/filter-evaluator.ts
1805
- var wt = /* @__PURE__ */ new Set([
1804
+ var Et = /* @__PURE__ */ new Set([
1806
1805
  "string",
1807
1806
  "text",
1808
1807
  "rich_text",
1809
1808
  "email",
1810
1809
  "url",
1811
1810
  "phone"
1812
- ]), Tt = /* @__PURE__ */ new Set([
1811
+ ]), Dt = /* @__PURE__ */ new Set([
1813
1812
  "int",
1814
1813
  "float",
1815
1814
  "decimal"
1816
- ]), Et = /* @__PURE__ */ new Set([
1815
+ ]), Ot = /* @__PURE__ */ new Set([
1817
1816
  "date",
1818
1817
  "timestamp",
1819
1818
  "time"
1820
- ]), Dt = /^(?:eq|not_eq|contains|starts_with|is_empty|is_not_empty)$/, Ot = /^(?:eq|not_eq|in|not_in|is_empty|is_not_empty)$/, kt = /^(?:eq|not_eq|gt|gte|lt|lte|between|is_empty|is_not_empty)$/, At = {
1821
- string: Dt,
1822
- text: Dt,
1823
- rich_text: Dt,
1824
- email: Dt,
1825
- url: Dt,
1826
- phone: Dt,
1827
- enum: Ot,
1828
- int: kt,
1829
- float: kt,
1830
- decimal: kt,
1831
- date: kt,
1832
- timestamp: kt,
1833
- time: kt,
1819
+ ]), kt = /^(?:eq|not_eq|contains|starts_with|is_empty|is_not_empty)$/, At = /^(?:eq|not_eq|in|not_in|is_empty|is_not_empty)$/, jt = /^(?:eq|not_eq|gt|gte|lt|lte|between|is_empty|is_not_empty)$/, Mt = {
1820
+ string: kt,
1821
+ text: kt,
1822
+ rich_text: kt,
1823
+ email: kt,
1824
+ url: kt,
1825
+ phone: kt,
1826
+ enum: At,
1827
+ int: jt,
1828
+ float: jt,
1829
+ decimal: jt,
1830
+ date: jt,
1831
+ timestamp: jt,
1832
+ time: jt,
1834
1833
  bool: /^(?:eq|is_empty)$/,
1835
1834
  ref: /^(?:eq|not_eq|is_empty|is_not_empty)$/,
1836
1835
  uuid: /^(?:eq|not_eq|is_empty|is_not_empty)$/
1837
1836
  };
1838
- function jt(e, t, n) {
1839
- return e.every((e) => Mt(e, t, n));
1837
+ function Nt(e, t, n) {
1838
+ return e.every((e) => Pt(e, t, n));
1840
1839
  }
1841
- function Mt(e, t, n) {
1842
- if (e.and) return e.and.every((e) => Mt(e, t, n));
1843
- if (e.or) return e.or.some((e) => Mt(e, t, n));
1840
+ function Pt(e, t, n) {
1841
+ if (e.and) return e.and.every((e) => Pt(e, t, n));
1842
+ if (e.or) return e.or.some((e) => Pt(e, t, n));
1844
1843
  if (!e.field || !e.op) return !1;
1845
1844
  let r = t[e.field];
1846
- return !r || !At[r.type]?.test(e.op) ? !1 : Nt(e, r.type, n[e.field]);
1845
+ return !r || !Mt[r.type]?.test(e.op) ? !1 : Ft(e, r.type, n[e.field]);
1847
1846
  }
1848
- function Nt(e, t, n) {
1849
- let r = Pt(n);
1847
+ function Ft(e, t, n) {
1848
+ let r = It(n);
1850
1849
  if (e.op === "is_empty") return r;
1851
1850
  if (e.op === "is_not_empty") return !r;
1852
1851
  if (r) return !1;
1853
1852
  let i = e.value;
1854
1853
  switch (e.op) {
1855
- case "eq": return Ft(t, n, i);
1856
- case "not_eq": return !Ft(t, n, i) && It(t, n, i);
1857
- case "in": return Array.isArray(i) && i.some((e) => Ft(t, n, e));
1858
- case "not_in": return Array.isArray(i) && i.every((e) => It(t, n, e) && !Ft(t, n, e));
1854
+ case "eq": return Lt(t, n, i);
1855
+ case "not_eq": return !Lt(t, n, i) && Rt(t, n, i);
1856
+ case "in": return Array.isArray(i) && i.some((e) => Lt(t, n, e));
1857
+ case "not_in": return Array.isArray(i) && i.every((e) => Rt(t, n, e) && !Lt(t, n, e));
1859
1858
  case "contains": return typeof n == "string" && typeof i == "string" && n.toLowerCase().includes(i.toLowerCase());
1860
1859
  case "starts_with": return typeof n == "string" && typeof i == "string" && n.toLowerCase().startsWith(i.toLowerCase());
1861
- case "gt": return Lt(t, n, i, (e, t) => e > t);
1862
- case "gte": return Lt(t, n, i, (e, t) => e >= t);
1863
- case "lt": return Lt(t, n, i, (e, t) => e < t);
1864
- case "lte": return Lt(t, n, i, (e, t) => e <= t);
1860
+ case "gt": return zt(t, n, i, (e, t) => e > t);
1861
+ case "gte": return zt(t, n, i, (e, t) => e >= t);
1862
+ case "lt": return zt(t, n, i, (e, t) => e < t);
1863
+ case "lte": return zt(t, n, i, (e, t) => e <= t);
1865
1864
  case "between": {
1866
1865
  if (!Array.isArray(i) || i.length !== 2) return !1;
1867
- let e = Rt(t, n, i[0]), r = Rt(t, n, i[1]);
1866
+ let e = Bt(t, n, i[0]), r = Bt(t, n, i[1]);
1868
1867
  return e === void 0 || r === void 0 ? !1 : e >= 0 && r <= 0;
1869
1868
  }
1870
1869
  default: return !1;
1871
1870
  }
1872
1871
  }
1873
- function Pt(e) {
1872
+ function It(e) {
1874
1873
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
1875
1874
  }
1876
- function Ft(e, t, n) {
1877
- return It(e, t, n) ? Et.has(e) ? Rt(e, t, n) === 0 : t === n : !1;
1875
+ function Lt(e, t, n) {
1876
+ return Rt(e, t, n) ? Ot.has(e) ? Bt(e, t, n) === 0 : t === n : !1;
1878
1877
  }
1879
- function It(e, t, n) {
1880
- return Rt(e, t, n) !== void 0;
1878
+ function Rt(e, t, n) {
1879
+ return Bt(e, t, n) !== void 0;
1881
1880
  }
1882
- function Lt(e, t, n, r) {
1883
- let i = Rt(e, t, n);
1881
+ function zt(e, t, n, r) {
1882
+ let i = Bt(e, t, n);
1884
1883
  return i !== void 0 && r(i, 0);
1885
1884
  }
1886
- function Rt(e, t, n) {
1887
- if (Tt.has(e)) return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1888
- if (Et.has(e)) return typeof t != "string" || typeof n != "string" || !zt(e, t) || !zt(e, n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1889
- if (wt.has(e) || e === "enum" || e === "ref" || e === "uuid") return typeof t != "string" || typeof n != "string" ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1885
+ function Bt(e, t, n) {
1886
+ if (Dt.has(e)) return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1887
+ if (Ot.has(e)) return typeof t != "string" || typeof n != "string" || !Vt(e, t) || !Vt(e, n) ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1888
+ if (Et.has(e) || e === "enum" || e === "ref" || e === "uuid") return typeof t != "string" || typeof n != "string" ? void 0 : t === n ? 0 : t < n ? -1 : 1;
1890
1889
  if (e === "bool") return typeof t != "boolean" || typeof n != "boolean" ? void 0 : t === n ? 0 : t ? 1 : -1;
1891
1890
  }
1892
- function zt(e, t) {
1891
+ function Vt(e, t) {
1893
1892
  switch (e) {
1894
1893
  case "date": return /^\d{4}-\d{2}-\d{2}$/.test(t);
1895
1894
  case "time": return /^\d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(t);
@@ -1899,23 +1898,23 @@ function zt(e, t) {
1899
1898
  }
1900
1899
  //#endregion
1901
1900
  //#region src/lib/variants.ts
1902
- function Bt(e, t) {
1901
+ function Ht(e, t) {
1903
1902
  let n = e.variants;
1904
1903
  if (!n || n.length === 0) return;
1905
1904
  let r = {};
1906
1905
  for (let [t, n] of e.fields) r[t] = n;
1907
- for (let [e, i] of n) if (e !== "default" && i.when && jt(i.when, r, t)) return e;
1906
+ for (let [e, i] of n) if (e !== "default" && i.when && Nt(i.when, r, t)) return e;
1908
1907
  return n.has("default") ? "default" : void 0;
1909
1908
  }
1910
- function Vt(e, t) {
1909
+ function Ut(e, t) {
1911
1910
  let n = e?.variants;
1912
1911
  if (!n || !n.items().some((e) => e.actions !== void 0)) return;
1913
- let r = Bt(e, t), i = n.get("default"), a = (r ? n.get(r)?.actions : void 0) ?? i?.actions ?? [];
1912
+ let r = Ht(e, t), i = n.get("default"), a = (r ? n.get(r)?.actions : void 0) ?? i?.actions ?? [];
1914
1913
  return new Set(a);
1915
1914
  }
1916
- function Ht(e, t) {
1915
+ function Wt(e, t) {
1917
1916
  if (t.length === 0) return;
1918
- let n = t.map((t) => Vt(e, t));
1917
+ let n = t.map((t) => Ut(e, t));
1919
1918
  if (n.every((e) => e === void 0)) return;
1920
1919
  let r = n[0] ?? /* @__PURE__ */ new Set(), i = new Set(r);
1921
1920
  for (let e of n.slice(1)) {
@@ -1927,18 +1926,18 @@ function Ht(e, t) {
1927
1926
  }
1928
1927
  return i;
1929
1928
  }
1930
- function Ut(e, t, n) {
1929
+ function Gt(e, t, n) {
1931
1930
  if (!t.variants || t.variants.length === 0) return;
1932
1931
  if (e.variants) {
1933
- let r = Bt(e, n) ?? "default";
1932
+ let r = Ht(e, n) ?? "default";
1934
1933
  return t.variants.has(r) ? r : "default";
1935
1934
  }
1936
1935
  let r = {};
1937
1936
  for (let [t, n] of e.fields) r[t] = n;
1938
- for (let [e, i] of t.variants) if (e !== "default" && i.when && jt(i.when, r, n)) return e;
1937
+ for (let [e, i] of t.variants) if (e !== "default" && i.when && Nt(i.when, r, n)) return e;
1939
1938
  return "default";
1940
1939
  }
1941
- var Wt = [
1940
+ var Kt = [
1942
1941
  "items",
1943
1942
  "sidebar",
1944
1943
  "sidebar_width",
@@ -1950,18 +1949,13 @@ var Wt = [
1950
1949
  "card",
1951
1950
  "quick_peek"
1952
1951
  ];
1953
- function Gt(e, t, n) {
1952
+ function qt(e, t, n) {
1954
1953
  if (!e || !t?.variants) return t;
1955
- let r = Ut(e, t, n), i = r ? t.variants.get(r) : void 0;
1954
+ let r = Gt(e, t, n), i = r ? t.variants.get(r) : void 0;
1956
1955
  if (!i) return t;
1957
1956
  let a = { ...t };
1958
- for (let e of Wt) i[e] !== void 0 && (a[e] = i[e]);
1957
+ for (let e of Kt) i[e] !== void 0 && (a[e] = i[e]);
1959
1958
  return a;
1960
1959
  }
1961
1960
  //#endregion
1962
- //#region src/lib/action-dispatch.ts
1963
- function Kt(e, t, n, r, i) {
1964
- return s(n) ? (a(e, n.ui_steps, r), null) : n.entity ? `${n.entity}.${t}` : i ? `${i}.${t}` : t;
1965
- }
1966
- //#endregion
1967
- export { Z as C, oe as S, be as _, Ut as a, le as b, Ct as c, Re as d, ze as f, xe as g, Be as h, Bt as i, at as l, Ve as m, Ht as n, Vt as o, He as p, Gt as r, jt as s, Kt as t, Le as u, ye as v, ae as x, Q as y };
1961
+ export { oe as C, ae as S, xe as _, Ut as a, Q as b, st as c, Re as d, ze as f, Ve as g, Be as h, Gt as i, We as l, He as m, qt as n, Nt as o, Ue as p, Ht as r, Tt as s, Wt as t, Le as u, be as v, Z as w, le as x, ye as y };