@rebasepro/app 0.0.1-canary.4829d6e

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 (268) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -0
  3. package/dist/auth/api.d.ts +66 -0
  4. package/dist/auth/index.d.ts +13 -0
  5. package/dist/auth/types.d.ts +127 -0
  6. package/dist/auth/useRebaseAuthController.d.ts +13 -0
  7. package/dist/components/AIIcon.d.ts +17 -0
  8. package/dist/components/AuthSimulationMenu.d.ts +0 -0
  9. package/dist/components/ConfirmationDialog.d.ts +9 -0
  10. package/dist/components/Debug/UIReferenceView.d.ts +13 -0
  11. package/dist/components/Debug/UIStyleGuide.d.ts +2 -0
  12. package/dist/components/Debug/collection-views/CardViewDemo.d.ts +2 -0
  13. package/dist/components/Debug/collection-views/CollectionTableDemo.d.ts +2 -0
  14. package/dist/components/Debug/collection-views/KanbanBoardDemo.d.ts +2 -0
  15. package/dist/components/Debug/collection-views/index.d.ts +3 -0
  16. package/dist/components/Debug/collection-views/sample_data.d.ts +23 -0
  17. package/dist/components/Debug/crm-dashboard/CalendarWidget.d.ts +22 -0
  18. package/dist/components/Debug/crm-dashboard/CrmDashboardDemo.d.ts +2 -0
  19. package/dist/components/Debug/crm-dashboard/DashboardMetrics.d.ts +15 -0
  20. package/dist/components/Debug/crm-dashboard/PipelineOverview.d.ts +34 -0
  21. package/dist/components/Debug/crm-dashboard/RecentActivity.d.ts +19 -0
  22. package/dist/components/Debug/crm-dashboard/TaskFilters.d.ts +30 -0
  23. package/dist/components/Debug/crm-dashboard/TaskTable.d.ts +50 -0
  24. package/dist/components/Debug/crm-dashboard/TasksView.d.ts +41 -0
  25. package/dist/components/ErrorTooltip.d.ts +3 -0
  26. package/dist/components/ErrorView.d.ts +21 -0
  27. package/dist/components/LanguageToggle.d.ts +2 -0
  28. package/dist/components/LoginView/LoginView.d.ts +113 -0
  29. package/dist/components/LoginView/index.d.ts +2 -0
  30. package/dist/components/NotFoundPage.d.ts +2 -0
  31. package/dist/components/RebaseAuth.d.ts +10 -0
  32. package/dist/components/RebaseLogo.d.ts +7 -0
  33. package/dist/components/SchemaDriftBanner.d.ts +27 -0
  34. package/dist/components/UnsavedChangesDialog.d.ts +9 -0
  35. package/dist/components/UserDisplay.d.ts +7 -0
  36. package/dist/components/UserSelectPopover.d.ts +63 -0
  37. package/dist/components/UserSettingsView.d.ts +2 -0
  38. package/dist/components/common/index.d.ts +6 -0
  39. package/dist/components/common/table_height.d.ts +5 -0
  40. package/dist/components/common/types.d.ts +66 -0
  41. package/dist/components/common/useColumnsIds.d.ts +9 -0
  42. package/dist/components/common/useDataTableController.d.ts +45 -0
  43. package/dist/components/common/useDebouncedData.d.ts +9 -0
  44. package/dist/components/common/useScrollRestoration.d.ts +14 -0
  45. package/dist/components/index.d.ts +18 -0
  46. package/dist/contexts/AdminModeController.d.ts +4 -0
  47. package/dist/contexts/AnalyticsContext.d.ts +3 -0
  48. package/dist/contexts/AuthControllerContext.d.ts +3 -0
  49. package/dist/contexts/CollectionScopeContext.d.ts +50 -0
  50. package/dist/contexts/ComponentOverrideContext.d.ts +42 -0
  51. package/dist/contexts/CustomizationControllerContext.d.ts +3 -0
  52. package/dist/contexts/DataDriverContext.d.ts +3 -0
  53. package/dist/contexts/DataSourcesContext.d.ts +31 -0
  54. package/dist/contexts/DatabaseAdminContext.d.ts +3 -0
  55. package/dist/contexts/DialogsProvider.d.ts +4 -0
  56. package/dist/contexts/EffectiveRoleController.d.ts +4 -0
  57. package/dist/contexts/ModeController.d.ts +4 -0
  58. package/dist/contexts/RebaseClientInstanceContext.d.ts +6 -0
  59. package/dist/contexts/RebaseDataContext.d.ts +3 -0
  60. package/dist/contexts/SnackbarProvider.d.ts +2 -0
  61. package/dist/contexts/StorageSourceContext.d.ts +3 -0
  62. package/dist/contexts/StorageSourcesContext.d.ts +25 -0
  63. package/dist/contexts/UserConfigurationPersistenceContext.d.ts +3 -0
  64. package/dist/contexts/index.d.ts +17 -0
  65. package/dist/core/PluginLifecycleManager.d.ts +17 -0
  66. package/dist/core/PluginProviderStack.d.ts +21 -0
  67. package/dist/core/Rebase.d.ts +15 -0
  68. package/dist/core/RebaseProps.d.ts +291 -0
  69. package/dist/core/RebaseRouter.d.ts +4 -0
  70. package/dist/core/RebaseRoutes.d.ts +17 -0
  71. package/dist/core/index.d.ts +4 -0
  72. package/dist/hooks/ApiConfigContext.d.ts +24 -0
  73. package/dist/hooks/data/delete.d.ts +33 -0
  74. package/dist/hooks/data/save.d.ts +40 -0
  75. package/dist/hooks/data/useCollection.d.ts +62 -0
  76. package/dist/hooks/data/useData.d.ts +13 -0
  77. package/dist/hooks/data/useDataOrder.d.ts +12 -0
  78. package/dist/hooks/data/useFetch.d.ts +43 -0
  79. package/dist/hooks/data/useRelationSelector.d.ts +52 -0
  80. package/dist/hooks/index.d.ts +36 -0
  81. package/dist/hooks/useAdminModeController.d.ts +19 -0
  82. package/dist/hooks/useAnalyticsController.d.ts +5 -0
  83. package/dist/hooks/useAuthController.d.ts +11 -0
  84. package/dist/hooks/useAuthSubscription.d.ts +2 -0
  85. package/dist/hooks/useBackendStorageSource.d.ts +30 -0
  86. package/dist/hooks/useBridgeRegistration.d.ts +18 -0
  87. package/dist/hooks/useBrowserTitleAndIcon.d.ts +6 -0
  88. package/dist/hooks/useBuildAdminModeController.d.ts +6 -0
  89. package/dist/hooks/useBuildEffectiveRoleController.d.ts +8 -0
  90. package/dist/hooks/useBuildLocalConfigurationPersistence.d.ts +2 -0
  91. package/dist/hooks/useBuildModeController.d.ts +6 -0
  92. package/dist/hooks/useClipboard.d.ts +57 -0
  93. package/dist/hooks/useCollapsedGroups.d.ts +27 -0
  94. package/dist/hooks/useComponentOverride.d.ts +32 -0
  95. package/dist/hooks/useCustomizationController.d.ts +11 -0
  96. package/dist/hooks/useDialogsController.d.ts +11 -0
  97. package/dist/hooks/useEffectiveRoleController.d.ts +7 -0
  98. package/dist/hooks/useLargeLayout.d.ts +1 -0
  99. package/dist/hooks/useModeController.d.ts +19 -0
  100. package/dist/hooks/usePermissions.d.ts +12 -0
  101. package/dist/hooks/useRebaseClient.d.ts +5 -0
  102. package/dist/hooks/useRebaseContext.d.ts +11 -0
  103. package/dist/hooks/useRebaseRegistry.d.ts +34 -0
  104. package/dist/hooks/useResolvedComponent.d.ts +47 -0
  105. package/dist/hooks/useSlot.d.ts +18 -0
  106. package/dist/hooks/useSnackbarController.d.ts +20 -0
  107. package/dist/hooks/useStorageSource.d.ts +6 -0
  108. package/dist/hooks/useStudioBridge.d.ts +79 -0
  109. package/dist/hooks/useTranslation.d.ts +17 -0
  110. package/dist/hooks/useUnsavedChangesDialog.d.ts +12 -0
  111. package/dist/hooks/useUserConfigurationPersistence.d.ts +8 -0
  112. package/dist/i18n/RebaseI18nProvider.d.ts +33 -0
  113. package/dist/index.d.ts +16 -0
  114. package/dist/index.es.js +16843 -0
  115. package/dist/index.es.js.map +1 -0
  116. package/dist/index.umd.js +17021 -0
  117. package/dist/index.umd.js.map +1 -0
  118. package/dist/internal/common.d.ts +14 -0
  119. package/dist/internal/useRestoreScroll.d.ts +15 -0
  120. package/dist/locales/de.d.ts +2 -0
  121. package/dist/locales/en.d.ts +10 -0
  122. package/dist/locales/es.d.ts +10 -0
  123. package/dist/locales/fr.d.ts +2 -0
  124. package/dist/locales/hi.d.ts +2 -0
  125. package/dist/locales/it.d.ts +2 -0
  126. package/dist/locales/pt.d.ts +7 -0
  127. package/dist/util/constants.d.ts +1 -0
  128. package/dist/util/createFormexStub.d.ts +2 -0
  129. package/dist/util/entity_cache.d.ts +22 -0
  130. package/dist/util/enums.d.ts +5 -0
  131. package/dist/util/icon_list.d.ts +5 -0
  132. package/dist/util/icons.d.ts +20 -0
  133. package/dist/util/index.d.ts +8 -0
  134. package/dist/util/previews.d.ts +4 -0
  135. package/dist/util/useStorageUploadController.d.ts +44 -0
  136. package/dist/vitePlugin.d.ts +60 -0
  137. package/dist/vitePlugin.js +113 -0
  138. package/package.json +145 -0
  139. package/src/auth/api.ts +148 -0
  140. package/src/auth/index.ts +25 -0
  141. package/src/auth/types.ts +115 -0
  142. package/src/auth/useRebaseAuthController.ts +328 -0
  143. package/src/components/AIIcon.tsx +47 -0
  144. package/src/components/AuthSimulationMenu.tsx +0 -0
  145. package/src/components/ConfirmationDialog.tsx +48 -0
  146. package/src/components/Debug/UIReferenceView.tsx +958 -0
  147. package/src/components/Debug/UIStyleGuide.tsx +156 -0
  148. package/src/components/Debug/collection-views/CardViewDemo.tsx +85 -0
  149. package/src/components/Debug/collection-views/CollectionTableDemo.tsx +107 -0
  150. package/src/components/Debug/collection-views/KanbanBoardDemo.tsx +90 -0
  151. package/src/components/Debug/collection-views/index.ts +3 -0
  152. package/src/components/Debug/collection-views/sample_data.ts +42 -0
  153. package/src/components/Debug/crm-dashboard/CalendarWidget.tsx +389 -0
  154. package/src/components/Debug/crm-dashboard/CrmDashboardDemo.tsx +1102 -0
  155. package/src/components/Debug/crm-dashboard/DashboardMetrics.tsx +133 -0
  156. package/src/components/Debug/crm-dashboard/PipelineOverview.tsx +290 -0
  157. package/src/components/Debug/crm-dashboard/RecentActivity.tsx +215 -0
  158. package/src/components/Debug/crm-dashboard/TaskFilters.tsx +184 -0
  159. package/src/components/Debug/crm-dashboard/TaskTable.tsx +427 -0
  160. package/src/components/Debug/crm-dashboard/TasksView.tsx +234 -0
  161. package/src/components/ErrorTooltip.tsx +12 -0
  162. package/src/components/ErrorView.tsx +94 -0
  163. package/src/components/LanguageToggle.tsx +59 -0
  164. package/src/components/LoginView/LoginView.tsx +932 -0
  165. package/src/components/LoginView/index.ts +2 -0
  166. package/src/components/NotFoundPage.tsx +27 -0
  167. package/src/components/RebaseAuth.tsx +27 -0
  168. package/src/components/RebaseLogo.tsx +29 -0
  169. package/src/components/SchemaDriftBanner.tsx +102 -0
  170. package/src/components/UnsavedChangesDialog.tsx +46 -0
  171. package/src/components/UserDisplay.tsx +54 -0
  172. package/src/components/UserSelectPopover.tsx +399 -0
  173. package/src/components/UserSettingsView.tsx +318 -0
  174. package/src/components/common/index.ts +6 -0
  175. package/src/components/common/table_height.tsx +21 -0
  176. package/src/components/common/types.tsx +66 -0
  177. package/src/components/common/useColumnsIds.tsx +222 -0
  178. package/src/components/common/useDataTableController.tsx +514 -0
  179. package/src/components/common/useDebouncedData.ts +49 -0
  180. package/src/components/common/useScrollRestoration.tsx +68 -0
  181. package/src/components/index.tsx +26 -0
  182. package/src/contexts/AdminModeController.tsx +11 -0
  183. package/src/contexts/AnalyticsContext.tsx +4 -0
  184. package/src/contexts/AuthControllerContext.tsx +4 -0
  185. package/src/contexts/CollectionScopeContext.tsx +67 -0
  186. package/src/contexts/ComponentOverrideContext.tsx +81 -0
  187. package/src/contexts/CustomizationControllerContext.tsx +4 -0
  188. package/src/contexts/DataDriverContext.tsx +4 -0
  189. package/src/contexts/DataSourcesContext.tsx +36 -0
  190. package/src/contexts/DatabaseAdminContext.tsx +4 -0
  191. package/src/contexts/DialogsProvider.tsx +56 -0
  192. package/src/contexts/EffectiveRoleController.tsx +12 -0
  193. package/src/contexts/ModeController.tsx +11 -0
  194. package/src/contexts/RebaseClientInstanceContext.tsx +7 -0
  195. package/src/contexts/RebaseDataContext.tsx +4 -0
  196. package/src/contexts/SnackbarProvider.tsx +15 -0
  197. package/src/contexts/StorageSourceContext.tsx +4 -0
  198. package/src/contexts/StorageSourcesContext.tsx +30 -0
  199. package/src/contexts/UserConfigurationPersistenceContext.tsx +4 -0
  200. package/src/contexts/index.ts +17 -0
  201. package/src/core/PluginLifecycleManager.tsx +95 -0
  202. package/src/core/PluginProviderStack.tsx +40 -0
  203. package/src/core/Rebase.tsx +439 -0
  204. package/src/core/RebaseProps.tsx +320 -0
  205. package/src/core/RebaseRouter.tsx +17 -0
  206. package/src/core/RebaseRoutes.tsx +24 -0
  207. package/src/core/index.tsx +5 -0
  208. package/src/hooks/ApiConfigContext.tsx +41 -0
  209. package/src/hooks/data/delete.ts +55 -0
  210. package/src/hooks/data/save.ts +77 -0
  211. package/src/hooks/data/useCollection.tsx +176 -0
  212. package/src/hooks/data/useData.tsx +18 -0
  213. package/src/hooks/data/useDataOrder.ts +26 -0
  214. package/src/hooks/data/useFetch.tsx +140 -0
  215. package/src/hooks/data/useRelationSelector.tsx +234 -0
  216. package/src/hooks/index.tsx +45 -0
  217. package/src/hooks/useAdminModeController.tsx +23 -0
  218. package/src/hooks/useAnalyticsController.tsx +8 -0
  219. package/src/hooks/useAuthController.tsx +14 -0
  220. package/src/hooks/useAuthSubscription.ts +87 -0
  221. package/src/hooks/useBackendStorageSource.ts +288 -0
  222. package/src/hooks/useBridgeRegistration.tsx +32 -0
  223. package/src/hooks/useBrowserTitleAndIcon.tsx +23 -0
  224. package/src/hooks/useBuildAdminModeController.tsx +24 -0
  225. package/src/hooks/useBuildEffectiveRoleController.tsx +31 -0
  226. package/src/hooks/useBuildLocalConfigurationPersistence.tsx +75 -0
  227. package/src/hooks/useBuildModeController.tsx +71 -0
  228. package/src/hooks/useClipboard.tsx +158 -0
  229. package/src/hooks/useCollapsedGroups.ts +116 -0
  230. package/src/hooks/useComponentOverride.tsx +59 -0
  231. package/src/hooks/useCustomizationController.tsx +14 -0
  232. package/src/hooks/useDialogsController.tsx +15 -0
  233. package/src/hooks/useEffectiveRoleController.tsx +10 -0
  234. package/src/hooks/useLargeLayout.tsx +65 -0
  235. package/src/hooks/useModeController.tsx +23 -0
  236. package/src/hooks/usePermissions.ts +44 -0
  237. package/src/hooks/useRebaseClient.tsx +10 -0
  238. package/src/hooks/useRebaseContext.tsx +83 -0
  239. package/src/hooks/useRebaseRegistry.tsx +91 -0
  240. package/src/hooks/useResolvedComponent.tsx +159 -0
  241. package/src/hooks/useSlot.tsx +64 -0
  242. package/src/hooks/useSnackbarController.tsx +52 -0
  243. package/src/hooks/useStorageSource.tsx +11 -0
  244. package/src/hooks/useStudioBridge.tsx +209 -0
  245. package/src/hooks/useTranslation.ts +33 -0
  246. package/src/hooks/useUnsavedChangesDialog.tsx +64 -0
  247. package/src/hooks/useUserConfigurationPersistence.tsx +11 -0
  248. package/src/i18n/RebaseI18nProvider.tsx +160 -0
  249. package/src/index.ts +25 -0
  250. package/src/internal/common.tsx +16 -0
  251. package/src/internal/useRestoreScroll.tsx +69 -0
  252. package/src/locales/de.ts +902 -0
  253. package/src/locales/en.ts +980 -0
  254. package/src/locales/es.ts +922 -0
  255. package/src/locales/fr.ts +901 -0
  256. package/src/locales/hi.ts +901 -0
  257. package/src/locales/it.ts +901 -0
  258. package/src/locales/pt.ts +909 -0
  259. package/src/util/constants.ts +7 -0
  260. package/src/util/createFormexStub.tsx +66 -0
  261. package/src/util/entity_cache.ts +239 -0
  262. package/src/util/enums.ts +32 -0
  263. package/src/util/icon_list.ts +22 -0
  264. package/src/util/icons.tsx +149 -0
  265. package/src/util/index.ts +12 -0
  266. package/src/util/previews.ts +105 -0
  267. package/src/util/useStorageUploadController.tsx +350 -0
  268. package/src/vitePlugin.ts +196 -0
@@ -0,0 +1,50 @@
1
+ import React from "react";
2
+ interface TaskEntity {
3
+ id: string;
4
+ values: {
5
+ title: string;
6
+ status: string;
7
+ resolution: string | null;
8
+ dueDate: string | null;
9
+ stageId: string | null;
10
+ description: string | null;
11
+ notes: string | null;
12
+ clientId: string | null;
13
+ client?: {
14
+ name?: string;
15
+ } | null;
16
+ priority?: string | null;
17
+ createdAt: string | null;
18
+ };
19
+ }
20
+ export interface TaskTableProps {
21
+ tasks: TaskEntity[];
22
+ loading: boolean;
23
+ pendingTasks: TaskEntity[];
24
+ visiblePendingTasks: TaskEntity[];
25
+ hasMorePending: boolean;
26
+ onLoadMorePending: () => void;
27
+ pendingCount: number;
28
+ togglingIds: Set<string>;
29
+ onToggleTask: (taskId: string, currentStatus: string) => void;
30
+ onOpenTask: (taskId: string) => void;
31
+ onOpenClient: (clientId: string) => void;
32
+ clientsMap: Map<string, {
33
+ name: string;
34
+ picture?: string;
35
+ }>;
36
+ stageLabels: Record<string, string>;
37
+ recentlyToggledIds: Set<string>;
38
+ completedTasks: TaskEntity[];
39
+ completedLoaded: boolean;
40
+ loadingCompleted: boolean;
41
+ completedHasMore: boolean;
42
+ onExpandCompleted: () => void;
43
+ onLoadMoreCompleted: () => void;
44
+ }
45
+ export declare const resolutionDisplay: Record<string, {
46
+ label: string;
47
+ colorScheme: string;
48
+ }>;
49
+ export declare function TaskTable({ tasks, loading, pendingTasks, visiblePendingTasks, hasMorePending, onLoadMorePending, pendingCount, togglingIds, onToggleTask, onOpenTask, onOpenClient, clientsMap, stageLabels, recentlyToggledIds, completedTasks, completedLoaded, loadingCompleted, completedHasMore, onExpandCompleted, onLoadMoreCompleted }: TaskTableProps): React.JSX.Element;
50
+ export {};
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ interface TaskEntity {
3
+ id: string;
4
+ values: {
5
+ title: string;
6
+ status: string;
7
+ resolution: string | null;
8
+ dueDate: string | null;
9
+ stageId: string | null;
10
+ description: string | null;
11
+ notes: string | null;
12
+ clientId: string | null;
13
+ client?: {
14
+ name?: string;
15
+ } | null;
16
+ priority?: string | null;
17
+ createdAt: string | null;
18
+ };
19
+ }
20
+ export interface TasksViewProps {
21
+ loading: boolean;
22
+ tasks: TaskEntity[];
23
+ togglingIds: Set<string>;
24
+ onToggleTask: (taskId: string, currentStatus: string) => void;
25
+ onOpenTask: (taskId: string) => void;
26
+ onOpenClient: (clientId: string) => void;
27
+ clientsMap: Map<string, {
28
+ name: string;
29
+ picture?: string;
30
+ }>;
31
+ pipelineStages: any[];
32
+ recentlyToggledIds: Set<string>;
33
+ completedTasks: TaskEntity[];
34
+ completedLoaded: boolean;
35
+ loadingCompleted: boolean;
36
+ completedHasMore: boolean;
37
+ onExpandCompleted: () => void;
38
+ onLoadMoreCompleted: () => void;
39
+ }
40
+ export declare function TasksView({ loading, tasks, togglingIds, onToggleTask, onOpenTask, onOpenClient, clientsMap, pipelineStages, recentlyToggledIds, completedTasks, completedLoaded, loadingCompleted, completedHasMore, onExpandCompleted, onLoadMoreCompleted }: TasksViewProps): React.JSX.Element;
41
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TooltipProps } from "@rebasepro/ui";
3
+ export declare function ErrorTooltip(props: TooltipProps): React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ /**
3
+ * @group Components
4
+ */
5
+ export interface ErrorViewProps {
6
+ title?: string;
7
+ error: Error | React.ReactElement | string;
8
+ tooltip?: string;
9
+ onRetry?: () => void;
10
+ }
11
+ /**
12
+ * Generic error view. Displayed for example when an unexpected value comes
13
+ * from the driver in a collection view.
14
+ * @param title
15
+ * @param error
16
+ * @param tooltip
17
+ * @param onRetry
18
+
19
+ * @group Components
20
+ */
21
+ export declare function ErrorView({ title, error, tooltip, onRetry }: ErrorViewProps): React.ReactElement;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function LanguageToggle(): React.JSX.Element;
@@ -0,0 +1,113 @@
1
+ import React, { ReactNode } from "react";
2
+ /** Google Identity Services SDK — injected by the GIS <script> tag. */
3
+ declare global {
4
+ interface Window {
5
+ google?: {
6
+ accounts: {
7
+ oauth2: {
8
+ initCodeClient(config: {
9
+ client_id: string;
10
+ scope: string;
11
+ ux_mode: "popup" | "redirect";
12
+ callback: (response: {
13
+ code?: string;
14
+ error?: string;
15
+ }) => void;
16
+ }): {
17
+ requestCode(): void;
18
+ };
19
+ };
20
+ };
21
+ };
22
+ }
23
+ }
24
+ import { AuthControllerExtended } from "@rebasepro/types";
25
+ /**
26
+ * Props for the generic LoginView.
27
+ * Consumes {@link AuthControllerExtended} — works with any backend
28
+ * (Rebase custom backend, Firebase, etc.)
29
+ */
30
+ export interface LoginViewProps {
31
+ /**
32
+ * Auth controller — must implement AuthControllerExtended.
33
+ */
34
+ authController: AuthControllerExtended;
35
+ /**
36
+ * Path to the logo displayed in the login screen
37
+ */
38
+ logo?: string;
39
+ /**
40
+ * Enable the skip login button
41
+ */
42
+ allowSkipLogin?: boolean;
43
+ /**
44
+ * Disable the login buttons
45
+ */
46
+ disabled?: boolean;
47
+ /**
48
+ * Prevent users from creating new accounts.
49
+ * If not set, checks `authController.capabilities.registration`.
50
+ */
51
+ disableSignupScreen?: boolean;
52
+ /**
53
+ * Display this component when no user is found
54
+ */
55
+ noUserComponent?: ReactNode;
56
+ /**
57
+ * Display this component below the sign-in buttons
58
+ */
59
+ additionalComponent?: ReactNode;
60
+ /**
61
+ * Display this component above the sign-in buttons
62
+ */
63
+ topComponent?: ReactNode;
64
+ /**
65
+ * Error message when user is not allowed access
66
+ */
67
+ notAllowedError?: string | Error;
68
+ /**
69
+ * Google client ID for Google OAuth.
70
+ * Required when Google login is enabled via ID token flow.
71
+ */
72
+ googleClientId?: string;
73
+ /**
74
+ * GitHub client ID for GitHub OAuth.
75
+ */
76
+ githubClientId?: string;
77
+ /**
78
+ * LinkedIn client ID for LinkedIn OAuth.
79
+ */
80
+ linkedinClientId?: string;
81
+ /**
82
+ * Optional custom title shown above options
83
+ */
84
+ title?: string;
85
+ /**
86
+ * Optional custom subtitle shown above options
87
+ */
88
+ subtitle?: string;
89
+ /**
90
+ * When true, shows bootstrap/setup UI (first-user creation).
91
+ * If not set, derived from `authController` if it exposes `needsSetup`.
92
+ */
93
+ needsSetup?: boolean;
94
+ /**
95
+ * Whether registration is enabled.
96
+ * If not set, derived from `authController.capabilities.registration`.
97
+ */
98
+ registrationEnabled?: boolean;
99
+ /**
100
+ * Pre-fill the email field (e.g. for demo or testing environments).
101
+ */
102
+ defaultEmail?: string;
103
+ /**
104
+ * Pre-fill the password field (e.g. for demo or testing environments).
105
+ */
106
+ defaultPassword?: string;
107
+ }
108
+ /**
109
+ * Generic login view component that works with any AuthControllerExtended.
110
+ * Feature-detects capabilities to show/hide login methods.
111
+ * @group Core
112
+ */
113
+ export declare function LoginView({ logo, authController, noUserComponent, disableSignupScreen, disabled, notAllowedError, googleClientId, githubClientId, linkedinClientId, title, subtitle, needsSetup, registrationEnabled, additionalComponent, topComponent, defaultEmail, defaultPassword }: LoginViewProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { LoginView } from "./LoginView";
2
+ export type { LoginViewProps } from "./LoginView";
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function NotFoundPage(): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { RebaseAuthConfig } from "@rebasepro/types";
2
+ /**
3
+ * Declarative component to configure authentication in Rebase.
4
+ * Renders nothing — purely registers config into the RebaseRegistry.
5
+ *
6
+ * This is a framework-level component that lives in core since
7
+ * authentication is cross-cutting (CMS, Studio, any app area).
8
+ * @group Core
9
+ */
10
+ export declare function RebaseAuth({ loginView }: RebaseAuthConfig): null;
@@ -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
+ }): React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ interface SchemaDriftContextValue {
3
+ /** Report a schema drift error (call from any data-loading hook). */
4
+ reportSchemaDrift: (message: string) => void;
5
+ /** The most recent schema drift message, or null. */
6
+ schemaDriftMessage: string | null;
7
+ /** Dismiss the banner for this session. */
8
+ dismiss: () => void;
9
+ }
10
+ export declare function useSchemaDriftContext(): SchemaDriftContextValue;
11
+ /**
12
+ * Detects schema drift from an error object.
13
+ * Checks both the error code (from `RebaseApiError`) and the message
14
+ * for schema drift indicators.
15
+ */
16
+ export declare function isSchemaDriftError(error: unknown): boolean;
17
+ export declare function SchemaDriftProvider({ children }: {
18
+ children: React.ReactNode;
19
+ }): React.JSX.Element;
20
+ export interface SchemaDriftBannerProps {
21
+ className?: string;
22
+ }
23
+ /**
24
+ * Persistent banner shown when a schema drift error is detected.
25
+ */
26
+ export declare function SchemaDriftBanner({ className }: SchemaDriftBannerProps): React.JSX.Element | null;
27
+ export {};
@@ -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): React.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.Element;
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ /**
3
+ * Represents a selectable user item with optional role information.
4
+ */
5
+ export interface SelectableUser {
6
+ uid: string;
7
+ displayName?: string | null;
8
+ email?: string | null;
9
+ photoURL?: string | null;
10
+ roles?: string[];
11
+ }
12
+ export interface UserSelectPopoverProps {
13
+ /**
14
+ * The currently selected user, or `null` for "self"/default.
15
+ */
16
+ selectedUser: SelectableUser | null;
17
+ /**
18
+ * Called when the user selection changes.
19
+ * `null` means "reset to self/default".
20
+ */
21
+ onUserSelected: (user: SelectableUser | null) => void;
22
+ /**
23
+ * Full list of users to display.
24
+ * The component handles client-side search/filter internally.
25
+ */
26
+ users: SelectableUser[];
27
+ /**
28
+ * Whether users are currently loading.
29
+ */
30
+ loading?: boolean;
31
+ /**
32
+ * The current user (displayed as the "self" option at the top).
33
+ */
34
+ currentUser?: SelectableUser | null;
35
+ /**
36
+ * Label to display when no user is selected.
37
+ * @default "Current user"
38
+ */
39
+ defaultLabel?: string;
40
+ /**
41
+ * Maximum number of users to render at a time (for performance).
42
+ * Users can still be found via search.
43
+ * @default 100
44
+ */
45
+ renderLimit?: number;
46
+ /**
47
+ * Additional class name for the trigger button.
48
+ */
49
+ className?: string;
50
+ /**
51
+ * Size variant.
52
+ * @default "small"
53
+ */
54
+ size?: "small" | "medium";
55
+ }
56
+ /**
57
+ * A reusable user picker popover with search support.
58
+ * Designed to handle very large user lists (100k+) by filtering
59
+ * client-side and limiting the rendered set.
60
+ *
61
+ * @group Components
62
+ */
63
+ export declare function UserSelectPopover({ selectedUser, onUserSelected, users, loading, currentUser, defaultLabel, renderLimit, className, size }: UserSelectPopoverProps): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare function UserSettingsView(): React.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,66 @@
1
+ import type { Property, Entity } from "@rebasepro/types";
2
+ import { CollectionSize, SelectedCellProps } from "@rebasepro/types";
3
+ export type DataCollectionTableController<M extends Record<string, unknown>> = {
4
+ /**
5
+ * This cell is displayed as selected
6
+ */
7
+ selectedCell?: SelectedCellProps;
8
+ /**
9
+ * Store used to sync selection state across cells efficiently.
10
+ */
11
+ selectionStore?: {
12
+ getEntity: () => SelectedCellProps | undefined;
13
+ subscribe: (cb: () => void) => () => void;
14
+ };
15
+ /**
16
+ * Select a table cell
17
+ * @param cell
18
+ */
19
+ select: (cell?: SelectedCellProps<M>) => void;
20
+ /**
21
+ * The cell that is displayed as a popup view.
22
+ * @param cell
23
+ */
24
+ setPopupCell?: (cell?: SelectedCellProps<M>) => void;
25
+ /**
26
+ * Callback used when the value of a cell has changed.
27
+ * @param params
28
+ */
29
+ onValueChange?: (params: OnCellValueChangeParams<unknown, Entity<M>>) => void;
30
+ /**
31
+ * Size of the elements in the collection
32
+ */
33
+ size: CollectionSize;
34
+ };
35
+ /**
36
+ * Props passed in a callback when the content of a cell in a table has been edited
37
+ * @group Collection components
38
+ */
39
+ export interface OnCellValueChangeParams<T = unknown, D = unknown> {
40
+ value: T;
41
+ propertyKey: string;
42
+ data?: D;
43
+ onValueUpdated: () => void;
44
+ setError: (e: Error | undefined) => void;
45
+ }
46
+ /**
47
+ * @group Collection components
48
+ */
49
+ export type UniqueFieldValidator = (props: {
50
+ name: string;
51
+ value: unknown;
52
+ property: Property;
53
+ entityId?: string | number;
54
+ }) => Promise<boolean>;
55
+ /**
56
+ * Callback when a cell has changed in a table
57
+ * @group Collection components
58
+ */
59
+ export type OnCellValueChange<T, M extends Record<string, unknown>> = (params: OnCellValueChangeParams<T, Entity<M>>) => Promise<void> | void;
60
+ /**
61
+ * @group Collection components
62
+ */
63
+ export type OnColumnResizeParams = {
64
+ width: number;
65
+ key: string;
66
+ };
@@ -0,0 +1,9 @@
1
+ import type { CollectionConfig, Property } from "@rebasepro/types";
2
+ export type PropertyColumnConfig = {
3
+ key: string;
4
+ disabled: boolean;
5
+ };
6
+ export declare function getSubcollectionColumnId(collection: CollectionConfig<any>): string;
7
+ export declare function useColumnIds<M extends Record<string, any>>(collection: CollectionConfig<M>, includeSubcollections: boolean): PropertyColumnConfig[];
8
+ export declare function getColumnKeysForProperty(property: Property, key: string, disabled?: boolean): PropertyColumnConfig[];
9
+ export declare function getFormFieldKeys(collection: CollectionConfig): string[];
@@ -0,0 +1,45 @@
1
+ import type { CollectionConfig } 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: CollectionConfig<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
+ fixedFilter?: 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 DataCollectionTable}.
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 fixedFilterFromProps
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, fixedFilter: fixedFilterFromProps, 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: unknown, 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,18 @@
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 { CrmDashboardDemo } from "./Debug/crm-dashboard/CrmDashboardDemo";
12
+ export * from "./UserSettingsView";
13
+ export * from "./LanguageToggle";
14
+ export * from "./UserSelectPopover";
15
+ export * from "./UserDisplay";
16
+ export * from "./LoginView";
17
+ export * from "./RebaseAuth";
18
+ export * from "./SchemaDriftBanner";
@@ -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,50 @@
1
+ import React from "react";
2
+ import type { CollectionConfig } from "@rebasepro/types";
3
+ /**
4
+ * Carries the collection a UI subtree is currently bound to.
5
+ *
6
+ * Mounted by every collection binding (main collection views, entity
7
+ * edit/detail views, side panels, reference-selection dialogs, import
8
+ * previews) via {@link CollectionScopeProvider}. Leaf components read it with
9
+ * {@link useCollectionScope} to derive collection-dependent behavior — e.g.
10
+ * filter fields resolve the engine's supported operators from
11
+ * `collection.engine` — without every intermediate component threading
12
+ * collection props.
13
+ *
14
+ * @internal
15
+ */
16
+ export declare const CollectionScopeContext: React.Context<CollectionConfig | undefined>;
17
+ /**
18
+ * Read the collection the current subtree is bound to, or `undefined` when
19
+ * rendered outside any collection scope (e.g. a fully standalone table).
20
+ *
21
+ * @group Hooks
22
+ */
23
+ export declare function useCollectionScope(): CollectionConfig | undefined;
24
+ /**
25
+ * Scopes a UI subtree to a collection.
26
+ *
27
+ * Provides two things at once:
28
+ * 1. The collection itself — readable via {@link useCollectionScope} —
29
+ * so leaf components (filter fields, previews, …) can derive
30
+ * collection-dependent behavior such as engine capabilities.
31
+ * 2. The collection's component overrides (`collection.components`),
32
+ * by mounting {@link CollectionComponentOverrideProvider}.
33
+ *
34
+ * Mount this wherever a subtree is bound to a specific collection. If you
35
+ * build a custom view around `SelectableTable` / `CollectionTableBinding`,
36
+ * wrap it in this provider to get engine-aware filters and collection-scoped
37
+ * component overrides for free:
38
+ *
39
+ * ```tsx
40
+ * <CollectionScopeProvider collection={myCollection}>
41
+ * <CollectionTableBinding ... />
42
+ * </CollectionScopeProvider>
43
+ * ```
44
+ *
45
+ * @group Components
46
+ */
47
+ export declare function CollectionScopeProvider({ collection, children }: {
48
+ collection: CollectionConfig<any> | undefined;
49
+ children: React.ReactNode;
50
+ }): React.JSX.Element;