@rebasepro/plugin-insights 0.0.1-canary.09e5ec5

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 (301) hide show
  1. package/LICENSE +6 -0
  2. package/dist/common/src/collections/CollectionRegistry.d.ts +56 -0
  3. package/dist/common/src/collections/index.d.ts +1 -0
  4. package/dist/common/src/data/buildRebaseData.d.ts +14 -0
  5. package/dist/common/src/index.d.ts +3 -0
  6. package/dist/common/src/util/builders.d.ts +57 -0
  7. package/dist/common/src/util/callbacks.d.ts +6 -0
  8. package/dist/common/src/util/collections.d.ts +11 -0
  9. package/dist/common/src/util/common.d.ts +2 -0
  10. package/dist/common/src/util/conditions.d.ts +26 -0
  11. package/dist/common/src/util/entities.d.ts +58 -0
  12. package/dist/common/src/util/enums.d.ts +3 -0
  13. package/dist/common/src/util/index.d.ts +16 -0
  14. package/dist/common/src/util/navigation_from_path.d.ts +34 -0
  15. package/dist/common/src/util/navigation_utils.d.ts +20 -0
  16. package/dist/common/src/util/parent_references_from_path.d.ts +6 -0
  17. package/dist/common/src/util/paths.d.ts +14 -0
  18. package/dist/common/src/util/permissions.d.ts +5 -0
  19. package/dist/common/src/util/references.d.ts +2 -0
  20. package/dist/common/src/util/relations.d.ts +22 -0
  21. package/dist/common/src/util/resolutions.d.ts +72 -0
  22. package/dist/common/src/util/storage.d.ts +24 -0
  23. package/dist/core/src/components/AIIcon.d.ts +16 -0
  24. package/dist/core/src/components/ConfirmationDialog.d.ts +9 -0
  25. package/dist/core/src/components/Debug/UIReferenceView.d.ts +1 -0
  26. package/dist/core/src/components/Debug/UIStyleGuide.d.ts +1 -0
  27. package/dist/core/src/components/ErrorTooltip.d.ts +2 -0
  28. package/dist/core/src/components/ErrorView.d.ts +21 -0
  29. package/dist/core/src/components/LanguageToggle.d.ts +1 -0
  30. package/dist/core/src/components/LoginView/LoginView.d.ts +68 -0
  31. package/dist/core/src/components/LoginView/index.d.ts +2 -0
  32. package/dist/core/src/components/NotFoundPage.d.ts +1 -0
  33. package/dist/core/src/components/RebaseAuth.d.ts +10 -0
  34. package/dist/core/src/components/RebaseLogo.d.ts +7 -0
  35. package/dist/core/src/components/UnsavedChangesDialog.d.ts +9 -0
  36. package/dist/core/src/components/UserDisplay.d.ts +7 -0
  37. package/dist/core/src/components/UserSelectPopover.d.ts +62 -0
  38. package/dist/core/src/components/UserSettingsView.d.ts +1 -0
  39. package/dist/core/src/components/common/index.d.ts +6 -0
  40. package/dist/core/src/components/common/table_height.d.ts +5 -0
  41. package/dist/core/src/components/common/types.d.ts +63 -0
  42. package/dist/core/src/components/common/useColumnsIds.d.ts +9 -0
  43. package/dist/core/src/components/common/useDataTableController.d.ts +45 -0
  44. package/dist/core/src/components/common/useDebouncedData.d.ts +9 -0
  45. package/dist/core/src/components/common/useScrollRestoration.d.ts +14 -0
  46. package/dist/core/src/components/index.d.ts +16 -0
  47. package/dist/core/src/contexts/AdminModeController.d.ts +4 -0
  48. package/dist/core/src/contexts/AnalyticsContext.d.ts +3 -0
  49. package/dist/core/src/contexts/AuthControllerContext.d.ts +3 -0
  50. package/dist/core/src/contexts/CustomizationControllerContext.d.ts +3 -0
  51. package/dist/core/src/contexts/DataDriverContext.d.ts +3 -0
  52. package/dist/core/src/contexts/DatabaseAdminContext.d.ts +3 -0
  53. package/dist/core/src/contexts/DialogsProvider.d.ts +4 -0
  54. package/dist/core/src/contexts/EffectiveRoleController.d.ts +4 -0
  55. package/dist/core/src/contexts/InternalUserManagementContext.d.ts +3 -0
  56. package/dist/core/src/contexts/ModeController.d.ts +4 -0
  57. package/dist/core/src/contexts/RebaseClientInstanceContext.d.ts +6 -0
  58. package/dist/core/src/contexts/RebaseDataContext.d.ts +3 -0
  59. package/dist/core/src/contexts/SnackbarProvider.d.ts +2 -0
  60. package/dist/core/src/contexts/StorageSourceContext.d.ts +3 -0
  61. package/dist/core/src/contexts/UserConfigurationPersistenceContext.d.ts +3 -0
  62. package/dist/core/src/contexts/index.d.ts +13 -0
  63. package/dist/core/src/core/PluginLifecycleManager.d.ts +17 -0
  64. package/dist/core/src/core/PluginProviderStack.d.ts +21 -0
  65. package/dist/core/src/core/Rebase.d.ts +14 -0
  66. package/dist/core/src/core/RebaseProps.d.ts +136 -0
  67. package/dist/core/src/core/RebaseRouter.d.ts +4 -0
  68. package/dist/core/src/core/RebaseRoutes.d.ts +17 -0
  69. package/dist/core/src/core/index.d.ts +4 -0
  70. package/dist/core/src/hooks/ApiConfigContext.d.ts +24 -0
  71. package/dist/core/src/hooks/data/delete.d.ts +31 -0
  72. package/dist/core/src/hooks/data/save.d.ts +34 -0
  73. package/dist/core/src/hooks/data/useCollectionFetch.d.ts +51 -0
  74. package/dist/core/src/hooks/data/useData.d.ts +13 -0
  75. package/dist/core/src/hooks/data/useDataOrder.d.ts +12 -0
  76. package/dist/core/src/hooks/data/useEntityFetch.d.ts +38 -0
  77. package/dist/core/src/hooks/data/useRelationSelector.d.ts +52 -0
  78. package/dist/core/src/hooks/data/useUserSelector.d.ts +31 -0
  79. package/dist/core/src/hooks/index.d.ts +37 -0
  80. package/dist/core/src/hooks/useAdminModeController.d.ts +19 -0
  81. package/dist/core/src/hooks/useAnalyticsController.d.ts +5 -0
  82. package/dist/core/src/hooks/useAuthController.d.ts +11 -0
  83. package/dist/core/src/hooks/useAuthSubscription.d.ts +2 -0
  84. package/dist/core/src/hooks/useBackendStorageSource.d.ts +30 -0
  85. package/dist/core/src/hooks/useBridgeRegistration.d.ts +18 -0
  86. package/dist/core/src/hooks/useBrowserTitleAndIcon.d.ts +6 -0
  87. package/dist/core/src/hooks/useBuildAdminModeController.d.ts +6 -0
  88. package/dist/core/src/hooks/useBuildEffectiveRoleController.d.ts +8 -0
  89. package/dist/core/src/hooks/useBuildLocalConfigurationPersistence.d.ts +2 -0
  90. package/dist/core/src/hooks/useBuildModeController.d.ts +6 -0
  91. package/dist/core/src/hooks/useClipboard.d.ts +57 -0
  92. package/dist/core/src/hooks/useCollapsedGroups.d.ts +12 -0
  93. package/dist/core/src/hooks/useCustomizationController.d.ts +11 -0
  94. package/dist/core/src/hooks/useDialogsController.d.ts +11 -0
  95. package/dist/core/src/hooks/useEffectiveRoleController.d.ts +7 -0
  96. package/dist/core/src/hooks/useInternalUserManagementController.d.ts +12 -0
  97. package/dist/core/src/hooks/useLargeLayout.d.ts +1 -0
  98. package/dist/core/src/hooks/useModeController.d.ts +19 -0
  99. package/dist/core/src/hooks/usePermissions.d.ts +12 -0
  100. package/dist/core/src/hooks/useRebaseClient.d.ts +5 -0
  101. package/dist/core/src/hooks/useRebaseContext.d.ts +11 -0
  102. package/dist/core/src/hooks/useRebaseRegistry.d.ts +34 -0
  103. package/dist/core/src/hooks/useSlot.d.ts +18 -0
  104. package/dist/core/src/hooks/useSnackbarController.d.ts +20 -0
  105. package/dist/core/src/hooks/useStorageSource.d.ts +7 -0
  106. package/dist/core/src/hooks/useStudioBridge.d.ts +91 -0
  107. package/dist/core/src/hooks/useTranslation.d.ts +17 -0
  108. package/dist/core/src/hooks/useUnsavedChangesDialog.d.ts +12 -0
  109. package/dist/core/src/hooks/useUserConfigurationPersistence.d.ts +8 -0
  110. package/dist/core/src/hooks/useValidateAuthenticator.d.ts +21 -0
  111. package/dist/core/src/i18n/RebaseI18nProvider.d.ts +33 -0
  112. package/dist/core/src/index.d.ts +15 -0
  113. package/dist/core/src/internal/common.d.ts +3 -0
  114. package/dist/core/src/internal/useRestoreScroll.d.ts +6 -0
  115. package/dist/core/src/locales/de.d.ts +2 -0
  116. package/dist/core/src/locales/en.d.ts +10 -0
  117. package/dist/core/src/locales/es.d.ts +10 -0
  118. package/dist/core/src/locales/fr.d.ts +2 -0
  119. package/dist/core/src/locales/hi.d.ts +2 -0
  120. package/dist/core/src/locales/it.d.ts +2 -0
  121. package/dist/core/src/locales/pt.d.ts +7 -0
  122. package/dist/core/src/util/constants.d.ts +1 -0
  123. package/dist/core/src/util/createFormexStub.d.ts +2 -0
  124. package/dist/core/src/util/entity_cache.d.ts +27 -0
  125. package/dist/core/src/util/enums.d.ts +5 -0
  126. package/dist/core/src/util/icon_list.d.ts +5 -0
  127. package/dist/core/src/util/icon_synonyms.d.ts +1 -0
  128. package/dist/core/src/util/icons.d.ts +20 -0
  129. package/dist/core/src/util/index.d.ts +10 -0
  130. package/dist/core/src/util/previews.d.ts +4 -0
  131. package/dist/core/src/util/useStorageUploadController.d.ts +38 -0
  132. package/dist/core/src/util/useTraceUpdate.d.ts +2 -0
  133. package/dist/formex/src/Field.d.ts +52 -0
  134. package/dist/formex/src/Formex.d.ts +7 -0
  135. package/dist/formex/src/index.d.ts +5 -0
  136. package/dist/formex/src/types.d.ts +40 -0
  137. package/dist/formex/src/useCreateFormex.d.ts +14 -0
  138. package/dist/formex/src/utils.d.ts +16 -0
  139. package/dist/index.es.js +945 -0
  140. package/dist/index.es.js.map +1 -0
  141. package/dist/index.umd.js +944 -0
  142. package/dist/index.umd.js.map +1 -0
  143. package/dist/plugin-insights/src/components/CollectionInsightsInline.d.ts +16 -0
  144. package/dist/plugin-insights/src/components/HomeCardInsightSlot.d.ts +16 -0
  145. package/dist/plugin-insights/src/components/HomeInsightsSlot.d.ts +13 -0
  146. package/dist/plugin-insights/src/components/InsightWidget.d.ts +19 -0
  147. package/dist/plugin-insights/src/components/InsightWidgetSkeleton.d.ts +20 -0
  148. package/dist/plugin-insights/src/components/InsightsScorecardView.d.ts +19 -0
  149. package/dist/plugin-insights/src/engine/InsightsCache.d.ts +18 -0
  150. package/dist/plugin-insights/src/engine/InsightsProvider.d.ts +22 -0
  151. package/dist/plugin-insights/src/engine/useInsightsData.d.ts +17 -0
  152. package/dist/plugin-insights/src/index.d.ts +8 -0
  153. package/dist/plugin-insights/src/types/engine.d.ts +79 -0
  154. package/dist/plugin-insights/src/types/index.d.ts +2 -0
  155. package/dist/plugin-insights/src/types/widgets.d.ts +59 -0
  156. package/dist/plugin-insights/src/useInsightsPlugin.d.ts +37 -0
  157. package/dist/types/src/controllers/analytics_controller.d.ts +7 -0
  158. package/dist/types/src/controllers/auth.d.ts +119 -0
  159. package/dist/types/src/controllers/client.d.ts +170 -0
  160. package/dist/types/src/controllers/collection_registry.d.ts +45 -0
  161. package/dist/types/src/controllers/customization_controller.d.ts +60 -0
  162. package/dist/types/src/controllers/data.d.ts +168 -0
  163. package/dist/types/src/controllers/data_driver.d.ts +160 -0
  164. package/dist/types/src/controllers/database_admin.d.ts +11 -0
  165. package/dist/types/src/controllers/dialogs_controller.d.ts +36 -0
  166. package/dist/types/src/controllers/effective_role.d.ts +4 -0
  167. package/dist/types/src/controllers/email.d.ts +34 -0
  168. package/dist/types/src/controllers/index.d.ts +18 -0
  169. package/dist/types/src/controllers/local_config_persistence.d.ts +20 -0
  170. package/dist/types/src/controllers/navigation.d.ts +213 -0
  171. package/dist/types/src/controllers/registry.d.ts +54 -0
  172. package/dist/types/src/controllers/side_dialogs_controller.d.ts +67 -0
  173. package/dist/types/src/controllers/side_entity_controller.d.ts +90 -0
  174. package/dist/types/src/controllers/snackbar.d.ts +24 -0
  175. package/dist/types/src/controllers/storage.d.ts +171 -0
  176. package/dist/types/src/index.d.ts +4 -0
  177. package/dist/types/src/rebase_context.d.ts +105 -0
  178. package/dist/types/src/types/backend.d.ts +536 -0
  179. package/dist/types/src/types/builders.d.ts +15 -0
  180. package/dist/types/src/types/chips.d.ts +5 -0
  181. package/dist/types/src/types/collections.d.ts +856 -0
  182. package/dist/types/src/types/cron.d.ts +102 -0
  183. package/dist/types/src/types/data_source.d.ts +64 -0
  184. package/dist/types/src/types/entities.d.ts +145 -0
  185. package/dist/types/src/types/entity_actions.d.ts +98 -0
  186. package/dist/types/src/types/entity_callbacks.d.ts +173 -0
  187. package/dist/types/src/types/entity_link_builder.d.ts +7 -0
  188. package/dist/types/src/types/entity_overrides.d.ts +10 -0
  189. package/dist/types/src/types/entity_views.d.ts +61 -0
  190. package/dist/types/src/types/export_import.d.ts +21 -0
  191. package/dist/types/src/types/index.d.ts +23 -0
  192. package/dist/types/src/types/locales.d.ts +4 -0
  193. package/dist/types/src/types/modify_collections.d.ts +5 -0
  194. package/dist/types/src/types/plugins.d.ts +279 -0
  195. package/dist/types/src/types/properties.d.ts +1176 -0
  196. package/dist/types/src/types/property_config.d.ts +70 -0
  197. package/dist/types/src/types/relations.d.ts +336 -0
  198. package/dist/types/src/types/slots.d.ts +252 -0
  199. package/dist/types/src/types/translations.d.ts +870 -0
  200. package/dist/types/src/types/user_management_delegate.d.ts +121 -0
  201. package/dist/types/src/types/websockets.d.ts +78 -0
  202. package/dist/types/src/users/index.d.ts +2 -0
  203. package/dist/types/src/users/roles.d.ts +22 -0
  204. package/dist/types/src/users/user.d.ts +46 -0
  205. package/dist/ui/src/components/Alert.d.ts +12 -0
  206. package/dist/ui/src/components/Autocomplete.d.ts +21 -0
  207. package/dist/ui/src/components/Avatar.d.ts +11 -0
  208. package/dist/ui/src/components/Badge.d.ts +8 -0
  209. package/dist/ui/src/components/BooleanSwitch.d.ts +14 -0
  210. package/dist/ui/src/components/BooleanSwitchWithLabel.d.ts +17 -0
  211. package/dist/ui/src/components/Button.d.ts +14 -0
  212. package/dist/ui/src/components/Card.d.ts +9 -0
  213. package/dist/ui/src/components/CenteredView.d.ts +9 -0
  214. package/dist/ui/src/components/Checkbox.d.ts +13 -0
  215. package/dist/ui/src/components/Chip.d.ts +26 -0
  216. package/dist/ui/src/components/CircularProgress.d.ts +5 -0
  217. package/dist/ui/src/components/CircularProgressCenter.d.ts +11 -0
  218. package/dist/ui/src/components/Collapse.d.ts +9 -0
  219. package/dist/ui/src/components/ColorPicker.d.ts +30 -0
  220. package/dist/ui/src/components/Container.d.ts +8 -0
  221. package/dist/ui/src/components/DateTimeField.d.ts +24 -0
  222. package/dist/ui/src/components/DebouncedTextField.d.ts +2 -0
  223. package/dist/ui/src/components/Dialog.d.ts +39 -0
  224. package/dist/ui/src/components/DialogActions.d.ts +7 -0
  225. package/dist/ui/src/components/DialogContent.d.ts +7 -0
  226. package/dist/ui/src/components/DialogTitle.d.ts +10 -0
  227. package/dist/ui/src/components/ErrorBoundary.d.ts +11 -0
  228. package/dist/ui/src/components/ExpandablePanel.d.ts +12 -0
  229. package/dist/ui/src/components/FileUpload.d.ts +23 -0
  230. package/dist/ui/src/components/IconButton.d.ts +12 -0
  231. package/dist/ui/src/components/InfoLabel.d.ts +5 -0
  232. package/dist/ui/src/components/InputLabel.d.ts +11 -0
  233. package/dist/ui/src/components/Label.d.ts +7 -0
  234. package/dist/ui/src/components/LoadingButton.d.ts +7 -0
  235. package/dist/ui/src/components/Markdown.d.ts +10 -0
  236. package/dist/ui/src/components/Menu.d.ts +23 -0
  237. package/dist/ui/src/components/Menubar.d.ts +80 -0
  238. package/dist/ui/src/components/MultiSelect.d.ts +48 -0
  239. package/dist/ui/src/components/Paper.d.ts +6 -0
  240. package/dist/ui/src/components/Popover.d.ts +24 -0
  241. package/dist/ui/src/components/RadioGroup.d.ts +28 -0
  242. package/dist/ui/src/components/ResizablePanels.d.ts +18 -0
  243. package/dist/ui/src/components/SearchBar.d.ts +22 -0
  244. package/dist/ui/src/components/Select.d.ts +43 -0
  245. package/dist/ui/src/components/Separator.d.ts +5 -0
  246. package/dist/ui/src/components/Sheet.d.ts +22 -0
  247. package/dist/ui/src/components/Skeleton.d.ts +6 -0
  248. package/dist/ui/src/components/Slider.d.ts +21 -0
  249. package/dist/ui/src/components/Table.d.ts +34 -0
  250. package/dist/ui/src/components/Tabs.d.ts +19 -0
  251. package/dist/ui/src/components/TextField.d.ts +58 -0
  252. package/dist/ui/src/components/TextareaAutosize.d.ts +43 -0
  253. package/dist/ui/src/components/ToggleButtonGroup.d.ts +30 -0
  254. package/dist/ui/src/components/Tooltip.d.ts +19 -0
  255. package/dist/ui/src/components/Typography.d.ts +36 -0
  256. package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +11 -0
  257. package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +21 -0
  258. package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +29 -0
  259. package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -0
  260. package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +243 -0
  261. package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +3 -0
  262. package/dist/ui/src/components/VirtualTable/index.d.ts +3 -0
  263. package/dist/ui/src/components/VirtualTable/types.d.ts +38 -0
  264. package/dist/ui/src/components/common/SelectInputLabel.d.ts +5 -0
  265. package/dist/ui/src/components/index.d.ts +53 -0
  266. package/dist/ui/src/hooks/PortalContainerContext.d.ts +31 -0
  267. package/dist/ui/src/hooks/index.d.ts +6 -0
  268. package/dist/ui/src/hooks/useDebounceCallback.d.ts +1 -0
  269. package/dist/ui/src/hooks/useDebounceValue.d.ts +1 -0
  270. package/dist/ui/src/hooks/useDebouncedCallback.d.ts +1 -0
  271. package/dist/ui/src/hooks/useInjectStyles.d.ts +7 -0
  272. package/dist/ui/src/hooks/useOutsideAlerter.d.ts +5 -0
  273. package/dist/ui/src/icons/GitHubIcon.d.ts +2 -0
  274. package/dist/ui/src/icons/HandleIcon.d.ts +1 -0
  275. package/dist/ui/src/icons/Icon.d.ts +20 -0
  276. package/dist/ui/src/icons/cool_icon_keys.d.ts +1 -0
  277. package/dist/ui/src/icons/icon_keys.d.ts +1 -0
  278. package/dist/ui/src/icons/index.d.ts +6 -0
  279. package/dist/ui/src/index.d.ts +5 -0
  280. package/dist/ui/src/styles.d.ts +12 -0
  281. package/dist/ui/src/util/chip_colors.d.ts +4 -0
  282. package/dist/ui/src/util/cls.d.ts +2 -0
  283. package/dist/ui/src/util/debounce.d.ts +10 -0
  284. package/dist/ui/src/util/hash.d.ts +1 -0
  285. package/dist/ui/src/util/index.d.ts +4 -0
  286. package/dist/ui/src/util/key_to_icon_component.d.ts +1 -0
  287. package/package.json +80 -0
  288. package/src/components/CollectionInsightsInline.tsx +30 -0
  289. package/src/components/HomeCardInsightSlot.tsx +36 -0
  290. package/src/components/HomeInsightsSlot.tsx +30 -0
  291. package/src/components/InsightWidget.tsx +65 -0
  292. package/src/components/InsightWidgetSkeleton.tsx +122 -0
  293. package/src/components/InsightsScorecardView.tsx +160 -0
  294. package/src/engine/InsightsCache.ts +52 -0
  295. package/src/engine/InsightsProvider.tsx +38 -0
  296. package/src/engine/useInsightsData.ts +100 -0
  297. package/src/index.ts +22 -0
  298. package/src/types/engine.ts +85 -0
  299. package/src/types/index.ts +5 -0
  300. package/src/types/widgets.ts +66 -0
  301. package/src/useInsightsPlugin.tsx +117 -0
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export declare function RebaseLogo({ width, height, className, style }: {
3
+ width?: string;
4
+ height?: string;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface UnsavedChangesDialogProps {
3
+ open: boolean;
4
+ body?: React.ReactNode;
5
+ title?: string;
6
+ handleOk: () => void;
7
+ handleCancel: () => void;
8
+ }
9
+ export declare function UnsavedChangesDialog({ open, handleOk, handleCancel, body, title }: UnsavedChangesDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { User } from "@rebasepro/types";
2
+ /**
3
+ * Component to render a single user with name and email
4
+ */
5
+ export declare function UserDisplay({ user }: {
6
+ user: User | null;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Represents a selectable user item with optional role information.
3
+ */
4
+ export interface SelectableUser {
5
+ uid: string;
6
+ displayName?: string | null;
7
+ email?: string | null;
8
+ photoURL?: string | null;
9
+ roles?: string[];
10
+ }
11
+ export interface UserSelectPopoverProps {
12
+ /**
13
+ * The currently selected user, or `null` for "self"/default.
14
+ */
15
+ selectedUser: SelectableUser | null;
16
+ /**
17
+ * Called when the user selection changes.
18
+ * `null` means "reset to self/default".
19
+ */
20
+ onUserSelected: (user: SelectableUser | null) => void;
21
+ /**
22
+ * Full list of users to display.
23
+ * The component handles client-side search/filter internally.
24
+ */
25
+ users: SelectableUser[];
26
+ /**
27
+ * Whether users are currently loading.
28
+ */
29
+ loading?: boolean;
30
+ /**
31
+ * The current user (displayed as the "self" option at the top).
32
+ */
33
+ currentUser?: SelectableUser | null;
34
+ /**
35
+ * Label to display when no user is selected.
36
+ * @default "Current user"
37
+ */
38
+ defaultLabel?: string;
39
+ /**
40
+ * Maximum number of users to render at a time (for performance).
41
+ * Users can still be found via search.
42
+ * @default 100
43
+ */
44
+ renderLimit?: number;
45
+ /**
46
+ * Additional class name for the trigger button.
47
+ */
48
+ className?: string;
49
+ /**
50
+ * Size variant.
51
+ * @default "small"
52
+ */
53
+ size?: "small" | "medium";
54
+ }
55
+ /**
56
+ * A reusable user picker popover with search support.
57
+ * Designed to handle very large user lists (100k+) by filtering
58
+ * client-side and limiting the rendered set.
59
+ *
60
+ * @group Components
61
+ */
62
+ export declare function UserSelectPopover({ selectedUser, onUserSelected, users, loading, currentUser, defaultLabel, renderLimit, className, size }: UserSelectPopoverProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function UserSettingsView(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ export * from "./types";
2
+ export * from "./useDebouncedData";
3
+ export * from "./useColumnsIds";
4
+ export * from "./useDataTableController";
5
+ export * from "./useScrollRestoration";
6
+ export * from "./table_height";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @group Components
3
+ */
4
+ export type TableSize = "xs" | "s" | "m" | "l" | "xl";
5
+ export declare function getRowHeight(size: TableSize): number;
@@ -0,0 +1,63 @@
1
+ import type { Property } from "@rebasepro/types";
2
+ import { CollectionSize, SelectedCellProps } from "@rebasepro/types";
3
+ export type EntityCollectionTableController<M extends Record<string, any>> = {
4
+ /**
5
+ * This cell is displayed as selected
6
+ */
7
+ selectedCell?: SelectedCellProps<any>;
8
+ /**
9
+ * Store used to sync selection state across cells efficiently.
10
+ */
11
+ selectionStore?: any;
12
+ /**
13
+ * Select a table cell
14
+ * @param cell
15
+ */
16
+ select: (cell?: SelectedCellProps<M>) => void;
17
+ /**
18
+ * The cell that is displayed as a popup view.
19
+ * @param cell
20
+ */
21
+ setPopupCell?: (cell?: SelectedCellProps<M>) => void;
22
+ /**
23
+ * Callback used when the value of a cell has changed.
24
+ * @param params
25
+ */
26
+ onValueChange?: (params: OnCellValueChangeParams<any, M>) => void;
27
+ /**
28
+ * Size of the elements in the collection
29
+ */
30
+ size: CollectionSize;
31
+ };
32
+ /**
33
+ * Props passed in a callback when the content of a cell in a table has been edited
34
+ * @group Collection components
35
+ */
36
+ export interface OnCellValueChangeParams<T = any, D = any> {
37
+ value: T;
38
+ propertyKey: string;
39
+ data?: D;
40
+ onValueUpdated: () => void;
41
+ setError: (e: Error | undefined) => void;
42
+ }
43
+ /**
44
+ * @group Collection components
45
+ */
46
+ export type UniqueFieldValidator = (props: {
47
+ name: string;
48
+ value: any;
49
+ property: Property;
50
+ entityId?: string | number;
51
+ }) => Promise<boolean>;
52
+ /**
53
+ * Callback when a cell has changed in a table
54
+ * @group Collection components
55
+ */
56
+ export type OnCellValueChange<T, M extends Record<string, any>> = (params: OnCellValueChangeParams<T, M>) => Promise<void> | void;
57
+ /**
58
+ * @group Collection components
59
+ */
60
+ export type OnColumnResizeParams = {
61
+ width: number;
62
+ key: string;
63
+ };
@@ -0,0 +1,9 @@
1
+ import type { EntityCollection, Property } from "@rebasepro/types";
2
+ export type PropertyColumnConfig = {
3
+ key: string;
4
+ disabled: boolean;
5
+ };
6
+ export declare function getSubcollectionColumnId(collection: EntityCollection<any>): string;
7
+ export declare function useColumnIds<M extends Record<string, any>>(collection: EntityCollection<M>, includeSubcollections: boolean): PropertyColumnConfig[];
8
+ export declare function getColumnKeysForProperty(property: Property, key: string, disabled?: boolean): PropertyColumnConfig[];
9
+ export declare function getFormFieldKeys(collection: EntityCollection): string[];
@@ -0,0 +1,45 @@
1
+ import type { EntityCollection } from "@rebasepro/types";
2
+ import { Entity, EntityTableController, FilterValues, User } from "@rebasepro/types";
3
+ import { ScrollRestorationController } from "./useScrollRestoration";
4
+ export declare const DEFAULT_PAGE_SIZE = 50;
5
+ export type DataTableControllerProps<M extends Record<string, any> = any> = {
6
+ /**
7
+ * Full path where the data of this table is located
8
+ */
9
+ path: string;
10
+ /**
11
+ * The collection that is represented by this config.
12
+ */
13
+ collection: EntityCollection<M>;
14
+ /**
15
+ * List of entities that will be displayed on top, no matter the ordering.
16
+ * This is used for reference fields selection
17
+ */
18
+ entitiesDisplayedFirst?: Entity<M>[];
19
+ lastDeleteTimestamp?: number;
20
+ /**
21
+ * Force filter to be applied to the table.
22
+ */
23
+ forceFilter?: FilterValues<string>;
24
+ scrollRestoration?: ScrollRestorationController;
25
+ /**
26
+ * When set to true the filters and sort will be updated in the URL
27
+ */
28
+ updateUrl?: boolean;
29
+ };
30
+ /**
31
+ * Use this hook to build a controller for the {@link EntityCollectionTable}.
32
+ * This controller is bound to data in a path in your specified driver.
33
+ *
34
+ * Note that you can build your own hook returning a {@link EntityTableController}
35
+ * if you would like to display different data.
36
+ *
37
+ * @param path
38
+ * @param collection
39
+ * @param scrollRestoration
40
+ * @param entitiesDisplayedFirst
41
+ * @param lastDeleteTimestamp
42
+ * @param forceFilterFromProps
43
+ * @param updateUrl
44
+ */
45
+ export declare function useDataTableController<M extends Record<string, any> = any, USER extends User = User>({ path, collection, scrollRestoration, entitiesDisplayedFirst, lastDeleteTimestamp: _lastDeleteTimestamp, forceFilter: forceFilterFromProps, updateUrl }: DataTableControllerProps<M>): EntityTableController<M>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Hack to prevent data updates for incomplete callbacks from Firestore
3
+ * triggers.
4
+ * If any deps change, the update is immediate
5
+ * @param data
6
+ * @param deps
7
+ * @param timeoutMs
8
+ */
9
+ export declare function useDebouncedData<T>(data: T[], deps: any, timeoutMs?: number): T[];
@@ -0,0 +1,14 @@
1
+ import { Entity, FilterValues } from "@rebasepro/types";
2
+ export type ScrollRestorationController = {
3
+ getCollectionScroll: (path: string, filters?: FilterValues<any>) => {
4
+ scrollOffset: number;
5
+ data: Entity<any>[];
6
+ } | undefined;
7
+ updateCollectionScroll: (props: {
8
+ path: string;
9
+ scrollOffset: number;
10
+ filters?: FilterValues<any>;
11
+ data: Entity<any>[];
12
+ }) => void;
13
+ };
14
+ export declare function useScrollRestoration(): ScrollRestorationController;
@@ -0,0 +1,16 @@
1
+ export type { ErrorViewProps } from "./ErrorView";
2
+ export { ErrorView } from "./ErrorView";
3
+ export * from "./common";
4
+ export * from "./NotFoundPage";
5
+ export * from "./ConfirmationDialog";
6
+ export * from "./ErrorTooltip";
7
+ export * from "./RebaseLogo";
8
+ export * from "./AIIcon";
9
+ export * from "./Debug/UIStyleGuide";
10
+ export * from "./Debug/UIReferenceView";
11
+ export * from "./UserSettingsView";
12
+ export * from "./LanguageToggle";
13
+ export * from "./UserSelectPopover";
14
+ export * from "./UserDisplay";
15
+ export * from "./LoginView";
16
+ export * from "./RebaseAuth";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { AdminModeController } from "../hooks";
3
+ export declare const AdminModeControllerContext: React.Context<AdminModeController>;
4
+ export declare const AdminModeControllerProvider: React.Provider<AdminModeController>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { AnalyticsController } from "@rebasepro/types";
3
+ export declare const AnalyticsContext: React.Context<AnalyticsController>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { AuthController } from "@rebasepro/types";
3
+ export declare const AuthControllerContext: React.Context<AuthController<any, any>>;
@@ -0,0 +1,3 @@
1
+ import type { CustomizationController } from "@rebasepro/types";
2
+ import React from "react";
3
+ export declare const CustomizationControllerContext: React.Context<CustomizationController>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { DataDriver } from "@rebasepro/types";
3
+ export declare const DataDriverContext: React.Context<DataDriver>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { DatabaseAdmin } from "@rebasepro/types";
3
+ export declare const DatabaseAdminContext: React.Context<DatabaseAdmin | undefined>;
@@ -0,0 +1,4 @@
1
+ import type { DialogsController } from "@rebasepro/types";
2
+ import React, { PropsWithChildren } from "react";
3
+ export declare const DialogsControllerContext: React.Context<DialogsController>;
4
+ export declare const DialogsProvider: React.FC<PropsWithChildren>;
@@ -0,0 +1,4 @@
1
+ import type { EffectiveRoleController } from "@rebasepro/types";
2
+ import React from "react";
3
+ export declare const EffectiveRoleControllerContext: React.Context<EffectiveRoleController>;
4
+ export declare const EffectiveRoleControllerProvider: React.Provider<EffectiveRoleController>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { UserManagementDelegate } from "@rebasepro/types";
3
+ export declare const InternalUserManagementContext: React.Context<UserManagementDelegate<any> | undefined>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ModeController } from "../hooks";
3
+ export declare const ModeControllerContext: React.Context<ModeController>;
4
+ export declare const ModeControllerProvider: React.Provider<ModeController>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ /**
3
+ * Context that exposes the full RebaseClient instance (from `@rebasepro/client`).
4
+ * Used by the JS Editor to give developer scripts access to `client.data`, `client.auth`, etc.
5
+ */
6
+ export declare const RebaseClientInstanceContext: React.Context<any>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { RebaseData } from "@rebasepro/types";
3
+ export declare const RebaseDataContext: React.Context<RebaseData>;
@@ -0,0 +1,2 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ export declare const SnackbarProvider: React.FC<PropsWithChildren<{}>>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { StorageSource } from "@rebasepro/types";
3
+ export declare const StorageSourceContext: React.Context<StorageSource>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { UserConfigurationPersistence } from "@rebasepro/types";
3
+ export declare const UserConfigurationPersistenceContext: React.Context<UserConfigurationPersistence | undefined>;
@@ -0,0 +1,13 @@
1
+ export * from "./SnackbarProvider";
2
+ export * from "./ModeController";
3
+ export * from "./AdminModeController";
4
+ export * from "./EffectiveRoleController";
5
+ export * from "./AuthControllerContext";
6
+ export * from "./DataDriverContext";
7
+ export * from "./AnalyticsContext";
8
+ export * from "./StorageSourceContext";
9
+ export * from "./UserConfigurationPersistenceContext";
10
+ export * from "./DialogsProvider";
11
+ export * from "./InternalUserManagementContext";
12
+ export * from "./RebaseClientInstanceContext";
13
+ export * from "./CustomizationControllerContext";
@@ -0,0 +1,17 @@
1
+ import type { RebasePlugin, RebaseContext } from "@rebasepro/types";
2
+ /**
3
+ * Render-less component that manages plugin lifecycle hooks.
4
+ *
5
+ * - Calls `lifecycle.onMount(context)` when plugins mount.
6
+ * - Calls `lifecycle.onUnmount()` when plugins unmount.
7
+ * - Subscribes to auth state changes and calls `lifecycle.onAuthStateChange`.
8
+ *
9
+ * Mount this component inside the Rebase tree, below PluginProviderStack,
10
+ * so that the RebaseContext is fully available.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare function PluginLifecycleManager({ plugins, context }: {
15
+ plugins: RebasePlugin[];
16
+ context: RebaseContext;
17
+ }): null;
@@ -0,0 +1,21 @@
1
+ import type { RebasePlugin } from "@rebasepro/types";
2
+ import React from "react";
3
+ /**
4
+ * Wraps children with all provider components from plugins that match the given scope.
5
+ *
6
+ * Replaces the 3 copy-pasted `plugins.forEach(plugin => { if (plugin.form?.provider) ... })` patterns
7
+ * in Rebase.tsx, EntityEditView.tsx, and PopupFormField.tsx.
8
+ *
9
+ * @param plugins - Array of plugins to extract providers from.
10
+ * @param scope - `"root"` or `"form"` — which providers to apply.
11
+ * @param scopeProps - Additional props passed to each provider component.
12
+ * @param children - The content to wrap.
13
+ *
14
+ * @group Core
15
+ */
16
+ export declare function PluginProviderStack({ plugins, scope, scopeProps, children }: {
17
+ plugins: RebasePlugin[];
18
+ scope: "root" | "form";
19
+ scopeProps?: Record<string, unknown>;
20
+ children: React.ReactNode;
21
+ }): React.ReactNode;
@@ -0,0 +1,14 @@
1
+ import type { RebaseProps } from "./RebaseProps";
2
+ import { User } from "@rebasepro/types";
3
+ /**
4
+ * If you are using independent components of the CMS
5
+ * you need to wrap them with this main component, so the internal hooks work.
6
+ *
7
+ * This is the main component of Rebase. It acts as the provider of all the
8
+ * internal contexts and hooks.
9
+ *
10
+ * You only need to use this component if you are building a custom app.
11
+ *
12
+ * @group Core
13
+ */
14
+ export declare function Rebase<USER extends User>(props: RebaseProps<USER>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,136 @@
1
+ import React from "react";
2
+ import { Locale, User, AuthController, AnalyticsEvent, DataDriver, StorageSource, UserConfigurationPersistence, DatabaseAdmin, RebaseData, RebaseClient, RebaseContext, UserManagementDelegate, EntityLinkBuilder, RebasePlugin, SlotContribution, PropertyConfig, EntityCustomView, EntityAction } from "@rebasepro/types";
3
+ /**
4
+ * Controller to simulate different roles when dev mode is active.
5
+ * @group Models
6
+ */
7
+ export interface EffectiveRoleController {
8
+ effectiveRole: string | null;
9
+ setEffectiveRole: (role: string | null) => void;
10
+ }
11
+ /**
12
+ * @group Models
13
+ */
14
+ export type RebaseProps<USER extends User> = {
15
+ /**
16
+ * The root components of your application. Use RebaseCMS, RebaseStudio, and RebaseShell.
17
+ * Alternatively, pass a render function that receives { context, loading }.
18
+ */
19
+ children: React.ReactNode | ((props: {
20
+ context: RebaseContext;
21
+ loading: boolean;
22
+ }) => React.ReactNode);
23
+ /**
24
+ * Optional base path for the entire Rebase app.
25
+ * Defaults to "/"
26
+ */
27
+ basePath?: string;
28
+ /**
29
+ * Optional base path for the CMS collections.
30
+ * Defaults to "/c"
31
+ */
32
+ baseCollectionPath?: string;
33
+ /**
34
+ * If you have a custom API key, you can use it here.
35
+ */
36
+ apiKey?: string;
37
+ /**
38
+ * Base URL for the backend API (e.g. "http://localhost:3001").
39
+ * When provided, this is available via `useApiConfig()` to any hook
40
+ * in the tree, reducing repetitive `apiUrl` threading.
41
+ */
42
+ apiUrl?: string;
43
+ /**
44
+ * Format of the dates in the CMS.
45
+ * Defaults to 'MMMM dd, yyyy, HH:mm:ss'
46
+ */
47
+ dateTimeFormat?: string;
48
+ /**
49
+ * Locale of the CMS, currently only affecting dates
50
+ */
51
+ locale?: Locale;
52
+ /**
53
+ * Unified RebaseClient for data, auth, and storage.
54
+ */
55
+ client?: RebaseClient;
56
+ /**
57
+ * Optional override for RebaseData if not using `client`
58
+ */
59
+ data?: RebaseData;
60
+ /**
61
+ * Optional override for DataDriver if not using `client`
62
+ */
63
+ driver?: DataDriver;
64
+ /**
65
+ * Optional override for AuthController if not using `client`
66
+ */
67
+ authController?: AuthController<USER>;
68
+ /**
69
+ * Optional override for StorageSource if not using `client`
70
+ */
71
+ storageSource?: StorageSource;
72
+ /**
73
+ * Administrative database operations (SQL, schema discovery).
74
+ * Only needed when the studio/admin features are enabled.
75
+ */
76
+ databaseAdmin?: DatabaseAdmin;
77
+ /**
78
+ * Use this controller to access the configuration that is stored locally,
79
+ * and not defined in code
80
+ */
81
+ userConfigPersistence?: UserConfigurationPersistence;
82
+ /**
83
+ * Callback used to get analytics events from the CMS
84
+ */
85
+ onAnalyticsEvent?: (event: AnalyticsEvent, data?: object) => void;
86
+ /**
87
+ * Optional link builder you can add to generate a button in your entity forms.
88
+ * The function must return a URL that gets opened when the button is clicked
89
+ */
90
+ entityLinkBuilder?: EntityLinkBuilder;
91
+ /**
92
+ * You can use this props to provide your own user management implementation.
93
+ * Note that this will not affect the UI, but it will be used to show user information
94
+ * in various places of the CMS, for example, to show who created or modified an entity,
95
+ * or to assign ownership of an entity.
96
+ *
97
+ * You can also use this data to be retrieved in your custom properties,
98
+ * for example, to show a list of users in a dropdown.
99
+ *
100
+ * If you are using the Rebase user management plugin, this
101
+ * prop will be implemented automatically.
102
+ */
103
+ userManagement?: UserManagementDelegate<USER>;
104
+ /**
105
+ * Plugins loaded in the CMS
106
+ */
107
+ plugins?: RebasePlugin[];
108
+ /**
109
+ * Extra slots for the CMS
110
+ */
111
+ slots?: SlotContribution[];
112
+ /**
113
+ * Property configs (widgets)
114
+ */
115
+ propertyConfigs?: Record<string, PropertyConfig>;
116
+ /**
117
+ * Entity Views
118
+ */
119
+ entityViews?: EntityCustomView<any>[];
120
+ /**
121
+ * Entity Actions
122
+ */
123
+ entityActions?: EntityAction[];
124
+ components?: {
125
+ /**
126
+ * Component to render when a reference is missing
127
+ */
128
+ missingReference?: React.ComponentType<{
129
+ path: string;
130
+ }>;
131
+ };
132
+ /**
133
+ * Controller to simulate different roles when dev mode is active.
134
+ */
135
+ effectiveRoleController?: EffectiveRoleController;
136
+ };
@@ -0,0 +1,4 @@
1
+ export declare function RebaseRouter({ children, basePath }: {
2
+ children: any;
3
+ basePath?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ /**
3
+ * A drop-in replacement for react-router's `<Routes>` that preserves the
4
+ * underlying view when a side dialog navigates the URL to a different path.
5
+ *
6
+ * When opening a side dialog from e.g. `/posts` to `authors/123#side`,
7
+ * the `base_location` stored in router state is used so the route tree
8
+ * keeps rendering the original `/posts` view underneath the dialog overlay.
9
+ *
10
+ * Additionally, registered views from `useNavigationStateController()` are
11
+ * automatically routed — no need to manually map them to `<Route>` elements.
12
+ * Views with `nestedRoutes: true` get a wildcard route (slug/*) as well.
13
+ * Explicitly declared `children` routes take priority.
14
+ */
15
+ export declare function RebaseRoutes({ children }: {
16
+ children?: React.ReactNode;
17
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export * from "./Rebase";
2
+ export * from "./PluginProviderStack";
3
+ export * from "./RebaseRouter";
4
+ export * from "./RebaseRoutes";
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ /**
3
+ * Configuration for API connectivity. Passed once at the top level
4
+ * and available to any hook that needs `apiUrl` or `getAuthToken`.
5
+ *
6
+ * Individual hooks can still accept explicit overrides — this context
7
+ * serves as a fallback to eliminate repetitive threading.
8
+ */
9
+ export interface ApiConfig {
10
+ apiUrl: string;
11
+ getAuthToken?: () => Promise<string | null>;
12
+ }
13
+ /**
14
+ * Read the API config from context. Returns `undefined` if no provider is present,
15
+ * allowing hooks to fall back to their own props.
16
+ */
17
+ export declare function useApiConfig(): ApiConfig | undefined;
18
+ /**
19
+ * Provide API configuration (apiUrl, getAuthToken) to the entire subtree.
20
+ * Typically rendered inside `<Rebase>` or at the app root.
21
+ */
22
+ export declare function ApiConfigProvider({ apiUrl, getAuthToken, children }: ApiConfig & {
23
+ children: React.ReactNode;
24
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import type { EntityCollection } from "@rebasepro/types";
2
+ import { DeleteEntityProps, Entity, EntityCallbacks, RebaseContext, User } from "@rebasepro/types";
3
+ import { RebaseData } from "@rebasepro/types";
4
+ /**
5
+ * @group Hooks and utilities
6
+ */
7
+ export type DeleteEntityWithCallbacksProps<M extends Record<string, any>, USER extends User = User> = DeleteEntityProps<M> & {
8
+ callbacks?: EntityCallbacks<M, USER>;
9
+ onDeleteSuccess?: (entity: Entity<M>) => void;
10
+ onDeleteFailure?: (entity: Entity<M>, e: Error) => void;
11
+ };
12
+ /**
13
+ * This function is in charge of deleting an entity.
14
+ * It will run all the delete callbacks specified in the collection.
15
+ * It is also possible to attach callbacks on save success or error, and callback
16
+ * errors.
17
+ *
18
+ * @param data
19
+ * @param entity
20
+ * @param collection
21
+ * @param callbacks
22
+ * @param onDeleteSuccess
23
+ * @param onDeleteFailure
24
+ * @param context
25
+ * @group Hooks and utilities
26
+ */
27
+ export declare function deleteEntityWithCallbacks<M extends Record<string, any>, USER extends User>({ data, entity, collection, callbacks, onDeleteSuccess, onDeleteFailure, context }: DeleteEntityWithCallbacksProps<M> & {
28
+ collection: EntityCollection<M>;
29
+ data: RebaseData;
30
+ context: RebaseContext<USER>;
31
+ }): Promise<boolean>;