@rebasepro/admin 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/dist/CollectionEditorDialog-jA-PLh6N.js +3549 -0
  2. package/dist/CollectionEditorDialog-jA-PLh6N.js.map +1 -0
  3. package/dist/CollectionsStudioView-UKouBPOm.js +170 -0
  4. package/dist/CollectionsStudioView-UKouBPOm.js.map +1 -0
  5. package/dist/PropertyEditView-DEUddmg_.js +3660 -0
  6. package/dist/PropertyEditView-DEUddmg_.js.map +1 -0
  7. package/dist/collection_editor/ConfigControllerProvider.d.ts +2 -2
  8. package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -1
  9. package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +2 -1
  10. package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
  11. package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
  12. package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
  13. package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
  14. package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -1
  15. package/dist/collection_editor/ui/MissingReferenceWidget.d.ts +1 -1
  16. package/dist/collection_editor/ui/NewCollectionButton.d.ts +1 -1
  17. package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
  18. package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +1 -1
  19. package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +1 -1
  20. package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
  21. package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -1
  22. package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -2
  23. package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
  24. package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -1
  25. package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
  26. package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.d.ts +2 -1
  27. package/dist/collection_editor/ui/collection_editor/CollectionRelationsTab.d.ts +2 -1
  28. package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -1
  29. package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.d.ts +1 -9
  30. package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -1
  31. package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
  32. package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -1
  33. package/dist/collection_editor/ui/collection_editor/EntityActionsSelectDialog.d.ts +2 -1
  34. package/dist/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.d.ts +2 -1
  35. package/dist/collection_editor/ui/collection_editor/EnumForm.d.ts +2 -1
  36. package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -1
  37. package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -1
  38. package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.d.ts +2 -1
  39. package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +1 -1
  40. package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +4 -4
  41. package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +2 -2
  42. package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -2
  43. package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +2 -1
  44. package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +2 -1
  45. package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
  46. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
  47. package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +3 -2
  48. package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +2 -1
  49. package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.d.ts +2 -1
  50. package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.d.ts +2 -1
  51. package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.d.ts +2 -1
  52. package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.d.ts +2 -1
  53. package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +2 -1
  54. package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.d.ts +2 -1
  55. package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.d.ts +2 -1
  56. package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.d.ts +3 -2
  57. package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +2 -1
  58. package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +2 -1
  59. package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.d.ts +2 -1
  60. package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.d.ts +2 -1
  61. package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.d.ts +2 -1
  62. package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +2 -1
  63. package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +2 -1
  64. package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.d.ts +2 -1
  65. package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.d.ts +1 -1
  66. package/dist/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.d.ts +2 -1
  67. package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +2 -1
  68. package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +2 -1
  69. package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +2 -1
  70. package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +2 -1
  71. package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.d.ts +1 -1
  72. package/dist/collection_editor_ui.js +4 -11
  73. package/dist/components/ArrayContainer.d.ts +3 -3
  74. package/dist/components/ClearFilterSortButton.d.ts +1 -1
  75. package/dist/components/CollectionEditorDialogs.d.ts +2 -1
  76. package/dist/components/CollectionPanel.d.ts +2 -27
  77. package/dist/components/DefaultAppBar.d.ts +1 -1
  78. package/dist/components/DefaultDrawer.d.ts +4 -4
  79. package/dist/components/DeleteEntityDialog.d.ts +2 -1
  80. package/dist/components/DrawerNavigationGroup.d.ts +1 -1
  81. package/dist/components/DrawerNavigationItem.d.ts +1 -1
  82. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  83. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
  84. package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +3 -3
  85. package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +3 -3
  86. package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +3 -3
  87. package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +2 -1
  88. package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
  89. package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +1 -1
  90. package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +2 -1
  91. package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +2 -1
  92. package/dist/components/EntityCollectionTable/fields/VirtualTableSelect.d.ts +1 -1
  93. package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +2 -1
  94. package/dist/components/EntityCollectionTable/fields/VirtualTableUserSelect.d.ts +1 -1
  95. package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
  96. package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
  97. package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
  98. package/dist/components/EntityCollectionView/Board.d.ts +2 -1
  99. package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
  100. package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
  101. package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
  102. package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
  103. package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
  104. package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
  105. package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +1 -1
  106. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +0 -24
  107. package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +1 -1
  108. package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
  109. package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +2 -1
  110. package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
  111. package/dist/components/EntityCollectionView/SplitListView.d.ts +1 -1
  112. package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
  113. package/dist/components/EntityDetailView.d.ts +1 -1
  114. package/dist/components/EntityEditView.d.ts +2 -2
  115. package/dist/components/EntityEditViewFormActions.d.ts +2 -1
  116. package/dist/components/EntityJsonPreview.d.ts +2 -1
  117. package/dist/components/EntityPreview.d.ts +3 -3
  118. package/dist/components/EntitySidePanel.d.ts +2 -1
  119. package/dist/components/EntityView.d.ts +2 -1
  120. package/dist/components/FieldCaption.d.ts +1 -1
  121. package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
  122. package/dist/components/HomePage/FavouritesView.d.ts +1 -1
  123. package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
  124. package/dist/components/HomePage/NavigationCard.d.ts +1 -1
  125. package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
  126. package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
  127. package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
  128. package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
  129. package/dist/components/PropertyCollectionView.d.ts +2 -1
  130. package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
  131. package/dist/components/RebaseAuthGate.d.ts +1 -1
  132. package/dist/components/RebaseLayout.d.ts +1 -1
  133. package/dist/components/RebaseNavigation.d.ts +1 -1
  134. package/dist/components/RebaseRouteDefs.d.ts +1 -1
  135. package/dist/components/RebaseShell.d.ts +1 -1
  136. package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
  137. package/dist/components/ReferenceWidget.d.ts +2 -1
  138. package/dist/components/SearchIconsView.d.ts +2 -1
  139. package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
  140. package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
  141. package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
  142. package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
  143. package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +2 -1
  144. package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
  145. package/dist/components/SideDialogs.d.ts +1 -1
  146. package/dist/components/SideEntityProvider.d.ts +1 -1
  147. package/dist/components/admin/CreationResultDialog.d.ts +2 -1
  148. package/dist/components/app/AppBar.d.ts +1 -1
  149. package/dist/components/app/Drawer.d.ts +1 -1
  150. package/dist/components/common/default_entity_actions.d.ts +2 -1
  151. package/dist/components/history/EntityHistoryEntry.d.ts +1 -1
  152. package/dist/components/history/EntityHistoryView.d.ts +1 -1
  153. package/dist/components/history/LastEditedByFormAction.d.ts +2 -1
  154. package/dist/components/history/LastEditedByIndicator.d.ts +2 -1
  155. package/dist/components/history/UserChip.d.ts +1 -1
  156. package/dist/data_export/export/BasicExportAction.d.ts +2 -1
  157. package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
  158. package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
  159. package/dist/data_import/components/ImportFileUpload.d.ts +1 -1
  160. package/dist/data_import/components/ImportNewPropertyFieldPreview.d.ts +2 -1
  161. package/dist/data_import/components/ImportSaveInProgress.d.ts +1 -1
  162. package/dist/data_import/import/ImportCollectionAction.d.ts +4 -3
  163. package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
  164. package/dist/editor/editor.d.ts +1 -1
  165. package/dist/editor/selectors/color-selector.d.ts +1 -1
  166. package/dist/editor/selectors/link-selector.d.ts +1 -1
  167. package/dist/editor/selectors/node-selector.d.ts +1 -1
  168. package/dist/editor/selectors/text-buttons.d.ts +1 -1
  169. package/dist/editor.js +2621 -3574
  170. package/dist/editor.js.map +1 -1
  171. package/dist/form/EntityForm.d.ts +2 -1
  172. package/dist/form/EntityFormActions.d.ts +2 -1
  173. package/dist/form/components/FieldHelperText.d.ts +1 -1
  174. package/dist/form/components/FormEntry.d.ts +1 -1
  175. package/dist/form/components/FormLayout.d.ts +1 -1
  176. package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
  177. package/dist/form/components/LocalChangesMenu.d.ts +2 -1
  178. package/dist/form/components/StorageItemPreview.d.ts +2 -1
  179. package/dist/form/components/StorageUploadProgress.d.ts +2 -1
  180. package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
  181. package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
  182. package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
  183. package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
  184. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
  185. package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
  186. package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +2 -1
  187. package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
  188. package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +2 -1
  189. package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
  190. package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
  191. package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
  192. package/dist/form/field_bindings/RelationFieldBinding.d.ts +2 -1
  193. package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
  194. package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
  195. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
  196. package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
  197. package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
  198. package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
  199. package/dist/form/field_bindings/VectorFieldBinding.d.ts +2 -1
  200. package/dist/history-BL49TIDb.js +311 -0
  201. package/dist/history-BL49TIDb.js.map +1 -0
  202. package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +0 -2
  203. package/dist/hooks/navigation/useNavigationResolution.d.ts +5 -6
  204. package/dist/hooks/navigation/useResolvedCollections.d.ts +0 -2
  205. package/dist/hooks/useBreadcrumbsController.d.ts +2 -32
  206. package/dist/index.js +2 -3393
  207. package/dist/markdown-CklalUUk.js +526 -0
  208. package/dist/markdown-CklalUUk.js.map +1 -0
  209. package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
  210. package/dist/preview/components/EmptyValue.d.ts +2 -1
  211. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  212. package/dist/preview/components/ImagePreview.d.ts +2 -1
  213. package/dist/preview/components/ReferencePreview.d.ts +2 -1
  214. package/dist/preview/components/RelationPreview.d.ts +2 -1
  215. package/dist/preview/components/StorageThumbnail.d.ts +1 -1
  216. package/dist/preview/components/UserPreview.d.ts +6 -3
  217. package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
  218. package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
  219. package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
  220. package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
  221. package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
  222. package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
  223. package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
  224. package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
  225. package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
  226. package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
  227. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  228. package/dist/routes/RebaseRoute.d.ts +1 -1
  229. package/dist/src-BJ8fkM8y.js +24010 -0
  230. package/dist/src-BJ8fkM8y.js.map +1 -0
  231. package/dist/types/components/PropertyPreviewProps.d.ts +4 -0
  232. package/dist/types/components/formex.d.ts +1 -40
  233. package/dist/types/fields.d.ts +9 -1
  234. package/dist/util/navigation_utils.d.ts +2 -1
  235. package/dist/util/previews.d.ts +5 -0
  236. package/dist/util/property_utils.d.ts +1 -1
  237. package/package.json +29 -26
  238. package/src/collection_editor/ConfigControllerProvider.tsx +10 -7
  239. package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +2 -1
  240. package/src/collection_editor/ui/EditorCollectionAction.tsx +2 -1
  241. package/src/collection_editor/ui/EditorCollectionActionStart.tsx +2 -1
  242. package/src/collection_editor/ui/EditorEntityAction.tsx +2 -1
  243. package/src/collection_editor/ui/KanbanSetupAction.tsx +2 -1
  244. package/src/collection_editor/ui/MissingReferenceWidget.tsx +2 -1
  245. package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +2 -1
  246. package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +2 -3
  247. package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1
  248. package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +8 -4
  249. package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -1
  250. package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +1 -1
  251. package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +5 -2
  252. package/src/collection_editor/useLocalCollectionsConfigController.tsx +7 -2
  253. package/src/collection_editor/validateCollectionJson.ts +2 -2
  254. package/src/components/CollectionPanel.tsx +51 -25
  255. package/src/components/DefaultAppBar.tsx +1 -2
  256. package/src/components/DefaultDrawer.tsx +3 -2
  257. package/src/components/DrawerNavigationGroup.tsx +3 -2
  258. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +30 -9
  259. package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
  260. package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -0
  261. package/src/components/EntityCollectionView/Board.tsx +10 -8
  262. package/src/components/EntityCollectionView/BoardSortableList.tsx +2 -2
  263. package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +4 -2
  264. package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +14 -4
  265. package/src/components/EntityCollectionView/EntityCollectionListView.tsx +48 -26
  266. package/src/components/EntityCollectionView/EntityCollectionView.tsx +146 -73
  267. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +2 -1
  268. package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +3 -2
  269. package/src/components/EntityCollectionView/FilterPresetsButton.tsx +4 -2
  270. package/src/components/EntityCollectionView/ViewModeToggle.tsx +0 -1
  271. package/src/components/EntityCollectionView/useBoardDataController.tsx +17 -15
  272. package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +29 -19
  273. package/src/components/EntityDetailView.tsx +66 -30
  274. package/src/components/EntityEditView.tsx +70 -32
  275. package/src/components/EntitySidePanel.tsx +6 -3
  276. package/src/components/HomePage/ContentHomePage.tsx +3 -3
  277. package/src/components/HomePage/NavigationCard.tsx +5 -5
  278. package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
  279. package/src/components/RebaseLayout.tsx +5 -2
  280. package/src/components/RebaseNavigation.tsx +1 -4
  281. package/src/components/RebaseRouteDefs.tsx +5 -3
  282. package/src/components/SearchIconsView.tsx +1 -1
  283. package/src/components/SelectableTable/SelectableTable.tsx +2 -3
  284. package/src/components/SelectableTable/SelectionStore.ts +9 -3
  285. package/src/components/UserSelector.tsx +92 -2
  286. package/src/components/common/default_entity_actions.tsx +23 -6
  287. package/src/components/field_configs.tsx +6 -3
  288. package/src/editor/editor.tsx +1 -1
  289. package/src/editor/extensions/Image/index.ts +2 -2
  290. package/src/editor/extensions/Image.ts +2 -2
  291. package/src/editor/extensions/clipboard.ts +2 -2
  292. package/src/editor/markdown-it-plugins.d.ts +24 -0
  293. package/src/editor/markdown.ts +2 -3
  294. package/src/form/EntityForm.tsx +21 -15
  295. package/src/form/field_bindings/MapFieldBinding.tsx +3 -3
  296. package/src/form/field_bindings/VectorFieldBinding.tsx +3 -3
  297. package/src/form/validation.ts +17 -15
  298. package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -6
  299. package/src/hooks/navigation/useNavigationResolution.ts +143 -19
  300. package/src/hooks/navigation/useResolvedCollections.ts +4 -6
  301. package/src/hooks/useBreadcrumbsController.tsx +2 -34
  302. package/src/hooks/useBuildSideEntityController.tsx +25 -3
  303. package/src/preview/PropertyPreview.tsx +6 -2
  304. package/src/preview/components/ReferencePreview.tsx +64 -13
  305. package/src/preview/components/RelationPreview.tsx +101 -13
  306. package/src/preview/components/UserPreview.tsx +5 -14
  307. package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
  308. package/src/routes/RebaseRoute.tsx +5 -4
  309. package/src/types/components/PropertyPreviewProps.tsx +5 -0
  310. package/src/types/components/formex.tsx +1 -45
  311. package/src/types/fields.tsx +10 -1
  312. package/src/util/navigation_utils.ts +14 -4
  313. package/src/util/previews.ts +101 -4
  314. package/dist/CollectionEditorDialog-C8E440oK.js +0 -4574
  315. package/dist/CollectionEditorDialog-C8E440oK.js.map +0 -1
  316. package/dist/CollectionsStudioView-Brr_b06v.js +0 -217
  317. package/dist/CollectionsStudioView-Brr_b06v.js.map +0 -1
  318. package/dist/ExportCollectionAction-D3TTYXrq.js +0 -446
  319. package/dist/ExportCollectionAction-D3TTYXrq.js.map +0 -1
  320. package/dist/ImportCollectionAction-Dn7lya6E.js +0 -685
  321. package/dist/ImportCollectionAction-Dn7lya6E.js.map +0 -1
  322. package/dist/PropertyEditView-ChBleIbN.js +0 -8197
  323. package/dist/PropertyEditView-ChBleIbN.js.map +0 -1
  324. package/dist/collection_editor_ui.js.map +0 -1
  325. package/dist/index-D3S9x_RP.js +0 -462
  326. package/dist/index-D3S9x_RP.js.map +0 -1
  327. package/dist/index-D9RNzm01.js +0 -12
  328. package/dist/index-D9RNzm01.js.map +0 -1
  329. package/dist/index-DrrT332R.js +0 -8
  330. package/dist/index-DrrT332R.js.map +0 -1
  331. package/dist/index.js.map +0 -1
  332. package/dist/markdown-DD2JDU1X.js +0 -618
  333. package/dist/markdown-DD2JDU1X.js.map +0 -1
  334. package/dist/useEntityHistory-UVsSclfZ.js +0 -123
  335. package/dist/useEntityHistory-UVsSclfZ.js.map +0 -1
  336. package/dist/util-COYYD8zr.js +0 -30474
  337. package/dist/util-COYYD8zr.js.map +0 -1
@@ -5,11 +5,12 @@ import {
5
5
  RebaseRoutes,
6
6
  UserSettingsView,
7
7
  UIReferenceView,
8
- NotFoundPage
8
+ NotFoundPage,
9
+ useComponentOverride
9
10
  } from "@rebasepro/core";
10
11
  import { CircularProgressCenter } from "@rebasepro/ui";
11
12
 
12
- import { ContentHomePage } from "./HomePage/ContentHomePage";
13
+ import { ContentHomePage as DefaultHomePage } from "./HomePage/ContentHomePage";
13
14
 
14
15
  import { RebaseRoute } from "../routes/RebaseRoute";
15
16
  import { CustomViewRoute } from "../routes/CustomViewRoute";
@@ -65,7 +66,8 @@ export function RebaseRouteDefs({ children, layout }: RebaseRouteDefsProps) {
65
66
  const registry = useRebaseRegistry();
66
67
  const navigationStateController = useNavigationStateController();
67
68
 
68
- const cmsHomePage = registry.cmsConfig?.homePage ?? <Suspense fallback={<CircularProgressCenter/>}><ContentHomePage/></Suspense>;
69
+ const ResolvedHomePage = useComponentOverride("HomePage", DefaultHomePage);
70
+ const cmsHomePage = registry.cmsConfig?.homePage ?? <Suspense fallback={<CircularProgressCenter/>}><ResolvedHomePage/></Suspense>;
69
71
  const studioHomePage = registry.studioConfig?.homePage;
70
72
 
71
73
  const combinedViews = useMemo(() => [
@@ -17,7 +17,7 @@ const UPDATE_SEARCH_INDEX_WAIT_MS = 220;
17
17
 
18
18
 
19
19
  function toPascalCase(str: string): string {
20
- return str.split(/[-_]/).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
20
+ return str.split(/[-_]/).map(word => word.charAt(0).toUpperCase() + word.slice(1)).join("");
21
21
  }
22
22
 
23
23
  function resolveIcon(iconKey: string): React.ComponentType<{ size: number }> | null {
@@ -24,7 +24,7 @@ export type SelectableTableProps<M extends Record<string, unknown>> = {
24
24
 
25
25
  columns: VirtualTableColumn[];
26
26
 
27
- cellRenderer: React.ComponentType<CellRendererParams<Entity<M>>>;
27
+ cellRenderer: (props: CellRendererParams<Entity<M>>) => React.ReactNode;
28
28
 
29
29
  /**
30
30
  * Builder for creating the buttons in each row
@@ -247,8 +247,7 @@ export const SelectableTable = function SelectableTable<M extends Record<string,
247
247
  <VirtualTable
248
248
  data={data as unknown as Record<string, unknown>[]}
249
249
  columns={columns}
250
- // @ts-ignore
251
- cellRenderer={cellRenderer}
250
+ cellRenderer={(props) => cellRenderer(props as unknown as CellRendererParams<Entity<M>>)}
252
251
  onRowClick={inlineEditing ? undefined : (onEntityClick ? onRowClick : undefined)}
253
252
  onEndReached={loadNextPage}
254
253
  onResetPagination={resetPagination}
@@ -32,7 +32,9 @@ export function createSelectionStore() {
32
32
  listeners.forEach(l => l());
33
33
  }
34
34
 
35
- return { getSnapshot, subscribe, select };
35
+ return { getSnapshot,
36
+ subscribe,
37
+ select };
36
38
  }
37
39
 
38
40
  export type SelectionStore = ReturnType<typeof createSelectionStore>;
@@ -51,8 +53,12 @@ export function useCellSelected(
51
53
  // Memoize a selector that derives a boolean from the store snapshot.
52
54
  // useSyncExternalStore calls this on every store notification, but
53
55
  // React only re-renders when the returned value !== the previous one.
54
- const selectorRef = useRef({ propertyKey, entityPath, entityId });
55
- selectorRef.current = { propertyKey, entityPath, entityId };
56
+ const selectorRef = useRef({ propertyKey,
57
+ entityPath,
58
+ entityId });
59
+ selectorRef.current = { propertyKey,
60
+ entityPath,
61
+ entityId };
56
62
 
57
63
  const getSnapshot = useCallback(() => {
58
64
  const cell = store.getSnapshot();
@@ -21,10 +21,100 @@ import * as React from "react";
21
21
  import { useCallback, useEffect, useRef, useState } from "react";
22
22
  import { Command as CommandPrimitive } from "cmdk";
23
23
  import { User } from "@rebasepro/types";
24
- import { useUserSelector, UserSelectorItem } from "@rebasepro/core";
25
- import { UserDisplay } from "@rebasepro/core";
24
+ import { useRebaseClient, useAuthController, UserDisplay } from "@rebasepro/core";
26
25
  import { EmptyValue } from "../preview";
27
26
 
27
+ interface UserSelectorItem {
28
+ uid: string;
29
+ label: string;
30
+ description?: string;
31
+ user: User;
32
+ }
33
+
34
+ const DEFAULT_PAGE_SIZE = 10;
35
+
36
+ /**
37
+ * Local hook to fetch users from the collection REST API with search and pagination.
38
+ */
39
+ function useUserSelector({ pageSize = DEFAULT_PAGE_SIZE }: { pageSize?: number } = {}) {
40
+ const client = useRebaseClient<{ baseUrl?: string }>();
41
+ const { getAuthToken } = useAuthController();
42
+
43
+ const [items, setItems] = useState<UserSelectorItem[]>([]);
44
+ const [isLoading, setIsLoading] = useState(false);
45
+ const [hasMore, setHasMore] = useState(true);
46
+ const [currentSearch, setCurrentSearch] = useState("");
47
+ const offsetRef = useRef(0);
48
+ const userCacheRef = useRef<Map<string, User>>(new Map());
49
+
50
+ const fetchUsers = useCallback(async (searchStr: string, offset: number, append: boolean) => {
51
+ if (!client?.baseUrl) return;
52
+ setIsLoading(true);
53
+ try {
54
+ const token = await getAuthToken?.();
55
+ const params = new URLSearchParams({
56
+ limit: String(pageSize),
57
+ offset: String(offset)
58
+ });
59
+ if (searchStr) params.set("search", searchStr);
60
+ const response = await fetch(`${client.baseUrl}/api/users?${params}`, {
61
+ headers: token ? { Authorization: `Bearer ${token}` } : {}
62
+ });
63
+ if (!response.ok) throw new Error("Failed to fetch users");
64
+ const data = await response.json();
65
+ const rows: Record<string, unknown>[] = data.data ?? data.users ?? [];
66
+ const newItems: UserSelectorItem[] = rows.map((r: Record<string, unknown>) => {
67
+ const user: User = {
68
+ uid: (r.id as string) ?? "",
69
+ email: (r.email as string) ?? "",
70
+ displayName: (r.displayName as string) ?? (r.display_name as string) ?? null,
71
+ photoURL: (r.photoURL as string) ?? (r.photo_url as string) ?? null,
72
+ providerId: "custom",
73
+ isAnonymous: false,
74
+ roles: (r.roles as string[]) ?? []
75
+ };
76
+ userCacheRef.current.set(user.uid, user);
77
+ return { uid: user.uid,
78
+ label: user.displayName ?? user.email ?? user.uid,
79
+ user };
80
+ });
81
+ setItems(prev => append ? [...prev, ...newItems] : newItems);
82
+ setHasMore(newItems.length >= pageSize);
83
+ offsetRef.current = offset + newItems.length;
84
+ } catch {
85
+ setHasMore(false);
86
+ } finally {
87
+ setIsLoading(false);
88
+ }
89
+ }, [client?.baseUrl, getAuthToken, pageSize]);
90
+
91
+ useEffect(() => {
92
+ offsetRef.current = 0;
93
+ fetchUsers("", 0, false);
94
+ }, [fetchUsers]);
95
+
96
+ const search = useCallback((searchStr: string) => {
97
+ setCurrentSearch(searchStr);
98
+ offsetRef.current = 0;
99
+ fetchUsers(searchStr, 0, false);
100
+ }, [fetchUsers]);
101
+
102
+ const loadMore = useCallback(() => {
103
+ fetchUsers(currentSearch, offsetRef.current, true);
104
+ }, [fetchUsers, currentSearch]);
105
+
106
+ const getUser = useCallback((uid: string): User | null => {
107
+ return userCacheRef.current.get(uid) ?? null;
108
+ }, []);
109
+
110
+ return { items,
111
+ isLoading,
112
+ hasMore,
113
+ search,
114
+ loadMore,
115
+ getUser };
116
+ }
117
+
28
118
  export interface UserSelectorProps {
29
119
  className?: string;
30
120
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import { CopyIcon, iconSize, KeyRoundIcon, PencilIcon, Trash2Icon } from "@rebasepro/ui";
2
2
  import type { EntityAction, User, UserCreationResult } from "@rebasepro/types";
3
- import { ConfirmationDialog, useInternalUserManagementController, useSnackbarController, useTranslation } from "@rebasepro/core";
3
+ import { ConfirmationDialog, useSnackbarController, useTranslation, useRebaseClient, useAuthController } from "@rebasepro/core";
4
4
  import { DeleteEntityDialog } from "../DeleteEntityDialog";
5
5
  import { addRecentId } from "../EntityCollectionView/utils";
6
6
  import { navigateToEntity } from "../../util/navigation_utils";
@@ -168,18 +168,35 @@ export function ResetPasswordActionDialog({
168
168
  open: boolean;
169
169
  onClose: () => void;
170
170
  }) {
171
- const userManagement = useInternalUserManagementController();
171
+ const client = useRebaseClient<{ baseUrl?: string }>();
172
+ const { getAuthToken } = useAuthController();
172
173
  const snackbarController = useSnackbarController();
173
174
  const { t } = useTranslation();
174
175
  const [loading, setLoading] = useState(false);
175
176
  const [creationResult, setCreationResult] = useState<UserCreationResult | null>(null);
176
177
 
177
178
  const handleConfirm = async () => {
178
- if (!userManagement?.resetPassword) return;
179
179
  setLoading(true);
180
180
  try {
181
- const result = await userManagement.resetPassword(user);
182
- setCreationResult(result);
181
+ const baseUrl = client?.baseUrl || "";
182
+ const token = await getAuthToken?.();
183
+ const response = await fetch(`${baseUrl}/api/admin/users/${user.uid}/reset-password`, {
184
+ method: "POST",
185
+ headers: {
186
+ "Content-Type": "application/json",
187
+ ...(token ? { "Authorization": `Bearer ${token}` } : {})
188
+ }
189
+ });
190
+ if (!response.ok) {
191
+ const error = await response.json().catch(() => ({}));
192
+ throw new Error(error.message || "Failed to reset password");
193
+ }
194
+ const data = await response.json();
195
+ setCreationResult({
196
+ user,
197
+ invitationSent: data.invitationSent ?? false,
198
+ temporaryPassword: data.temporaryPassword
199
+ });
183
200
  snackbarController.open({
184
201
  type: "success",
185
202
  message: t("reset_password_success") || "Password reset successfully"
@@ -228,7 +245,7 @@ export const resetPasswordAction: EntityAction = {
228
245
  isEnabled: ({ entity }) => Boolean(entity),
229
246
  onClick({
230
247
  entity,
231
- context,
248
+ context
232
249
  }): Promise<void> {
233
250
  if (!entity) {
234
251
  throw new Error("INTERNAL: resetPasswordAction: Entity is undefined");
@@ -63,7 +63,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
63
63
  color: "#2d7ff9",
64
64
  property: {
65
65
  type: "string",
66
- ui: { multiline: true, Field: TextFieldBinding }
66
+ ui: { multiline: true,
67
+ Field: TextFieldBinding }
67
68
  }
68
69
  },
69
70
  markdown: {
@@ -74,7 +75,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
74
75
  color: "#2d7ff9",
75
76
  property: {
76
77
  type: "string",
77
- ui: { markdown: true, Field: MarkdownEditorFieldBinding }
78
+ ui: { markdown: true,
79
+ Field: MarkdownEditorFieldBinding }
78
80
  }
79
81
  },
80
82
  url: {
@@ -85,7 +87,8 @@ export const DEFAULT_FIELD_CONFIGS: Record<DefaultFieldConfig, PropertyConfig> =
85
87
  color: "#154fb3",
86
88
  property: {
87
89
  type: "string",
88
- ui: { url: true, Field: TextFieldBinding }
90
+ ui: { url: true,
91
+ Field: TextFieldBinding }
89
92
  }
90
93
  },
91
94
  email: {
@@ -154,7 +154,7 @@ onJsonContentChange };
154
154
  // the reverted value.
155
155
  const versionRef = useRef(version);
156
156
  useEffect(() => {
157
- if (versionRef.current === version) return; // skip initial render
157
+ if (versionRef.current === version) return; // skip initial render
158
158
  versionRef.current = version;
159
159
  if (!view) return;
160
160
  try {
@@ -5,8 +5,8 @@ import { schema } from "../../schema";
5
5
  export type UploadFn = (image: File) => Promise<string>;
6
6
 
7
7
  export async function onFileRead(view: EditorView, readerEvent: ProgressEvent<FileReader>, pos: number, upload: UploadFn, image: File) {
8
- // @ts-ignore
9
- const plugin = view.state.plugins.find((p: Plugin) => p.key === ImagePluginKey.key);
8
+ const state = view.state as typeof view.state & { plugins: Plugin[] };
9
+ const plugin = state.plugins.find((p: Plugin) => p.spec.key === ImagePluginKey);
10
10
  if (!plugin) {
11
11
  console.error("Image plugin not found");
12
12
  return;
@@ -8,8 +8,8 @@ export async function onFileRead(view: EditorView, readerEvent: ProgressEvent<Fi
8
8
 
9
9
  const { schema } = view.state;
10
10
 
11
- // @ts-ignore
12
- const plugin = view.state.plugins.find((p: Plugin) => p.key === ImagePluginKey.key);
11
+ const state = view.state as typeof view.state & { plugins: Plugin[] };
12
+ const plugin = state.plugins.find((p: Plugin) => p.spec.key === ImagePluginKey);
13
13
  if (!plugin) {
14
14
  console.error("Image plugin not found");
15
15
  return;
@@ -16,8 +16,8 @@ export function serializeForClipboard(view: EditorView, slice: Slice) {
16
16
  openStart--
17
17
  openEnd--
18
18
  const node = content.firstChild!
19
- // @ts-ignore
20
- context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null)
19
+ const nodeType = node.type as typeof node.type & { defaultAttrs?: unknown };
20
+ context.push(node.type.name, node.attrs != nodeType.defaultAttrs ? node.attrs : null)
21
21
  content = node.content
22
22
  }
23
23
 
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Ambient module declarations for markdown-it plugins that do not ship
3
+ * their own type declarations and have no DefinitelyTyped packages.
4
+ *
5
+ * Each plugin exports a default function that is a standard markdown-it
6
+ * plugin: it receives a MarkdownIt instance and optional options.
7
+ */
8
+ declare module "markdown-it-task-lists" {
9
+ import type MarkdownIt from "markdown-it";
10
+ const markdownItTaskLists: MarkdownIt.PluginSimple;
11
+ export default markdownItTaskLists;
12
+ }
13
+
14
+ declare module "markdown-it-mark" {
15
+ import type MarkdownIt from "markdown-it";
16
+ const markdownItMark: MarkdownIt.PluginSimple;
17
+ export default markdownItMark;
18
+ }
19
+
20
+ declare module "markdown-it-ins" {
21
+ import type MarkdownIt from "markdown-it";
22
+ const markdownItIns: MarkdownIt.PluginSimple;
23
+ export default markdownItIns;
24
+ }
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/triple-slash-reference */
2
+ /// <reference path="./markdown-it-plugins.d.ts" />
1
3
  import {
2
4
  MarkdownParser,
3
5
  MarkdownSerializer,
@@ -5,11 +7,8 @@ import {
5
7
  defaultMarkdownSerializer
6
8
  } from "prosemirror-markdown";
7
9
  import markdownIt from "markdown-it";
8
- // @ts-expect-error -- markdown-it-task-lists does not ship type declarations
9
10
  import markdownItTaskLists from "markdown-it-task-lists";
10
- // @ts-expect-error -- markdown-it-mark does not ship type declarations
11
11
  import markdownItMark from "markdown-it-mark";
12
- // @ts-expect-error -- markdown-it-ins does not ship type declarations
13
12
  import markdownItIns from "markdown-it-ins";
14
13
 
15
14
  import { schema } from "./schema";
@@ -31,7 +31,7 @@ import { EntityFormActions } from "./EntityFormActions";
31
31
  import type { EntityFormActionsProps } from "../types/components/EntityFormActionsProps";
32
32
  import { LocalChangesMenu } from "./components/LocalChangesMenu";
33
33
 
34
- import { getEntityTitlePropertyKey } from "../util/previews";
34
+ import { getEntityTitlePropertyKey, resolveTitleToString } from "../util/previews";
35
35
  import { getValueInPath, isObject, mergeDeep } from "@rebasepro/utils";
36
36
  import { useCollectionRegistryController, useSideEntityController, useCMSContext } from "../index";
37
37
 
@@ -249,11 +249,19 @@ export function EntityForm<M extends Record<string, unknown>>({
249
249
 
250
250
  return save(values)
251
251
  ?.then((savedEntity) => {
252
- formexController.resetForm({
253
- values: savedEntity?.values || values,
254
- submitCount: 0,
255
- touched: {}
256
- });
252
+ if (savedEntity) {
253
+ formexController.resetForm({
254
+ values: savedEntity.values || values,
255
+ submitCount: 0,
256
+ touched: {}
257
+ });
258
+ if (!autoSave) {
259
+ snackbarController.open({
260
+ type: "success",
261
+ message: `${collection.singularName ?? collection.name}: ${t("saved_correctly")}`
262
+ });
263
+ }
264
+ }
257
265
  })
258
266
  .finally(() => {
259
267
  formexController.setSubmitting(false);
@@ -372,11 +380,6 @@ export function EntityForm<M extends Record<string, unknown>>({
372
380
 
373
381
  clearDirtyCache();
374
382
  onValuesModified?.(false, updatedEntity.values);
375
- if (!autoSave)
376
- snackbarController.open({
377
- type: "success",
378
- message: `${collection.singularName ?? collection.name}: ${t("saved_correctly")}`
379
- });
380
383
  onEntityChange?.(updatedEntity);
381
384
  updateStatus("existing");
382
385
  setEntityId(updatedEntity.id);
@@ -502,6 +505,7 @@ export function EntityForm<M extends Record<string, unknown>>({
502
505
  entityId: entityId as string,
503
506
  path,
504
507
  save,
508
+ submit: formex.handleSubmit,
505
509
  formex,
506
510
  entity,
507
511
  savingError,
@@ -520,7 +524,8 @@ export function EntityForm<M extends Record<string, unknown>>({
520
524
 
521
525
  const formActionProps: PluginFormActionProps = {
522
526
  entityId,
523
- parentCollectionSlugs, parentEntityIds,
527
+ parentCollectionSlugs,
528
+ parentEntityIds,
524
529
  path: path,
525
530
  status,
526
531
  collection: collection as EntityCollection,
@@ -534,9 +539,10 @@ export function EntityForm<M extends Record<string, unknown>>({
534
539
  const pluginFormAfter = useSlot("form.after", formActionProps);
535
540
 
536
541
  const titlePropertyKey = getEntityTitlePropertyKey(collection, customizationController.propertyConfigs);
537
- const title = (formex.values && titlePropertyKey ? getValueInPath(formex.values, titlePropertyKey) as React.ReactNode : undefined)
538
- ?? collection.singularName
539
- ?? collection.name;
542
+ const rawTitle = formex.values && titlePropertyKey ? getValueInPath(formex.values, titlePropertyKey) : undefined;
543
+ const title = rawTitle !== undefined && rawTitle !== null
544
+ ? resolveTitleToString(rawTitle)
545
+ : (collection.singularName ?? collection.name);
540
546
 
541
547
  useEffect(() => {
542
548
  if (!autoSave) {
@@ -38,7 +38,7 @@ export function MapFieldBinding({
38
38
  const { t } = useTranslation();
39
39
 
40
40
  if (!property.properties) {
41
- throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${propertyKey}`);
41
+ throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property '${propertyKey}'${property.name ? ` ("${property.name}")` : ""}`);
42
42
  }
43
43
 
44
44
  const mapProperties = property.properties;
@@ -82,7 +82,6 @@ export function MapFieldBinding({
82
82
  </div>
83
83
 
84
84
 
85
-
86
85
  </>
87
86
  ;
88
87
 
@@ -92,7 +91,8 @@ export function MapFieldBinding({
92
91
  {!minimalistView && <ExpandablePanel initiallyExpanded={expanded}
93
92
  onExpandedChange={(expanded: boolean) => {
94
93
  onPropertyChange?.({
95
- ui: { ...property.ui, expanded }
94
+ ui: { ...property.ui,
95
+ expanded }
96
96
  });
97
97
  }}
98
98
  className={property.ui?.widthPercentage !== undefined ? "mt-8" : undefined}
@@ -41,8 +41,8 @@ export function VectorFieldBinding({
41
41
  };
42
42
 
43
43
  // Extract array value from the custom { __type: "Vector", value: number[] } wrapper
44
- const arrayValue = isVectorObject(value)
45
- ? value.value
44
+ const arrayValue = isVectorObject(value)
45
+ ? value.value
46
46
  : (Array.isArray(value) ? value : []);
47
47
 
48
48
  const [textValue, setTextValue] = useState(() => arrayValue.join(", "));
@@ -108,7 +108,7 @@ export function VectorFieldBinding({
108
108
  <div className="flex items-center justify-between flex-wrap gap-2">
109
109
  <div className="flex items-center gap-2.5">
110
110
  {/* Status Dot */}
111
- <div className={`w-2.5 h-2.5 rounded-full ${isPopulated ? 'bg-emerald-500 animate-pulse' : 'bg-surface-300 dark:bg-surface-600'}`} />
111
+ <div className={`w-2.5 h-2.5 rounded-full ${isPopulated ? "bg-emerald-500 animate-pulse" : "bg-surface-300 dark:bg-surface-600"}`} />
112
112
  <span className="text-sm font-semibold text-text-primary dark:text-text-primary-dark">
113
113
  {isPopulated ? `${arrayValue.length} Dimensions` : "Empty Vector"}
114
114
  </span>
@@ -229,7 +229,7 @@ function getZodNumberSchema({
229
229
  const n = Number(val);
230
230
  return isNaN(n) ? val : n; // pass through non-numeric to let refine catch it
231
231
  },
232
- z.number({ invalid_type_error: "Must be a number" }).nullable()
232
+ z.number({ error: "Must be a number" }).nullable()
233
233
  );
234
234
 
235
235
  const isRequired = validation?.required || property.isId === true || property.isId === "manual";
@@ -446,17 +446,19 @@ function getZodArraySchema({
446
446
  });
447
447
  arraySchema = z.array(
448
448
  z.any().superRefine(async (object, ctx) => {
449
- // Find the matching schema from zodProperties based on the path
450
- const parentPath = ctx.path.slice(0, -1).join(".");
451
- const index = ctx.path[ctx.path.length - 1];
452
- const key = parentPath ? `${parentPath}[${index}]` : `${name}[${index}]`;
453
- const zodProperty = getValueInPath(zodProperties, key) as ZodTypeAny | undefined;
454
- if (zodProperty) {
455
- const result = await zodProperty.safeParseAsync(object);
456
- if (!result.success) {
457
- result.error.issues.forEach((issue) => {
458
- ctx.addIssue(issue);
459
- });
449
+ // In Zod v4, ctx.path is not available in superRefine.
450
+ // Instead, iterate all zodProperties and validate against each.
451
+ for (const [key, zodProperty] of Object.entries(zodProperties)) {
452
+ if (zodProperty) {
453
+ const result = await (zodProperty as ZodTypeAny).safeParseAsync(object);
454
+ if (!result.success) {
455
+ result.error.issues.forEach((issue) => {
456
+ ctx.addIssue({
457
+ code: "custom",
458
+ message: issue.message
459
+ });
460
+ });
461
+ }
460
462
  }
461
463
  }
462
464
  })
@@ -537,21 +539,21 @@ function getZodVectorSchema({
537
539
  },
538
540
  z.array(z.number()).nullable().optional()
539
541
  );
540
-
542
+
541
543
  if (property.dimensions) {
542
544
  schema = schema.refine(
543
545
  (val: unknown) => val === null || val === undefined || (Array.isArray(val) && val.length === property.dimensions),
544
546
  { message: `${property.name ?? "Vector"} must have exactly ${property.dimensions} dimensions` }
545
547
  );
546
548
  }
547
-
549
+
548
550
  if (property.validation?.required) {
549
551
  schema = schema.refine(
550
552
  (val: unknown) => val !== null && val !== undefined && Array.isArray(val) && val.length > 0,
551
553
  { message: property.validation?.requiredMessage ?? "Required" }
552
554
  );
553
555
  }
554
-
556
+
555
557
  return schema;
556
558
  }
557
559
 
@@ -5,7 +5,6 @@ import { AuthController, RebaseData, CollectionRegistryController, User } from "
5
5
  import type { EntityCollectionsBuilder, AppViewsBuilder, EffectiveRoleController } from "@rebasepro/types";
6
6
  import { CollectionRegistry } from "@rebasepro/common";
7
7
 
8
- import { UserManagementDelegate } from "@rebasepro/types";
9
8
 
10
9
  import { useResolvedCollections } from "./useResolvedCollections";
11
10
  import { useResolvedViews } from "./useResolvedViews";
@@ -25,7 +24,7 @@ export type BuildNavigationStateProps<EC extends EntityCollection, USER extends
25
24
  urlController: UrlController;
26
25
  adminMode?: "content" | "studio" | "settings";
27
26
  effectiveRoleController?: EffectiveRoleController;
28
- userManagement?: UserManagementDelegate<USER>;
27
+
29
28
  };
30
29
 
31
30
  /**
@@ -55,8 +54,7 @@ export function useBuildNavigationStateController<EC extends EntityCollection, U
55
54
  collectionRegistryController,
56
55
  urlController,
57
56
  adminMode = "content",
58
- effectiveRoleController,
59
- userManagement
57
+ effectiveRoleController
60
58
  } = props;
61
59
 
62
60
  const {
@@ -70,8 +68,7 @@ export function useBuildNavigationStateController<EC extends EntityCollection, U
70
68
  data,
71
69
  plugins,
72
70
  disabled,
73
- collectionRegistryController,
74
- userManagement
71
+ collectionRegistryController
75
72
  });
76
73
 
77
74
  const {