@rebasepro/plugin-data-enhancement 0.2.1 → 0.2.3

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 (348) hide show
  1. package/dist/admin/src/collection_editor/CollectionEditorDialogsContext.d.ts +19 -0
  2. package/dist/admin/src/collection_editor/ConfigControllerProvider.d.ts +41 -0
  3. package/dist/admin/src/collection_editor/_cms_internals.d.ts +29 -0
  4. package/dist/admin/src/collection_editor/api/generateCollectionApi.d.ts +77 -0
  5. package/dist/admin/src/collection_editor/index.d.ts +16 -0
  6. package/dist/admin/src/collection_editor/pgColumnToProperty.d.ts +6 -0
  7. package/dist/admin/src/collection_editor/types/collection_editor_controller.d.ts +59 -0
  8. package/dist/admin/src/collection_editor/types/collection_inference.d.ts +10 -0
  9. package/dist/admin/src/collection_editor/types/config_controller.d.ts +98 -0
  10. package/dist/admin/src/collection_editor/types/config_permissions.d.ts +19 -0
  11. package/dist/admin/src/collection_editor/ui/EditorCollectionAction.d.ts +2 -0
  12. package/dist/admin/src/collection_editor/ui/MissingReferenceWidget.d.ts +3 -0
  13. package/dist/admin/src/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +36 -0
  14. package/dist/admin/src/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +20 -0
  15. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +71 -0
  16. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +19 -0
  17. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +7 -0
  18. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +16 -0
  19. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionRLSTab.d.ts +12 -0
  20. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +5 -0
  21. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionYupValidation.d.ts +14 -0
  22. package/dist/admin/src/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +5 -0
  23. package/dist/admin/src/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +3 -0
  24. package/dist/admin/src/collection_editor/ui/collection_editor/EnumForm.d.ts +12 -0
  25. package/dist/admin/src/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +7 -0
  26. package/dist/admin/src/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +6 -0
  27. package/dist/admin/src/collection_editor/ui/collection_editor/KanbanConfigSection.d.ts +4 -0
  28. package/dist/admin/src/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +5 -0
  29. package/dist/admin/src/collection_editor/ui/collection_editor/PropertyEditView.d.ts +47 -0
  30. package/dist/admin/src/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +16 -0
  31. package/dist/admin/src/collection_editor/ui/collection_editor/PropertyTree.d.ts +31 -0
  32. package/dist/admin/src/collection_editor/ui/collection_editor/SwitchControl.d.ts +8 -0
  33. package/dist/admin/src/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +6 -0
  34. package/dist/admin/src/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +7 -0
  35. package/dist/admin/src/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +13 -0
  36. package/dist/admin/src/collection_editor/ui/collection_editor/import/clean_import_data.d.ts +7 -0
  37. package/dist/admin/src/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +7 -0
  38. package/dist/admin/src/collection_editor/ui/collection_editor/properties/BooleanPropertyField.d.ts +3 -0
  39. package/dist/admin/src/collection_editor/ui/collection_editor/properties/CommonPropertyFields.d.ts +10 -0
  40. package/dist/admin/src/collection_editor/ui/collection_editor/properties/DateTimePropertyField.d.ts +3 -0
  41. package/dist/admin/src/collection_editor/ui/collection_editor/properties/EnumPropertyField.d.ts +9 -0
  42. package/dist/admin/src/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.d.ts +3 -0
  43. package/dist/admin/src/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +7 -0
  44. package/dist/admin/src/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.d.ts +4 -0
  45. package/dist/admin/src/collection_editor/ui/collection_editor/properties/NumberPropertyField.d.ts +3 -0
  46. package/dist/admin/src/collection_editor/ui/collection_editor/properties/ReferencePropertyField.d.ts +14 -0
  47. package/dist/admin/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +9 -0
  48. package/dist/admin/src/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +9 -0
  49. package/dist/admin/src/collection_editor/ui/collection_editor/properties/StoragePropertyField.d.ts +5 -0
  50. package/dist/admin/src/collection_editor/ui/collection_editor/properties/StringPropertyField.d.ts +5 -0
  51. package/dist/admin/src/collection_editor/ui/collection_editor/properties/UrlPropertyField.d.ts +4 -0
  52. package/dist/admin/src/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +3 -0
  53. package/dist/admin/src/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +3 -0
  54. package/dist/admin/src/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +5 -0
  55. package/dist/admin/src/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +4 -0
  56. package/dist/admin/src/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +3 -0
  57. package/dist/admin/src/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +11 -0
  58. package/dist/admin/src/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.d.ts +3 -0
  59. package/dist/admin/src/collection_editor/ui/collection_editor/templates/blog_template.d.ts +2 -0
  60. package/dist/admin/src/collection_editor/ui/collection_editor/templates/pages_template.d.ts +2 -0
  61. package/dist/admin/src/collection_editor/ui/collection_editor/templates/products_template.d.ts +2 -0
  62. package/dist/admin/src/collection_editor/ui/collection_editor/templates/users_template.d.ts +2 -0
  63. package/dist/admin/src/collection_editor/ui/collection_editor/util.d.ts +5 -0
  64. package/dist/admin/src/collection_editor/ui/collection_editor/utils/strings.d.ts +1 -0
  65. package/dist/admin/src/collection_editor/ui/collection_editor/utils/supported_fields.d.ts +3 -0
  66. package/dist/admin/src/collection_editor/ui/collection_editor/utils/update_property_for_widget.d.ts +2 -0
  67. package/dist/admin/src/collection_editor/useCollectionEditorController.d.ts +6 -0
  68. package/dist/admin/src/collection_editor/useCollectionsConfigController.d.ts +6 -0
  69. package/dist/admin/src/collection_editor/useLocalCollectionsConfigController.d.ts +6 -0
  70. package/dist/admin/src/collection_editor/validateCollectionJson.d.ts +22 -0
  71. package/dist/admin/src/components/AdminModeSyncer.d.ts +17 -0
  72. package/dist/admin/src/components/ArrayContainer.d.ts +58 -0
  73. package/dist/admin/src/components/ClearFilterSortButton.d.ts +5 -0
  74. package/dist/admin/src/components/CollectionEditorDialogs.d.ts +15 -0
  75. package/dist/admin/src/components/DefaultAppBar.d.ts +29 -0
  76. package/dist/admin/src/components/DefaultDrawer.d.ts +29 -0
  77. package/dist/admin/src/components/DeleteEntityDialog.d.ts +13 -0
  78. package/dist/admin/src/components/DrawerNavigationGroup.d.ts +49 -0
  79. package/dist/admin/src/components/DrawerNavigationItem.d.ts +10 -0
  80. package/dist/admin/src/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +39 -0
  81. package/dist/admin/src/components/EntityCollectionTable/EntityCollectionTable.d.ts +27 -0
  82. package/dist/admin/src/components/EntityCollectionTable/EntityCollectionTableProps.d.ts +129 -0
  83. package/dist/admin/src/components/EntityCollectionTable/PropertyTableCell.d.ts +26 -0
  84. package/dist/admin/src/components/EntityCollectionTable/column_utils.d.ts +16 -0
  85. package/dist/admin/src/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +21 -0
  86. package/dist/admin/src/components/EntityCollectionTable/fields/TableReferenceField.d.ts +22 -0
  87. package/dist/admin/src/components/EntityCollectionTable/fields/TableRelationField.d.ts +22 -0
  88. package/dist/admin/src/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +20 -0
  89. package/dist/admin/src/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +35 -0
  90. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +12 -0
  91. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +9 -0
  92. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +8 -0
  93. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableSelect.d.ts +15 -0
  94. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +7 -0
  95. package/dist/admin/src/components/EntityCollectionTable/fields/VirtualTableUserSelect.d.ts +12 -0
  96. package/dist/admin/src/components/EntityCollectionTable/index.d.ts +6 -0
  97. package/dist/admin/src/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +25 -0
  98. package/dist/admin/src/components/EntityCollectionTable/internal/EntityTableCell.d.ts +32 -0
  99. package/dist/admin/src/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +9 -0
  100. package/dist/admin/src/components/EntityCollectionTable/internal/common.d.ts +5 -0
  101. package/dist/admin/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +27 -0
  102. package/dist/admin/src/components/EntityCollectionTable/internal/popup_field/useDraggable.d.ts +13 -0
  103. package/dist/admin/src/components/EntityCollectionTable/internal/popup_field/useWindowSize.d.ts +6 -0
  104. package/dist/admin/src/components/EntityCollectionTable/table_bindings.d.ts +28 -0
  105. package/dist/admin/src/components/EntityCollectionView/Board.d.ts +2 -0
  106. package/dist/admin/src/components/EntityCollectionView/BoardColumn.d.ts +42 -0
  107. package/dist/admin/src/components/EntityCollectionView/BoardColumnTitle.d.ts +9 -0
  108. package/dist/admin/src/components/EntityCollectionView/BoardSortableList.d.ts +14 -0
  109. package/dist/admin/src/components/EntityCollectionView/EntityBoardCard.d.ts +31 -0
  110. package/dist/admin/src/components/EntityCollectionView/EntityCard.d.ts +20 -0
  111. package/dist/admin/src/components/EntityCollectionView/EntityCollectionBoardView.d.ts +22 -0
  112. package/dist/admin/src/components/EntityCollectionView/EntityCollectionCardView.d.ts +32 -0
  113. package/dist/admin/src/components/EntityCollectionView/EntityCollectionListView.d.ts +50 -0
  114. package/dist/admin/src/components/EntityCollectionView/EntityCollectionView.d.ts +65 -0
  115. package/dist/admin/src/components/EntityCollectionView/EntityCollectionViewActions.d.ts +20 -0
  116. package/dist/admin/src/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +20 -0
  117. package/dist/admin/src/components/EntityCollectionView/FilterPresetsButton.d.ts +21 -0
  118. package/dist/admin/src/components/EntityCollectionView/FiltersDialog.d.ts +15 -0
  119. package/dist/admin/src/components/EntityCollectionView/SplitListView.d.ts +58 -0
  120. package/dist/admin/src/components/EntityCollectionView/ViewModeToggle.d.ts +44 -0
  121. package/dist/admin/src/components/EntityCollectionView/board_types.d.ts +105 -0
  122. package/dist/admin/src/components/EntityCollectionView/hooks/useCollectionInlineEditor.d.ts +12 -0
  123. package/dist/admin/src/components/EntityCollectionView/hooks/useKanbanDragAndDrop.d.ts +19 -0
  124. package/dist/admin/src/components/EntityCollectionView/useBoardDataController.d.ts +61 -0
  125. package/dist/admin/src/components/EntityCollectionView/useEntityPreviewSlots.d.ts +101 -0
  126. package/dist/admin/src/components/EntityCollectionView/useSelectionController.d.ts +2 -0
  127. package/dist/admin/src/components/EntityCollectionView/utils.d.ts +3 -0
  128. package/dist/admin/src/components/EntityDetailView.d.ts +31 -0
  129. package/dist/admin/src/components/EntityEditView.d.ts +57 -0
  130. package/dist/admin/src/components/EntityEditViewFormActions.d.ts +2 -0
  131. package/dist/admin/src/components/EntityJsonPreview.d.ts +3 -0
  132. package/dist/admin/src/components/EntityPreview.d.ts +56 -0
  133. package/dist/admin/src/components/EntitySidePanel.d.ts +10 -0
  134. package/dist/admin/src/components/EntityView.d.ts +12 -0
  135. package/dist/admin/src/components/FieldCaption.d.ts +5 -0
  136. package/dist/admin/src/components/HomePage/ContentHomePage.d.ts +11 -0
  137. package/dist/admin/src/components/HomePage/FavouritesView.d.ts +3 -0
  138. package/dist/admin/src/components/HomePage/HomePageDnD.d.ts +77 -0
  139. package/dist/admin/src/components/HomePage/NavigationCard.d.ts +11 -0
  140. package/dist/admin/src/components/HomePage/NavigationCardBinding.d.ts +18 -0
  141. package/dist/admin/src/components/HomePage/NavigationGroup.d.ts +11 -0
  142. package/dist/admin/src/components/HomePage/RenameGroupDialog.d.ts +9 -0
  143. package/dist/admin/src/components/HomePage/SmallNavigationCard.d.ts +6 -0
  144. package/dist/admin/src/components/PropertyCollectionView.d.ts +24 -0
  145. package/dist/admin/src/components/PropertyConfigBadge.d.ts +6 -0
  146. package/dist/admin/src/components/PropertyIdCopyTooltip.d.ts +8 -0
  147. package/dist/admin/src/components/RebaseAuthGate.d.ts +21 -0
  148. package/dist/admin/src/components/RebaseCMS.d.ts +10 -0
  149. package/dist/admin/src/components/RebaseLayout.d.ts +32 -0
  150. package/dist/admin/src/components/RebaseNavigation.d.ts +24 -0
  151. package/dist/admin/src/components/RebaseRouteDefs.d.ts +30 -0
  152. package/dist/admin/src/components/RebaseShell.d.ts +25 -0
  153. package/dist/admin/src/components/ReferenceTable/EntitySelectionTable.d.ts +59 -0
  154. package/dist/admin/src/components/ReferenceWidget.d.ts +30 -0
  155. package/dist/admin/src/components/RelationSelector.d.ts +32 -0
  156. package/dist/admin/src/components/SearchIconsView.d.ts +5 -0
  157. package/dist/admin/src/components/SelectableTable/SelectableTable.d.ts +95 -0
  158. package/dist/admin/src/components/SelectableTable/SelectableTableContext.d.ts +4 -0
  159. package/dist/admin/src/components/SelectableTable/SelectionStore.d.ts +26 -0
  160. package/dist/admin/src/components/SelectableTable/filters/BooleanFilterField.d.ts +9 -0
  161. package/dist/admin/src/components/SelectableTable/filters/DateTimeFilterField.d.ts +12 -0
  162. package/dist/admin/src/components/SelectableTable/filters/ReferenceFilterField.d.ts +15 -0
  163. package/dist/admin/src/components/SelectableTable/filters/RelationFilterField.d.ts +12 -0
  164. package/dist/admin/src/components/SelectableTable/filters/StringNumberFilterField.d.ts +13 -0
  165. package/dist/admin/src/components/SideDialogs.d.ts +25 -0
  166. package/dist/admin/src/components/SideEntityProvider.d.ts +32 -0
  167. package/dist/admin/src/components/UserSelector.d.ts +18 -0
  168. package/dist/admin/src/components/admin/CreationResultDialog.d.ts +5 -0
  169. package/dist/admin/src/components/admin/RoleChip.d.ts +4 -0
  170. package/dist/admin/src/components/admin/RolesFilterSelect.d.ts +2 -0
  171. package/dist/admin/src/components/admin/RolesView.d.ts +4 -0
  172. package/dist/admin/src/components/admin/UserRolesSelectField.d.ts +2 -0
  173. package/dist/admin/src/components/admin/UsersView.d.ts +4 -0
  174. package/dist/admin/src/components/app/AppBar.d.ts +12 -0
  175. package/dist/admin/src/components/app/Drawer.d.ts +19 -0
  176. package/dist/admin/src/components/app/Scaffold.d.ts +34 -0
  177. package/dist/admin/src/components/app/useApp.d.ts +17 -0
  178. package/dist/admin/src/components/common/default_entity_actions.d.ts +10 -0
  179. package/dist/admin/src/components/common/index.d.ts +1 -0
  180. package/dist/admin/src/components/field_configs.d.ts +7 -0
  181. package/dist/admin/src/components/history/EntityHistoryEntry.d.ts +17 -0
  182. package/dist/admin/src/components/history/EntityHistoryView.d.ts +6 -0
  183. package/dist/admin/src/components/history/LastEditedByFormAction.d.ts +6 -0
  184. package/dist/admin/src/components/history/LastEditedByIndicator.d.ts +10 -0
  185. package/dist/admin/src/components/history/UserChip.d.ts +4 -0
  186. package/dist/admin/src/components/history/index.d.ts +5 -0
  187. package/dist/admin/src/components/index.d.ts +39 -0
  188. package/dist/admin/src/contexts/BreacrumbsContext.d.ts +8 -0
  189. package/dist/admin/src/contexts/SideDialogsControllerContext.d.ts +3 -0
  190. package/dist/admin/src/data_export/export/BasicExportAction.d.ts +7 -0
  191. package/dist/admin/src/data_export/export/ExportCollectionAction.d.ts +11 -0
  192. package/dist/admin/src/data_export/export/export.d.ts +22 -0
  193. package/dist/admin/src/data_export/export/index.d.ts +3 -0
  194. package/dist/admin/src/data_export/index.d.ts +1 -0
  195. package/dist/admin/src/data_import/components/DataNewPropertiesMapping.d.ts +13 -0
  196. package/dist/admin/src/data_import/components/ImportFileUpload.d.ts +3 -0
  197. package/dist/admin/src/data_import/components/ImportNewPropertyFieldPreview.d.ts +9 -0
  198. package/dist/admin/src/data_import/components/ImportSaveInProgress.d.ts +8 -0
  199. package/dist/admin/src/data_import/components/index.d.ts +4 -0
  200. package/dist/admin/src/data_import/hooks/index.d.ts +1 -0
  201. package/dist/admin/src/data_import/hooks/useImportConfig.d.ts +2 -0
  202. package/dist/admin/src/data_import/import/ImportCollectionAction.d.ts +15 -0
  203. package/dist/admin/src/data_import/import/index.d.ts +1 -0
  204. package/dist/admin/src/data_import/index.d.ts +5 -0
  205. package/dist/admin/src/data_import/types/column_mapping.d.ts +20 -0
  206. package/dist/admin/src/data_import/types/index.d.ts +1 -0
  207. package/dist/admin/src/data_import/utils/data.d.ts +4 -0
  208. package/dist/admin/src/data_import/utils/file_headers.d.ts +6 -0
  209. package/dist/admin/src/data_import/utils/file_to_json.d.ts +6 -0
  210. package/dist/admin/src/data_import/utils/get_import_inference_type.d.ts +2 -0
  211. package/dist/admin/src/data_import/utils/index.d.ts +3 -0
  212. package/dist/admin/src/data_import/utils/transforms.d.ts +11 -0
  213. package/dist/admin/src/editor/components/SlashCommandMenu.d.ts +6 -0
  214. package/dist/admin/src/editor/components/editor-bubble-item.d.ts +8 -0
  215. package/dist/admin/src/editor/components/editor-bubble.d.ts +8 -0
  216. package/dist/admin/src/editor/components/image-bubble.d.ts +5 -0
  217. package/dist/admin/src/editor/components/index.d.ts +16 -0
  218. package/dist/admin/src/editor/components/table-bubble.d.ts +5 -0
  219. package/dist/admin/src/editor/editor.d.ts +30 -0
  220. package/dist/admin/src/editor/extensions/HighlightDecorationExtension.d.ts +24 -0
  221. package/dist/admin/src/editor/extensions/Image.d.ts +6 -0
  222. package/dist/admin/src/editor/extensions/TextLoadingDecorationExtension.d.ts +16 -0
  223. package/dist/admin/src/editor/extensions/clipboard.d.ts +7 -0
  224. package/dist/admin/src/editor/extensions/drag-and-drop.d.ts +9 -0
  225. package/dist/admin/src/editor/hooks/useProseMirror.d.ts +13 -0
  226. package/dist/admin/src/editor/hooks/useProseMirrorContext.d.ts +9 -0
  227. package/dist/admin/src/editor/index.d.ts +2 -0
  228. package/dist/admin/src/editor/markdown.d.ts +5 -0
  229. package/dist/admin/src/editor/nodeViews/ImageComponent.d.ts +3 -0
  230. package/dist/admin/src/editor/nodeViews/ReactNodeView.d.ts +29 -0
  231. package/dist/admin/src/editor/nodeViews/TaskItemComponent.d.ts +3 -0
  232. package/dist/admin/src/editor/nodeViews/index.d.ts +6 -0
  233. package/dist/admin/src/editor/plugins/index.d.ts +2 -0
  234. package/dist/admin/src/editor/plugins/inputrules.d.ts +6 -0
  235. package/dist/admin/src/editor/plugins/placeholderPlugin.d.ts +3 -0
  236. package/dist/admin/src/editor/plugins/slashCommandPlugin.d.ts +12 -0
  237. package/dist/admin/src/editor/schema.d.ts +2 -0
  238. package/dist/admin/src/editor/selectors/link-selector.d.ts +8 -0
  239. package/dist/admin/src/editor/selectors/node-selector.d.ts +15 -0
  240. package/dist/admin/src/editor/selectors/text-buttons.d.ts +1 -0
  241. package/dist/admin/src/editor/types.d.ts +5 -0
  242. package/dist/admin/src/editor/utils/prosemirror-utils.d.ts +7 -0
  243. package/dist/admin/src/editor/utils/remove_classes.d.ts +1 -0
  244. package/dist/admin/src/form/EntityForm.d.ts +10 -0
  245. package/dist/admin/src/form/EntityFormActions.d.ts +2 -0
  246. package/dist/admin/src/form/PropertyFieldBinding.d.ts +30 -0
  247. package/dist/admin/src/form/components/ErrorFocus.d.ts +4 -0
  248. package/dist/admin/src/form/components/FieldHelperText.d.ts +12 -0
  249. package/dist/admin/src/form/components/FormEntry.d.ts +6 -0
  250. package/dist/admin/src/form/components/FormLayout.d.ts +5 -0
  251. package/dist/admin/src/form/components/LabelWithIcon.d.ts +14 -0
  252. package/dist/admin/src/form/components/LabelWithIconAndTooltip.d.ts +15 -0
  253. package/dist/admin/src/form/components/LocalChangesMenu.d.ts +11 -0
  254. package/dist/admin/src/form/components/StorageItemPreview.d.ts +14 -0
  255. package/dist/admin/src/form/components/StorageUploadProgress.d.ts +10 -0
  256. package/dist/admin/src/form/components/index.d.ts +5 -0
  257. package/dist/admin/src/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +10 -0
  258. package/dist/admin/src/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +13 -0
  259. package/dist/admin/src/form/field_bindings/BlockFieldBinding.d.ts +11 -0
  260. package/dist/admin/src/form/field_bindings/DateTimeFieldBinding.d.ts +12 -0
  261. package/dist/admin/src/form/field_bindings/KeyValueFieldBinding.d.ts +8 -0
  262. package/dist/admin/src/form/field_bindings/MapFieldBinding.d.ts +10 -0
  263. package/dist/admin/src/form/field_bindings/MarkdownEditorFieldBinding.d.ts +12 -0
  264. package/dist/admin/src/form/field_bindings/MultiSelectFieldBinding.d.ts +10 -0
  265. package/dist/admin/src/form/field_bindings/MultipleRelationFieldBinding.d.ts +10 -0
  266. package/dist/admin/src/form/field_bindings/ReadOnlyFieldBinding.d.ts +11 -0
  267. package/dist/admin/src/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +10 -0
  268. package/dist/admin/src/form/field_bindings/ReferenceFieldBinding.d.ts +10 -0
  269. package/dist/admin/src/form/field_bindings/RelationFieldBinding.d.ts +3 -0
  270. package/dist/admin/src/form/field_bindings/RepeatFieldBinding.d.ts +11 -0
  271. package/dist/admin/src/form/field_bindings/SelectFieldBinding.d.ts +11 -0
  272. package/dist/admin/src/form/field_bindings/StorageUploadFieldBinding.d.ts +21 -0
  273. package/dist/admin/src/form/field_bindings/SwitchFieldBinding.d.ts +10 -0
  274. package/dist/admin/src/form/field_bindings/TextFieldBinding.d.ts +9 -0
  275. package/dist/admin/src/form/field_bindings/UserSelectFieldBinding.d.ts +14 -0
  276. package/dist/admin/src/form/field_bindings/VectorFieldBinding.d.ts +11 -0
  277. package/dist/admin/src/form/index.d.ts +21 -0
  278. package/dist/admin/src/form/useClearRestoreValue.d.ts +13 -0
  279. package/dist/admin/src/form/validation.d.ts +21 -0
  280. package/dist/admin/src/hooks/index.d.ts +15 -0
  281. package/dist/admin/src/hooks/navigation/contexts/CollectionRegistryContext.d.ts +5 -0
  282. package/dist/admin/src/hooks/navigation/contexts/NavigationStateContext.d.ts +4 -0
  283. package/dist/admin/src/hooks/navigation/contexts/UrlContext.d.ts +4 -0
  284. package/dist/admin/src/hooks/navigation/contexts/index.d.ts +3 -0
  285. package/dist/admin/src/hooks/navigation/useBuildCollectionRegistryController.d.ts +7 -0
  286. package/dist/admin/src/hooks/navigation/useBuildNavigationStateController.d.ts +34 -0
  287. package/dist/admin/src/hooks/navigation/useBuildUrlController.d.ts +7 -0
  288. package/dist/admin/src/hooks/navigation/useNavigationResolution.d.ts +7 -0
  289. package/dist/admin/src/hooks/navigation/useResolvedCollections.d.ts +28 -0
  290. package/dist/admin/src/hooks/navigation/useResolvedViews.d.ts +30 -0
  291. package/dist/admin/src/hooks/navigation/useTopLevelNavigation.d.ts +27 -0
  292. package/dist/admin/src/hooks/navigation/utils.d.ts +12 -0
  293. package/dist/admin/src/hooks/useBreadcrumbsController.d.ts +42 -0
  294. package/dist/admin/src/hooks/useBuildSideDialogsController.d.ts +2 -0
  295. package/dist/admin/src/hooks/useBuildSideEntityController.d.ts +6 -0
  296. package/dist/admin/src/hooks/useCMSContext.d.ts +27 -0
  297. package/dist/admin/src/hooks/useEntityHistory.d.ts +30 -0
  298. package/dist/admin/src/hooks/useEntitySelectionDialog.d.ts +18 -0
  299. package/dist/admin/src/hooks/useResolvedNavigationFrom.d.ts +73 -0
  300. package/dist/admin/src/hooks/useSideDialogsController.d.ts +19 -0
  301. package/dist/admin/src/hooks/useSideEntityController.d.ts +11 -0
  302. package/dist/admin/src/index.d.ts +15 -0
  303. package/dist/admin/src/preview/PropertyPreview.d.ts +7 -0
  304. package/dist/admin/src/preview/components/ArrayEnumPreview.d.ts +11 -0
  305. package/dist/admin/src/preview/components/BooleanPreview.d.ts +11 -0
  306. package/dist/admin/src/preview/components/DatePreview.d.ts +17 -0
  307. package/dist/admin/src/preview/components/EmptyValue.d.ts +6 -0
  308. package/dist/admin/src/preview/components/EnumValuesChip.d.ts +13 -0
  309. package/dist/admin/src/preview/components/ImagePreview.d.ts +16 -0
  310. package/dist/admin/src/preview/components/ReferencePreview.d.ts +17 -0
  311. package/dist/admin/src/preview/components/RelationPreview.d.ts +17 -0
  312. package/dist/admin/src/preview/components/StorageThumbnail.d.ts +15 -0
  313. package/dist/admin/src/preview/components/UrlComponentPreview.d.ts +14 -0
  314. package/dist/admin/src/preview/components/UserPreview.d.ts +9 -0
  315. package/dist/admin/src/preview/index.d.ts +23 -0
  316. package/dist/admin/src/preview/property_previews/ArrayOfMapsPreview.d.ts +6 -0
  317. package/dist/admin/src/preview/property_previews/ArrayOfReferencesPreview.d.ts +6 -0
  318. package/dist/admin/src/preview/property_previews/ArrayOfRelationsPreview.d.ts +6 -0
  319. package/dist/admin/src/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +6 -0
  320. package/dist/admin/src/preview/property_previews/ArrayOfStringsPreview.d.ts +6 -0
  321. package/dist/admin/src/preview/property_previews/ArrayOneOfPreview.d.ts +6 -0
  322. package/dist/admin/src/preview/property_previews/ArrayPropertyEnumPreview.d.ts +6 -0
  323. package/dist/admin/src/preview/property_previews/ArrayPropertyPreview.d.ts +6 -0
  324. package/dist/admin/src/preview/property_previews/MapPropertyPreview.d.ts +9 -0
  325. package/dist/admin/src/preview/property_previews/NumberPropertyPreview.d.ts +7 -0
  326. package/dist/admin/src/preview/property_previews/SkeletonPropertyComponent.d.ts +14 -0
  327. package/dist/admin/src/preview/property_previews/StringPropertyPreview.d.ts +7 -0
  328. package/dist/admin/src/preview/util.d.ts +7 -0
  329. package/dist/admin/src/routes/CustomViewRoute.d.ts +4 -0
  330. package/dist/admin/src/routes/RebaseRoute.d.ts +1 -0
  331. package/dist/admin/src/routes/index.d.ts +2 -0
  332. package/dist/admin/src/types/components/EntityFormActionsProps.d.ts +19 -0
  333. package/dist/admin/src/types/components/EntityFormProps.d.ts +49 -0
  334. package/dist/admin/src/types/components/PropertyPreviewProps.d.ts +47 -0
  335. package/dist/admin/src/types/components/formex.d.ts +40 -0
  336. package/dist/admin/src/types/components/index.d.ts +3 -0
  337. package/dist/admin/src/types/fields.d.ts +221 -0
  338. package/dist/admin/src/types/index.d.ts +2 -0
  339. package/dist/admin/src/util/entity_actions.d.ts +2 -0
  340. package/dist/admin/src/util/index.d.ts +5 -0
  341. package/dist/admin/src/util/navigation_utils.d.ts +26 -0
  342. package/dist/admin/src/util/previews.d.ts +4 -0
  343. package/dist/admin/src/util/property_utils.d.ts +25 -0
  344. package/dist/admin/src/util/resolutions.d.ts +9 -0
  345. package/dist/common/src/data/query_builder.d.ts +51 -0
  346. package/dist/common/src/index.d.ts +1 -0
  347. package/dist/types/src/controllers/data.d.ts +21 -0
  348. package/package.json +12 -7
@@ -0,0 +1,7 @@
1
+ import { CollectionSize } from "@rebasepro/types";
2
+ import type { PreviewSize } from "../types/components/PropertyPreviewProps";
3
+ export declare const SMALL_THUMBNAIL = 40;
4
+ export declare const MEDIUM_THUMBNAIL = 100;
5
+ export declare const LARGE_THUMBNAIL = 200;
6
+ export declare function getThumbnailMeasure(size: PreviewSize): number;
7
+ export declare function getPreviewSizeFrom(size: CollectionSize): PreviewSize;
@@ -0,0 +1,4 @@
1
+ import type { AppView } from "@rebasepro/types";
2
+ export declare function CustomViewRoute({ view }: {
3
+ view: AppView;
4
+ }): import("react").ReactNode;
@@ -0,0 +1 @@
1
+ export declare function RebaseRoute(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export * from "./CustomViewRoute";
2
+ export * from "./RebaseRoute";
@@ -0,0 +1,19 @@
1
+ import { Entity } from "@rebasepro/types";
2
+ import { EntityCollection } from "@rebasepro/types";
3
+ import { FormContext } from "../fields";
4
+ import { FormexController } from "./formex";
5
+ export interface EntityFormActionsProps {
6
+ path: string;
7
+ collection: EntityCollection;
8
+ entity?: Entity;
9
+ layout: "bottom" | "side" | "responsive";
10
+ savingError?: Error;
11
+ formex: FormexController<any>;
12
+ disabled: boolean;
13
+ status: "new" | "existing" | "copy";
14
+ pluginActions: React.ReactNode[];
15
+ openEntityMode: "side_panel" | "full_screen" | "split" | "dialog";
16
+ showDefaultActions?: boolean;
17
+ navigateBack: () => void;
18
+ formContext: FormContext;
19
+ }
@@ -0,0 +1,49 @@
1
+ import { Entity, EntityStatus } from "@rebasepro/types";
2
+ import { EntityCollection, EntityCustomViewParams } from "@rebasepro/types";
3
+ import { FormContext } from "../fields";
4
+ import { FormexController } from "./formex";
5
+ import { EntityFormActionsProps } from "./EntityFormActionsProps";
6
+ export type EntityFormProps<M extends Record<string, unknown>> = {
7
+ path: string;
8
+ fullIdPath?: string;
9
+ collection: EntityCollection<M>;
10
+ entityId?: string | number;
11
+ entity?: Entity<M>;
12
+ databaseId?: string;
13
+ onIdChange?: (id: string | number) => void;
14
+ onValuesModified?: (modified: boolean, values: M) => void;
15
+ onSaved?: (params: OnUpdateParams) => void;
16
+ initialDirtyValues?: Partial<M>;
17
+ onFormContextReady?: (formContext: FormContext<M>) => void;
18
+ forceActionsAtTheBottom?: boolean;
19
+ className?: string;
20
+ initialStatus: EntityStatus;
21
+ onStatusChange?: (status: EntityStatus) => void;
22
+ onEntityChange?: (entity: Entity<M>) => void;
23
+ formex?: FormexController<M>;
24
+ openEntityMode?: "side_panel" | "full_screen" | "split" | "dialog";
25
+ /**
26
+ * If true, the form will be disabled and no actions will be available
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Include the copy and delete actions in the form
31
+ */
32
+ showDefaultActions?: boolean;
33
+ /**
34
+ * Display the entity path in the form
35
+ */
36
+ showEntityPath?: boolean;
37
+ EntityFormActionsComponent?: React.FC<EntityFormActionsProps>;
38
+ navigateBack?: () => void;
39
+ Builder?: React.ComponentType<EntityCustomViewParams<M>>;
40
+ children?: React.ReactNode;
41
+ };
42
+ export type OnUpdateParams = {
43
+ entity: Entity<any>;
44
+ status: EntityStatus;
45
+ path: string;
46
+ entityId?: string | number;
47
+ selectedTab?: string;
48
+ collection: EntityCollection<any>;
49
+ };
@@ -0,0 +1,47 @@
1
+ import { Property } from "@rebasepro/types";
2
+ /**
3
+ * @group Preview components
4
+ */
5
+ export type PreviewSize = "small" | "medium" | "large";
6
+ /**
7
+ * @group Preview components
8
+ */
9
+ export interface PropertyPreviewProps<P extends Property | Property, CustomProps = unknown> {
10
+ /**
11
+ * Name of the property
12
+ */
13
+ propertyKey?: string;
14
+ value: any;
15
+ /**
16
+ * Property this display is related to, now strongly typed to P
17
+ */
18
+ property: P;
19
+ /**
20
+ * Desired size of the preview, depending on the context.
21
+ */
22
+ size: PreviewSize;
23
+ /**
24
+ * Max height assigned to the preview, depending on the context.
25
+ * It may be undefined if unlimited.
26
+ */
27
+ height?: number;
28
+ /**
29
+ * Max height width to the preview, depending on the context.
30
+ * It may be undefined if unlimited.
31
+ */
32
+ width?: number;
33
+ /**
34
+ * Additional properties set by the developer
35
+ */
36
+ customProps?: CustomProps;
37
+ /**
38
+ * If the preview should be interactive or not.
39
+ * This applies only to videos.
40
+ */
41
+ interactive?: boolean;
42
+ /**
43
+ * If true, image previews will fill their container completely.
44
+ * Only applies to image type properties.
45
+ */
46
+ fill?: boolean;
47
+ }
@@ -0,0 +1,40 @@
1
+ import React, { FormEvent } from "react";
2
+ export type FormexController<T extends object> = {
3
+ values: T;
4
+ initialValues: T;
5
+ setValues: (values: T) => void;
6
+ setFieldValue: (key: string, value: unknown, shouldValidate?: boolean) => void;
7
+ touched: Record<string, boolean>;
8
+ setFieldTouched: (key: string, touched: boolean, shouldValidate?: boolean) => void;
9
+ setTouched: (touched: Record<string, boolean>) => void;
10
+ dirty: boolean;
11
+ setDirty: (dirty: boolean) => void;
12
+ setSubmitCount: (submitCount: number) => void;
13
+ errors: Record<string, string>;
14
+ setFieldError: (key: string, error?: string) => void;
15
+ handleChange: (event: React.SyntheticEvent) => void;
16
+ handleBlur: (event: React.FocusEvent) => void;
17
+ handleSubmit: (event?: FormEvent<HTMLFormElement>) => void;
18
+ validate: () => void;
19
+ resetForm: (props?: FormexResetProps<T>) => void;
20
+ submitCount: number;
21
+ isSubmitting: boolean;
22
+ setSubmitting: (isSubmitting: boolean) => void;
23
+ isValidating: boolean;
24
+ /**
25
+ * The version of the form. This is incremented every time the form is reset
26
+ * or the form is submitted.
27
+ */
28
+ version: number;
29
+ debugId?: string;
30
+ undo: () => void;
31
+ redo: () => void;
32
+ canUndo: boolean;
33
+ canRedo: boolean;
34
+ };
35
+ export type FormexResetProps<T extends object> = {
36
+ values?: T;
37
+ submitCount?: number;
38
+ errors?: Record<string, string>;
39
+ touched?: Record<string, boolean>;
40
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./PropertyPreviewProps";
2
+ export * from "./EntityFormProps";
3
+ export * from "./EntityFormActionsProps";
@@ -0,0 +1,221 @@
1
+ import { Entity } from "@rebasepro/types";
2
+ import { FormexController } from "./components/formex";
3
+ import { EntityCollection } from "@rebasepro/types";
4
+ import { Property } from "@rebasepro/types";
5
+ export type DefaultFieldConfig = "text_field" | "multiline" | "markdown" | "url" | "email" | "switch" | "select" | "multi_select" | "user_select" | "number_input" | "number_select" | "multi_number_select" | "file_upload" | "multi_file_upload" | "reference_as_string" | "reference" | "multi_references" | "relation" | "date_time" | "group" | "key_value" | "repeat" | "custom_array" | "block" | "vector_input";
6
+ /**
7
+ * When building a custom field you need to create a React component that takes
8
+ * this interface as props.
9
+ *
10
+ * @group Form custom fields
11
+ */
12
+ export interface FieldProps<P extends Property | Property = Property, CustomProps = any, M extends Record<string, any> = any> {
13
+ /**
14
+ * Key of the property
15
+ * E.g. "user.name" for a property with path "user.name"
16
+ */
17
+ propertyKey: string;
18
+ /**
19
+ * Current value of this field, inferred from the property type P
20
+ */
21
+ value: any;
22
+ /**
23
+ * Set value of field directly
24
+ */
25
+ setValue: (value: any | null, shouldValidate?: boolean) => void;
26
+ /**
27
+ * Set value of a different field directly
28
+ * @param propertyKey
29
+ * @param value
30
+ * @param shouldValidate
31
+ */
32
+ setFieldValue: (propertyKey: string, value: unknown, shouldValidate?: boolean) => void;
33
+ /**
34
+ * Is the form currently submitting
35
+ */
36
+ isSubmitting?: boolean;
37
+ /**
38
+ * Should this field show the error indicator.
39
+ * Note that there might be an error (like an empty field that should be
40
+ * filled) but we don't want to show the error until the user has tried
41
+ * saving.
42
+ */
43
+ showError?: boolean;
44
+ /**
45
+ * Is there an error in this field. The error field has the same shape as
46
+ * the field, replacing values with a string containing the error.
47
+ * It takes the value `null` if there is no error
48
+ */
49
+ error?: string;
50
+ /**
51
+ * Has this field been touched
52
+ */
53
+ touched?: boolean;
54
+ /**
55
+ * Property related to this field, now strongly typed to P
56
+ */
57
+ property: P;
58
+ /**
59
+ * Should this field include a description
60
+ */
61
+ includeDescription?: boolean;
62
+ /**
63
+ * Flag to indicate that the underlying value has been updated in the
64
+ * driver
65
+ */
66
+ underlyingValueHasChanged?: boolean;
67
+ /**
68
+ * Is this field part of an array
69
+ */
70
+ partOfArray?: boolean;
71
+ /**
72
+ * Is this field part of a block
73
+ */
74
+ partOfBlock?: boolean;
75
+ /**
76
+ * Display the child properties directly, without being wrapped in an
77
+ * extendable panel. Note that this will also hide the title of this property.
78
+ */
79
+ minimalistView?: boolean;
80
+ /**
81
+ * Should this field autofocus on mount
82
+ */
83
+ autoFocus?: boolean;
84
+ /**
85
+ * Additional properties set by the developer
86
+ */
87
+ customProps?: CustomProps;
88
+ /**
89
+ * Additional values related to the state of the form or the entity
90
+ */
91
+ context: FormContext<M>;
92
+ /**
93
+ * Flag to indicate if this field should be disabled
94
+ */
95
+ disabled?: boolean;
96
+ /**
97
+ * Size of the field
98
+ */
99
+ size?: "small" | "medium" | "large";
100
+ /**
101
+ * Some properties might change internal state (like expanding a panel).
102
+ * This function should be called when the internal state changes.
103
+ * This is used to preserve state in array containers.
104
+ *
105
+ * @param property
106
+ */
107
+ onPropertyChange?: (property: Partial<Property>) => void;
108
+ }
109
+ /**
110
+ * Context passed to custom fields
111
+ * @group Form custom fields
112
+ */
113
+ export interface FormContext<M extends Record<string, unknown> = Record<string, unknown>> {
114
+ /**
115
+ * Current values of the entity
116
+ */
117
+ values: M;
118
+ /**
119
+ * Update the value of a field
120
+ * @param key
121
+ * @param value
122
+ * @param shouldValidate
123
+ */
124
+ setFieldValue: (key: string, value: unknown, shouldValidate?: boolean) => void;
125
+ /**
126
+ * Save the entity.
127
+ */
128
+ save: (values: M) => void;
129
+ /**
130
+ * Collection of the entity being modified
131
+ */
132
+ collection?: EntityCollection<M>;
133
+ /**
134
+ * Entity id, it can be undefined if it's a new entity
135
+ */
136
+ entityId?: string | number;
137
+ /**
138
+ * Path this entity is located at
139
+ */
140
+ path?: string;
141
+ status: "new" | "existing" | "copy";
142
+ entity?: Entity<M>;
143
+ savingError?: Error;
144
+ openEntityMode: "side_panel" | "full_screen" | "split" | "dialog";
145
+ /**
146
+ * This is the underlying formex controller that powers the form.
147
+ * If you are in a red only mode, the formex controller is there, but you can't
148
+ * operate with it
149
+ */
150
+ formex: FormexController<M>;
151
+ disabled: boolean;
152
+ }
153
+ /**
154
+ * In case you need to render a field bound to a Property inside your
155
+ * custom field you can use {@link PropertyFieldBinding} with these props.
156
+ * @group Form custom fields
157
+ */
158
+ export interface PropertyFieldBindingProps<M extends Record<string, unknown> = Record<string, unknown>> {
159
+ /**
160
+ * The key/path of the property, such as `age`. You can use nested and array
161
+ * indexed such as `address.street` or `people[3]`
162
+ */
163
+ propertyKey: string;
164
+ /**
165
+ * The CMS property you are binding this field to
166
+ */
167
+ property: Property;
168
+ /**
169
+ * The context where this field is being rendered. You get a context as a
170
+ * prop when creating a custom field.
171
+ */
172
+ context: FormContext<M>;
173
+ /**
174
+ * Should the description be included in this field
175
+ */
176
+ includeDescription?: boolean;
177
+ /**
178
+ * Has the value of this property been updated in the database while this
179
+ * field is being edited
180
+ */
181
+ underlyingValueHasChanged?: boolean;
182
+ /**
183
+ * Is this field part of an array
184
+ */
185
+ partOfArray?: boolean;
186
+ /**
187
+ * Is this field part of a block
188
+ */
189
+ partOfBlock?: boolean;
190
+ /**
191
+ * Display the child properties directly, without being wrapped in an
192
+ * extendable panel. Note that this will also hide the title of this property.
193
+ */
194
+ minimalistView?: boolean;
195
+ /**
196
+ * Should the field take focus when rendered. When opening the popup view
197
+ * in table mode, it makes sense to put the focus on the only field rendered.
198
+ */
199
+ autoFocus?: boolean;
200
+ /**
201
+ * Should this field be disabled
202
+ */
203
+ disabled?: boolean;
204
+ /**
205
+ * Index of the field in the array.
206
+ * Only used when the field is part of an array.
207
+ */
208
+ index?: number;
209
+ /**
210
+ * The size of the field
211
+ */
212
+ size?: "small" | "medium" | "large";
213
+ /**
214
+ * Some properties might change internal state (like expanding a panel).
215
+ * This function should be called when the internal state changes.
216
+ * This is used to preserve state in array containers.
217
+ *
218
+ * @param property
219
+ */
220
+ onPropertyChange?: (property: Partial<Property>) => void;
221
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./fields";
2
+ export * from "./components";
@@ -0,0 +1,2 @@
1
+ import type { EntityAction } from "@rebasepro/types";
2
+ export declare function mergeEntityActions(currentActions: EntityAction[], newActions: EntityAction[]): EntityAction[];
@@ -0,0 +1,5 @@
1
+ export * from "./entity_actions";
2
+ export * from "./navigation_utils";
3
+ export * from "./resolutions";
4
+ export * from "./property_utils";
5
+ export * from "./previews";
@@ -0,0 +1,26 @@
1
+ import type { EntityCollection, UrlController, SideEntityController } from "@rebasepro/types";
2
+ export { removeInitialAndTrailingSlashes, removeInitialSlash, removeTrailingSlash, addInitialSlash, getLastSegment, resolveCollectionPathIds, getCollectionBySlugWithin, getCollectionPathsCombinations } from "@rebasepro/common";
3
+ /**
4
+ * Navigate to an entity using either a side panel or full-screen mode.
5
+ * This is an admin-specific UI concern and lives here (not in common).
6
+ */
7
+ export declare function navigateToEntity({ openEntityMode, collection, entityId, copy, path, selectedTab, defaultValues, sideEntityController, onClose, navigation }: {
8
+ openEntityMode: "side_panel" | "full_screen" | "split" | "dialog";
9
+ collection?: EntityCollection;
10
+ entityId?: string | number;
11
+ selectedTab?: string;
12
+ copy?: boolean;
13
+ /**
14
+ * Pre-populate the new entity form with these values.
15
+ * Only applied when entityId is not set (i.e. "new" mode).
16
+ *
17
+ * Side panel: passed through EntitySidePanelProps → EntityEditView.
18
+ * Full screen: carried via React Router location.state so the route
19
+ * component can read it on mount without polluting the URL.
20
+ */
21
+ defaultValues?: Record<string, unknown>;
22
+ path: string;
23
+ sideEntityController: SideEntityController;
24
+ onClose?: () => void;
25
+ navigation: UrlController;
26
+ }): void;
@@ -0,0 +1,4 @@
1
+ import type { EntityCollection, PropertyConfig } from "@rebasepro/types";
2
+ import { AuthController } from "@rebasepro/types";
3
+ export declare function getEntityPreviewKeys(authController: AuthController, targetCollection: EntityCollection<any>, fields: Record<string, PropertyConfig>, previewProperties?: string[], limit?: number): string[];
4
+ export declare function getEntityTitlePropertyKey<M extends Record<string, unknown>>(collection: EntityCollection<M>, propertyConfigs: Record<string, PropertyConfig>): string | undefined;
@@ -0,0 +1,25 @@
1
+ import type { Properties } from "@rebasepro/types";
2
+ import type { EntityCollection, Property, PropertyConfig } from "@rebasepro/types";
3
+ import React from "react";
4
+ import type { IconSize } from "@rebasepro/ui";
5
+ export declare function isReferenceProperty(property: Property): boolean | null;
6
+ export declare function isRelationProperty(property: Property): boolean | null;
7
+ export declare function getIconForWidget(widget: PropertyConfig | undefined, size: IconSize | number): import("react/jsx-runtime").JSX.Element;
8
+ export declare function getIconForProperty(property: Property, size?: IconSize | number, fields?: Record<string, PropertyConfig>): React.ReactNode;
9
+ /**
10
+ * Get a property in a property tree from a path like
11
+ * `address.street`
12
+ * @param properties
13
+ * @param path
14
+ */
15
+ export declare function getPropertyInPath(properties: Properties, path: string): Property | undefined;
16
+ export declare function getResolvedPropertyInPath(properties: Record<string, Property>, path: string): Property | undefined;
17
+ export declare function getBracketNotation(path: string): string;
18
+ /**
19
+ * Get properties sorted by their order, but include ALL properties.
20
+ * Nested keys (like "data.mode") in propertiesOrder are ignored - they're for column ordering.
21
+ * @param properties
22
+ * @param propertiesOrder
23
+ */
24
+ export declare function getPropertiesWithPropertiesOrder(properties: Properties, propertiesOrder?: string[]): Properties;
25
+ export declare function getDefaultPropertiesOrder(collection: EntityCollection): string[];
@@ -0,0 +1,9 @@
1
+ import type { EntityCustomView } from "@rebasepro/types";
2
+ import type { CustomizationController, EntityAction } from "@rebasepro/types";
3
+ export declare function resolveEntityView(entityView: string | EntityCustomView<any>, contextEntityViews?: EntityCustomView<any>[]): EntityCustomView<any> | undefined;
4
+ export declare function resolveEntityAction<M extends Record<string, unknown>>(entityAction: string | EntityAction<M>, contextEntityActions?: EntityAction<M>[]): EntityAction<M> | undefined;
5
+ export declare function resolvedSelectedEntityView<M extends Record<string, unknown>>(customViews: (string | EntityCustomView<M>)[] | undefined, customizationController: CustomizationController, selectedTab?: string, _canEdit?: boolean): {
6
+ resolvedEntityViews: EntityCustomView[];
7
+ selectedEntityView: EntityCustomView | undefined;
8
+ selectedSecondaryForm: EntityCustomView | undefined;
9
+ };
@@ -0,0 +1,51 @@
1
+ import { FindResponse, CollectionAccessor, QueryBuilderInterface, FilterOperator } from "@rebasepro/types";
2
+ export declare class QueryBuilder<M extends Record<string, unknown> = Record<string, unknown>> implements QueryBuilderInterface<M> {
3
+ private collection;
4
+ private params;
5
+ constructor(collection: CollectionAccessor<M>);
6
+ /**
7
+ * Add a filter condition to your query.
8
+ * @example
9
+ * client.collection('users').where('age', '>=', 18).find()
10
+ */
11
+ where(column: keyof M & string, operator: FilterOperator, value: unknown): this;
12
+ /**
13
+ * Order the results by a specific column.
14
+ * @example
15
+ * client.collection('users').orderBy('createdAt', 'desc').find()
16
+ */
17
+ orderBy(column: keyof M & string, ascending?: "asc" | "desc"): this;
18
+ /**
19
+ * Limit the number of results returned.
20
+ */
21
+ limit(count: number): this;
22
+ /**
23
+ * Skip the first N results.
24
+ */
25
+ offset(count: number): this;
26
+ /**
27
+ * Set a free-text search string if supported by the backend.
28
+ */
29
+ search(searchString: string): this;
30
+ /**
31
+ * Include related entities in the response.
32
+ * Relations will be populated with full entity data instead of just IDs.
33
+ *
34
+ * @param relations - Relation names to include, or "*" for all.
35
+ * @example
36
+ * // Include specific relations
37
+ * client.data.posts.include("tags", "author").find()
38
+ *
39
+ * // Include all relations
40
+ * client.data.posts.include("*").find()
41
+ */
42
+ include(...relations: string[]): this;
43
+ /**
44
+ * Execute the find query and return the results.
45
+ */
46
+ find(): Promise<FindResponse<M>>;
47
+ /**
48
+ * Listen to realtime updates matching this query.
49
+ */
50
+ listen(onUpdate: (data: FindResponse<M>) => void, onError?: (error: Error) => void): () => void;
51
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./util";
2
2
  export * from "./collections";
3
3
  export * from "./data/buildRebaseData";
4
+ export * from "./data/query_builder";
@@ -76,6 +76,21 @@ export interface FindResponse<M extends Record<string, unknown> = Record<string,
76
76
  hasMore: boolean;
77
77
  };
78
78
  }
79
+ export type FilterOperator = WhereFilterOpShort;
80
+ /**
81
+ * Fluent Query Builder Interface supported on both client and server accessors.
82
+ * @group Data
83
+ */
84
+ export interface QueryBuilderInterface<M extends Record<string, unknown> = Record<string, unknown>> {
85
+ where(column: keyof M & string, operator: FilterOperator, value: unknown): this;
86
+ orderBy(column: keyof M & string, ascending?: "asc" | "desc"): this;
87
+ limit(count: number): this;
88
+ offset(count: number): this;
89
+ search(searchString: string): this;
90
+ include(...relations: string[]): this;
91
+ find(): Promise<FindResponse<M>>;
92
+ listen(onUpdate: (data: FindResponse<M>) => void, onError?: (error: Error) => void): () => void;
93
+ }
79
94
  /**
80
95
  * A single collection's CRUD accessor.
81
96
  *
@@ -124,6 +139,12 @@ export interface CollectionAccessor<M extends Record<string, unknown> = Record<s
124
139
  * Count the number of records matching the given filter.
125
140
  */
126
141
  count?(params?: FindParams): Promise<number>;
142
+ where(column: keyof M & string, operator: FilterOperator, value: unknown): QueryBuilderInterface<M>;
143
+ orderBy(column: keyof M & string, ascending?: "asc" | "desc"): QueryBuilderInterface<M>;
144
+ limit(count: number): QueryBuilderInterface<M>;
145
+ offset(count: number): QueryBuilderInterface<M>;
146
+ search(searchString: string): QueryBuilderInterface<M>;
147
+ include(...relations: string[]): QueryBuilderInterface<M>;
127
148
  }
128
149
  /**
129
150
  * The unified data access object.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rebasepro/plugin-data-enhancement",
3
3
  "type": "module",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "./dist/index.d.ts",
@@ -16,12 +16,12 @@
16
16
  "./package.json": "./package.json"
17
17
  },
18
18
  "dependencies": {
19
- "@rebasepro/common": "0.2.1",
20
- "@rebasepro/admin": "0.2.1",
21
- "@rebasepro/core": "0.2.1",
22
- "@rebasepro/types": "0.2.1",
23
- "@rebasepro/utils": "0.2.1",
24
- "@rebasepro/ui": "0.2.1"
19
+ "@rebasepro/admin": "0.2.3",
20
+ "@rebasepro/common": "0.2.3",
21
+ "@rebasepro/types": "0.2.3",
22
+ "@rebasepro/ui": "0.2.3",
23
+ "@rebasepro/core": "0.2.3",
24
+ "@rebasepro/utils": "0.2.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": ">=19.0.0",
@@ -77,6 +77,11 @@
77
77
  "access": "public"
78
78
  },
79
79
  "gitHead": "d935eefa5aa8d1009a2398cfac2c1e4ee9aeb6b6",
80
+ "repository": {
81
+ "type": "git",
82
+ "url": "https://github.com/rebasepro/rebase.git",
83
+ "directory": "packages/plugin-data-enhancement"
84
+ },
80
85
  "scripts": {
81
86
  "dev": "vite",
82
87
  "build": "vite build && tsc --emitDeclarationOnly -p tsconfig.prod.json",