@rebasepro/admin 0.10.0 → 0.10.1-canary.0a881d4

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 (352) hide show
  1. package/dist/{CollectionEditorDialog-BOlKGGg7.js → CollectionEditorDialog-DMztwJ5S.js} +12 -12
  2. package/dist/CollectionEditorDialog-DMztwJ5S.js.map +1 -0
  3. package/dist/{PropertyEditView-i51tFOfM.js → PropertyEditView-CjFCnftn.js} +18 -18
  4. package/dist/PropertyEditView-CjFCnftn.js.map +1 -0
  5. package/dist/{RouterCollectionsStudioView-Dh4W53PU.js → RouterCollectionsStudioView-nDFQdKHA.js} +4 -4
  6. package/dist/RouterCollectionsStudioView-nDFQdKHA.js.map +1 -0
  7. package/dist/collection_editor/api/generateCollectionApi.d.ts +4 -4
  8. package/dist/collection_editor/pgColumnToProperty.d.ts +4 -3
  9. package/dist/collection_editor/serializable_types.d.ts +31 -30
  10. package/dist/collection_editor/serializable_utils.d.ts +6 -5
  11. package/dist/collection_editor/types/collection_editor_controller.d.ts +6 -5
  12. package/dist/collection_editor/types/collection_inference.d.ts +3 -2
  13. package/dist/collection_editor/types/config_controller.d.ts +8 -7
  14. package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -2
  15. package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +3 -2
  16. package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
  17. package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
  18. package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
  19. package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
  20. package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -2
  21. package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
  22. package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +2 -2
  23. package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +3 -3
  24. package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -2
  25. package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +5 -4
  26. package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
  27. package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -2
  28. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +3 -2
  29. package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -2
  30. package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -2
  31. package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -2
  32. package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -2
  33. package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -2
  34. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +3 -2
  35. package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -1
  36. package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +4 -3
  37. package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
  38. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +1 -1
  39. package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +1 -1
  40. package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +1 -1
  41. package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +1 -1
  42. package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +2 -2
  43. package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +2 -2
  44. package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +2 -2
  45. package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +2 -2
  46. package/dist/collection_editor/ui/collection_editor/utils/supported_fields.d.ts +1 -1
  47. package/dist/collection_editor/ui/collection_editor/utils/update_property_for_widget.d.ts +2 -1
  48. package/dist/collection_editor/useLocalCollectionsConfigController.d.ts +2 -2
  49. package/dist/collection_editor/validateCollectionJson.d.ts +2 -2
  50. package/dist/collection_editor_ui.js +4 -4
  51. package/dist/components/AdminModeSyncer.d.ts +1 -1
  52. package/dist/components/ClearFilterSortButton.d.ts +1 -1
  53. package/dist/components/CollectionPanel.d.ts +2 -2
  54. package/dist/components/CollectionTableBinding/CollectionRowActions.d.ts +4 -4
  55. package/dist/components/CollectionTableBinding/CollectionTableBinding.d.ts +1 -1
  56. package/dist/components/CollectionTableBinding/CollectionTableBindingProps.d.ts +3 -2
  57. package/dist/components/CollectionTableBinding/fields/TableMultipleRelationField.d.ts +3 -3
  58. package/dist/components/CollectionTableBinding/fields/TableReferenceField.d.ts +3 -3
  59. package/dist/components/CollectionTableBinding/fields/TableRelationField.d.ts +3 -3
  60. package/dist/components/CollectionTableBinding/internal/common.d.ts +2 -2
  61. package/dist/components/CollectionTableBinding/internal/popup_field/PopupFormField.d.ts +2 -2
  62. package/dist/components/CollectionViewBinding/BoardCardBinding.d.ts +3 -3
  63. package/dist/components/CollectionViewBinding/CollectionBoardViewBinding.d.ts +3 -3
  64. package/dist/components/CollectionViewBinding/CollectionCardViewBinding.d.ts +3 -3
  65. package/dist/components/CollectionViewBinding/CollectionListViewBinding.d.ts +3 -3
  66. package/dist/components/CollectionViewBinding/CollectionViewActions.d.ts +2 -3
  67. package/dist/components/CollectionViewBinding/CollectionViewBinding.d.ts +2 -2
  68. package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +2 -3
  69. package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +3 -3
  70. package/dist/components/CollectionViewBinding/FilterPresetsButton.d.ts +2 -1
  71. package/dist/components/CollectionViewBinding/SplitListView.d.ts +3 -3
  72. package/dist/components/CollectionViewBinding/ViewModeToggle.d.ts +1 -1
  73. package/dist/components/CollectionViewBinding/hooks/useCollectionInlineEditor.d.ts +3 -2
  74. package/dist/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.d.ts +3 -2
  75. package/dist/components/CollectionViewBinding/useBoardDataController.d.ts +2 -2
  76. package/dist/components/CollectionViewBinding/usePreviewSlots.d.ts +9 -6
  77. package/dist/components/CollectionViewBinding/useSelectionController.d.ts +2 -1
  78. package/dist/components/DeleteEntityDialog.d.ts +2 -2
  79. package/dist/components/DetailViewBinding.d.ts +3 -3
  80. package/dist/components/DrawerNavigationGroup.d.ts +1 -1
  81. package/dist/components/EditViewBinding.d.ts +3 -3
  82. package/dist/components/EntityPreviewBinding.d.ts +3 -3
  83. package/dist/components/EntityViewBinding.d.ts +2 -2
  84. package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
  85. package/dist/components/HomePage/HomePageDnD.d.ts +1 -1
  86. package/dist/components/HomePage/NavigationCardBinding.d.ts +1 -1
  87. package/dist/components/PropertyConfigBadge.d.ts +1 -1
  88. package/dist/components/RebaseAdmin.d.ts +1 -1
  89. package/dist/components/RebaseLayout.d.ts +1 -1
  90. package/dist/components/ReferenceTable/SelectionTableBinding.d.ts +2 -2
  91. package/dist/components/SelectableTable/SelectableTable.d.ts +3 -2
  92. package/dist/components/SelectableTable/SelectionStore.d.ts +1 -1
  93. package/dist/components/SelectableTable/filters/FilterFieldBinding.d.ts +2 -2
  94. package/dist/components/SidePanelBinding.d.ts +1 -1
  95. package/dist/components/admin/CreationResultDialog.d.ts +1 -1
  96. package/dist/components/common/default_entity_actions.d.ts +2 -1
  97. package/dist/components/field_configs.d.ts +3 -2
  98. package/dist/components/history/EntityHistoryEntry.d.ts +2 -2
  99. package/dist/components/history/EntityHistoryView.d.ts +1 -1
  100. package/dist/components/history/LastEditedByFormAction.d.ts +1 -1
  101. package/dist/components/history/LastEditedByIndicator.d.ts +2 -2
  102. package/dist/contexts/BreacrumbsContext.d.ts +1 -1
  103. package/dist/contexts/SideDialogsControllerContext.d.ts +1 -1
  104. package/dist/contexts/SidePanelControllerContext.d.ts +1 -1
  105. package/dist/data_export/export/ExportCollectionAction.d.ts +4 -3
  106. package/dist/data_import/components/ImportSaveInProgress.d.ts +2 -2
  107. package/dist/data_import/import/ImportCollectionAction.d.ts +2 -1
  108. package/dist/data_import/utils/data.d.ts +2 -1
  109. package/dist/{export-BM6HPujv.js → export-CavEbZVF.js} +2 -2
  110. package/dist/export-CavEbZVF.js.map +1 -0
  111. package/dist/form/PropertyFieldBinding.d.ts +1 -1
  112. package/dist/form/form_utils.d.ts +4 -3
  113. package/dist/{history-CtIPJxvQ.js → history-B1lIsrkX.js} +2 -2
  114. package/dist/history-B1lIsrkX.js.map +1 -0
  115. package/dist/hooks/index.d.ts +1 -0
  116. package/dist/hooks/navigation/contexts/CollectionRegistryContext.d.ts +2 -2
  117. package/dist/hooks/navigation/contexts/NavigationStateContext.d.ts +1 -1
  118. package/dist/hooks/navigation/contexts/UrlContext.d.ts +1 -1
  119. package/dist/hooks/navigation/useBuildCollectionRegistryController.d.ts +2 -1
  120. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +7 -5
  121. package/dist/hooks/navigation/useBuildUrlController.d.ts +1 -1
  122. package/dist/hooks/navigation/useNavigationResolution.d.ts +6 -5
  123. package/dist/hooks/navigation/useResolvedCollections.d.ts +8 -7
  124. package/dist/hooks/navigation/useResolvedViews.d.ts +4 -2
  125. package/dist/hooks/navigation/useTopLevelNavigation.d.ts +2 -2
  126. package/dist/hooks/navigation/utils.d.ts +5 -5
  127. package/dist/hooks/useBreadcrumbsController.d.ts +1 -1
  128. package/dist/hooks/useBuildSidePanel.d.ts +4 -4
  129. package/dist/hooks/useCMSContext.d.ts +4 -2
  130. package/dist/hooks/useResolvedNavigationFrom.d.ts +5 -4
  131. package/dist/hooks/useResolvedUsers.d.ts +8 -0
  132. package/dist/hooks/useSideDialogsController.d.ts +1 -1
  133. package/dist/hooks/useSidePanel.d.ts +1 -1
  134. package/dist/{import-DzQnT03v.js → import-36UcGe71.js} +2 -2
  135. package/dist/import-36UcGe71.js.map +1 -0
  136. package/dist/index.d.ts +1 -1
  137. package/dist/index.js +16 -16
  138. package/dist/index.js.map +1 -1
  139. package/dist/preview/components/UrlComponentPreview.d.ts +1 -1
  140. package/dist/preview/components/UserPreview.d.ts +3 -2
  141. package/dist/preview/property_previews/StringPropertyPreview.d.ts +1 -1
  142. package/dist/preview/util.d.ts +1 -1
  143. package/dist/routes/CustomViewRoute.d.ts +1 -1
  144. package/dist/types/components/EntityFormActionsProps.d.ts +2 -2
  145. package/dist/types/components/EntityFormProps.d.ts +3 -3
  146. package/dist/types/fields.d.ts +2 -2
  147. package/dist/util/dataControllerAdapter.d.ts +1 -1
  148. package/dist/util/entity_actions.d.ts +1 -1
  149. package/dist/util/navigation_utils.d.ts +3 -3
  150. package/dist/util/previews.d.ts +22 -4
  151. package/dist/util/property_utils.d.ts +3 -2
  152. package/dist/util/resolutions.d.ts +1 -1
  153. package/dist/util/view_mode.d.ts +3 -3
  154. package/dist/{util-XFwQ9FEc.js → util-CPgUM4M8.js} +353 -221
  155. package/dist/util-CPgUM4M8.js.map +1 -0
  156. package/package.json +11 -9
  157. package/src/collection_editor/ConfigControllerProvider.tsx +11 -12
  158. package/src/collection_editor/api/generateCollectionApi.ts +4 -4
  159. package/src/collection_editor/pgColumnToProperty.ts +4 -3
  160. package/src/collection_editor/serializable_types.ts +36 -34
  161. package/src/collection_editor/serializable_utils.ts +17 -32
  162. package/src/collection_editor/types/collection_editor_controller.tsx +6 -5
  163. package/src/collection_editor/types/collection_inference.ts +3 -2
  164. package/src/collection_editor/types/config_controller.tsx +8 -7
  165. package/src/collection_editor/ui/AddKanbanColumnAction.tsx +3 -2
  166. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +3 -2
  167. package/src/collection_editor/ui/EditorCollectionAction.tsx +3 -2
  168. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +3 -2
  169. package/src/collection_editor/ui/EditorEntityAction.tsx +3 -2
  170. package/src/collection_editor/ui/HomePageEditorCollectionAction.tsx +1 -1
  171. package/src/collection_editor/ui/KanbanSetupAction.tsx +3 -2
  172. package/src/collection_editor/ui/MissingReferenceWidget.tsx +1 -1
  173. package/src/collection_editor/ui/NewCollectionCard.tsx +1 -1
  174. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +3 -2
  175. package/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.tsx +6 -5
  176. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +5 -7
  177. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +28 -38
  178. package/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.tsx +4 -3
  179. package/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.tsx +3 -2
  180. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +4 -3
  181. package/src/collection_editor/ui/collection_editor/CollectionRLSTab.tsx +4 -3
  182. package/src/collection_editor/ui/collection_editor/CollectionRelationsTab.tsx +3 -2
  183. package/src/collection_editor/ui/collection_editor/CollectionStudioView.tsx +2 -2
  184. package/src/collection_editor/ui/collection_editor/CollectionsStudioView.tsx +3 -2
  185. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +4 -3
  186. package/src/collection_editor/ui/collection_editor/EntityActionsEditTab.tsx +4 -4
  187. package/src/collection_editor/ui/collection_editor/GeneralSettingsForm.tsx +4 -4
  188. package/src/collection_editor/ui/collection_editor/GetCodeDialog.tsx +5 -4
  189. package/src/collection_editor/ui/collection_editor/KanbanConfigSection.tsx +3 -2
  190. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +4 -3
  191. package/src/collection_editor/ui/collection_editor/PropertyTree.tsx +2 -1
  192. package/src/collection_editor/ui/collection_editor/SubcollectionsEditTab.tsx +6 -5
  193. package/src/collection_editor/ui/collection_editor/ViewModeSwitch.tsx +1 -1
  194. package/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.tsx +3 -2
  195. package/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.tsx +2 -1
  196. package/src/collection_editor/ui/collection_editor/properties/MapPropertyField.tsx +3 -2
  197. package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +3 -2
  198. package/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.tsx +2 -1
  199. package/src/collection_editor/ui/collection_editor/templates/blog_template.ts +3 -3
  200. package/src/collection_editor/ui/collection_editor/templates/pages_template.ts +3 -3
  201. package/src/collection_editor/ui/collection_editor/templates/products_template.ts +4 -4
  202. package/src/collection_editor/ui/collection_editor/templates/users_template.ts +2 -2
  203. package/src/collection_editor/ui/collection_editor/utils/supported_fields.tsx +1 -1
  204. package/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.ts +10 -8
  205. package/src/collection_editor/useJsonCollectionsConfigController.tsx +10 -9
  206. package/src/collection_editor/useLocalCollectionsConfigController.tsx +5 -5
  207. package/src/collection_editor/validateCollectionJson.ts +4 -5
  208. package/src/components/AdminModeSyncer.tsx +1 -1
  209. package/src/components/ClearFilterSortButton.tsx +1 -1
  210. package/src/components/CollectionPanel.tsx +5 -4
  211. package/src/components/CollectionTableBinding/CollectionRowActions.tsx +6 -6
  212. package/src/components/CollectionTableBinding/CollectionTableBinding.tsx +5 -4
  213. package/src/components/CollectionTableBinding/CollectionTableBindingProps.tsx +3 -2
  214. package/src/components/CollectionTableBinding/PropertyTableCell.tsx +5 -5
  215. package/src/components/CollectionTableBinding/fields/TableMultipleRelationField.tsx +4 -3
  216. package/src/components/CollectionTableBinding/fields/TableReferenceField.tsx +5 -4
  217. package/src/components/CollectionTableBinding/fields/TableRelationField.tsx +4 -3
  218. package/src/components/CollectionTableBinding/internal/common.tsx +8 -7
  219. package/src/components/CollectionTableBinding/internal/popup_field/PopupFormField.tsx +5 -4
  220. package/src/components/CollectionTableBinding/table_bindings.tsx +7 -7
  221. package/src/components/CollectionViewBinding/BoardCardBinding.tsx +6 -5
  222. package/src/components/CollectionViewBinding/CollectionBoardViewBinding.tsx +5 -6
  223. package/src/components/CollectionViewBinding/CollectionCardViewBinding.tsx +4 -3
  224. package/src/components/CollectionViewBinding/CollectionListViewBinding.tsx +10 -13
  225. package/src/components/CollectionViewBinding/CollectionViewActions.tsx +3 -3
  226. package/src/components/CollectionViewBinding/CollectionViewBinding.tsx +17 -16
  227. package/src/components/CollectionViewBinding/CollectionViewStartActions.tsx +3 -3
  228. package/src/components/CollectionViewBinding/EntityCardBinding.tsx +6 -5
  229. package/src/components/CollectionViewBinding/FilterPresetsButton.tsx +2 -1
  230. package/src/components/CollectionViewBinding/FiltersDialog.tsx +2 -2
  231. package/src/components/CollectionViewBinding/SplitListView.tsx +6 -5
  232. package/src/components/CollectionViewBinding/ViewModeToggle.tsx +1 -1
  233. package/src/components/CollectionViewBinding/hooks/useCollectionInlineEditor.ts +3 -2
  234. package/src/components/CollectionViewBinding/hooks/useKanbanDragAndDrop.ts +3 -2
  235. package/src/components/CollectionViewBinding/useBoardDataController.tsx +3 -2
  236. package/src/components/CollectionViewBinding/usePreviewSlots.ts +57 -25
  237. package/src/components/CollectionViewBinding/useSelectionController.tsx +2 -1
  238. package/src/components/DefaultDrawer.tsx +2 -2
  239. package/src/components/DeleteEntityDialog.tsx +3 -2
  240. package/src/components/DetailViewBinding.tsx +23 -18
  241. package/src/components/DrawerNavigationGroup.tsx +1 -1
  242. package/src/components/EditFormActions.tsx +5 -5
  243. package/src/components/EditViewBinding.tsx +11 -15
  244. package/src/components/EntityPreviewBinding.tsx +7 -6
  245. package/src/components/EntityViewBinding.tsx +3 -3
  246. package/src/components/HomePage/ContentHomePage.tsx +2 -2
  247. package/src/components/HomePage/FavouritesView.tsx +1 -1
  248. package/src/components/HomePage/HomePageDnD.tsx +1 -1
  249. package/src/components/HomePage/NavigationCardBinding.tsx +2 -2
  250. package/src/components/PropertyConfigBadge.tsx +2 -1
  251. package/src/components/RebaseAdmin.tsx +1 -1
  252. package/src/components/RebaseAuthGate.tsx +1 -1
  253. package/src/components/RebaseLayout.tsx +1 -1
  254. package/src/components/RebaseNavigation.tsx +4 -3
  255. package/src/components/ReferenceTable/SelectionTableBinding.tsx +6 -5
  256. package/src/components/ReferenceWidget.tsx +3 -2
  257. package/src/components/SelectableTable/SelectableTable.tsx +3 -3
  258. package/src/components/SelectableTable/SelectionStore.ts +1 -1
  259. package/src/components/SelectableTable/filters/FilterFieldBinding.tsx +9 -6
  260. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +3 -2
  261. package/src/components/SideDialogs.tsx +2 -2
  262. package/src/components/SidePanelBinding.tsx +5 -5
  263. package/src/components/SidePanelProvider.tsx +1 -1
  264. package/src/components/admin/CreationResultDialog.tsx +1 -1
  265. package/src/components/common/default_entity_actions.tsx +3 -2
  266. package/src/components/field_configs.tsx +30 -29
  267. package/src/components/history/EntityHistoryEntry.tsx +3 -2
  268. package/src/components/history/EntityHistoryView.tsx +1 -1
  269. package/src/components/history/LastEditedByFormAction.tsx +1 -1
  270. package/src/components/history/LastEditedByIndicator.tsx +3 -2
  271. package/src/contexts/BreacrumbsContext.tsx +1 -1
  272. package/src/contexts/SideDialogsControllerContext.tsx +1 -1
  273. package/src/contexts/SidePanelControllerContext.tsx +1 -1
  274. package/src/data_export/export/ExportCollectionAction.tsx +5 -4
  275. package/src/data_import/components/ImportSaveInProgress.tsx +4 -3
  276. package/src/data_import/import/ImportCollectionAction.tsx +3 -2
  277. package/src/data_import/utils/data.ts +3 -2
  278. package/src/form/EntityForm.tsx +19 -10
  279. package/src/form/EntityFormActions.tsx +3 -3
  280. package/src/form/EntityFormBinding.tsx +6 -4
  281. package/src/form/PropertyFieldBinding.tsx +15 -12
  282. package/src/form/components/FieldHelperText.tsx +1 -1
  283. package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +5 -4
  284. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +7 -6
  285. package/src/form/field_bindings/BlockFieldBinding.tsx +4 -4
  286. package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
  287. package/src/form/field_bindings/KeyValueFieldBinding.tsx +1 -1
  288. package/src/form/field_bindings/MapFieldBinding.tsx +7 -7
  289. package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +1 -1
  290. package/src/form/field_bindings/MultipleRelationFieldBinding.tsx +2 -2
  291. package/src/form/field_bindings/ReferenceFieldBinding.tsx +4 -3
  292. package/src/form/field_bindings/RelationFieldBinding.tsx +2 -2
  293. package/src/form/field_bindings/RepeatFieldBinding.tsx +5 -5
  294. package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
  295. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +2 -2
  296. package/src/form/field_bindings/SwitchFieldBinding.tsx +1 -1
  297. package/src/form/field_bindings/TextFieldBinding.tsx +8 -8
  298. package/src/form/field_bindings/UserSelectFieldBinding.tsx +1 -1
  299. package/src/form/form_utils.ts +5 -3
  300. package/src/form/useClearRestoreValue.tsx +1 -1
  301. package/src/form/validation.ts +1 -1
  302. package/src/hooks/index.ts +1 -0
  303. package/src/hooks/navigation/contexts/CollectionRegistryContext.tsx +3 -2
  304. package/src/hooks/navigation/contexts/NavigationStateContext.tsx +1 -1
  305. package/src/hooks/navigation/contexts/UrlContext.tsx +1 -1
  306. package/src/hooks/navigation/useBuildCollectionRegistryController.tsx +19 -15
  307. package/src/hooks/navigation/useBuildNavigationStateController.tsx +8 -6
  308. package/src/hooks/navigation/useBuildUrlController.tsx +2 -2
  309. package/src/hooks/navigation/useNavigationResolution.ts +15 -21
  310. package/src/hooks/navigation/useResolvedCollections.ts +10 -9
  311. package/src/hooks/navigation/useResolvedViews.tsx +4 -2
  312. package/src/hooks/navigation/useTopLevelNavigation.ts +3 -2
  313. package/src/hooks/navigation/utils.ts +6 -5
  314. package/src/hooks/useBreadcrumbsController.tsx +1 -1
  315. package/src/hooks/useBuildSidePanel.tsx +9 -12
  316. package/src/hooks/useCMSContext.tsx +8 -4
  317. package/src/hooks/useResolvedNavigationFrom.tsx +7 -5
  318. package/src/hooks/useResolvedUsers.ts +143 -0
  319. package/src/hooks/useSelectionDialog.tsx +3 -2
  320. package/src/hooks/useSideDialogsController.tsx +1 -1
  321. package/src/hooks/useSidePanel.tsx +1 -1
  322. package/src/index.ts +2 -1
  323. package/src/preview/PropertyPreview.tsx +11 -11
  324. package/src/preview/components/ReferencePreview.tsx +6 -5
  325. package/src/preview/components/RelationPreview.tsx +6 -5
  326. package/src/preview/components/UrlComponentPreview.tsx +1 -1
  327. package/src/preview/components/UserPreview.tsx +13 -4
  328. package/src/preview/property_previews/ArrayOfReferencesPreview.tsx +1 -1
  329. package/src/preview/property_previews/ArrayOfRelationsPreview.tsx +1 -1
  330. package/src/preview/property_previews/SkeletonPropertyComponent.tsx +2 -2
  331. package/src/preview/property_previews/StringPropertyPreview.tsx +19 -13
  332. package/src/preview/util.ts +1 -1
  333. package/src/routes/CustomViewRoute.tsx +1 -1
  334. package/src/routes/RebaseRoute.tsx +7 -5
  335. package/src/types/components/EntityFormActionsProps.tsx +3 -2
  336. package/src/types/components/EntityFormProps.tsx +4 -3
  337. package/src/types/fields.tsx +3 -2
  338. package/src/util/dataControllerAdapter.ts +2 -1
  339. package/src/util/entity_actions.ts +1 -1
  340. package/src/util/navigation_utils.ts +4 -13
  341. package/src/util/previews.ts +43 -53
  342. package/src/util/propertyConfigMapper.ts +7 -7
  343. package/src/util/property_utils.tsx +5 -4
  344. package/src/util/resolutions.ts +1 -1
  345. package/src/util/view_mode.ts +4 -3
  346. package/dist/CollectionEditorDialog-BOlKGGg7.js.map +0 -1
  347. package/dist/PropertyEditView-i51tFOfM.js.map +0 -1
  348. package/dist/RouterCollectionsStudioView-Dh4W53PU.js.map +0 -1
  349. package/dist/export-BM6HPujv.js.map +0 -1
  350. package/dist/history-CtIPJxvQ.js.map +0 -1
  351. package/dist/import-DzQnT03v.js.map +0 -1
  352. package/dist/util-XFwQ9FEc.js.map +0 -1
@@ -2,8 +2,8 @@ import * as React$1 from "react";
2
2
  import React, { Suspense, createContext, createElement, forwardRef, lazy, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
3
3
  import { deepEqual } from "fast-equals";
4
4
  import { Alert, AlertCircleIcon, AlertTriangleIcon, AlignLeftIcon, ArrowLeftIcon, ArrowRightToLineIcon, Badge, BooleanSwitchWithLabel, Button, CHIP_COLORS, CalendarIcon, Card, CardView, CenteredView, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, Chip, CircleIcon, CircularProgress, CircularProgressCenter, CodeIcon, Collapse, ColumnsIcon, CopyIcon, DateTimeField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, ExpandablePanel, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, FileUpload, FilterChip, FilterIcon, FilterXIcon, FlagIcon, FolderUpIcon, FunctionSquareIcon, GlobeIcon, HandleIcon, HashIcon, HistoryIcon, IconButton, ImageOffIcon, KanbanIcon, KanbanView, KeyRoundIcon, Label, LayoutGridIcon, LinkIcon, ListIcon, ListOrderedIcon, ListView, LoaderIcon, LoadingButton, MailIcon, Markdown, Maximize2Icon, Menu, MenuItem, MinusIcon, MoreVerticalIcon, MultiSelect, MultiSelectItem, PencilIcon, PlusIcon, Popover, PopoverPrimitive, Portal, QuoteIcon, RadioGroup, RadioGroupItem, RefreshCwIcon, RepeatIcon, ResizablePanels, Rows3Icon, SearchBar, SearchIcon, Select, SelectItem, Separator, SettingsIcon, Sheet, Skeleton, Tab, Table, TableBody, TableCell, TableHeader, TableIcon, TableRow, TableView, Tabs, TextField, TextIcon, TextareaAutosize, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UploadIcon, UserIcon, VirtualTableDateField, VirtualTableInput, VirtualTableInput as VirtualTableInput$1, VirtualTableNumberInput, VirtualTableSwitch, VoteIcon, XCircleIcon, XIcon, cls, coolIconKeys, createVirtualTableSelectionStore, debounce, defaultBorderMixin, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, fieldBackgroundInvisibleMixin, fieldBackgroundMixin, focusedDisabled, getColorSchemeForSeed, iconSize, lucideIcons, paperMixin, useDebouncedCallback, useInjectStyles, useOutsideAlerter } from "@rebasepro/ui";
5
- import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, addInitialSlash, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getCollectionBySlugWithin, getCollectionPathsCombinations, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getEntityImagePreviewPropertyKey, getLabelOrConfigFrom, getLastSegment as getLastSegment$1, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getReferenceFrom, getRelationFrom, getSubcollections, getTableName, isHidden, isPropertyBuilder, isReadOnly, normalizeToEntityRelation, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, removeTrailingSlash as removeTrailingSlash$1, resolveArrayProperties, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveDefaultSelectedView, resolveEnumValues, resolveFilterOperators, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource } from "@rebasepro/common";
6
- import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH, CollectionScopeProvider, DEFAULT_PAGE_SIZE, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, IconForView, PluginProviderStack, StorageSourceContext, UnsavedChangesDialog, UserDisplay, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, flattenKeys, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getFormFieldKeys, getIcon, getRelationIncludeParams, getRowHeight, iconsSearch, removeEntityFromCache, removeEntityFromMemoryCache, resolveComponentRef, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAnalyticsController, useApiConfig, useAuthController, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataTableController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseClient, useRebaseContext, useRelationSelector, useResolvedComponent, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/app";
5
+ import { CollectionRegistry, DEFAULT_ONE_OF_TYPE, DEFAULT_ONE_OF_VALUE, canReadCollection, enumToObjectEntries, getArrayResolvedProperties, getDefaultValueFor, getDefaultValueFortype, getDefaultValuesFor, getLabelOrConfigFrom, getReferenceFrom, getRelationFrom, getSubcollections, getTableName, isPropertyBuilder, normalizeToEntityRelation, resolveArrayProperties, resolveEnumValues, resolveProperty, resolveRelationProperty, resolveStorageFilenameString, resolveStoragePathString, resolveStorageSource } from "@rebasepro/common";
6
+ import { ADDITIONAL_TAB_WIDTH, CONTAINER_FULL_WIDTH, CollectionScopeProvider, DEFAULT_PAGE_SIZE, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, IconForView, PluginProviderStack, StorageSourceContext, UnsavedChangesDialog, UserDisplay, addInitialSlash, buildEnumLabel, createFormexStub, deleteEntityWithCallbacks, flattenKeys, getAdminSubcollections, getCollectionBySlugWithin, getCollectionPathsCombinations, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getEntityImagePreviewPropertyKey, getFormFieldKeys, getIcon, getLastSegment as getLastSegment$1, getLocalChangesBackup, getNavigationEntriesFromPath, getParentReferencesFromPath, getRelationIncludeParams, getRowHeight, getTitlePropertyCandidates, getTitlePropertyKey, getTitlePropertyKeyForValues, iconsSearch, isHidden, isReadOnly, looksLikeIdentifierValue, removeEntityFromCache, removeEntityFromMemoryCache, removeInitialAndTrailingSlashes, removeInitialAndTrailingSlashes as removeInitialAndTrailingSlashes$1, removeInitialSlash, removeTrailingSlash, removeTrailingSlash as removeTrailingSlash$1, resolveCollectionPathIds, resolveCollectionPathIds as resolveCollectionPathIds$1, resolveComponentRef, resolveDefaultSelectedView, resolveFilterOperators, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAnalyticsController, useApiConfig, useAuthController, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataTableController, useFetch, useLargeLayout, useModeController, useNavigationBlocker, usePermissions, useRebaseClient, useRebaseContext, useRelationSelector, useResolvedComponent, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence } from "@rebasepro/app";
7
7
  import { Field, Formex, getIn, setIn, useCreateFormex, useFormex } from "@rebasepro/forms";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { defaultDateFormat, getHashValue, getValueInPath, hydrateRegExp, isObject, mergeDeep, randomString, toArray } from "@rebasepro/utils";
@@ -23,6 +23,7 @@ import ExcelJS from "exceljs";
23
23
  import { inferTypeFromValue } from "@rebasepro/inference";
24
24
  import { Highlight, themes } from "prism-react-renderer";
25
25
  import { generateKeyBetween, generateNKeysBetween } from "fractional-indexing";
26
+ import { resolveAdminCollection } from "@rebasepro/admin-types";
26
27
  //#region src/form/components/FormEntry.tsx
27
28
  function FormEntry({ propertyKey, widthPercentage = 100, children }) {
28
29
  return /* @__PURE__ */ jsx("div", {
@@ -328,7 +329,7 @@ function SkeletonPropertyComponent({ property, size }) {
328
329
  let content;
329
330
  if (property.type === "string") {
330
331
  const stringProperty = property;
331
- if (stringProperty.ui?.url) content = renderUrlComponent(stringProperty, size);
332
+ if (stringProperty.admin?.urlPreview) content = renderUrlComponent(stringProperty, size);
332
333
  else if (stringProperty.storage) content = renderSkeletonImageThumbnail(size);
333
334
  else content = renderSkeletonText();
334
335
  } else if (property.type === "array") {
@@ -438,7 +439,7 @@ function renderReference() {
438
439
  });
439
440
  }
440
441
  function renderUrlComponent(property, size = "large") {
441
- if (typeof property.ui?.url === "boolean") return /* @__PURE__ */ jsxs("div", {
442
+ if (typeof property.admin?.urlPreview === "boolean") return /* @__PURE__ */ jsxs("div", {
442
443
  style: { display: "flex" },
443
444
  children: [renderSkeletonIcon(), renderSkeletonText()]
444
445
  });
@@ -540,29 +541,35 @@ function EnumValuesChip({ enumValues, enumKey, size, className, children }) {
540
541
  /**
541
542
  * @group Preview components
542
543
  */
543
- function StringPropertyPreview({ propertyKey, value, property, size }) {
544
+ function StringPropertyPreview({ propertyKey, value, property, size, textOnly }) {
544
545
  const strValue = value;
545
546
  if (property.enum) return /* @__PURE__ */ jsx(EnumValuesChip, {
546
547
  enumKey: strValue,
547
548
  enumValues: property.enum,
548
549
  size
549
550
  });
550
- else if (property.ui?.previewAsTag) return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Chip, {
551
+ else if (property.admin?.previewAsTag) return /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(Chip, {
551
552
  colorScheme: getColorSchemeForSeed(propertyKey ?? ""),
552
553
  size,
553
554
  children: strValue
554
555
  }) });
555
- else if (property.ui?.url) return /* @__PURE__ */ jsx(UrlComponentPreview, {
556
+ else if (property.admin?.urlPreview) return /* @__PURE__ */ jsx(UrlComponentPreview, {
556
557
  size,
557
558
  url: strValue,
558
- previewType: typeof property.ui?.url === "string" ? property.ui?.url : void 0
559
+ previewType: typeof property.admin?.urlPreview === "string" ? property.admin?.urlPreview : void 0
559
560
  });
560
561
  else {
561
562
  if (!strValue) return /* @__PURE__ */ jsx(Fragment, {});
562
- const lines = strValue.split("\n");
563
- return strValue && strValue.includes("\n") ? /* @__PURE__ */ jsx("div", {
564
- className: cls("overflow-x-scroll overflow-hidden", size === "small" ? "text-sm" : ""),
565
- children: lines.map((str, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx("span", { children: str }), index !== lines.length - 1 && /* @__PURE__ */ jsx("br", {})] }, `string_preview_${index}`))
563
+ if (textOnly) {
564
+ const singleLine = strValue.replace(/\s*\n\s*/g, " ");
565
+ return size === "small" ? /* @__PURE__ */ jsx("span", {
566
+ className: "text-sm",
567
+ children: singleLine
568
+ }) : /* @__PURE__ */ jsx(Fragment, { children: singleLine });
569
+ }
570
+ return strValue.includes("\n") ? /* @__PURE__ */ jsx("div", {
571
+ className: cls("whitespace-pre-line line-clamp-3 overflow-hidden", size === "small" ? "text-sm" : ""),
572
+ children: strValue
566
573
  }) : size === "small" ? /* @__PURE__ */ jsx("span", {
567
574
  className: "text-sm",
568
575
  children: strValue
@@ -639,9 +646,9 @@ function getDefaultIconForProperty(property) {
639
646
  switch (property.type) {
640
647
  case "string":
641
648
  if (property.storage) return UploadIcon;
642
- if (property.ui?.url) return GlobeIcon;
649
+ if (property.admin?.urlPreview) return GlobeIcon;
643
650
  if (property.email) return MailIcon;
644
- if (property.ui?.multiline || property.ui?.markdown) return AlignLeftIcon;
651
+ if (property.admin?.multiline || property.admin?.markdown) return AlignLeftIcon;
645
652
  return TextIcon;
646
653
  case "number": return HashIcon;
647
654
  case "boolean": return FlagIcon;
@@ -742,7 +749,7 @@ function getDefaultPropertiesOrder(collection) {
742
749
  //#region src/util/previews.ts
743
750
  function isHiddenProperty(property) {
744
751
  if (!property) return false;
745
- return Boolean(property.ui?.hideFromCollection);
752
+ return Boolean(property.admin?.hideFromCollection);
746
753
  }
747
754
  /**
748
755
  * Returns true when the property holds file-storage content (single image,
@@ -752,10 +759,10 @@ function isHiddenProperty(property) {
752
759
  function isStorageProperty$1(property) {
753
760
  if (!property) return false;
754
761
  if (property.type === "string" && property.storage) return true;
755
- if (property.type === "string" && property.ui?.url === "image") return true;
762
+ if (property.type === "string" && property.admin?.urlPreview === "image") return true;
756
763
  if (property.type === "array" && property.of && !Array.isArray(property.of)) {
757
764
  const inner = property.of;
758
- if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return true;
765
+ if (inner.type === "string" && (inner.storage || inner.admin?.urlPreview === "image")) return true;
759
766
  }
760
767
  return false;
761
768
  }
@@ -776,38 +783,34 @@ function getEntityPreviewKeys(authController, targetCollection, fields, previewP
776
783
  }).slice(0, limit);
777
784
  }
778
785
  }
786
+ /**
787
+ * The property that fills the title slot for a collection.
788
+ *
789
+ * Ranking lives in `@rebasepro/common` so every surface (list rows, cards,
790
+ * board cards, detail header, relation chips) agrees on what an entity is
791
+ * called. Identifiers are excluded from the property *schema* — primary keys,
792
+ * foreign keys, UUID columns — not from the key name.
793
+ */
779
794
  function getEntityTitlePropertyKey(collection, propertyConfigs) {
780
- if (collection.titleProperty) return collection.titleProperty;
781
- const hasExplicitOrder = !!collection.propertiesOrder;
782
- const orderToSearch = collection.propertiesOrder || Object.keys(collection.properties);
783
- if (hasExplicitOrder) for (const key of orderToSearch) {
784
- const property = collection.properties[key];
785
- if (property && !isPropertyBuilder(property)) {
786
- const prop = property;
787
- if (prop && typeof prop === "object" && "isId" in prop && Boolean(prop.isId) || key === "id" || isHiddenProperty(prop)) continue;
788
- if (prop.type === "relation" || prop.type === "string" && !isStorageProperty$1(prop)) return key;
789
- }
790
- }
791
- let firstStringCandidate;
792
- for (const key of orderToSearch) {
793
- const property = collection.properties[key];
794
- if (property && !isPropertyBuilder(property)) {
795
- const prop = property;
796
- if (isHiddenProperty(prop)) continue;
797
- if (prop.type === "string" && !prop.ui?.multiline && !prop.ui?.markdown && !prop.storage && !prop.isId) {
798
- if (!firstStringCandidate) firstStringCandidate = key;
799
- const lowerKey = key.toLowerCase();
800
- if ([
801
- "name",
802
- "title",
803
- "label",
804
- "displayname",
805
- "username"
806
- ].includes(lowerKey)) return key;
807
- }
808
- }
809
- }
810
- return firstStringCandidate;
795
+ return getTitlePropertyKey(collection);
796
+ }
797
+ /**
798
+ * Same as {@link getEntityTitlePropertyKey}, but skips candidates that carry
799
+ * no readable value for this particular entity (empty, or an opaque id).
800
+ */
801
+ function getEntityTitlePropertyKeyForEntity(collection, values, entityId) {
802
+ return getTitlePropertyKeyForValues(collection, values, entityId);
803
+ }
804
+ /**
805
+ * True when a property key points at a user picker, whose stored value is an
806
+ * auth user id that has to be resolved before it can be displayed.
807
+ */
808
+ function isUserSelectProperty(collection, propertyKey) {
809
+ if (!propertyKey) return false;
810
+ const property = collection.properties[propertyKey];
811
+ if (!property || isPropertyBuilder(property)) return false;
812
+ const prop = property;
813
+ return prop.type === "string" && Boolean(prop.userSelect);
811
814
  }
812
815
  /**
813
816
  * Attempt to turn a title value (which might be a relation, reference, date, array, or other complex object)
@@ -895,7 +898,7 @@ function EntityPreviewBindingData({ actions, collection: collectionProp, preview
895
898
  customizationController.propertyConfigs
896
899
  ]);
897
900
  if (!collection) return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ErrorView, { error: `Collection not found: ${entity.path}` }) });
898
- const titleProperty = includeTitle ? getEntityTitlePropertyKey(collection, customizationController.propertyConfigs) : void 0;
901
+ const titleProperty = includeTitle ? getEntityTitlePropertyKeyForEntity(collection, entity.values, entity.id) : void 0;
899
902
  const imagePropertyKey = includeImage ? getEntityImagePreviewPropertyKey(collection) : void 0;
900
903
  const imageProperty = imagePropertyKey ? collection.properties[imagePropertyKey] : void 0;
901
904
  const ofProp = imageProperty && "of" in imageProperty ? imageProperty.of : void 0;
@@ -1109,7 +1112,7 @@ function ReferencePreviewInternal(props) {
1109
1112
  }
1110
1113
  function ReferencePreviewExisting({ reference, collection, previewProperties, size, disabled, includeEntityLink, includeId, onClick, hover, textOnly }) {
1111
1114
  const ResolvedEntityPreview = useComponentOverride("EntityPreview", EntityPreviewBinding);
1112
- const customizationController = useCustomizationController();
1115
+ useCustomizationController();
1113
1116
  const { entity, dataLoading, dataLoadingError } = useFetch({
1114
1117
  path: reference.path,
1115
1118
  entityId: reference.id,
@@ -1152,7 +1155,7 @@ function ReferencePreviewExisting({ reference, collection, previewProperties, si
1152
1155
  });
1153
1156
  }
1154
1157
  if (textOnly) {
1155
- const titleProperty = getEntityTitlePropertyKey(collection, customizationController.propertyConfigs);
1158
+ const titleProperty = getEntityTitlePropertyKeyForEntity(collection, usedEntity.values, usedEntity.id);
1156
1159
  const titleValue = titleProperty ? getValueInPath(usedEntity.values, titleProperty) : void 0;
1157
1160
  return /* @__PURE__ */ jsx("span", {
1158
1161
  className: "truncate",
@@ -1189,7 +1192,7 @@ function ArrayOfReferencesPreview({ propertyKey, value, property, size }) {
1189
1192
  className: "mt-1 mb-1 w-full",
1190
1193
  children: /* @__PURE__ */ jsx(ReferencePreview, {
1191
1194
  disabled: !ofProperty.path,
1192
- previewProperties: ofProperty.ui?.previewProperties,
1195
+ previewProperties: ofProperty.admin?.previewProperties,
1193
1196
  size: childSize,
1194
1197
  reference,
1195
1198
  includeId: ofProperty.includeId,
@@ -1301,7 +1304,7 @@ function RelationPreviewInternal(props) {
1301
1304
  function RelationPreviewExisting({ relation, collection, previewProperties, size, disabled, includeEntityLink, includeId, onClick, hover, textOnly }) {
1302
1305
  const passedEntity = relation.data;
1303
1306
  const ResolvedEntityPreview = useComponentOverride("EntityPreview", EntityPreviewBinding);
1304
- const customizationController = useCustomizationController();
1307
+ useCustomizationController();
1305
1308
  const { entity, dataLoading, dataLoadingError } = useFetch({
1306
1309
  path: relation.path,
1307
1310
  entityId: passedEntity ? void 0 : relation.id,
@@ -1344,7 +1347,7 @@ function RelationPreviewExisting({ relation, collection, previewProperties, size
1344
1347
  });
1345
1348
  }
1346
1349
  if (textOnly) {
1347
- const titleProperty = getEntityTitlePropertyKey(collection, customizationController.propertyConfigs);
1350
+ const titleProperty = getEntityTitlePropertyKeyForEntity(collection, usedEntity.values, usedEntity.id);
1348
1351
  const titleValue = titleProperty ? getValueInPath(usedEntity.values, titleProperty) : void 0;
1349
1352
  return /* @__PURE__ */ jsx("span", {
1350
1353
  className: "truncate",
@@ -1382,7 +1385,7 @@ function ArrayOfRelationsPreview({ propertyKey, value, property, size }) {
1382
1385
  className: "w-full",
1383
1386
  children: /* @__PURE__ */ jsx(RelationPreview, {
1384
1387
  disabled: !ofProperty.relation,
1385
- previewProperties: ofProperty.ui?.previewProperties,
1388
+ previewProperties: ofProperty.admin?.previewProperties,
1386
1389
  size: "small",
1387
1390
  relation: entityRelation,
1388
1391
  includeId: ofProperty.includeId,
@@ -1679,21 +1682,129 @@ function NumberPropertyPreview({ value, property, size }) {
1679
1682
  });
1680
1683
  }
1681
1684
  //#endregion
1685
+ //#region src/hooks/useResolvedUsers.ts
1686
+ var caches = /* @__PURE__ */ new Map();
1687
+ function getCache(baseUrl) {
1688
+ let cache = caches.get(baseUrl);
1689
+ if (!cache) {
1690
+ cache = {
1691
+ users: /* @__PURE__ */ new Map(),
1692
+ pending: /* @__PURE__ */ new Map(),
1693
+ queue: /* @__PURE__ */ new Set()
1694
+ };
1695
+ caches.set(baseUrl, cache);
1696
+ }
1697
+ return cache;
1698
+ }
1699
+ async function fetchUsers(baseUrl, ids, token) {
1700
+ const resolved = /* @__PURE__ */ new Map();
1701
+ for (const id of ids) resolved.set(id, null);
1702
+ const params = new URLSearchParams({ ids: ids.join(",") });
1703
+ const response = await fetch(`${baseUrl}/api/users?${params}`, { headers: token ? { Authorization: `Bearer ${token}` } : {} });
1704
+ if (!response.ok) return resolved;
1705
+ const data = await response.json();
1706
+ const rows = data.users ?? data.data ?? [];
1707
+ for (const row of rows) {
1708
+ const uid = row.uid ?? row.id;
1709
+ if (!uid) continue;
1710
+ resolved.set(uid, {
1711
+ uid,
1712
+ email: row.email ?? "",
1713
+ displayName: row.displayName ?? row.display_name ?? null,
1714
+ photoURL: row.photoURL ?? row.photo_url ?? null,
1715
+ providerId: "custom",
1716
+ isAnonymous: false,
1717
+ roles: row.roles ?? []
1718
+ });
1719
+ }
1720
+ return resolved;
1721
+ }
1722
+ function requestUser(baseUrl, uid, getAuthToken) {
1723
+ const cache = getCache(baseUrl);
1724
+ const existing = cache.pending.get(uid);
1725
+ if (existing) return existing;
1726
+ cache.queue.add(uid);
1727
+ const promise = new Promise((resolve, reject) => {
1728
+ if (cache.flush) clearTimeout(cache.flush);
1729
+ cache.flush = setTimeout(async () => {
1730
+ const ids = [...cache.queue];
1731
+ cache.queue.clear();
1732
+ cache.flush = void 0;
1733
+ try {
1734
+ const resolved = await fetchUsers(baseUrl, ids, await getAuthToken?.());
1735
+ for (const id of ids) {
1736
+ cache.users.set(id, resolved.get(id) ?? null);
1737
+ cache.pending.delete(id);
1738
+ }
1739
+ resolve();
1740
+ } catch (error) {
1741
+ for (const id of ids) cache.pending.delete(id);
1742
+ reject(error);
1743
+ }
1744
+ }, 0);
1745
+ });
1746
+ cache.pending.set(uid, promise);
1747
+ return promise;
1748
+ }
1749
+ /**
1750
+ * The auth user behind a `userSelect` value, or `null` while it is loading or
1751
+ * when it cannot be resolved.
1752
+ */
1753
+ function useResolvedUser(uid) {
1754
+ const client = useRebaseClient();
1755
+ const { getAuthToken } = useAuthController();
1756
+ const baseUrl = client?.baseUrl;
1757
+ const [user, setUser] = useState(() => baseUrl && uid ? getCache(baseUrl).users.get(uid) ?? null : null);
1758
+ useEffect(() => {
1759
+ if (!baseUrl || !uid) {
1760
+ setUser(null);
1761
+ return;
1762
+ }
1763
+ const cache = getCache(baseUrl);
1764
+ if (cache.users.has(uid)) {
1765
+ setUser(cache.users.get(uid) ?? null);
1766
+ return;
1767
+ }
1768
+ let active = true;
1769
+ requestUser(baseUrl, uid, getAuthToken).then(() => {
1770
+ if (active) setUser(getCache(baseUrl).users.get(uid) ?? null);
1771
+ }).catch(() => {
1772
+ if (active) setUser(null);
1773
+ });
1774
+ return () => {
1775
+ active = false;
1776
+ };
1777
+ }, [
1778
+ baseUrl,
1779
+ uid,
1780
+ getAuthToken
1781
+ ]);
1782
+ return user;
1783
+ }
1784
+ /** Human-readable label for a resolved user. */
1785
+ function getUserLabel(user) {
1786
+ return user.displayName || user.email || user.uid;
1787
+ }
1788
+ //#endregion
1682
1789
  //#region src/preview/components/UserPreview.tsx
1683
1790
  /**
1684
1791
  * Preview component for displaying a user reference value.
1685
1792
  *
1686
- * Shows the raw user ID. Collection-based user management means
1687
- * user records are fetched through the standard data layer.
1793
+ * Resolves the stored auth user id to a name (or email) the same way a
1794
+ * relation resolves its target, and falls back to the raw id only while the
1795
+ * lookup is in flight or when the user cannot be resolved.
1688
1796
  *
1689
1797
  * @group Preview components
1690
1798
  */
1691
1799
  function UserPreview({ value }) {
1692
- if (typeof value !== "string" || !value) return /* @__PURE__ */ jsx(EmptyValue, {});
1800
+ const uid = typeof value === "string" && value ? value : void 0;
1801
+ const user = useResolvedUser(uid);
1802
+ if (!uid) return /* @__PURE__ */ jsx(EmptyValue, {});
1693
1803
  return /* @__PURE__ */ jsx(Typography, {
1694
1804
  variant: "caption",
1695
1805
  color: "secondary",
1696
- children: value
1806
+ className: "truncate",
1807
+ children: user ? getUserLabel(user) : uid
1697
1808
  });
1698
1809
  }
1699
1810
  //#endregion
@@ -1713,8 +1824,8 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1713
1824
  authController
1714
1825
  });
1715
1826
  if (property === null) content = /* @__PURE__ */ jsx(EmptyValue, {});
1716
- else if (property.ui?.Preview) {
1717
- const ResolvedPreview = resolveComponentRef(property.ui.Preview);
1827
+ else if (property.admin?.Preview) {
1828
+ const ResolvedPreview = resolveComponentRef(property.admin.Preview);
1718
1829
  if (ResolvedPreview) content = /* @__PURE__ */ jsx(Suspense, {
1719
1830
  fallback: null,
1720
1831
  children: createElement(ResolvedPreview, {
@@ -1724,7 +1835,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1724
1835
  size,
1725
1836
  height,
1726
1837
  width,
1727
- customProps: property.ui?.customProps
1838
+ customProps: property.admin?.customProps
1728
1839
  })
1729
1840
  });
1730
1841
  } else if (value === void 0 || value === null) content = /* @__PURE__ */ jsx(EmptyValue, {});
@@ -1740,20 +1851,20 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1740
1851
  fill,
1741
1852
  storagePathOrDownloadUrl: filePath
1742
1853
  });
1743
- } else if (stringProperty.ui?.url) {
1744
- if (typeof stringProperty.ui?.url === "boolean") content = /* @__PURE__ */ jsx(UrlComponentPreview, {
1854
+ } else if (stringProperty.admin?.urlPreview) {
1855
+ if (typeof stringProperty.admin?.urlPreview === "boolean") content = /* @__PURE__ */ jsx(UrlComponentPreview, {
1745
1856
  size: props.size,
1746
1857
  url: value,
1747
1858
  fill
1748
1859
  });
1749
- else if (typeof stringProperty.ui?.url === "string") content = /* @__PURE__ */ jsx(UrlComponentPreview, {
1860
+ else if (typeof stringProperty.admin?.urlPreview === "string") content = /* @__PURE__ */ jsx(UrlComponentPreview, {
1750
1861
  size: props.size,
1751
1862
  url: value,
1752
1863
  interactive,
1753
1864
  fill,
1754
- previewType: stringProperty.ui?.url
1865
+ previewType: stringProperty.admin?.urlPreview
1755
1866
  });
1756
- } else if (stringProperty.ui?.markdown) content = /* @__PURE__ */ jsx(Markdown, {
1867
+ } else if (stringProperty.admin?.markdown) content = /* @__PURE__ */ jsx(Markdown, {
1757
1868
  source: value,
1758
1869
  size: "small"
1759
1870
  });
@@ -1831,7 +1942,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1831
1942
  else content = buildWrongValueType(propertyKey, property.type, value);
1832
1943
  else if (property.type === "reference") if (typeof property.path === "string") if (typeof value === "object" && value !== null && "isEntityReference" in value && value.isEntityReference()) content = /* @__PURE__ */ jsx(ReferencePreview, {
1833
1944
  disabled: !property.path,
1834
- previewProperties: property.ui?.previewProperties,
1945
+ previewProperties: property.admin?.previewProperties,
1835
1946
  includeId: property.includeId,
1836
1947
  includeEntityLink: property.includeEntityLink,
1837
1948
  size: props.size,
@@ -1850,7 +1961,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1850
1961
  className: "w-full",
1851
1962
  children: /* @__PURE__ */ jsx(RelationPreview, {
1852
1963
  disabled: !property.relation,
1853
- previewProperties: property.ui?.previewProperties,
1964
+ previewProperties: property.admin?.previewProperties,
1854
1965
  includeId: property.includeId,
1855
1966
  includeEntityLink: property.includeEntityLink,
1856
1967
  size: "small",
@@ -1864,7 +1975,7 @@ var PropertyPreview = React.memo(function PropertyPreview(props) {
1864
1975
  const relationValue = normalizeToEntityRelation(value, "relation");
1865
1976
  if (relationValue) content = /* @__PURE__ */ jsx(RelationPreview, {
1866
1977
  disabled: !property.relation,
1867
- previewProperties: property.ui?.previewProperties,
1978
+ previewProperties: property.admin?.previewProperties,
1868
1979
  includeId: property.includeId,
1869
1980
  includeEntityLink: property.includeEntityLink,
1870
1981
  size: props.size,
@@ -1972,7 +2083,7 @@ function FieldHelperText({ error, showError, property, includeDescription = true
1972
2083
  className: "ml-3.5 text-red-500 dark:text-red-500",
1973
2084
  children: displayError
1974
2085
  });
1975
- const disabledTooltip = typeof property.ui?.disabled === "object" ? property.ui?.disabled.disabledMessage : void 0;
2086
+ const disabledTooltip = typeof property.admin?.disabled === "object" ? property.admin?.disabled.disabledMessage : void 0;
1976
2087
  return /* @__PURE__ */ jsx("div", {
1977
2088
  className: "flex ml-3.5 mt-1",
1978
2089
  children: /* @__PURE__ */ jsx(Typography, {
@@ -2032,7 +2143,7 @@ function ReadOnlyFieldBinding({ propertyKey, value, error, showError, minimalist
2032
2143
  function useClearRestoreValue({ property, value, setValue }) {
2033
2144
  const clearedValueRef = useRef(null);
2034
2145
  useEffect(() => {
2035
- if (typeof property.ui?.disabled === "object" && Boolean(property.ui?.disabled.clearOnDisabled)) {
2146
+ if (typeof property.admin?.disabled === "object" && Boolean(property.admin?.disabled.clearOnDisabled)) {
2036
2147
  if (value != null) {
2037
2148
  clearedValueRef.current = value;
2038
2149
  setValue(null);
@@ -2054,7 +2165,7 @@ function useClearRestoreValue({ property, value, setValue }) {
2054
2165
  */
2055
2166
  function ArrayCustomShapedFieldBinding({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, customProps, minimalistView: minimalistViewProp, property, includeDescription, context, disabled }) {
2056
2167
  const authController = useAuthController();
2057
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
2168
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
2058
2169
  const resolvedProperties = getArrayResolvedProperties({
2059
2170
  propertyValue: value,
2060
2171
  propertyKey,
@@ -2062,7 +2173,7 @@ function ArrayCustomShapedFieldBinding({ propertyKey, value, error, showError, i
2062
2173
  ignoreMissingFields: false,
2063
2174
  authController
2064
2175
  });
2065
- const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
2176
+ const expanded = property.admin?.expanded === void 0 ? true : property.admin?.expanded;
2066
2177
  useClearRestoreValue({
2067
2178
  property,
2068
2179
  value,
@@ -2084,7 +2195,7 @@ function ArrayCustomShapedFieldBinding({ propertyKey, value, error, showError, i
2084
2195
  ]
2085
2196
  })] });
2086
2197
  const body = (resolvedProperties ?? []).map((childProperty, index) => {
2087
- const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.ui?.disabled);
2198
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.admin?.disabled);
2088
2199
  return /* @__PURE__ */ jsx("div", {
2089
2200
  className: "pb-4",
2090
2201
  children: /* @__PURE__ */ jsx(PropertyFieldBinding, {
@@ -3577,7 +3688,7 @@ function TableRelationSelectorField({ disabled = false, internalValue, updateVal
3577
3688
  //#endregion
3578
3689
  //#region src/components/CollectionTableBinding/table_bindings.tsx
3579
3690
  function isStorageProperty(property) {
3580
- if (property.type === "string" && property.ui?.markdown) return false;
3691
+ if (property.type === "string" && property.admin?.markdown) return false;
3581
3692
  if (property.type === "string" && property.storage) return true;
3582
3693
  if (property.type === "array") if (Array.isArray(property.of)) return false;
3583
3694
  else return property.of?.type === "string" && property.of?.storage;
@@ -3662,8 +3773,8 @@ function getTableBindingForProperty(property, selected) {
3662
3773
  }),
3663
3774
  fullHeight: true
3664
3775
  };
3665
- else if (stringProperty.ui?.markdown || !stringProperty.storage) {
3666
- const multiline = Boolean(stringProperty.ui?.multiline) || Boolean(stringProperty.ui?.markdown);
3776
+ else if (stringProperty.admin?.markdown || !stringProperty.storage) {
3777
+ const multiline = Boolean(stringProperty.admin?.multiline) || Boolean(stringProperty.admin?.markdown);
3667
3778
  return {
3668
3779
  Component: ({ error, validationError, disabled, selected, internalValue, updateValue }) => /* @__PURE__ */ jsx(VirtualTableInput, {
3669
3780
  error: validationError ?? error,
@@ -3712,7 +3823,7 @@ function getTableBindingForProperty(property, selected) {
3712
3823
  size,
3713
3824
  path: property.path,
3714
3825
  multiselect: false,
3715
- previewProperties: property.ui?.previewProperties,
3826
+ previewProperties: property.admin?.previewProperties,
3716
3827
  includeId: property.includeId,
3717
3828
  includeEntityLink: property.includeEntityLink,
3718
3829
  title: property.name ?? propertyKey,
@@ -3722,7 +3833,7 @@ function getTableBindingForProperty(property, selected) {
3722
3833
  allowScroll: false
3723
3834
  };
3724
3835
  } else if (property.type === "relation") {
3725
- if (property.relation) if (property.ui?.widget === "dialog") return {
3836
+ if (property.relation) if (property.admin?.widget === "dialog") return {
3726
3837
  Component: RelationDialogBindingComponent,
3727
3838
  allowScroll: false
3728
3839
  };
@@ -3764,7 +3875,7 @@ function getTableBindingForProperty(property, selected) {
3764
3875
  size,
3765
3876
  multiselect: true,
3766
3877
  path: refOfProp.path,
3767
- previewProperties: refOfProp.ui?.previewProperties,
3878
+ previewProperties: refOfProp.admin?.previewProperties,
3768
3879
  title: arrayProperty.name,
3769
3880
  fixedFilter: refOfProp.fixedFilter,
3770
3881
  includeId: refOfProp.includeId,
@@ -3787,7 +3898,7 @@ function RelationDialogBindingComponent({ propertyKey, internalValue, updateValu
3787
3898
  size,
3788
3899
  multiselect: false,
3789
3900
  relation: relProp.relation,
3790
- previewProperties: relProp.ui?.previewProperties,
3901
+ previewProperties: relProp.admin?.previewProperties,
3791
3902
  includeId: relProp.includeId,
3792
3903
  includeEntityLink: relProp.includeEntityLink,
3793
3904
  title: relProp.name ?? propertyKey,
@@ -3889,7 +4000,7 @@ function getZodStringSchema({ property, parentProperty, customFieldValidator, na
3889
4000
  if (validation.lowercase) schema = z.preprocess((v) => typeof v === "string" ? v.toLowerCase() : v, schema);
3890
4001
  if (validation.uppercase) schema = z.preprocess((v) => typeof v === "string" ? v.toUpperCase() : v, schema);
3891
4002
  if (property.email) schema = schema.refine((value) => value == null || typeof value === "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value), { message: `${property.name} must be an email` });
3892
- if (property.ui?.url) if (!property.storage || property.storage?.storeUrl) schema = schema.refine((value) => {
4003
+ if (property.url) if (!property.storage || property.storage?.storeUrl) schema = schema.refine((value) => {
3893
4004
  if (value == null) return true;
3894
4005
  try {
3895
4006
  new URL(value);
@@ -4196,11 +4307,11 @@ var PropertyTableCell = React.memo(function PropertyTableCell({ propertyKey, cus
4196
4307
  const onValueUpdated = useCallback(() => {
4197
4308
  setSavedTimestamp(Date.now());
4198
4309
  }, []);
4199
- const customField = Boolean(property.ui?.Field);
4200
- const customPreview = Boolean(property.ui?.Preview);
4310
+ const customField = Boolean(property.admin?.Field);
4311
+ const customPreview = Boolean(property.admin?.Preview);
4201
4312
  const readOnlyProperty = isReadOnly(property);
4202
- const disabledTooltip = typeof property.ui?.disabled === "object" ? property.ui?.disabled.disabledMessage : void 0;
4203
- const disabled = readonly || disabledProp || Boolean(property.ui?.disabled);
4313
+ const disabledTooltip = typeof property.admin?.disabled === "object" ? property.admin?.disabled.disabledMessage : void 0;
4314
+ const disabled = readonly || disabledProp || Boolean(property.admin?.disabled);
4204
4315
  const validation = useMemo(() => mapPropertyToZod({
4205
4316
  property,
4206
4317
  entityId: entity.id,
@@ -4654,12 +4765,12 @@ function getTableCellAlignment(property) {
4654
4765
  else return "left";
4655
4766
  }
4656
4767
  function getTablePropertyColumnWidth(property) {
4657
- if (property.ui?.columnWidth) return property.ui?.columnWidth;
4658
- if (property.type === "string") if (property.ui?.url) return 280;
4768
+ if (property.admin?.columnWidth) return property.admin?.columnWidth;
4769
+ if (property.type === "string") if (property.admin?.urlPreview) return 280;
4659
4770
  else if (property.storage) return 160;
4660
4771
  else if (property.enum) return 200;
4661
- else if (property.ui?.multiline) return 300;
4662
- else if (property.ui?.markdown) return 300;
4772
+ else if (property.admin?.multiline) return 300;
4773
+ else if (property.admin?.markdown) return 300;
4663
4774
  else if (property.email) return 200;
4664
4775
  else return 200;
4665
4776
  else if (property.type === "array") {
@@ -5256,14 +5367,14 @@ function RelationFilterField({ value, setValue, relation, name: _name, hidden: _
5256
5367
  * Filters dialog.
5257
5368
  *
5258
5369
  * Resolution order:
5259
- * 1. `property.ui.Filter` — per-property replacement (rendered even when the
5370
+ * 1. `property.admin.Filter` — per-property replacement (rendered even when the
5260
5371
  * resolved operator list is empty; the component owns filterability).
5261
5372
  * 2. `components["Collection.FilterField"]` — collection-level or app-level
5262
5373
  * override (wrap mode supported via `OriginalComponent`).
5263
5374
  * 3. Built-in field dispatched by property type.
5264
5375
  *
5265
5376
  * The operators handed to the field are the intersection of the engine's
5266
- * capabilities, the property-type defaults, and `property.ui.filterOperators`
5377
+ * capabilities, the property-type defaults, and `property.admin.filterOperators`
5267
5378
  * (see `resolveFilterOperators`). When that intersection is empty and no
5268
5379
  * per-property `Filter` is set, nothing is rendered.
5269
5380
  *
@@ -5275,7 +5386,7 @@ function FilterFieldBinding({ propertyKey, property, engine, value, setValue, hi
5275
5386
  const baseProperty = isArray ? Array.isArray(ofVal) ? ofVal[0] : ofVal : property;
5276
5387
  const scopeCollection = useCollectionScope();
5277
5388
  const ResolvedFilterField = useComponentOverride("Collection.FilterField", DefaultFilterField);
5278
- const PropertyFilter = useResolvedComponent(baseProperty?.ui?.Filter);
5389
+ const PropertyFilter = useResolvedComponent(baseProperty?.admin?.Filter);
5279
5390
  if (!baseProperty) return null;
5280
5391
  const operators = resolveFilterOperators({
5281
5392
  property: baseProperty,
@@ -5317,7 +5428,7 @@ function DefaultFilterField({ propertyKey, property, isArray, operators, value,
5317
5428
  path: referenceProperty.path,
5318
5429
  title,
5319
5430
  includeId: referenceProperty.includeId,
5320
- previewProperties: referenceProperty.ui?.previewProperties,
5431
+ previewProperties: referenceProperty.admin?.previewProperties,
5321
5432
  hidden: hidden ?? false,
5322
5433
  setHidden: setHidden ?? (() => void 0)
5323
5434
  });
@@ -5379,7 +5490,7 @@ function DefaultFilterField({ propertyKey, property, isArray, operators, value,
5379
5490
  * a custom view. If you just need to create a default view you can do it
5380
5491
  * exclusively with config options.
5381
5492
  *
5382
- * If you want to bind a {@link CollectionConfig} to a table with the default
5493
+ * If you want to bind a {@link AdminCollection} to a table with the default
5383
5494
  * options you see in collections in the top level navigation, you can
5384
5495
  * check {@link CollectionViewBinding}.
5385
5496
  *
@@ -5522,7 +5633,7 @@ var SelectableTable = function SelectableTable({ onValueChange, cellRenderer, on
5522
5633
  * a custom view. If you just need to create a default view you can do it
5523
5634
  * exclusively with config options.
5524
5635
  *
5525
- * If you want to bind a {@link CollectionConfig} to a table with the default
5636
+ * If you want to bind a {@link AdminCollection} to a table with the default
5526
5637
  * options you see in collections in the top level navigation, you can
5527
5638
  * check {@link CollectionViewBinding}.
5528
5639
  *
@@ -5568,7 +5679,7 @@ var CollectionTableBinding = function CollectionTableBinding({ className, style,
5568
5679
  propertyKey,
5569
5680
  entity
5570
5681
  }) ?? columnCustom?.resolvedProperty;
5571
- if (!property?.ui?.disabled) disabled = false;
5682
+ if (!property?.admin?.disabled) disabled = false;
5572
5683
  if (!property) return null;
5573
5684
  return /* @__PURE__ */ jsx(ErrorBoundary, { children: entity ? /* @__PURE__ */ jsx(PropertyTableCell, {
5574
5685
  readonly: !inlineEditing,
@@ -7295,8 +7406,8 @@ function EditorCollectionAction({ path, parentCollectionSlugs, parentEntityIds,
7295
7406
  }
7296
7407
  //#endregion
7297
7408
  //#region src/components/CollectionViewBinding/CollectionViewActions.tsx
7298
- var ImportCollectionAction = lazy(() => import("./import-DzQnT03v.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
7299
- var ExportCollectionAction = lazy(() => import("./export-BM6HPujv.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
7409
+ var ImportCollectionAction = lazy(() => import("./import-36UcGe71.js").then((n) => n.t).then((m) => ({ default: m.ImportCollectionAction })));
7410
+ var ExportCollectionAction = lazy(() => import("./export-CavEbZVF.js").then((n) => n.t).then((m) => ({ default: m.ExportCollectionAction })));
7300
7411
  function CollectionViewActions({ collection, relativePath, parentCollectionSlugs, parentEntityIds, onNewClick, onMultipleDeleteClick, selectionEnabled, path, selectionController, tableController, collectionEntitiesCount, compact, children, openNewDocument }) {
7301
7412
  const context = useCMSContext();
7302
7413
  const { canCreate, canDelete } = usePermissions();
@@ -7408,7 +7519,8 @@ function CollectionViewActions({ collection, relativePath, parentCollectionSlugs
7408
7519
  * Pure function — call inside `useMemo`.
7409
7520
  */
7410
7521
  function resolveCollectionSlotKeys(collection, authController, propertyConfigs) {
7411
- const titleKey = getEntityTitlePropertyKey(collection, propertyConfigs);
7522
+ const titleKeyCandidates = getTitlePropertyCandidates(collection);
7523
+ const titleKey = titleKeyCandidates[0];
7412
7524
  const imageKey = getEntityImagePreviewPropertyKey(collection);
7413
7525
  let statusKey;
7414
7526
  if (!statusKey && collection.previewProperties) for (const key of collection.previewProperties) {
@@ -7468,11 +7580,12 @@ function resolveCollectionSlotKeys(collection, authController, propertyConfigs)
7468
7580
  const sortedPreviewKeys = hasExplicitOrder ? previewKeys : [...previewKeys].sort((a, b) => {
7469
7581
  const propA = collection.properties[a];
7470
7582
  const propB = collection.properties[b];
7471
- const scoreA = propA?.type === "string" ? propA.ui?.multiline ? 2 : 1 : 0;
7472
- return (propB?.type === "string" ? propB.ui?.multiline ? 2 : 1 : 0) - scoreA;
7583
+ const scoreA = propA?.type === "string" ? propA.admin?.multiline ? 2 : 1 : 0;
7584
+ return (propB?.type === "string" ? propB.admin?.multiline ? 2 : 1 : 0) - scoreA;
7473
7585
  });
7474
7586
  return {
7475
7587
  titleKey,
7588
+ titleKeyCandidates,
7476
7589
  imageKey,
7477
7590
  subtitleKey: sortedPreviewKeys.length > 0 ? sortedPreviewKeys[0] : void 0,
7478
7591
  relationKeys,
@@ -7499,6 +7612,24 @@ function resolveImageSlot(collection, imageKey, entity) {
7499
7612
  value: resolvedValue
7500
7613
  };
7501
7614
  }
7615
+ /**
7616
+ * Walk the collection's ranked title candidates and return the first one that
7617
+ * holds something a person can read for this entity. Candidates are already
7618
+ * ordered and free of identifier properties; this only rejects values —
7619
+ * empties, and strings that turn out to be an id at runtime.
7620
+ */
7621
+ function resolveEntityTitleKey(entity, candidates) {
7622
+ for (const key of candidates) {
7623
+ const value = getValueInPath(entity.values, key);
7624
+ if (value === void 0 || value === null || value === "") continue;
7625
+ if (typeof value === "string") {
7626
+ if (looksLikeIdentifierValue(value)) continue;
7627
+ if (value === String(entity.id)) continue;
7628
+ }
7629
+ return key;
7630
+ }
7631
+ return candidates[0];
7632
+ }
7502
7633
  function formatDateValue$1(value) {
7503
7634
  if (!value) return "";
7504
7635
  const date = value instanceof Date ? value : new Date(value);
@@ -7538,20 +7669,21 @@ function useCollectionSlotKeys(collection, authController, propertyConfigs) {
7538
7669
  * `React.memo` render functions or loops without violating hook rules.
7539
7670
  */
7540
7671
  function resolveEntitySlots(entity, collection, slotKeys) {
7541
- const { titleKey, imageKey, subtitleKey, relationKeys, statusKey, dateKey } = slotKeys;
7672
+ const { titleKey, titleKeyCandidates, imageKey, subtitleKey, relationKeys, statusKey, dateKey } = slotKeys;
7542
7673
  const image = imageKey ? resolveImageSlot(collection, imageKey, entity) : void 0;
7674
+ const resolvedTitleKey = resolveEntityTitleKey(entity, titleKeyCandidates ?? (titleKey ? [titleKey] : []));
7543
7675
  let title;
7544
- if (titleKey) {
7545
- const prop = collection.properties[titleKey];
7546
- const val = getValueInPath(entity.values, titleKey);
7676
+ if (resolvedTitleKey) {
7677
+ const prop = collection.properties[resolvedTitleKey];
7678
+ const val = getValueInPath(entity.values, resolvedTitleKey);
7547
7679
  if (prop) title = {
7548
7680
  property: prop,
7549
- propertyKey: titleKey,
7681
+ propertyKey: resolvedTitleKey,
7550
7682
  value: val
7551
7683
  };
7552
7684
  }
7553
7685
  let subtitle;
7554
- if (subtitleKey) {
7686
+ if (subtitleKey && subtitleKey !== resolvedTitleKey) {
7555
7687
  const prop = collection.properties[subtitleKey];
7556
7688
  const val = getValueInPath(entity.values, subtitleKey);
7557
7689
  if (prop && val !== void 0 && val !== null && val !== "") subtitle = {
@@ -7657,12 +7789,12 @@ function resolveRelationDisplayName(relation, prop) {
7657
7789
  const targetTitleKey = targetCollection.titleProperty;
7658
7790
  if (targetTitleKey && values[targetTitleKey] !== void 0) return String(values[targetTitleKey]);
7659
7791
  const isHiddenProp = (p) => {
7660
- if (p.ui?.hideFromCollection) return true;
7661
- if (typeof p.ui?.disabled === "object" && p.ui.disabled.hidden) return true;
7792
+ if (p.admin?.hideFromCollection) return true;
7793
+ if (typeof p.admin?.disabled === "object" && p.admin.disabled.hidden) return true;
7662
7794
  return false;
7663
7795
  };
7664
7796
  const isDisplayCandidate = (p) => {
7665
- return p.type === "string" && !p.ui?.multiline && !p.ui?.markdown && !p.storage && !("isId" in p && p.isId) && !isHiddenProp(p);
7797
+ return p.type === "string" && !p.admin?.multiline && !p.admin?.markdown && !p.storage && !("isId" in p && p.isId) && !isHiddenProp(p);
7666
7798
  };
7667
7799
  for (const pk of [
7668
7800
  "name",
@@ -8082,10 +8214,10 @@ function CollectionListViewBinding({ collection, tableController, onEntityClick,
8082
8214
  if (usedKeys.has(k)) return false;
8083
8215
  const prop = resolvedCollection.properties[k];
8084
8216
  if (!prop) return false;
8085
- if (prop.type === "string" && (prop.storage || prop.ui?.url === "image")) return false;
8217
+ if (prop.type === "string" && (prop.storage || prop.admin?.urlPreview === "image")) return false;
8086
8218
  if (prop.type === "array" && prop.of && !Array.isArray(prop.of)) {
8087
8219
  const inner = prop.of;
8088
- if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return false;
8220
+ if (inner.type === "string" && (inner.storage || inner.admin?.urlPreview === "image")) return false;
8089
8221
  }
8090
8222
  return true;
8091
8223
  }).forEach((key) => {
@@ -8740,7 +8872,7 @@ var MAIN_TAB_VALUE = "__main_##Q$SC^#S6";
8740
8872
  var JSON_TAB_VALUE = "__json";
8741
8873
  //#endregion
8742
8874
  //#region src/components/DetailViewBinding.tsx
8743
- var EntityHistoryView$1 = lazy(() => import("./history-CtIPJxvQ.js").then((m) => ({ default: m.EntityHistoryView })));
8875
+ var EntityHistoryView$1 = lazy(() => import("./history-B1lIsrkX.js").then((m) => ({ default: m.EntityHistoryView })));
8744
8876
  function DetailViewBinding({ entityId, ...props }) {
8745
8877
  const { entity, dataLoading, dataLoadingError } = useFetch({
8746
8878
  path: props.path,
@@ -8800,7 +8932,7 @@ function DetailViewBindingInner({ path, entityId, selectedTab: selectedTabProp,
8800
8932
  const target = val === "edit" ? MAIN_TAB_VALUE : val;
8801
8933
  if (target !== selectedTab) setSelectedTab(target);
8802
8934
  }, [selectedTabProp, defaultSelectedView]);
8803
- const subcollections = getSubcollections(collection).filter((c) => !c.hideFromNavigation);
8935
+ const subcollections = getAdminSubcollections(collection).filter((c) => !c.hideFromNavigation);
8804
8936
  const subcollectionsCount = subcollections?.length ?? 0;
8805
8937
  const customViews = collection.entityViews ?? [];
8806
8938
  const customViewsCount = customViews?.length ?? 0;
@@ -8881,9 +9013,10 @@ function DetailViewBindingInner({ path, entityId, selectedTab: selectedTabProp,
8881
9013
  ]));
8882
9014
  const formViewConfig = collection.formView;
8883
9015
  const FormViewBuilder = formViewConfig?.Builder ? resolveComponentRef(formViewConfig.Builder) : null;
8884
- const titlePropertyKey = getEntityTitlePropertyKey(collection, customizationController.propertyConfigs);
9016
+ const titlePropertyKey = getEntityTitlePropertyKeyForEntity(collection, usedEntity?.values, usedEntity?.id);
8885
9017
  const rawTitle = usedEntity?.values && titlePropertyKey ? getValueInPath(usedEntity.values, titlePropertyKey) : void 0;
8886
- const title = rawTitle !== void 0 && rawTitle !== null ? resolveTitleToString(rawTitle) : collection.singularName ?? collection.name;
9018
+ const titleUser = useResolvedUser(isUserSelectProperty(collection, titlePropertyKey) && typeof rawTitle === "string" ? rawTitle : void 0);
9019
+ const title = titleUser ? getUserLabel(titleUser) : rawTitle !== void 0 && rawTitle !== null ? resolveTitleToString(rawTitle) : collection.singularName ?? collection.name;
8887
9020
  const nonActionCustomViews = useMemo(() => resolvedEntityViews.filter((e) => !e.includeActions), [resolvedEntityViews]);
8888
9021
  const customViewsView = customViews && nonActionCustomViews.map((customView) => {
8889
9022
  if (!customView) return null;
@@ -11551,7 +11684,7 @@ function PopupFormFieldInternal({ tableKey, entityId, customFieldValidator, prop
11551
11684
  const property = propertyKey && getPropertyInPath(collection?.properties ?? {}, propertyKey);
11552
11685
  const fieldProps = propertyKey && property ? {
11553
11686
  propertyKey,
11554
- disabled: isSubmitting || isReadOnly(property) || !!property.ui?.disabled,
11687
+ disabled: isSubmitting || isReadOnly(property) || !!property.admin?.disabled,
11555
11688
  property,
11556
11689
  includeDescription: false,
11557
11690
  underlyingValueHasChanged: false,
@@ -11686,7 +11819,7 @@ function FiltersDialog({ open, onOpenChange, properties, filterValues, setFilter
11686
11819
  const ofProp = isArray && "of" in property ? property.of : void 0;
11687
11820
  const baseProperty = isArray ? Array.isArray(ofProp) ? ofProp[0] : ofProp : property;
11688
11821
  if (!baseProperty) return false;
11689
- if (baseProperty.ui?.Filter) return true;
11822
+ if (baseProperty.admin?.Filter) return true;
11690
11823
  return resolveFilterOperators({
11691
11824
  property: baseProperty,
11692
11825
  isArray,
@@ -12093,7 +12226,7 @@ function CollectionViewStartActions({ collection, relativePath, parentCollection
12093
12226
  //#region src/components/CollectionViewBinding/CollectionViewBinding.tsx
12094
12227
  var EMPTY_ARRAY = [];
12095
12228
  /**
12096
- * This component is in charge of binding a driver path with an {@link CollectionConfig}
12229
+ * This component is in charge of binding a driver path with an {@link AdminCollection}
12097
12230
  * where it's configuration is defined. It includes an infinite scrolling table
12098
12231
  * and a 'Add' new entities button,
12099
12232
  *
@@ -12942,7 +13075,7 @@ function buildPropertyWidthOverwrite(key, width) {
12942
13075
  const [parentKey, ...childKey] = key.split(".");
12943
13076
  return { properties: { [parentKey]: buildPropertyWidthOverwrite(childKey.join("."), width) } };
12944
13077
  }
12945
- return { properties: { [key]: { ui: { columnWidth: width } } } };
13078
+ return { properties: { [key]: { admin: { columnWidth: width } } } };
12946
13079
  }
12947
13080
  function EntityIdHeaderWidget({ collection, path, idPath, openEntityMode }) {
12948
13081
  const { t } = useTranslation();
@@ -13303,7 +13436,7 @@ function EntityActionButton({ action, enabled, props }) {
13303
13436
  }
13304
13437
  //#endregion
13305
13438
  //#region src/components/EditViewBinding.tsx
13306
- var EntityHistoryView = lazy(() => import("./history-CtIPJxvQ.js").then((m) => ({ default: m.EntityHistoryView })));
13439
+ var EntityHistoryView = lazy(() => import("./history-B1lIsrkX.js").then((m) => ({ default: m.EntityHistoryView })));
13307
13440
  /**
13308
13441
  * This is the default view that is used as the content of a side panel when
13309
13442
  * a record is opened.
@@ -13407,7 +13540,7 @@ function EditViewBindingInner({ path, entityId, selectedTab: selectedTabProp, co
13407
13540
  const target = val === "edit" ? MAIN_TAB_VALUE : val;
13408
13541
  if (target !== selectedTab) setSelectedTab(target);
13409
13542
  }, [selectedTabProp, defaultSelectedView]);
13410
- const subcollections = getSubcollections(collection).filter((c) => !c.hideFromNavigation);
13543
+ const subcollections = getAdminSubcollections(collection).filter((c) => !c.hideFromNavigation);
13411
13544
  const subcollectionsCount = subcollections?.length ?? 0;
13412
13545
  const customViews = collection.entityViews ?? [];
13413
13546
  const customViewsCount = customViews?.length ?? 0;
@@ -14489,10 +14622,10 @@ function useBuildCollectionRegistryController(props) {
14489
14622
  callbacks: result?.callbacks ?? callbacks
14490
14623
  };
14491
14624
  if (subcollections && "subcollections" in result) result.subcollections = result.subcollections ?? subcollections;
14492
- return {
14625
+ return resolveAdminCollection({
14493
14626
  ...overriddenCollection,
14494
14627
  ...result
14495
- };
14628
+ });
14496
14629
  }, [userConfigPersistence]);
14497
14630
  const getRawCollection = useCallback((slugOrPath) => {
14498
14631
  const registry = collectionRegistryRef.current;
@@ -14551,7 +14684,7 @@ function useBuildCollectionRegistryController(props) {
14551
14684
  }
14552
14685
  return paths;
14553
14686
  }, []);
14554
- const collections = collectionRegistryRef.current.getCollections();
14687
+ const collections = collectionRegistryRef.current.getCollections().map(resolveAdminCollection);
14555
14688
  useEffect(() => {
14556
14689
  if (!initialised && collections.length > 0) setInitialised(true);
14557
14690
  }, [initialised, collections.length]);
@@ -14899,7 +15032,7 @@ function useAsyncResolver({ resolver, initialValue, isEqual, deps, disabled }) {
14899
15032
  //#region src/hooks/navigation/useResolvedCollections.ts
14900
15033
  /**
14901
15034
  * Hook that resolves collection props (which may be async builders or arrays)
14902
- * into concrete CollectionConfig[], and registers them with the CollectionRegistry.
15035
+ * into concrete AdminCollection[], and registers them with the CollectionRegistry.
14903
15036
  *
14904
15037
  * When userManagement is provided, the default users collection is always
14905
15038
  * prepended. Developer collections override via generic slug-based dedup
@@ -15410,7 +15543,7 @@ function SideDialogView({ offsetPosition, panel, panelIndex, isTopPanel }) {
15410
15543
  maxWidth: "4xl",
15411
15544
  scrollable: false,
15412
15545
  children: panel && /* @__PURE__ */ jsx("div", {
15413
- className: "flex flex-col h-[75vh] min-h-[500px] min-w-[55vw] max-w-full overflow-hidden",
15546
+ className: "flex flex-col h-[75vh] min-h-[500px] w-full min-w-0 max-w-full overflow-hidden",
15414
15547
  children: /* @__PURE__ */ jsx(ErrorBoundary, { children: panel.component })
15415
15548
  })
15416
15549
  }) : /* @__PURE__ */ jsxs(Sheet, {
@@ -15703,11 +15836,11 @@ function useSelectionDialog(referenceDialogProps) {
15703
15836
  * @group Form fields
15704
15837
  */
15705
15838
  function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, disabled, isSubmitting, minimalistView: minimalistViewProp, property, includeDescription, setValue, setFieldValue }) {
15706
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
15839
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
15707
15840
  const { t } = useTranslation();
15708
15841
  const ofProperty = property.of;
15709
15842
  if (ofProperty.type !== "reference") throw Error("ArrayOfReferencesField expected a property containing references");
15710
- const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
15843
+ const expanded = property.admin?.expanded === void 0 ? true : property.admin?.expanded;
15711
15844
  const selectedEntityIds = value && Array.isArray(value) ? value.map((ref) => ref.id) : [];
15712
15845
  useClearRestoreValue({
15713
15846
  property,
@@ -15739,7 +15872,7 @@ function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, d
15739
15872
  if (!entryValue) return /* @__PURE__ */ jsx("div", { children: "Internal ERROR" });
15740
15873
  return /* @__PURE__ */ jsx(ReferencePreview, {
15741
15874
  disabled: !ofProperty.path,
15742
- previewProperties: ofProperty.ui?.previewProperties,
15875
+ previewProperties: ofProperty.admin?.previewProperties,
15743
15876
  size: "medium",
15744
15877
  onClick: onEntryClick,
15745
15878
  hover: !disabled,
@@ -15749,7 +15882,7 @@ function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, d
15749
15882
  }, internalId);
15750
15883
  }, [
15751
15884
  ofProperty.path,
15752
- ofProperty.ui?.previewProperties,
15885
+ ofProperty.admin?.previewProperties,
15753
15886
  value
15754
15887
  ]);
15755
15888
  const title = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LabelWithIconAndTooltip, {
@@ -15820,10 +15953,10 @@ function ArrayOfReferencesFieldBinding({ propertyKey, value, error, showError, d
15820
15953
  * @group Form fields
15821
15954
  */
15822
15955
  function BlockFieldBinding({ propertyKey, value, error, showError, isSubmitting, setValue, setFieldValue, minimalistView: minimalistViewProp, property, includeDescription, underlyingValueHasChanged, context, disabled }) {
15823
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
15956
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
15824
15957
  const { t } = useTranslation();
15825
15958
  if (!property.oneOf) throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");
15826
- const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
15959
+ const expanded = property.admin?.expanded === void 0 ? true : property.admin?.expanded;
15827
15960
  useClearRestoreValue({
15828
15961
  property,
15829
15962
  value,
@@ -15859,8 +15992,8 @@ function BlockFieldBinding({ propertyKey, value, error, showError, isSubmitting,
15859
15992
  addLabel: property.name ? t("add_to_field", { fieldName: property.name }) : t("add_entry"),
15860
15993
  buildEntry,
15861
15994
  onInternalIdAdded: setLastAddedId,
15862
- disabled: isSubmitting || Boolean(property.ui?.disabled),
15863
- canAddElements: !property.ui?.disabled,
15995
+ disabled: isSubmitting || Boolean(property.admin?.disabled),
15996
+ canAddElements: !property.admin?.disabled,
15864
15997
  onValueChange: (value) => setFieldValue(propertyKey, value),
15865
15998
  newDefaultEntry: {
15866
15999
  [property.oneOf.typeField ?? DEFAULT_ONE_OF_TYPE]: firstOneOfKey,
@@ -15987,7 +16120,7 @@ function DateTimeFieldBinding({ propertyKey, value, setValue, autoFocus, error,
15987
16120
  value: internalValue,
15988
16121
  onChange: (dateValue) => setValue(dateValue),
15989
16122
  mode: property.mode,
15990
- clearable: property.ui?.clearable,
16123
+ clearable: property.admin?.clearable,
15991
16124
  locale,
15992
16125
  error: showError,
15993
16126
  disabled,
@@ -16014,7 +16147,7 @@ function DateTimeFieldBinding({ propertyKey, value, setValue, autoFocus, error,
16014
16147
  * @group Form fields
16015
16148
  */
16016
16149
  function KeyValueFieldBinding({ propertyKey, value, showError, error, disabled, property, setValue, minimalistView, includeDescription, underlyingValueHasChanged, autoFocus, context }) {
16017
- const expanded = (property.ui?.expanded === void 0 ? true : property.ui?.expanded) || autoFocus;
16150
+ const expanded = (property.admin?.expanded === void 0 ? true : property.admin?.expanded) || autoFocus;
16018
16151
  if (!property.keyValue) throw Error(`Your property ${propertyKey} needs to have the 'keyValue' prop in order to use this field binding`);
16019
16152
  const mapFormView = /* @__PURE__ */ jsx(MapEditView, {
16020
16153
  value,
@@ -16450,15 +16583,15 @@ function gettype(value) {
16450
16583
  * @group Form fields
16451
16584
  */
16452
16585
  function MapFieldBinding({ propertyKey, value, showError, error, disabled, property, partOfArray, minimalistView: minimalistViewProp, includeDescription, autoFocus, context, onPropertyChange }) {
16453
- const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
16454
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
16586
+ const expanded = property.admin?.expanded === void 0 ? true : property.admin?.expanded;
16587
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
16455
16588
  const { t } = useTranslation();
16456
16589
  if (!property.properties) throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property '${propertyKey}'${property.name ? ` ("${property.name}")` : ""}`);
16457
16590
  const mapProperties = property.properties;
16458
16591
  const mapFormView = /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", {
16459
- className: cls("py-1 flex flex-col space-y-2", minimalistView && property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0),
16592
+ className: cls("py-1 flex flex-col space-y-2", minimalistView && property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0),
16460
16593
  children: Object.entries(mapProperties).filter(([_, property]) => !isHidden(property)).map(([entryKey, childProperty], index) => {
16461
- const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.ui?.disabled);
16594
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.admin?.disabled);
16462
16595
  return /* @__PURE__ */ jsx("div", {
16463
16596
  className: "relative",
16464
16597
  children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(PropertyFieldBinding, {
@@ -16481,12 +16614,12 @@ function MapFieldBinding({ propertyKey, value, showError, error, disabled, prope
16481
16614
  !minimalistView && /* @__PURE__ */ jsx(ExpandablePanel, {
16482
16615
  initiallyExpanded: expanded,
16483
16616
  onExpandedChange: (expanded) => {
16484
- onPropertyChange?.({ ui: {
16485
- ...property.ui,
16617
+ onPropertyChange?.({ admin: {
16618
+ ...property.admin,
16486
16619
  expanded
16487
16620
  } });
16488
16621
  },
16489
- className: property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0,
16622
+ className: property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0,
16490
16623
  innerClassName: "px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-white dark:bg-surface-900",
16491
16624
  title: /* @__PURE__ */ jsx(LabelWithIconAndTooltip, {
16492
16625
  propertyKey,
@@ -16666,7 +16799,7 @@ function MarkdownEditorFieldBinding({ property, propertyKey, value, setValue, in
16666
16799
  className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5"
16667
16800
  }),
16668
16801
  /* @__PURE__ */ jsx("div", { className: "flex-grow" }),
16669
- property.ui?.clearable && !disabled && /* @__PURE__ */ jsx(IconButton, {
16802
+ property.admin?.clearable && !disabled && /* @__PURE__ */ jsx(IconButton, {
16670
16803
  size: "small",
16671
16804
  onClick: (e) => {
16672
16805
  e.stopPropagation();
@@ -16822,7 +16955,7 @@ function ReferenceFieldBindingInternal({ propertyKey, value, setValue, error, sh
16822
16955
  !collection && /* @__PURE__ */ jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
16823
16956
  collection && /* @__PURE__ */ jsxs(Fragment, { children: [refValue && /* @__PURE__ */ jsx(ReferencePreview, {
16824
16957
  disabled: !property.path,
16825
- previewProperties: property.ui?.previewProperties,
16958
+ previewProperties: property.admin?.previewProperties,
16826
16959
  hover: !disabled,
16827
16960
  size,
16828
16961
  onClick: disabled || isSubmitting ? void 0 : onEntryClick,
@@ -16864,7 +16997,7 @@ function RepeatFieldBinding({ propertyKey, value, error, showError, isSubmitting
16864
16997
  const authController = useAuthController();
16865
16998
  const { t } = useTranslation();
16866
16999
  if (property.type !== "array" || !property.of || Array.isArray(property.of)) throw Error("RepeatFieldBinding misconfiguration. Property `type` is not `array`");
16867
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
17000
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
16868
17001
  if (!property.of) throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");
16869
17002
  const resolvedProperties = getArrayResolvedProperties({
16870
17003
  propertyValue: value,
@@ -16873,7 +17006,7 @@ function RepeatFieldBinding({ propertyKey, value, error, showError, isSubmitting
16873
17006
  ignoreMissingFields: false,
16874
17007
  authController
16875
17008
  });
16876
- const expanded = property.ui?.expanded === void 0 ? true : property.ui?.expanded;
17009
+ const expanded = property.admin?.expanded === void 0 ? true : property.admin?.expanded;
16877
17010
  const ofProperty = property.of;
16878
17011
  const [lastAddedId, setLastAddedId] = useState();
16879
17012
  useClearRestoreValue({
@@ -16897,7 +17030,7 @@ function RepeatFieldBinding({ propertyKey, value, error, showError, isSubmitting
16897
17030
  index
16898
17031
  }) });
16899
17032
  };
16900
- const canAddElements = !property.ui?.disabled && !isSubmitting && !disabled && (property.canAddElements || property.canAddElements === void 0);
17033
+ const canAddElements = !property.admin?.disabled && !isSubmitting && !disabled && (property.canAddElements || property.canAddElements === void 0);
16901
17034
  const sortable = property.sortable === void 0 ? true : property.sortable;
16902
17035
  const arrayContainer = /* @__PURE__ */ jsx(ArrayContainer, {
16903
17036
  droppableId: propertyKey,
@@ -16905,12 +17038,12 @@ function RepeatFieldBinding({ propertyKey, value, error, showError, isSubmitting
16905
17038
  value: value ?? [],
16906
17039
  buildEntry,
16907
17040
  onInternalIdAdded: setLastAddedId,
16908
- disabled: isSubmitting || Boolean(property.ui?.disabled),
17041
+ disabled: isSubmitting || Boolean(property.admin?.disabled),
16909
17042
  canAddElements,
16910
17043
  sortable,
16911
17044
  newDefaultEntry: getDefaultValueFor(property.of),
16912
17045
  onValueChange: (value) => setFieldValue(propertyKey, value),
16913
- className: property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0
17046
+ className: property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0
16914
17047
  });
16915
17048
  const title = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LabelWithIconAndTooltip, {
16916
17049
  propertyKey,
@@ -16982,7 +17115,7 @@ function SelectFieldBinding({ propertyKey, value, setValue, error, showError, di
16982
17115
  className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5 my-0"
16983
17116
  })
16984
17117
  }),
16985
- endAdornment: property.ui?.clearable && !disabled && /* @__PURE__ */ jsx(IconButton, {
17118
+ endAdornment: property.admin?.clearable && !disabled && /* @__PURE__ */ jsx(IconButton, {
16986
17119
  size: "small",
16987
17120
  onClick: handleClearClick,
16988
17121
  children: /* @__PURE__ */ jsx(XIcon, {})
@@ -17063,7 +17196,7 @@ var rejectDropClasses = "transition-colors duration-200 ease-[cubic-bezier(0,0,0
17063
17196
  function StorageUploadFieldBinding({ propertyKey, value, setValue, error, showError, autoFocus, minimalistView, property, includeDescription, context, isSubmitting }) {
17064
17197
  useAuthController();
17065
17198
  const storageSource = useStorageSource();
17066
- const disabled = isReadOnly(property) || !!property.ui?.disabled || isSubmitting || context.disabled;
17199
+ const disabled = isReadOnly(property) || !!property.admin?.disabled || isSubmitting || context.disabled;
17067
17200
  const { internalValue, setInternalValue, onFilesAdded, storage, onFileUploadComplete, storagePathBuilder, multipleFilesSupported, resolvedStorageSource } = useStorageUploadController({
17068
17201
  entityValues: context.values,
17069
17202
  entityId: context.entityId,
@@ -17326,7 +17459,7 @@ var SwitchFieldBinding = function SwitchFieldBinding({ propertyKey, value, setVa
17326
17459
  value,
17327
17460
  onValueChange: (v) => setValue(v),
17328
17461
  error: showError,
17329
- className: property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0,
17462
+ className: property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0,
17330
17463
  label: /* @__PURE__ */ jsx(LabelWithIcon, {
17331
17464
  icon: getIconForProperty(property, "small"),
17332
17465
  required: property.validation?.required,
@@ -17356,8 +17489,8 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17356
17489
  let multiline;
17357
17490
  let url;
17358
17491
  if (property.type === "string") {
17359
- multiline = property.ui?.multiline;
17360
- url = property.ui?.url;
17492
+ multiline = property.admin?.multiline;
17493
+ url = property.admin?.urlPreview;
17361
17494
  }
17362
17495
  useClearRestoreValue({
17363
17496
  property,
@@ -17383,7 +17516,7 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17383
17516
  if (property.type === "number") inputType = "number";
17384
17517
  else if (property.type === "string") {
17385
17518
  if (property.email) inputType = "email";
17386
- else if (property.ui?.url) inputType = "url";
17519
+ else if (property.admin?.urlPreview) inputType = "url";
17387
17520
  }
17388
17521
  const label = /* @__PURE__ */ jsx(LabelWithIcon, {
17389
17522
  icon: getIconForProperty(property, "small"),
@@ -17394,7 +17527,7 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17394
17527
  /* @__PURE__ */ jsx(PropertyIdCopyTooltip, {
17395
17528
  propertyKey,
17396
17529
  children: isMultiline ? /* @__PURE__ */ jsxs("div", {
17397
- className: cls("rounded-md relative max-w-full min-h-[64px]", fieldBackgroundMixin, fieldBackgroundHoverMixin, showError && error ? "border border-red-500 dark:border-red-600" : "", property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0),
17530
+ className: cls("rounded-md relative max-w-full min-h-[64px]", fieldBackgroundMixin, fieldBackgroundHoverMixin, showError && error ? "border border-red-500 dark:border-red-600" : "", property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0),
17398
17531
  children: [
17399
17532
  /* @__PURE__ */ jsx("div", {
17400
17533
  className: "pointer-events-none absolute top-1 text-xs font-medium px-3 text-text-secondary dark:text-text-secondary-dark",
@@ -17407,7 +17540,7 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17407
17540
  disabled,
17408
17541
  className: cls("rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8", disabled && "outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500", showError && error ? "text-red-500 dark:text-red-600" : "")
17409
17542
  }),
17410
- property.ui?.clearable && /* @__PURE__ */ jsx("div", {
17543
+ property.admin?.clearable && /* @__PURE__ */ jsx("div", {
17411
17544
  className: "flex flex-row justify-center items-center absolute h-full right-0 top-0 mr-4",
17412
17545
  children: /* @__PURE__ */ jsx(IconButton, {
17413
17546
  onClick: handleClearClick,
@@ -17420,7 +17553,7 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17420
17553
  value: displayValue,
17421
17554
  onChange,
17422
17555
  autoFocus,
17423
- className: property.ui?.widthPercentage !== void 0 ? "mt-8" : void 0,
17556
+ className: property.admin?.widthPercentage !== void 0 ? "mt-8" : void 0,
17424
17557
  label: /* @__PURE__ */ jsx(LabelWithIcon, {
17425
17558
  icon: getIconForProperty(property, "small"),
17426
17559
  required: property.validation?.required || property.isId === true,
@@ -17428,7 +17561,7 @@ function TextFieldBinding({ propertyKey, value, setValue, error, showError, disa
17428
17561
  }),
17429
17562
  type: inputType,
17430
17563
  disabled,
17431
- endAdornment: property.ui?.clearable && /* @__PURE__ */ jsx(IconButton, {
17564
+ endAdornment: property.admin?.clearable && /* @__PURE__ */ jsx(IconButton, {
17432
17565
  onClick: handleClearClick,
17433
17566
  children: /* @__PURE__ */ jsx(XIcon, {})
17434
17567
  }),
@@ -17635,7 +17768,7 @@ function MultipleRelationFieldBinding({ propertyKey, value: valueProp, error, sh
17635
17768
  const entryValue = value && Array.isArray(value) && value.length > index ? value[index] : void 0;
17636
17769
  if (!entryValue) return /* @__PURE__ */ jsx("div", { children: "Internal ERROR" });
17637
17770
  return /* @__PURE__ */ jsx(RelationPreview, {
17638
- previewProperties: property.ui?.previewProperties,
17771
+ previewProperties: property.admin?.previewProperties,
17639
17772
  size: "medium",
17640
17773
  onClick: onEntryClick,
17641
17774
  hover: !disabled,
@@ -17645,7 +17778,7 @@ function MultipleRelationFieldBinding({ propertyKey, value: valueProp, error, sh
17645
17778
  }, internalId);
17646
17779
  }, [
17647
17780
  relation,
17648
- property.ui?.previewProperties,
17781
+ property.admin?.previewProperties,
17649
17782
  value
17650
17783
  ]);
17651
17784
  const title = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LabelWithIconAndTooltip, {
@@ -17711,7 +17844,7 @@ function RelationFieldBinding(props) {
17711
17844
  if (!collection || !capabilities?.supportsRelations || !("relations" in collection) || !collection.relations) throw Error("RelationFieldBinding expected a collection with relations support");
17712
17845
  const relation = resolveRelationProperty(property, collection.relations, propertyKey).relation;
17713
17846
  const manyRelation = relation?.cardinality === "many";
17714
- if ((property.ui?.widget ?? "select") === "select" && relation) return /* @__PURE__ */ jsx(RelationSelectorBinding, {
17847
+ if ((property.admin?.widget ?? "select") === "select" && relation) return /* @__PURE__ */ jsx(RelationSelectorBinding, {
17715
17848
  ...props,
17716
17849
  relation,
17717
17850
  manyRelation
@@ -17789,7 +17922,7 @@ function SingleRelationFieldBinding({ propertyKey, value, size, error, showError
17789
17922
  !collection && /* @__PURE__ */ jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
17790
17923
  collection && /* @__PURE__ */ jsxs(Fragment, { children: [usedRelation && /* @__PURE__ */ jsx(RelationPreview, {
17791
17924
  disabled: !usedRelation,
17792
- previewProperties: property.ui?.previewProperties,
17925
+ previewProperties: property.admin?.previewProperties,
17793
17926
  hover: !disabled,
17794
17927
  size,
17795
17928
  onClick: disabled || isSubmitting ? void 0 : onEntryClick,
@@ -17846,7 +17979,7 @@ function UserSelectFieldBinding({ propertyKey, value, setValue, error, showError
17846
17979
  setValue(userId);
17847
17980
  },
17848
17981
  disabled,
17849
- clearable: property.ui?.clearable,
17982
+ clearable: property.admin?.clearable,
17850
17983
  size: selectorSize
17851
17984
  }),
17852
17985
  /* @__PURE__ */ jsx(FieldHelperText, {
@@ -17886,7 +18019,7 @@ var DEFAULT_FIELD_CONFIGS = {
17886
18019
  color: "#2d7ff9",
17887
18020
  property: {
17888
18021
  type: "string",
17889
- ui: { get Field() {
18022
+ admin: { get Field() {
17890
18023
  return TextFieldBinding;
17891
18024
  } }
17892
18025
  }
@@ -17899,7 +18032,7 @@ var DEFAULT_FIELD_CONFIGS = {
17899
18032
  color: "#2d7ff9",
17900
18033
  property: {
17901
18034
  type: "string",
17902
- ui: {
18035
+ admin: {
17903
18036
  multiline: true,
17904
18037
  get Field() {
17905
18038
  return TextFieldBinding;
@@ -17915,7 +18048,7 @@ var DEFAULT_FIELD_CONFIGS = {
17915
18048
  color: "#2d7ff9",
17916
18049
  property: {
17917
18050
  type: "string",
17918
- ui: {
18051
+ admin: {
17919
18052
  markdown: true,
17920
18053
  get Field() {
17921
18054
  return MarkdownEditorFieldBinding;
@@ -17931,12 +18064,10 @@ var DEFAULT_FIELD_CONFIGS = {
17931
18064
  color: "#154fb3",
17932
18065
  property: {
17933
18066
  type: "string",
17934
- ui: {
17935
- url: true,
17936
- get Field() {
17937
- return TextFieldBinding;
17938
- }
17939
- }
18067
+ url: true,
18068
+ admin: { get Field() {
18069
+ return TextFieldBinding;
18070
+ } }
17940
18071
  }
17941
18072
  },
17942
18073
  email: {
@@ -17948,7 +18079,7 @@ var DEFAULT_FIELD_CONFIGS = {
17948
18079
  property: {
17949
18080
  type: "string",
17950
18081
  email: true,
17951
- ui: { get Field() {
18082
+ admin: { get Field() {
17952
18083
  return TextFieldBinding;
17953
18084
  } }
17954
18085
  }
@@ -17961,7 +18092,7 @@ var DEFAULT_FIELD_CONFIGS = {
17961
18092
  color: "#20d9d2",
17962
18093
  property: {
17963
18094
  type: "boolean",
17964
- ui: { get Field() {
18095
+ admin: { get Field() {
17965
18096
  return SwitchFieldBinding;
17966
18097
  } }
17967
18098
  }
@@ -17975,7 +18106,7 @@ var DEFAULT_FIELD_CONFIGS = {
17975
18106
  property: {
17976
18107
  type: "string",
17977
18108
  enum: [],
17978
- ui: { get Field() {
18109
+ admin: { get Field() {
17979
18110
  return SelectFieldBinding;
17980
18111
  } }
17981
18112
  }
@@ -17992,7 +18123,7 @@ var DEFAULT_FIELD_CONFIGS = {
17992
18123
  type: "string",
17993
18124
  enum: []
17994
18125
  },
17995
- ui: { get Field() {
18126
+ admin: { get Field() {
17996
18127
  return MultiSelectFieldBinding;
17997
18128
  } }
17998
18129
  }
@@ -18004,7 +18135,7 @@ var DEFAULT_FIELD_CONFIGS = {
18004
18135
  Icon: UserIcon,
18005
18136
  property: {
18006
18137
  type: "string",
18007
- ui: { get Field() {
18138
+ admin: { get Field() {
18008
18139
  return UserSelectFieldBinding;
18009
18140
  } }
18010
18141
  }
@@ -18017,7 +18148,7 @@ var DEFAULT_FIELD_CONFIGS = {
18017
18148
  color: "#bec920",
18018
18149
  property: {
18019
18150
  type: "number",
18020
- ui: { get Field() {
18151
+ admin: { get Field() {
18021
18152
  return TextFieldBinding;
18022
18153
  } }
18023
18154
  }
@@ -18031,7 +18162,7 @@ var DEFAULT_FIELD_CONFIGS = {
18031
18162
  property: {
18032
18163
  type: "number",
18033
18164
  enum: [],
18034
- ui: { get Field() {
18165
+ admin: { get Field() {
18035
18166
  return SelectFieldBinding;
18036
18167
  } }
18037
18168
  }
@@ -18048,7 +18179,7 @@ var DEFAULT_FIELD_CONFIGS = {
18048
18179
  type: "number",
18049
18180
  enum: []
18050
18181
  },
18051
- ui: { get Field() {
18182
+ admin: { get Field() {
18052
18183
  return MultiSelectFieldBinding;
18053
18184
  } }
18054
18185
  }
@@ -18062,7 +18193,7 @@ var DEFAULT_FIELD_CONFIGS = {
18062
18193
  property: {
18063
18194
  type: "string",
18064
18195
  storage: { storagePath: "{path}" },
18065
- ui: { get Field() {
18196
+ admin: { get Field() {
18066
18197
  return StorageUploadFieldBinding;
18067
18198
  } }
18068
18199
  }
@@ -18079,7 +18210,7 @@ var DEFAULT_FIELD_CONFIGS = {
18079
18210
  type: "string",
18080
18211
  storage: { storagePath: "{path}" }
18081
18212
  },
18082
- ui: { get Field() {
18213
+ admin: { get Field() {
18083
18214
  return StorageUploadFieldBinding;
18084
18215
  } }
18085
18216
  }
@@ -18092,7 +18223,7 @@ var DEFAULT_FIELD_CONFIGS = {
18092
18223
  color: "#ff0042",
18093
18224
  property: {
18094
18225
  type: "reference",
18095
- ui: { get Field() {
18226
+ admin: { get Field() {
18096
18227
  return ReferenceFieldBinding;
18097
18228
  } }
18098
18229
  }
@@ -18106,7 +18237,7 @@ var DEFAULT_FIELD_CONFIGS = {
18106
18237
  property: {
18107
18238
  type: "array",
18108
18239
  of: { type: "reference" },
18109
- ui: { get Field() {
18240
+ admin: { get Field() {
18110
18241
  return ArrayOfReferencesFieldBinding;
18111
18242
  } }
18112
18243
  }
@@ -18120,7 +18251,7 @@ var DEFAULT_FIELD_CONFIGS = {
18120
18251
  property: {
18121
18252
  relationName: "",
18122
18253
  type: "relation",
18123
- ui: { get Field() {
18254
+ admin: { get Field() {
18124
18255
  return RelationFieldBinding;
18125
18256
  } }
18126
18257
  }
@@ -18133,7 +18264,7 @@ var DEFAULT_FIELD_CONFIGS = {
18133
18264
  color: "#8b46ff",
18134
18265
  property: {
18135
18266
  type: "date",
18136
- ui: { get Field() {
18267
+ admin: { get Field() {
18137
18268
  return DateTimeFieldBinding;
18138
18269
  } }
18139
18270
  }
@@ -18147,7 +18278,7 @@ var DEFAULT_FIELD_CONFIGS = {
18147
18278
  property: {
18148
18279
  type: "map",
18149
18280
  properties: {},
18150
- ui: { get Field() {
18281
+ admin: { get Field() {
18151
18282
  return MapFieldBinding;
18152
18283
  } }
18153
18284
  }
@@ -18161,7 +18292,7 @@ var DEFAULT_FIELD_CONFIGS = {
18161
18292
  property: {
18162
18293
  type: "map",
18163
18294
  keyValue: true,
18164
- ui: { get Field() {
18295
+ admin: { get Field() {
18165
18296
  return KeyValueFieldBinding;
18166
18297
  } }
18167
18298
  }
@@ -18175,7 +18306,7 @@ var DEFAULT_FIELD_CONFIGS = {
18175
18306
  property: {
18176
18307
  type: "array",
18177
18308
  of: { type: "string" },
18178
- ui: { get Field() {
18309
+ admin: { get Field() {
18179
18310
  return RepeatFieldBinding;
18180
18311
  } }
18181
18312
  }
@@ -18188,7 +18319,7 @@ var DEFAULT_FIELD_CONFIGS = {
18188
18319
  color: "#ff9408",
18189
18320
  property: {
18190
18321
  type: "array",
18191
- ui: { get Field() {
18322
+ admin: { get Field() {
18192
18323
  return ArrayCustomShapedFieldBinding;
18193
18324
  } }
18194
18325
  }
@@ -18202,7 +18333,7 @@ var DEFAULT_FIELD_CONFIGS = {
18202
18333
  property: {
18203
18334
  type: "array",
18204
18335
  oneOf: { properties: {} },
18205
- ui: { get Field() {
18336
+ admin: { get Field() {
18206
18337
  return BlockFieldBinding;
18207
18338
  } }
18208
18339
  }
@@ -18216,7 +18347,7 @@ var DEFAULT_FIELD_CONFIGS = {
18216
18347
  property: {
18217
18348
  type: "vector",
18218
18349
  dimensions: 1536,
18219
- ui: { get Field() {
18350
+ admin: { get Field() {
18220
18351
  return VectorFieldBinding;
18221
18352
  } }
18222
18353
  }
@@ -18242,10 +18373,10 @@ function getFieldConfig(property, propertyConfigs) {
18242
18373
  return mergeDeep(defaultFieldConfig ?? {}, customField ?? {});
18243
18374
  }
18244
18375
  function getDefaultFieldId(property) {
18245
- if (property.type === "string") if (property.ui?.markdown) return "markdown";
18246
- else if (property.ui?.multiline) return "multiline";
18376
+ if (property.type === "string") if (property.admin?.markdown) return "markdown";
18377
+ else if (property.admin?.multiline) return "multiline";
18247
18378
  else if (property.storage) return "file_upload";
18248
- else if (property.ui?.url) return "url";
18379
+ else if (property.admin?.urlPreview) return "url";
18249
18380
  else if (property.email) return "email";
18250
18381
  else if (property.enum) return "select";
18251
18382
  else if (property.userSelect) return "user_select";
@@ -18296,7 +18427,7 @@ function getFieldId(property) {
18296
18427
  *
18297
18428
  * Please note that if you build a custom field in a component, the
18298
18429
  * **validation** passed in the property will have no effect. You need to set
18299
- * the validation in the `CollectionConfig` definition.
18430
+ * the validation in the `AdminCollection` definition.
18300
18431
  *
18301
18432
  * @param propertyKey You can use nested names such as `address.street` or `friends[2]`
18302
18433
  * @param property
@@ -18335,11 +18466,11 @@ function PropertyFieldBindingInternal({ propertyKey, property, context, includeD
18335
18466
  authController
18336
18467
  });
18337
18468
  const readOnly = resolvedProperty ? isReadOnly(resolvedProperty) : true;
18338
- const disabled = disabledProp || readOnly || Boolean(resolvedProperty?.ui?.disabled) || context.disabled;
18469
+ const disabled = disabledProp || readOnly || Boolean(resolvedProperty?.admin?.disabled) || context.disabled;
18339
18470
  if (resolvedProperty === null || isHidden(resolvedProperty)) return /* @__PURE__ */ jsx(Fragment, {});
18340
18471
  else if (readOnly) Component = ReadOnlyFieldBinding;
18341
- else if (resolvedProperty.ui?.Field) {
18342
- const resolved = resolveComponentRef(resolvedProperty.ui.Field);
18472
+ else if (resolvedProperty.admin?.Field) {
18473
+ const resolved = resolveComponentRef(resolvedProperty.admin.Field);
18343
18474
  if (resolved) Component = resolved;
18344
18475
  } else {
18345
18476
  const propertyConfig = getFieldConfig(resolvedProperty, customizationController.propertyConfigs);
@@ -18353,7 +18484,7 @@ function PropertyFieldBindingInternal({ propertyKey, property, context, includeD
18353
18484
  propertyConfigs: customizationController.propertyConfigs,
18354
18485
  index,
18355
18486
  authController
18356
- })?.ui?.Field);
18487
+ })?.admin?.Field);
18357
18488
  }
18358
18489
  if (!Component) {
18359
18490
  console.warn(`No field component found for property ${propertyKey}`);
@@ -18386,7 +18517,7 @@ function PropertyFieldBindingInternal({ propertyKey, property, context, includeD
18386
18517
  }
18387
18518
  function FieldInternal({ Component, componentProps: { propertyKey, property, includeDescription, underlyingValueHasChanged, partOfArray, partOfBlock, minimalistView, autoFocus, context, disabled, size, onPropertyChange }, formexFieldProps }) {
18388
18519
  const { plugins } = useCustomizationController();
18389
- const customFieldProps = property.ui?.customProps;
18520
+ const customFieldProps = property.admin?.customProps;
18390
18521
  const value = formexFieldProps.field.value;
18391
18522
  const error = getIn(formexFieldProps.form.errors, propertyKey);
18392
18523
  const touched = getIn(formexFieldProps.form.touched, propertyKey);
@@ -18440,7 +18571,7 @@ var shouldPropertyReRender = (property, plugins) => {
18440
18571
  if (plugins?.some((plugin) => plugin.fieldBuilder)) return true;
18441
18572
  if (isPropertyBuilder(property)) return true;
18442
18573
  const defAProperty = property;
18443
- const rerenderThisProperty = Boolean(defAProperty.ui?.Field);
18574
+ const rerenderThisProperty = Boolean(defAProperty.admin?.Field);
18444
18575
  if (defAProperty.type === "map" && defAProperty.properties) return Boolean(rerenderThisProperty || Object.values(defAProperty.properties).some((childProperty) => shouldPropertyReRender(childProperty, plugins)));
18445
18576
  else return Boolean(rerenderThisProperty);
18446
18577
  };
@@ -18852,7 +18983,7 @@ function zodToFormErrors(zodError) {
18852
18983
  * @group Components
18853
18984
  */
18854
18985
  function EntityForm({ path, entityId: entityIdProp, collection, onValuesModified, onIdChange, onSaved, entity, initialDirtyValues, onFormContextReady, forceActionsAtTheBottom, initialStatus, className, onStatusChange, onEntityChange, openEntityMode = "full_screen", formex: formexProp, disabled: disabledProp, Builder, EntityFormActionsComponent = EntityFormActions, showDefaultActions = true, showEntityPath = true, navigateBack: navigateBackProp, children, onSubmit: onSubmitProp, onValuesChangeDeferred: onValuesChangeDeferredProp, onReset: onResetProp, uniqueFieldValidator: uniqueFieldValidatorProp, beforeFields, afterFields, pluginActions: pluginActionsProp, computedInitialValues, hasLocalChanges: hasLocalChangesProp, localChangesData, manualApplyLocalChanges, localChangesCacheKey, onClearLocalChanges }) {
18855
- const customizationController = useCustomizationController();
18986
+ useCustomizationController();
18856
18987
  const navigateBack = useCallback(() => {
18857
18988
  if (navigateBackProp) navigateBackProp();
18858
18989
  }, [navigateBackProp]);
@@ -19012,9 +19143,10 @@ function EntityForm({ path, entityId: entityIdProp, collection, onValuesModified
19012
19143
  path
19013
19144
  ]);
19014
19145
  const actionsDisabled = disabled || formex.isSubmitting || status === "existing" && !formex.dirty || Boolean(disabledProp);
19015
- const titlePropertyKey = getEntityTitlePropertyKey(collection, customizationController.propertyConfigs);
19146
+ const titlePropertyKey = getEntityTitlePropertyKeyForEntity(collection, formex.values, entityId);
19016
19147
  const rawTitle = formex.values && titlePropertyKey ? getValueInPath(formex.values, titlePropertyKey) : void 0;
19017
- const title = rawTitle !== void 0 && rawTitle !== null ? resolveTitleToString(rawTitle) : collection.singularName ?? collection.name;
19148
+ const titleUser = useResolvedUser(isUserSelectProperty(collection, titlePropertyKey) && typeof rawTitle === "string" ? rawTitle : void 0);
19149
+ const title = titleUser ? getUserLabel(titleUser) : rawTitle !== void 0 && rawTitle !== null ? resolveTitleToString(rawTitle) : collection.singularName ?? collection.name;
19018
19150
  const modified = formex.dirty;
19019
19151
  useEffect(() => {
19020
19152
  if (!autoSave) onValuesModified?.(modified, formex.values);
@@ -19063,9 +19195,9 @@ function EntityForm({ path, entityId: entityIdProp, collection, onValuesModified
19063
19195
  const underlyingValueHasChanged = !!underlyingChanges && Object.keys(underlyingChanges).includes(key) && formex.touched[key];
19064
19196
  const isNew = status === "new" || status === "copy";
19065
19197
  const isIdAndAuto = (property.type === "string" || property.type === "number") && "isId" in property && typeof property.isId === "string" && property.isId !== "manual";
19066
- const disabled = disabledProp || !autoSave && formex.isSubmitting || isReadOnly(property) || Boolean(property.ui?.disabled) || !isNew && "isId" in property && Boolean(property.isId) || isNew && isIdAndAuto;
19198
+ const disabled = disabledProp || !autoSave && formex.isSubmitting || isReadOnly(property) || Boolean(property.admin?.disabled) || !isNew && "isId" in property && Boolean(property.isId) || isNew && isIdAndAuto;
19067
19199
  if (isHidden(property)) return null;
19068
- const widthPercentage = property.ui?.widthPercentage ?? 100;
19200
+ const widthPercentage = property.admin?.widthPercentage ?? 100;
19069
19201
  const shouldAutoFocus = isNewEntity && !disabled && firstFocusableIndex === -1;
19070
19202
  if (shouldAutoFocus) firstFocusableIndex = 0;
19071
19203
  return /* @__PURE__ */ jsx(FormEntry, {
@@ -19530,10 +19662,10 @@ var useCollectionsConfigController = () => useContext(ConfigControllerContext);
19530
19662
  //#endregion
19531
19663
  //#region src/collection_editor/serializable_utils.ts
19532
19664
  /**
19533
- * Strip non-serializable fields from a `BaseUIConfig`.
19665
+ * Strip non-serializable fields from a `AdminPropertyOptions`.
19534
19666
  * Removes `Field` and `Preview` (ComponentRef).
19535
19667
  */
19536
- function toSerializableUIConfig(ui) {
19668
+ function toSerializableAdminOptions(ui) {
19537
19669
  if (!ui) return void 0;
19538
19670
  const { Field, Preview, ...rest } = ui;
19539
19671
  const result = {};
@@ -19569,7 +19701,7 @@ function serializeMatches(matches) {
19569
19701
  }
19570
19702
  /**
19571
19703
  * Resolve a relation target to a string slug.
19572
- * Functions are called to extract the target; CollectionConfig objects
19704
+ * Functions are called to extract the target; AdminCollection objects
19573
19705
  * use their slug.
19574
19706
  */
19575
19707
  function resolveRelationTarget(target) {
@@ -19594,8 +19726,8 @@ function toSerializableBaseFields(property) {
19594
19726
  if (property.defaultValue !== void 0) result.defaultValue = property.defaultValue;
19595
19727
  if (property.conditions) result.conditions = property.conditions;
19596
19728
  if (property.metadata) result.metadata = property.metadata;
19597
- const ui = toSerializableUIConfig(property.ui);
19598
- if (ui) result.ui = ui;
19729
+ const ui = toSerializableAdminOptions(property.admin);
19730
+ if (ui) result.admin = ui;
19599
19731
  return result;
19600
19732
  }
19601
19733
  /**
@@ -19784,7 +19916,7 @@ function toSerializableProperties(properties) {
19784
19916
  return result;
19785
19917
  }
19786
19918
  /**
19787
- * Convert an `CollectionConfig` to its JSON-serializable form.
19919
+ * Convert an `AdminCollection` to its JSON-serializable form.
19788
19920
  *
19789
19921
  * Strips all non-serializable fields (functions, React nodes, class instances)
19790
19922
  * while preserving the structural schema that the collection editor works with.
@@ -19896,7 +20028,7 @@ function fromSerializableProperties(serialized) {
19896
20028
  return result;
19897
20029
  }
19898
20030
  /**
19899
- * Convert a `SerializableCollectionConfig` back to an `CollectionConfig`.
20031
+ * Convert a `SerializableCollectionConfig` back to an `AdminCollection`.
19900
20032
  *
19901
20033
  * The result will NOT contain any of the non-serializable fields
19902
20034
  * (callbacks, entityActions, etc.) — those must be re-attached by the
@@ -20280,6 +20412,6 @@ function getFullIdPath(propertyKey, propertyNamespace) {
20280
20412
  return idToPropertiesPath(propertyNamespace ? `${propertyNamespace}.${propertyKey}` : propertyKey);
20281
20413
  }
20282
20414
  //#endregion
20283
- export { useHistory as $, renderSkeletonImageThumbnail as $n, SelectableTable as $t, VectorFieldBinding as A, SidePanelControllerContext as An, unflattenObject as At, KeyValueFieldBinding as B, getPropertiesWithPropertiesOrder as Bn, getCollectionPathsCombinations as Bt, zodToFormErrors as C, ArrayPropertyEnumPreview as Cn, flattenEntry as Ct, getDefaultFieldId as D, ArrayOfReferencesPreview as Dn, ImportSaveInProgress as Dt, getDefaultFieldConfig as E, RelationPreview as En, useImportConfig as Et, RepeatFieldBinding as F, getEntityTitlePropertyKey as Fn, useBreadcrumbsController as Ft, SelectionTableBinding as G, ArrayPropertyPreview as Gn, resolveCollectionPathIds$1 as Gt, BlockFieldBinding as H, getResolvedPropertyInPath as Hn, removeInitialAndTrailingSlashes$1 as Ht, ReferenceFieldBinding as I, getBracketNotation as In, BreadcrumbsProvider as It, useBuildNavigationStateController as J, StorageThumbnail as Jn, resolveEntityAction as Jt, SideDialogs as K, StringPropertyPreview as Kn, resolveOpenEntityMode as Kt, MultiSelectFieldBinding as L, getDefaultPropertiesOrder as Ln, mergeEntityActions as Lt, SwitchFieldBinding as M, CollectionRegistryContext as Mn, PropertyConfigBadge as Mt, StorageUploadFieldBinding as N, useCollectionRegistryController as Nn, SearchIconsView as Nt, getFieldConfig as O, ReferencePreview as On, ImportFileUpload as Ot, SelectFieldBinding as P, getEntityPreviewKeys as Pn, FieldCaption as Pt, useBuildCollectionRegistryController as Q, renderSkeletonIcon as Qn, CollectionTableBinding as Qt, MarkdownEditorFieldBinding as R, getIconForProperty as Rn, addInitialSlash as Rt, removeEmptyContainers as S, ArrayOfStringsPreview as Sn, convertDataToEntity as St, DEFAULT_FIELD_CONFIGS as T, ArrayOfStorageComponentsPreview as Tn, getInferenceType as Tt, ArrayOfReferencesFieldBinding as U, isReferenceProperty as Un, removeInitialSlash as Ut, DateTimeFieldBinding as V, getPropertyInPath as Vn, getLastSegment$1 as Vt, useSelectionDialog as W, isRelationProperty as Wn, removeTrailingSlash$1 as Wt, useResolvedViews as X, SkeletonPropertyComponent as Xn, useSelectionController as Xt, useTopLevelNavigation as Y, StorageThumbnailInternal as Yn, resolveEntityView as Yt, useResolvedCollections as Z, renderSkeletonCaptionText as Zn, VirtualTableInput$1 as Zt, EntityFormBinding as _, BooleanPreview as _n, useCollectionEditorController as _t, namespaceToPropertiesPath as a, useNavigationStateController as an, LabelWithIconAndTooltip as ar, EditViewBinding as at, getChanges as b, MapPropertyPreview as bn, ImportNewPropertyFieldPreview as bt, buildCollectionGenerationCallback as c, SelectableTableContext as cn, FormLayout as cr, deleteEntityAction as ct, fromSerializableProperties as d, ReadOnlyFieldBinding as dn, CreationResultDialog as dt, CollectionRowActions as en, renderSkeletonText as er, resolveNavigationFrom as et, fromSerializableProperty as f, FieldHelperText as fn, DetailViewBinding as ft, useCollectionsConfigController as g, NumberPropertyPreview as gn, CollectionViewActions as gt, toSerializableProperty as h, UserPreview as hn, EntityCardBinding as ht, namespaceToPropertiesOrderPath as i, NavigationStateContext as in, EmptyValue as ir, useBuildSidePanel as it, TextFieldBinding as j, useSidePanel as jn, ArrayContainer as jt, getFieldId as k, EntityPreviewBinding as kn, convertFileToJson as kt, validateCollectionJson as l, ArrayCustomShapedFieldBinding as ln, FormEntry as lr, editEntityAction as lt, toSerializableProperties as m, PropertyPreview as mn, CollectionCardViewBinding as mt, getFullIdPath as n, UrlContext as nn, ImagePreview as nr, buildSidePanelsFromUrl as nt, CollectionGenerationApiError as o, useSideDialogsController as on, PropertyIdCopyTooltip as or, CollectionViewBinding as ot, toSerializableCollectionConfig as p, ArrayOfMapsPreview as pn, EntityViewBinding as pt, useBuildUrlController as q, EnumValuesChip as qn, resolveViewMode as qt, idToPropertiesPath as r, useUrlController as rn, sanitizeUrl as rr, getEntityViewWidth as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, SideDialogsControllerContext as sn, LabelWithIcon as sr, copyEntityAction as st, getFullId as t, useCMSContext as tn, UrlComponentPreview as tr, useResolvedNavigationFrom as tt, fromSerializableCollectionConfig as u, useClearRestoreValue as un, resetPasswordAction as ut, EntityForm as v, DatePreview as vn, ConfigControllerProvider as vt, PropertyFieldBinding as w, ArrayEnumPreview as wn, processValueMapping as wt, getInitialEntityValues as x, ArrayOneOfPreview as xn, DataNewPropertiesMapping as xt, extractTouchedValues as y, KeyValuePreview as yn, useCollectionEditorDialogsState as yt, MapFieldBinding as z, getIconForWidget as zn, getCollectionBySlugWithin as zt };
20415
+ export { useHistory as $, SkeletonPropertyComponent as $n, SelectableTable as $t, VectorFieldBinding as A, ReferencePreview as An, unflattenObject as At, KeyValueFieldBinding as B, getDefaultPropertiesOrder as Bn, getCollectionPathsCombinations as Bt, zodToFormErrors as C, ArrayOneOfPreview as Cn, flattenEntry as Ct, getDefaultFieldId as D, ArrayOfStorageComponentsPreview as Dn, ImportSaveInProgress as Dt, getDefaultFieldConfig as E, ArrayEnumPreview as En, useImportConfig as Et, RepeatFieldBinding as F, useCollectionRegistryController as Fn, useBreadcrumbsController as Ft, SelectionTableBinding as G, getResolvedPropertyInPath as Gn, resolveCollectionPathIds$1 as Gt, BlockFieldBinding as H, getIconForWidget as Hn, removeInitialAndTrailingSlashes$1 as Ht, ReferenceFieldBinding as I, getEntityPreviewKeys as In, BreadcrumbsProvider as It, useBuildNavigationStateController as J, ArrayPropertyPreview as Jn, resolveEntityAction as Jt, SideDialogs as K, isReferenceProperty as Kn, resolveOpenEntityMode as Kt, MultiSelectFieldBinding as L, getEntityTitlePropertyKey as Ln, mergeEntityActions as Lt, SwitchFieldBinding as M, SidePanelControllerContext as Mn, PropertyConfigBadge as Mt, StorageUploadFieldBinding as N, useSidePanel as Nn, SearchIconsView as Nt, getFieldConfig as O, RelationPreview as On, ImportFileUpload as Ot, SelectFieldBinding as P, CollectionRegistryContext as Pn, FieldCaption as Pt, useBuildCollectionRegistryController as Q, StorageThumbnailInternal as Qn, CollectionTableBinding as Qt, MarkdownEditorFieldBinding as R, getEntityTitlePropertyKeyForEntity as Rn, addInitialSlash as Rt, removeEmptyContainers as S, MapPropertyPreview as Sn, convertDataToEntity as St, DEFAULT_FIELD_CONFIGS as T, ArrayPropertyEnumPreview as Tn, getInferenceType as Tt, ArrayOfReferencesFieldBinding as U, getPropertiesWithPropertiesOrder as Un, removeInitialSlash as Ut, DateTimeFieldBinding as V, getIconForProperty as Vn, getLastSegment$1 as Vt, useSelectionDialog as W, getPropertyInPath as Wn, removeTrailingSlash$1 as Wt, useResolvedViews as X, EnumValuesChip as Xn, useSelectionController as Xt, useTopLevelNavigation as Y, StringPropertyPreview as Yn, resolveEntityView as Yt, useResolvedCollections as Z, StorageThumbnail as Zn, VirtualTableInput$1 as Zt, EntityFormBinding as _, useResolvedUser as _n, useCollectionEditorController as _t, namespaceToPropertiesPath as a, useNavigationStateController as an, ImagePreview as ar, EditViewBinding as at, getChanges as b, DatePreview as bn, ImportNewPropertyFieldPreview as bt, buildCollectionGenerationCallback as c, SelectableTableContext as cn, LabelWithIconAndTooltip as cr, deleteEntityAction as ct, fromSerializableProperties as d, ReadOnlyFieldBinding as dn, FormLayout as dr, CreationResultDialog as dt, CollectionRowActions as en, renderSkeletonCaptionText as er, resolveNavigationFrom as et, fromSerializableProperty as f, FieldHelperText as fn, FormEntry as fr, DetailViewBinding as ft, useCollectionsConfigController as g, getUserLabel as gn, CollectionViewActions as gt, toSerializableProperty as h, UserPreview as hn, EntityCardBinding as ht, namespaceToPropertiesOrderPath as i, NavigationStateContext as in, UrlComponentPreview as ir, useBuildSidePanel as it, TextFieldBinding as j, EntityPreviewBinding as jn, ArrayContainer as jt, getFieldId as k, ArrayOfReferencesPreview as kn, convertFileToJson as kt, validateCollectionJson as l, ArrayCustomShapedFieldBinding as ln, PropertyIdCopyTooltip as lr, editEntityAction as lt, toSerializableProperties as m, PropertyPreview as mn, CollectionCardViewBinding as mt, getFullIdPath as n, UrlContext as nn, renderSkeletonImageThumbnail as nr, buildSidePanelsFromUrl as nt, CollectionGenerationApiError as o, useSideDialogsController as on, sanitizeUrl as or, CollectionViewBinding as ot, toSerializableCollectionConfig as p, ArrayOfMapsPreview as pn, EntityViewBinding as pt, useBuildUrlController as q, isRelationProperty as qn, resolveViewMode as qt, idToPropertiesPath as r, useUrlController as rn, renderSkeletonText as rr, getEntityViewWidth as rt, DEFAULT_COLLECTION_GENERATION_ENDPOINT as s, SideDialogsControllerContext as sn, EmptyValue as sr, copyEntityAction as st, getFullId as t, useCMSContext as tn, renderSkeletonIcon as tr, useResolvedNavigationFrom as tt, fromSerializableCollectionConfig as u, useClearRestoreValue as un, LabelWithIcon as ur, resetPasswordAction as ut, EntityForm as v, NumberPropertyPreview as vn, ConfigControllerProvider as vt, PropertyFieldBinding as w, ArrayOfStringsPreview as wn, processValueMapping as wt, getInitialEntityValues as x, KeyValuePreview as xn, DataNewPropertiesMapping as xt, extractTouchedValues as y, BooleanPreview as yn, useCollectionEditorDialogsState as yt, MapFieldBinding as z, getBracketNotation as zn, getCollectionBySlugWithin as zt };
20284
20416
 
20285
- //# sourceMappingURL=util-XFwQ9FEc.js.map
20417
+ //# sourceMappingURL=util-CPgUM4M8.js.map