@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
@@ -6,7 +6,8 @@ import { FieldHelperText } from "../components/FieldHelperText";
6
6
  import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
7
7
  import { PropertyFieldBinding } from "../PropertyFieldBinding";
8
8
  import { ExpandablePanel, Typography } from "@rebasepro/ui";
9
- import { getArrayResolvedProperties, isReadOnly } from "@rebasepro/common";
9
+ import { getArrayResolvedProperties } from "@rebasepro/common";
10
+ import { isReadOnly } from "@rebasepro/app";
10
11
  import { getIconForProperty } from "../../util/property_utils";
11
12
  import { useClearRestoreValue } from "../useClearRestoreValue";
12
13
  import { useAuthController } from "@rebasepro/app";
@@ -35,7 +36,7 @@ export function ArrayCustomShapedFieldBinding({
35
36
  }: FieldProps<ArrayProperty | ArrayProperty>) {
36
37
 
37
38
  const authController = useAuthController();
38
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
39
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
39
40
 
40
41
  const resolvedProperties: Property[] | undefined = getArrayResolvedProperties({
41
42
  propertyValue: value,
@@ -45,7 +46,7 @@ export function ArrayCustomShapedFieldBinding({
45
46
  authController
46
47
  })
47
48
 
48
- const expanded = property.ui?.expanded === undefined ? true : property.ui?.expanded;
49
+ const expanded = property.admin?.expanded === undefined ? true : property.admin?.expanded;
49
50
 
50
51
  useClearRestoreValue({
51
52
  property,
@@ -64,7 +65,7 @@ export function ArrayCustomShapedFieldBinding({
64
65
  </>);
65
66
 
66
67
  const body = (resolvedProperties ?? []).map((childProperty, index) => {
67
- const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.ui?.disabled);
68
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.admin?.disabled);
68
69
  const fieldProps = {
69
70
  propertyKey: `${propertyKey}[${index}]`,
70
71
  disabled: disabled || thisDisabled,
@@ -1,5 +1,5 @@
1
1
  import { useSelectionDialog } from "../../hooks/useSelectionDialog";
2
- import type { CollectionConfig } from "@rebasepro/types";
2
+
3
3
  import type { FieldProps } from "../../types/fields";
4
4
  import type { ArrayProperty, Property } from "@rebasepro/types";
5
5
  import React, { useCallback, useMemo } from "react";
@@ -15,6 +15,7 @@ import { useTranslation, ErrorView } from "@rebasepro/app";
15
15
  import { Button, cls, ExpandablePanel, fieldBackgroundMixin, PencilIcon, Typography } from "@rebasepro/ui";
16
16
  import { useClearRestoreValue } from "../useClearRestoreValue";
17
17
  import { useCollectionRegistryController } from "../../hooks/navigation/contexts/CollectionRegistryContext";
18
+ import type { AdminCollection } from "@rebasepro/admin-types";
18
19
 
19
20
  type ArrayOfReferencesFieldProps = FieldProps<ArrayProperty, EntityReference[]>;
20
21
 
@@ -39,7 +40,7 @@ export function ArrayOfReferencesFieldBinding({
39
40
  setFieldValue
40
41
  }: ArrayOfReferencesFieldProps) {
41
42
 
42
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
43
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
43
44
  const { t } = useTranslation();
44
45
 
45
46
  const ofProperty = property.of as Property;
@@ -47,7 +48,7 @@ export function ArrayOfReferencesFieldBinding({
47
48
  throw Error("ArrayOfReferencesField expected a property containing references");
48
49
  }
49
50
 
50
- const expanded = property.ui?.expanded === undefined ? true : property.ui?.expanded;
51
+ const expanded = property.admin?.expanded === undefined ? true : property.admin?.expanded;
51
52
  const selectedEntityIds = value && Array.isArray(value) ? value.map((ref) => ref.id) : [];
52
53
 
53
54
  useClearRestoreValue({
@@ -57,7 +58,7 @@ export function ArrayOfReferencesFieldBinding({
57
58
  });
58
59
 
59
60
  const collectionRegistryController = useCollectionRegistryController();
60
- const collection: CollectionConfig | undefined = useMemo(() => {
61
+ const collection: AdminCollection | undefined = useMemo(() => {
61
62
  return ofProperty.path ? collectionRegistryController.getCollection(ofProperty.path) : undefined;
62
63
  }, [ofProperty.path]);
63
64
 
@@ -98,7 +99,7 @@ export function ArrayOfReferencesFieldBinding({
98
99
  <ReferencePreview
99
100
  key={internalId}
100
101
  disabled={!ofProperty.path}
101
- previewProperties={ofProperty.ui?.previewProperties}
102
+ previewProperties={ofProperty.admin?.previewProperties}
102
103
  size={"medium"}
103
104
  onClick={onEntryClick}
104
105
  hover={!disabled}
@@ -107,7 +108,7 @@ export function ArrayOfReferencesFieldBinding({
107
108
  includeEntityLink={ofProperty.includeEntityLink}
108
109
  />
109
110
  );
110
- }, [ofProperty.path, ofProperty.ui?.previewProperties, value]);
111
+ }, [ofProperty.path, ofProperty.admin?.previewProperties, value]);
111
112
 
112
113
  const title = (<>
113
114
  <LabelWithIconAndTooltip
@@ -42,13 +42,13 @@ export function BlockFieldBinding({
42
42
  disabled
43
43
  }: FieldProps<ArrayProperty>) {
44
44
 
45
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
45
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
46
46
  const { t } = useTranslation();
47
47
 
48
48
  if (!property.oneOf)
49
49
  throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");
50
50
 
51
- const expanded = property.ui?.expanded === undefined ? true : property.ui?.expanded;
51
+ const expanded = property.admin?.expanded === undefined ? true : property.admin?.expanded;
52
52
  useClearRestoreValue({
53
53
  property,
54
54
  value,
@@ -94,8 +94,8 @@ export function BlockFieldBinding({
94
94
  addLabel={property.name ? t("add_to_field", { fieldName: property.name }) : t("add_entry")}
95
95
  buildEntry={buildEntry}
96
96
  onInternalIdAdded={setLastAddedId}
97
- disabled={isSubmitting || Boolean(property.ui?.disabled)}
98
- canAddElements={!property.ui?.disabled}
97
+ disabled={isSubmitting || Boolean(property.admin?.disabled)}
98
+ canAddElements={!property.admin?.disabled}
99
99
  onValueChange={(value) => setFieldValue(propertyKey, value)}
100
100
  newDefaultEntry={{
101
101
  [property.oneOf!.typeField ?? DEFAULT_ONE_OF_TYPE]: firstOneOfKey,
@@ -50,7 +50,7 @@ export function DateTimeFieldBinding({
50
50
  value={internalValue}
51
51
  onChange={(dateValue) => setValue(dateValue)}
52
52
  mode={property.mode}
53
- clearable={property.ui?.clearable}
53
+ clearable={property.admin?.clearable}
54
54
  locale={locale}
55
55
  error={showError}
56
56
  disabled={disabled}
@@ -53,7 +53,7 @@ export function KeyValueFieldBinding({
53
53
  context
54
54
  }: FieldProps<MapProperty>) {
55
55
 
56
- const expanded = (property.ui?.expanded === undefined ? true : property.ui?.expanded) || autoFocus;
56
+ const expanded = (property.admin?.expanded === undefined ? true : property.admin?.expanded) || autoFocus;
57
57
 
58
58
  if (!property.keyValue) {
59
59
  throw Error(`Your property ${propertyKey} needs to have the 'keyValue' prop in order to use this field binding`);
@@ -6,7 +6,7 @@ import { useTranslation } from "@rebasepro/app";
6
6
 
7
7
  import { ErrorBoundary } from "@rebasepro/ui";
8
8
  import { getIconForProperty } from "../../util/property_utils";
9
- import { isHidden, isReadOnly } from "@rebasepro/common";
9
+ import { isHidden, isReadOnly } from "@rebasepro/app";
10
10
  import { FieldHelperText } from "../components/FieldHelperText";
11
11
  import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
12
12
  import { PropertyFieldBinding } from "../PropertyFieldBinding";
@@ -34,8 +34,8 @@ export function MapFieldBinding({
34
34
  onPropertyChange
35
35
  }: FieldProps<MapProperty>) {
36
36
 
37
- const expanded = property.ui?.expanded === undefined ? true : property.ui?.expanded;
38
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
37
+ const expanded = property.admin?.expanded === undefined ? true : property.admin?.expanded;
38
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
39
39
  const { t } = useTranslation();
40
40
 
41
41
  if (!property.properties) {
@@ -46,11 +46,11 @@ export function MapFieldBinding({
46
46
 
47
47
  const mapFormView = <>
48
48
  <div
49
- className={cls("py-1 flex flex-col space-y-2", minimalistView && property.ui?.widthPercentage !== undefined ? "mt-8" : undefined)}>
49
+ className={cls("py-1 flex flex-col space-y-2", minimalistView && property.admin?.widthPercentage !== undefined ? "mt-8" : undefined)}>
50
50
  {Object.entries(mapProperties)
51
51
  .filter(([_, property]) => !isHidden(property))
52
52
  .map(([entryKey, childProperty], index) => {
53
- const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.ui?.disabled);
53
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.admin?.disabled);
54
54
  const fieldBindingProps: PropertyFieldBindingProps<Record<string, unknown>> = {
55
55
  propertyKey: `${propertyKey}.${entryKey}`,
56
56
  disabled: disabled || thisDisabled,
@@ -92,11 +92,11 @@ export function MapFieldBinding({
92
92
  {!minimalistView && <ExpandablePanel initiallyExpanded={expanded}
93
93
  onExpandedChange={(expanded: boolean) => {
94
94
  onPropertyChange?.({
95
- ui: { ...property.ui,
95
+ admin: { ...property.admin,
96
96
  expanded }
97
97
  });
98
98
  }}
99
- className={property.ui?.widthPercentage !== undefined ? "mt-8" : undefined}
99
+ className={property.admin?.widthPercentage !== undefined ? "mt-8" : undefined}
100
100
  innerClassName={"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-white dark:bg-surface-900"}
101
101
  title={<LabelWithIconAndTooltip
102
102
  propertyKey={propertyKey}
@@ -223,7 +223,7 @@ export function MarkdownEditorFieldBinding({
223
223
  title={property.name ?? propertyKey}
224
224
  className={"h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5"}/>
225
225
  <div className="flex-grow"/>
226
- {property.ui?.clearable && !disabled && (
226
+ {property.admin?.clearable && !disabled && (
227
227
  <IconButton
228
228
  size="small"
229
229
  onClick={(e) => {
@@ -87,7 +87,7 @@ export function MultipleRelationFieldBinding({
87
87
  return (
88
88
  <RelationPreview
89
89
  key={internalId}
90
- previewProperties={property.ui?.previewProperties}
90
+ previewProperties={property.admin?.previewProperties}
91
91
  size={"medium"}
92
92
  onClick={onEntryClick}
93
93
  hover={!disabled}
@@ -96,7 +96,7 @@ export function MultipleRelationFieldBinding({
96
96
  includeEntityLink={property.includeEntityLink}
97
97
  />
98
98
  );
99
- }, [relation, property.ui?.previewProperties, value]);
99
+ }, [relation, property.admin?.previewProperties, value]);
100
100
 
101
101
  const title = (<>
102
102
  <LabelWithIconAndTooltip
@@ -1,5 +1,5 @@
1
1
  import { useSelectionDialog } from "../../hooks/useSelectionDialog";
2
- import type { CollectionConfig } from "@rebasepro/types";
2
+
3
3
  import type { FieldProps } from "../../types/fields";
4
4
  import type { Property, ReferenceProperty } from "@rebasepro/types";
5
5
  import React, { useCallback, useMemo } from "react";
@@ -17,6 +17,7 @@ import { getReferenceFrom } from "@rebasepro/common";
17
17
  import { useClearRestoreValue } from "../useClearRestoreValue";
18
18
  import { cls } from "@rebasepro/ui";
19
19
  import { useCollectionRegistryController } from "../../hooks/navigation/contexts/CollectionRegistryContext";
20
+ import type { AdminCollection } from "@rebasepro/admin-types";
20
21
 
21
22
  /**
22
23
  * Field that opens a reference selection dialog.
@@ -65,7 +66,7 @@ function ReferenceFieldBindingInternal({
65
66
  const validValue = refValue && typeof refValue === "object" && "isEntityReference" in refValue && refValue.isEntityReference();
66
67
 
67
68
  const collectionRegistryController = useCollectionRegistryController();
68
- const collection: CollectionConfig | undefined = useMemo(() => {
69
+ const collection: AdminCollection | undefined = useMemo(() => {
69
70
  return property.path ? collectionRegistryController.getCollection(property.path) : undefined;
70
71
  }, [property.path]);
71
72
 
@@ -109,7 +110,7 @@ function ReferenceFieldBindingInternal({
109
110
 
110
111
  {refValue && <ReferencePreview
111
112
  disabled={!property.path}
112
- previewProperties={property.ui?.previewProperties}
113
+ previewProperties={property.admin?.previewProperties}
113
114
  hover={!disabled}
114
115
  size={size}
115
116
  onClick={disabled || isSubmitting ? undefined : onEntryClick}
@@ -29,7 +29,7 @@ export function RelationFieldBinding(props: FieldProps<RelationProperty>) {
29
29
  const relation = resolvedProperty.relation;
30
30
 
31
31
  const manyRelation = relation?.cardinality === "many";
32
- const widget = property.ui?.widget ?? "select";
32
+ const widget = property.admin?.widget ?? "select";
33
33
 
34
34
  if (widget === "select" && relation) {
35
35
  return <RelationSelectorBinding {...props} relation={relation} manyRelation={manyRelation} />;
@@ -153,7 +153,7 @@ function SingleRelationFieldBinding({
153
153
 
154
154
  {usedRelation && <RelationPreview
155
155
  disabled={!usedRelation}
156
- previewProperties={property.ui?.previewProperties}
156
+ previewProperties={property.admin?.previewProperties}
157
157
  hover={!disabled}
158
158
  size={size}
159
159
  onClick={disabled || isSubmitting ? undefined : onEntryClick}
@@ -44,7 +44,7 @@ export function RepeatFieldBinding({
44
44
  throw Error("RepeatFieldBinding misconfiguration. Property `type` is not `array`");
45
45
  }
46
46
 
47
- const minimalistView = minimalistViewProp || property.ui?.minimalistView;
47
+ const minimalistView = minimalistViewProp || property.admin?.minimalistView;
48
48
 
49
49
  if (!property.of)
50
50
  throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");
@@ -57,7 +57,7 @@ export function RepeatFieldBinding({
57
57
  authController
58
58
  })
59
59
 
60
- const expanded = property.ui?.expanded === undefined ? true : property.ui?.expanded;
60
+ const expanded = property.admin?.expanded === undefined ? true : property.admin?.expanded;
61
61
  const ofProperty = property.of;
62
62
 
63
63
  const [lastAddedId, setLastAddedId] = useState<number | undefined>();
@@ -92,19 +92,19 @@ export function RepeatFieldBinding({
92
92
  </ErrorBoundary>;
93
93
  };
94
94
 
95
- const canAddElements = !property.ui?.disabled && !isSubmitting && !disabled && (property.canAddElements || property.canAddElements === undefined);
95
+ const canAddElements = !property.admin?.disabled && !isSubmitting && !disabled && (property.canAddElements || property.canAddElements === undefined);
96
96
  const sortable = property.sortable === undefined ? true : property.sortable;
97
97
  const arrayContainer = <ArrayContainer droppableId={propertyKey}
98
98
  addLabel={property.name ? t("add_to_field", { fieldName: property.name }) : t("add_entry")}
99
99
  value={(value as unknown[]) ?? []}
100
100
  buildEntry={buildEntry}
101
101
  onInternalIdAdded={setLastAddedId}
102
- disabled={isSubmitting || Boolean(property.ui?.disabled)}
102
+ disabled={isSubmitting || Boolean(property.admin?.disabled)}
103
103
  canAddElements={canAddElements}
104
104
  sortable={sortable}
105
105
  newDefaultEntry={getDefaultValueFor(property.of)}
106
106
  onValueChange={(value) => setFieldValue(propertyKey, value)}
107
- className={property.ui?.widthPercentage !== undefined ? "mt-8" : undefined}
107
+ className={property.admin?.widthPercentage !== undefined ? "mt-8" : undefined}
108
108
  />;
109
109
 
110
110
  const title = (<>
@@ -68,7 +68,7 @@ export function SelectFieldBinding({
68
68
  />
69
69
  </PropertyIdCopyTooltip>}
70
70
  endAdornment={
71
- property.ui?.clearable && !disabled && <IconButton
71
+ property.admin?.clearable && !disabled && <IconButton
72
72
  size="small"
73
73
  onClick={handleClearClick}>
74
74
  <XIcon/>
@@ -8,7 +8,7 @@ import { useDropzone } from "react-dropzone";
8
8
  import { FieldHelperText } from "../components/FieldHelperText";
9
9
  import { LabelWithIconAndTooltip } from "../components/LabelWithIconAndTooltip";
10
10
 
11
- import { isReadOnly } from "@rebasepro/common";
11
+ import { isReadOnly } from "@rebasepro/app";
12
12
  import { getIconForProperty } from "../../util/property_utils";
13
13
  import { useAuthController, useSnackbarController, useStorageSource, useTranslation } from "@rebasepro/app";
14
14
  import { StorageSourceContext } from "@rebasepro/app";
@@ -65,7 +65,7 @@ export function StorageUploadFieldBinding({
65
65
  const authController = useAuthController();
66
66
 
67
67
  const storageSource = useStorageSource();
68
- const disabled = isReadOnly(property) || !!property.ui?.disabled || isSubmitting || context.disabled;
68
+ const disabled = isReadOnly(property) || !!property.admin?.disabled || isSubmitting || context.disabled;
69
69
 
70
70
  const {
71
71
  internalValue,
@@ -44,7 +44,7 @@ export const SwitchFieldBinding = function SwitchFieldBinding({
44
44
  value={value as boolean | null}
45
45
  onValueChange={(v) => setValue(v)}
46
46
  error={showError}
47
- className={property.ui?.widthPercentage !== undefined ? "mt-8" : undefined}
47
+ className={property.admin?.widthPercentage !== undefined ? "mt-8" : undefined}
48
48
  label={<LabelWithIcon
49
49
  icon={getIconForProperty(property, "small")}
50
50
  required={property.validation?.required}
@@ -12,7 +12,7 @@ import {
12
12
  TextField,
13
13
  XIcon
14
14
  } from "@rebasepro/ui";
15
- import { PreviewType } from "@rebasepro/types";
15
+ import { PreviewType } from "@rebasepro/admin-types";
16
16
  import { FieldHelperText } from "../components/FieldHelperText";
17
17
  import { LabelWithIcon } from "../components/LabelWithIcon";
18
18
  import { PropertyPreview } from "../../preview";
@@ -42,8 +42,8 @@ export function TextFieldBinding<T extends string | number>({
42
42
  let multiline: boolean | undefined;
43
43
  let url: boolean | PreviewType | undefined;
44
44
  if (property.type === "string") {
45
- multiline = property.ui?.multiline;
46
- url = property.ui?.url;
45
+ multiline = property.admin?.multiline;
46
+ url = property.admin?.urlPreview;
47
47
  }
48
48
 
49
49
  useClearRestoreValue({
@@ -82,7 +82,7 @@ export function TextFieldBinding<T extends string | number>({
82
82
  inputType = "number";
83
83
  } else if (property.type === "string") {
84
84
  if (property.email) inputType = "email";
85
- else if (property.ui?.url) inputType = "url";
85
+ else if (property.admin?.urlPreview) inputType = "url";
86
86
  }
87
87
 
88
88
  const label = (
@@ -99,7 +99,7 @@ export function TextFieldBinding<T extends string | number>({
99
99
  fieldBackgroundMixin,
100
100
  fieldBackgroundHoverMixin,
101
101
  showError && error ? "border border-red-500 dark:border-red-600" : "",
102
- property.ui?.widthPercentage !== undefined ? "mt-8" : undefined
102
+ property.admin?.widthPercentage !== undefined ? "mt-8" : undefined
103
103
  )}>
104
104
  <div
105
105
  className="pointer-events-none absolute top-1 text-xs font-medium px-3 text-text-secondary dark:text-text-secondary-dark">
@@ -116,7 +116,7 @@ export function TextFieldBinding<T extends string | number>({
116
116
  showError && error ? "text-red-500 dark:text-red-600" : ""
117
117
  )}
118
118
  />
119
- {property.ui?.clearable && (
119
+ {property.admin?.clearable && (
120
120
  <div
121
121
  className="flex flex-row justify-center items-center absolute h-full right-0 top-0 mr-4">
122
122
  <IconButton onClick={handleClearClick}>
@@ -131,7 +131,7 @@ export function TextFieldBinding<T extends string | number>({
131
131
  value={displayValue}
132
132
  onChange={onChange}
133
133
  autoFocus={autoFocus}
134
- className={property.ui?.widthPercentage !== undefined ? "mt-8" : undefined}
134
+ className={property.admin?.widthPercentage !== undefined ? "mt-8" : undefined}
135
135
  label={<LabelWithIcon
136
136
  icon={getIconForProperty(property, "small")}
137
137
  required={property.validation?.required || property.isId === true}
@@ -139,7 +139,7 @@ export function TextFieldBinding<T extends string | number>({
139
139
  type={inputType}
140
140
  disabled={disabled}
141
141
  endAdornment={
142
- property.ui?.clearable && <IconButton
142
+ property.admin?.clearable && <IconButton
143
143
  onClick={handleClearClick}>
144
144
  <XIcon/>
145
145
  </IconButton>
@@ -52,7 +52,7 @@ export function UserSelectFieldBinding({
52
52
  setValue(userId);
53
53
  }}
54
54
  disabled={disabled}
55
- clearable={property.ui?.clearable}
55
+ clearable={property.admin?.clearable}
56
56
  size={selectorSize}
57
57
  />
58
58
 
@@ -1,5 +1,7 @@
1
- import type { CollectionConfig, PropertyConfig } from "@rebasepro/types";
2
- import type { AuthController, Entity, EntityStatus, EntityValues } from "@rebasepro/types";
1
+
2
+ import type { PropertyConfig, AdminCollection } from "@rebasepro/admin-types";
3
+ import type { Entity, EntityStatus, EntityValues } from "@rebasepro/types";
4
+ import type { AuthController } from "@rebasepro/admin-types";
3
5
  import { deepEqual as equal } from "fast-equals";
4
6
  import { getIn, setIn } from "@rebasepro/forms";
5
7
  import { getDefaultValuesFor } from "@rebasepro/common";
@@ -114,7 +116,7 @@ export function getChanges<T extends object>(source: Partial<T>, comparison: Par
114
116
 
115
117
  export function getInitialEntityValues<M extends Record<string, unknown>>(
116
118
  authController: AuthController,
117
- collection: CollectionConfig,
119
+ collection: AdminCollection,
118
120
  path: string,
119
121
  status: "new" | "existing" | "copy",
120
122
  entity: Entity<M> | undefined,
@@ -22,7 +22,7 @@ export function useClearRestoreValue<T>({
22
22
 
23
23
  const clearedValueRef = useRef<T | null>(null);
24
24
  useEffect(() => {
25
- const shouldClearValueIfDisabled = typeof property.ui?.disabled === "object" && Boolean(property.ui?.disabled.clearOnDisabled);
25
+ const shouldClearValueIfDisabled = typeof property.admin?.disabled === "object" && Boolean(property.admin?.disabled.clearOnDisabled);
26
26
  if (shouldClearValueIfDisabled) {
27
27
  if (value != null) {
28
28
  clearedValueRef.current = value;
@@ -191,7 +191,7 @@ function getZodStringSchema({
191
191
  (value: unknown) => value == null || (typeof value === "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)),
192
192
  { message: `${property.name} must be an email` }
193
193
  );
194
- if (property.ui?.url) {
194
+ if (property.url) {
195
195
  if (!property.storage || property.storage?.storeUrl) {
196
196
  schema = schema.refine(
197
197
  (value: unknown) => {
@@ -2,6 +2,7 @@ export * from "./useSidePanel";
2
2
  export * from "./useSelectionDialog";
3
3
  export * from "./useBuildSidePanel";
4
4
  export * from "./useResolvedNavigationFrom";
5
+ export * from "./useResolvedUsers";
5
6
  export * from "./useHistory";
6
7
  export * from "./navigation/contexts";
7
8
  export * from "./navigation/useBuildCollectionRegistryController";
@@ -1,6 +1,7 @@
1
- import type { CollectionConfig } from "@rebasepro/types";
1
+
2
2
  import React, { createContext } from "react";
3
3
  import { CollectionRegistryController } from "@rebasepro/types";
4
+ import type { AdminCollection } from "@rebasepro/admin-types";
4
5
 
5
6
  export const CollectionRegistryContext = createContext<CollectionRegistryController>({
6
7
  getCollection: () => undefined,
@@ -12,7 +13,7 @@ export const CollectionRegistryContext = createContext<CollectionRegistryControl
12
13
  initialised: false
13
14
  });
14
15
 
15
- export function useCollectionRegistryController<DB = Record<string, unknown>, EC extends CollectionConfig = CollectionConfig>(): CollectionRegistryController<DB, EC> {
16
+ export function useCollectionRegistryController<DB = Record<string, unknown>, EC extends AdminCollection = AdminCollection>(): CollectionRegistryController<DB, EC> {
16
17
  const context = React.useContext(CollectionRegistryContext);
17
18
  if (context === undefined) {
18
19
  throw new Error("useCollectionRegistryController must be used within a CollectionRegistryContext.Provider");
@@ -1,4 +1,4 @@
1
- import type { NavigationStateController } from "@rebasepro/types";
1
+ import type { NavigationStateController } from "@rebasepro/admin-types";
2
2
  import React, { createContext } from "react";
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- import type { UrlController } from "@rebasepro/types";
1
+ import type { UrlController } from "@rebasepro/admin-types";
2
2
  import React, { createContext } from "react";
3
3
 
4
4
 
@@ -1,7 +1,9 @@
1
- import type { CollectionConfig, DataSourceDefinition } from "@rebasepro/types";
1
+ import type { DataSourceDefinition } from "@rebasepro/types";
2
2
  import { useCallback, useEffect, useRef, useState, useMemo } from "react";
3
- import { CollectionRegistry, getParentReferencesFromPath as commonGetParentReferencesFromPath, removeInitialAndTrailingSlashes, getSubcollections } from "@rebasepro/common";
4
- import { EntityReference, UserConfigurationPersistence, CollectionRegistryController } from "@rebasepro/types";
3
+ import { CollectionRegistry, getSubcollections } from "@rebasepro/common";
4
+ import { getParentReferencesFromPath as commonGetParentReferencesFromPath, removeInitialAndTrailingSlashes } from "@rebasepro/app";
5
+ import { EntityReference, CollectionRegistryController } from "@rebasepro/types";
6
+ import { UserConfigurationPersistence, resolveAdminCollection, AdminCollection } from "@rebasepro/admin-types";
5
7
  import { mergeDeep } from "@rebasepro/utils";
6
8
 
7
9
  export function useBuildCollectionRegistryController(props: {
@@ -21,7 +23,7 @@ export function useBuildCollectionRegistryController(props: {
21
23
  const getCollection = useCallback((
22
24
  slugOrPath: string,
23
25
  includeUserOverride = false
24
- ): CollectionConfig | undefined => {
26
+ ): AdminCollection | undefined => {
25
27
 
26
28
  const registry = collectionRegistryRef.current;
27
29
 
@@ -38,7 +40,7 @@ export function useBuildCollectionRegistryController(props: {
38
40
 
39
41
  if (!collectionPath) return undefined;
40
42
 
41
- let collection: CollectionConfig | undefined;
43
+ let collection: AdminCollection | undefined;
42
44
  try {
43
45
  collection = registry.resolvePathToCollections(collectionPath).finalCollection;
44
46
  } catch (e) {
@@ -50,13 +52,12 @@ export function useBuildCollectionRegistryController(props: {
50
52
  return undefined;
51
53
  }
52
54
 
53
-
54
55
  const userOverride = includeUserOverride ? userConfigPersistence?.getCollectionConfig(slugOrPath) : undefined;
55
56
  const overriddenCollection = collection ? mergeDeep(collection, userOverride ?? {}) : undefined;
56
57
 
57
58
  if (!overriddenCollection) return undefined;
58
59
 
59
- let result: Partial<CollectionConfig> | undefined = overriddenCollection;
60
+ let result: Partial<AdminCollection> | undefined = overriddenCollection;
60
61
  const subcollections = "subcollections" in overriddenCollection ? overriddenCollection.subcollections : undefined;
61
62
  const callbacks = overriddenCollection.callbacks;
62
63
  result = {
@@ -68,12 +69,15 @@ export function useBuildCollectionRegistryController(props: {
68
69
  (result as Record<string, unknown>).subcollections = (result as Record<string, unknown>).subcollections ?? subcollections;
69
70
  }
70
71
 
71
- return { ...overriddenCollection,
72
- ...result } as CollectionConfig;
72
+ // Flatten the admin block: everything downstream of here is the panel's
73
+ // view model, not the authoring shape. Applied after the user-override
74
+ // merge so an override of a presentation field still wins.
75
+ return resolveAdminCollection({ ...overriddenCollection,
76
+ ...result } as AdminCollection);
73
77
 
74
78
  }, [userConfigPersistence]);
75
79
 
76
- const getRawCollection = useCallback((slugOrPath: string): CollectionConfig | undefined => {
80
+ const getRawCollection = useCallback((slugOrPath: string): AdminCollection | undefined => {
77
81
  const registry = collectionRegistryRef.current;
78
82
  if (registry === undefined) return undefined;
79
83
 
@@ -82,7 +86,7 @@ export function useBuildCollectionRegistryController(props: {
82
86
 
83
87
  const pathSegments = cleanedPath.split("/");
84
88
 
85
- return registry.getRaw(pathSegments.join("/")) as CollectionConfig | undefined;
89
+ return registry.getRaw(pathSegments.join("/")) as AdminCollection | undefined;
86
90
  }, []);
87
91
 
88
92
  const getParentReferencesFromPath = useCallback((path: string): EntityReference[] => {
@@ -115,7 +119,7 @@ export function useBuildCollectionRegistryController(props: {
115
119
  result.push(oddPathSegments.slice(0, i));
116
120
  }
117
121
 
118
- const getCollectionFromPaths = (pathSegments: string[]): CollectionConfig | undefined => {
122
+ const getCollectionFromPaths = (pathSegments: string[]): AdminCollection | undefined => {
119
123
  if (!pathSegments?.length) return undefined;
120
124
  const testPath = pathSegments.reduce((acc, segment, idx) => {
121
125
  if (idx === 0) return segment;
@@ -144,11 +148,11 @@ export function useBuildCollectionRegistryController(props: {
144
148
  const convertIdsToPaths = useCallback((ids: string[]): string[] => {
145
149
  const registry = collectionRegistryRef.current;
146
150
  if (!registry) return [];
147
- let currentCollections: CollectionConfig[] = registry.getCollections();
151
+ let currentCollections: AdminCollection[] = registry.getCollections();
148
152
  const paths: string[] = [];
149
153
  for (let i = 0; i < ids.length; i++) {
150
154
  const id = ids[i];
151
- const collection: CollectionConfig | undefined = currentCollections.find(c => c.slug === id);
155
+ const collection: AdminCollection | undefined = currentCollections.find(c => c.slug === id);
152
156
  if (!collection)
153
157
  throw Error(`Collection with id ${id} not found`);
154
158
  paths.push(collection.slug);
@@ -157,7 +161,7 @@ export function useBuildCollectionRegistryController(props: {
157
161
  return paths;
158
162
  }, []);
159
163
 
160
- const collections = collectionRegistryRef.current.getCollections();
164
+ const collections = collectionRegistryRef.current.getCollections().map(resolveAdminCollection);
161
165
 
162
166
  // Determine initialised automatically based on whether collections exist,
163
167
  // though the NavigationStateController also plays a role in overall init