@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
@@ -1,123 +0,0 @@
1
- import { useState, useRef, useCallback, useEffect, useMemo } from "react";
2
- import { useApiConfig } from "@rebasepro/core";
3
- function useEntityHistory(params) {
4
- const {
5
- slug,
6
- entityId,
7
- enabled = true,
8
- pageSize = 10
9
- } = params;
10
- const apiConfig = useApiConfig();
11
- const [entries, setEntries] = useState([]);
12
- const [total, setTotal] = useState(0);
13
- const [isLoading, setIsLoading] = useState(false);
14
- const [hasMore, setHasMore] = useState(true);
15
- const [error, setError] = useState();
16
- const [offset, setOffset] = useState(0);
17
- const [refreshTrigger, setRefreshTrigger] = useState(0);
18
- const currentEntityRef = useRef(void 0);
19
- const fetchEntries = useCallback(async (currentOffset, signal) => {
20
- if (!apiConfig?.apiUrl || !entityId || !enabled) return;
21
- setIsLoading(true);
22
- setError(void 0);
23
- try {
24
- const token = await apiConfig.getAuthToken?.();
25
- const headers = {
26
- "Content-Type": "application/json"
27
- };
28
- if (token) headers["Authorization"] = `Bearer ${token}`;
29
- const url = `${apiConfig.apiUrl}/api/data/${slug}/${entityId}/history?limit=${pageSize}&offset=${currentOffset}`;
30
- const response = await fetch(url, {
31
- headers,
32
- signal
33
- });
34
- if (signal?.aborted) return;
35
- const entityKey = `${slug}/${entityId}`;
36
- if (currentEntityRef.current !== entityKey) return;
37
- if (!response.ok) {
38
- const errorData = await response.json().catch(() => ({
39
- error: {
40
- message: response.statusText
41
- }
42
- }));
43
- throw new Error(errorData.error?.message || `Failed to fetch history (${response.status})`);
44
- }
45
- const result = await response.json();
46
- if (currentOffset === 0) {
47
- setEntries(result.data);
48
- } else {
49
- setEntries((prev) => [...prev, ...result.data]);
50
- }
51
- setTotal(result.meta.total);
52
- setHasMore(result.meta.hasMore);
53
- } catch (err) {
54
- if (err instanceof DOMException && err.name === "AbortError") return;
55
- setError(err instanceof Error ? err : new Error(String(err)));
56
- } finally {
57
- setIsLoading(false);
58
- }
59
- }, [apiConfig, slug, entityId, enabled, pageSize]);
60
- useEffect(() => {
61
- const entityKey_0 = `${slug}/${entityId}`;
62
- const isNewEntity = currentEntityRef.current !== entityKey_0;
63
- if (isNewEntity) {
64
- currentEntityRef.current = entityKey_0;
65
- setEntries([]);
66
- setTotal(0);
67
- setHasMore(true);
68
- setOffset(0);
69
- }
70
- if (!enabled || !entityId) return;
71
- const abortController = new AbortController();
72
- const effectiveOffset = isNewEntity ? 0 : offset;
73
- fetchEntries(effectiveOffset, abortController.signal);
74
- return () => {
75
- abortController.abort();
76
- };
77
- }, [fetchEntries, offset, enabled, entityId, slug, refreshTrigger]);
78
- const loadMore = useCallback(() => {
79
- if (!isLoading && hasMore && offset + entries.length < total) {
80
- setOffset((prev_0) => prev_0 + pageSize);
81
- }
82
- }, [isLoading, hasMore, pageSize, offset, entries.length, total]);
83
- const revert = useCallback(async (historyId) => {
84
- if (!apiConfig?.apiUrl || !entityId) {
85
- throw new Error("Cannot revert: missing API configuration or entity ID");
86
- }
87
- const token_0 = await apiConfig.getAuthToken?.();
88
- const headers_0 = {
89
- "Content-Type": "application/json"
90
- };
91
- if (token_0) headers_0["Authorization"] = `Bearer ${token_0}`;
92
- const url_0 = `${apiConfig.apiUrl}/api/data/${slug}/${entityId}/history/${historyId}/revert`;
93
- const response_0 = await fetch(url_0, {
94
- method: "POST",
95
- headers: headers_0
96
- });
97
- if (!response_0.ok) {
98
- const errorData_0 = await response_0.json().catch(() => ({
99
- error: {
100
- message: response_0.statusText
101
- }
102
- }));
103
- throw new Error(errorData_0.error?.message || `Failed to revert (${response_0.status})`);
104
- }
105
- const result_0 = await response_0.json();
106
- currentEntityRef.current = void 0;
107
- setRefreshTrigger((prev_1) => prev_1 + 1);
108
- return result_0.data;
109
- }, [apiConfig, slug, entityId]);
110
- return useMemo(() => ({
111
- entries,
112
- total,
113
- isLoading,
114
- hasMore,
115
- error,
116
- loadMore,
117
- revert
118
- }), [entries, total, isLoading, hasMore, error, loadMore, revert]);
119
- }
120
- export {
121
- useEntityHistory as u
122
- };
123
- //# sourceMappingURL=useEntityHistory-UVsSclfZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useEntityHistory-UVsSclfZ.js","sources":["../src/hooks/useEntityHistory.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState, useMemo } from \"react\";\nimport { useApiConfig } from \"@rebasepro/core\";\n\nexport interface HistoryEntryData {\n id: string;\n table_name: string;\n entity_id: string;\n action: \"create\" | \"update\" | \"delete\";\n changed_fields: string[] | null;\n values: Record<string, unknown> | null;\n previous_values: Record<string, unknown> | null;\n updated_by: string | null;\n updated_at: string;\n}\n\nexport interface UseEntityHistoryResult {\n entries: HistoryEntryData[];\n total: number;\n isLoading: boolean;\n hasMore: boolean;\n error?: Error;\n loadMore: () => void;\n revert: (historyId: string) => Promise<Record<string, unknown>>;\n}\n\n/**\n * Hook to fetch entity history from the backend REST API.\n * Replaces the old subcollection-based approach with a proper API call.\n */\nexport function useEntityHistory(params: {\n slug: string;\n entityId: string | number | undefined;\n enabled?: boolean;\n pageSize?: number;\n}): UseEntityHistoryResult {\n const { slug, entityId, enabled = true, pageSize = 10 } = params;\n const apiConfig = useApiConfig();\n\n const [entries, setEntries] = useState<HistoryEntryData[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n const [error, setError] = useState<Error | undefined>();\n const [offset, setOffset] = useState(0);\n const [refreshTrigger, setRefreshTrigger] = useState(0);\n\n // Track the current entity identity so we can detect stale responses\n const currentEntityRef = useRef<string | undefined>(undefined);\n\n const fetchEntries = useCallback(async (\n currentOffset: number,\n signal?: AbortSignal\n ) => {\n if (!apiConfig?.apiUrl || !entityId || !enabled) return;\n\n setIsLoading(true);\n setError(undefined);\n\n try {\n const token = await apiConfig.getAuthToken?.();\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\"\n };\n if (token) headers[\"Authorization\"] = `Bearer ${token}`;\n\n const url = `${apiConfig.apiUrl}/api/data/${slug}/${entityId}/history?limit=${pageSize}&offset=${currentOffset}`;\n const response = await fetch(url, { headers,\nsignal });\n\n // Check if the request was aborted or the entity changed while in-flight\n if (signal?.aborted) return;\n const entityKey = `${slug}/${entityId}`;\n if (currentEntityRef.current !== entityKey) return;\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({ error: { message: response.statusText } }));\n throw new Error(errorData.error?.message || `Failed to fetch history (${response.status})`);\n }\n\n const result = await response.json();\n\n if (currentOffset === 0) {\n setEntries(result.data);\n } else {\n setEntries(prev => [...prev, ...result.data]);\n }\n\n setTotal(result.meta.total);\n setHasMore(result.meta.hasMore);\n } catch (err) {\n // Don't set error state for intentional aborts\n if (err instanceof DOMException && err.name === \"AbortError\") return;\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsLoading(false);\n }\n }, [apiConfig, slug, entityId, enabled, pageSize]);\n\n // Single unified effect: reset state when entity changes, fetch when offset changes.\n // Uses AbortController to cancel stale requests on entity change or unmount.\n useEffect(() => {\n const entityKey = `${slug}/${entityId}`;\n const isNewEntity = currentEntityRef.current !== entityKey;\n\n if (isNewEntity) {\n // Reset state for new entity\n currentEntityRef.current = entityKey;\n setEntries([]);\n setTotal(0);\n setHasMore(true);\n setOffset(0);\n }\n\n if (!enabled || !entityId) return;\n\n const abortController = new AbortController();\n // When entity changed, always fetch from offset 0\n const effectiveOffset = isNewEntity ? 0 : offset;\n fetchEntries(effectiveOffset, abortController.signal);\n\n return () => {\n abortController.abort();\n };\n }, [fetchEntries, offset, enabled, entityId, slug, refreshTrigger]);\n\n const loadMore = useCallback(() => {\n if (!isLoading && hasMore && offset + entries.length < total) {\n setOffset(prev => prev + pageSize);\n }\n }, [isLoading, hasMore, pageSize, offset, entries.length, total]);\n\n const revert = useCallback(async (historyId: string): Promise<Record<string, unknown>> => {\n if (!apiConfig?.apiUrl || !entityId) {\n throw new Error(\"Cannot revert: missing API configuration or entity ID\");\n }\n\n const token = await apiConfig.getAuthToken?.();\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\"\n };\n if (token) headers[\"Authorization\"] = `Bearer ${token}`;\n\n const url = `${apiConfig.apiUrl}/api/data/${slug}/${entityId}/history/${historyId}/revert`;\n const response = await fetch(url, { method: \"POST\",\nheaders });\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({ error: { message: response.statusText } }));\n throw new Error(errorData.error?.message || `Failed to revert (${response.status})`);\n }\n\n const result = await response.json();\n\n // Refresh the history list after revert by resetting the entity ref\n // and triggering the effect.\n currentEntityRef.current = undefined;\n setRefreshTrigger(prev => prev + 1);\n\n // Return the reverted entity data so callers can update the form\n return result.data as Record<string, unknown>;\n }, [apiConfig, slug, entityId]);\n\n return useMemo(() => ({\n entries,\n total,\n isLoading,\n hasMore,\n error,\n loadMore,\n revert\n }), [entries, total, isLoading, hasMore, error, loadMore, revert]);\n}\n"],"names":["useEntityHistory","params","slug","entityId","enabled","pageSize","apiConfig","useApiConfig","entries","setEntries","useState","total","setTotal","isLoading","setIsLoading","hasMore","setHasMore","error","setError","offset","setOffset","refreshTrigger","setRefreshTrigger","currentEntityRef","useRef","undefined","fetchEntries","useCallback","currentOffset","signal","apiUrl","token","getAuthToken","headers","url","response","fetch","aborted","entityKey","current","ok","errorData","json","catch","message","statusText","Error","status","result","data","prev","meta","err","DOMException","name","String","useEffect","isNewEntity","abortController","AbortController","effectiveOffset","abort","loadMore","length","revert","historyId","method","useMemo"],"mappings":";;AA6BO,SAASA,iBAAiBC,QAKN;AACvB,QAAM;AAAA,IAAEC;AAAAA,IAAMC;AAAAA,IAAUC,UAAU;AAAA,IAAMC,WAAW;AAAA,EAAA,IAAOJ;AAC1D,QAAMK,YAAYC,aAAAA;AAElB,QAAM,CAACC,SAASC,UAAU,IAAIC,SAA6B,CAAA,CAAE;AAC7D,QAAM,CAACC,OAAOC,QAAQ,IAAIF,SAAS,CAAC;AACpC,QAAM,CAACG,WAAWC,YAAY,IAAIJ,SAAS,KAAK;AAChD,QAAM,CAACK,SAASC,UAAU,IAAIN,SAAS,IAAI;AAC3C,QAAM,CAACO,OAAOC,QAAQ,IAAIR,SAAAA;AAC1B,QAAM,CAACS,QAAQC,SAAS,IAAIV,SAAS,CAAC;AACtC,QAAM,CAACW,gBAAgBC,iBAAiB,IAAIZ,SAAS,CAAC;AAGtD,QAAMa,mBAAmBC,OAA2BC,MAAS;AAE7D,QAAMC,eAAeC,YAAY,OAC7BC,eACAC,WACC;AACD,QAAI,CAACvB,WAAWwB,UAAU,CAAC3B,YAAY,CAACC,QAAS;AAEjDU,iBAAa,IAAI;AACjBI,aAASO,MAAS;AAElB,QAAI;AACA,YAAMM,QAAQ,MAAMzB,UAAU0B,eAAAA;AAC9B,YAAMC,UAAkC;AAAA,QACpC,gBAAgB;AAAA,MAAA;AAEpB,UA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