@rebasepro/app 0.17.3-canary.gdd23447 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/contexts/AuthControllerContext.d.ts +2 -1
- package/dist/contexts/CustomizationControllerContext.d.ts +2 -1
- package/dist/contexts/DialogsProvider.d.ts +2 -1
- package/dist/contexts/RebaseDataContext.d.ts +10 -1
- package/dist/contexts/StorageSourceContext.d.ts +11 -1
- package/dist/core/RebaseProps.d.ts +2 -12
- package/dist/debug/index.d.ts +19 -0
- package/dist/debug.js +3631 -0
- package/dist/hooks/data/delete.d.ts +16 -7
- package/dist/hooks/data/save.d.ts +18 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useAdminModeController.d.ts +5 -4
- package/dist/hooks/useNavigationGroupLabel.d.ts +17 -0
- package/dist/hooks/useStudioBridge.d.ts +33 -0
- package/dist/index.es.js +2599 -6980
- package/dist/index.es.js.map +1 -1
- package/dist/vitePlugin.d.ts +22 -0
- package/dist/vitePlugin.js +40 -1
- package/package.json +42 -31
- package/src/auth/api.ts +0 -134
- package/src/auth/index.ts +0 -26
- package/src/auth/types.ts +0 -115
- package/src/auth/useRebaseAuthController.ts +0 -345
- package/src/collections/collection_view_config.ts +0 -76
- package/src/collections/entity-display-cache.ts +0 -195
- package/src/collections/entity-display.ts +0 -77
- package/src/collections/entity_image_preview.ts +0 -61
- package/src/collections/filter-operator-resolution.ts +0 -119
- package/src/collections/form-layout.ts +0 -394
- package/src/collections/index.ts +0 -13
- package/src/collections/navigation_from_path.ts +0 -123
- package/src/collections/navigation_utils.ts +0 -171
- package/src/collections/parent_references_from_path.ts +0 -59
- package/src/collections/property-path.ts +0 -30
- package/src/collections/property_presentation.ts +0 -264
- package/src/collections/summary-property.ts +0 -114
- package/src/collections/title-property.ts +0 -312
- package/src/components/AIIcon.tsx +0 -47
- package/src/components/AuthSimulationMenu.tsx +0 -0
- package/src/components/ConfirmationDialog.tsx +0 -48
- package/src/components/Debug/UIReferenceView.tsx +0 -1053
- package/src/components/Debug/UIStyleGuide.tsx +0 -159
- package/src/components/Debug/collection-views/CardViewDemo.tsx +0 -87
- package/src/components/Debug/collection-views/CollectionTableDemo.tsx +0 -107
- package/src/components/Debug/collection-views/KanbanBoardDemo.tsx +0 -89
- package/src/components/Debug/collection-views/index.ts +0 -3
- package/src/components/Debug/collection-views/sample_data.ts +0 -44
- package/src/components/Debug/crm-dashboard/CalendarWidget.tsx +0 -387
- package/src/components/Debug/crm-dashboard/CrmDashboardDemo.tsx +0 -1100
- package/src/components/Debug/crm-dashboard/DashboardMetrics.tsx +0 -131
- package/src/components/Debug/crm-dashboard/PipelineOverview.tsx +0 -288
- package/src/components/Debug/crm-dashboard/RecentActivity.tsx +0 -213
- package/src/components/Debug/crm-dashboard/TaskFilters.tsx +0 -182
- package/src/components/Debug/crm-dashboard/TaskTable.tsx +0 -425
- package/src/components/Debug/crm-dashboard/TasksView.tsx +0 -234
- package/src/components/ErrorTooltip.tsx +0 -12
- package/src/components/ErrorView.tsx +0 -94
- package/src/components/LanguageToggle.tsx +0 -59
- package/src/components/LoginView/LoginView.tsx +0 -1235
- package/src/components/LoginView/index.ts +0 -2
- package/src/components/LoginView/oauth-redirect-flow.ts +0 -184
- package/src/components/NotFoundPage.tsx +0 -27
- package/src/components/RebaseAuth.tsx +0 -27
- package/src/components/RebaseLogo.tsx +0 -88
- package/src/components/SchemaDriftBanner.tsx +0 -102
- package/src/components/UnsavedChangesDialog.tsx +0 -46
- package/src/components/UserDisplay.tsx +0 -54
- package/src/components/UserSelectPopover.tsx +0 -399
- package/src/components/UserSettingsView.tsx +0 -318
- package/src/components/common/index.ts +0 -6
- package/src/components/common/table_height.tsx +0 -21
- package/src/components/common/types.tsx +0 -66
- package/src/components/common/useColumnsIds.tsx +0 -261
- package/src/components/common/useDataTableController.tsx +0 -571
- package/src/components/common/useDebouncedData.ts +0 -49
- package/src/components/common/useScrollRestoration.tsx +0 -68
- package/src/components/index.tsx +0 -26
- package/src/contexts/AdminModeController.tsx +0 -11
- package/src/contexts/AnalyticsContext.tsx +0 -4
- package/src/contexts/AuthControllerContext.tsx +0 -4
- package/src/contexts/CollectionResolverContext.tsx +0 -24
- package/src/contexts/CollectionScopeContext.tsx +0 -68
- package/src/contexts/ComponentOverrideContext.tsx +0 -81
- package/src/contexts/CustomizationControllerContext.tsx +0 -4
- package/src/contexts/DataDriverContext.tsx +0 -4
- package/src/contexts/DataSourcesContext.tsx +0 -36
- package/src/contexts/DatabaseAdminContext.tsx +0 -4
- package/src/contexts/DialogsProvider.tsx +0 -56
- package/src/contexts/EffectiveRoleController.tsx +0 -12
- package/src/contexts/ModeController.tsx +0 -11
- package/src/contexts/RebaseClientInstanceContext.tsx +0 -7
- package/src/contexts/RebaseDataContext.tsx +0 -4
- package/src/contexts/SnackbarProvider.tsx +0 -15
- package/src/contexts/StorageSourceContext.tsx +0 -4
- package/src/contexts/StorageSourcesContext.tsx +0 -30
- package/src/contexts/UserConfigurationPersistenceContext.tsx +0 -4
- package/src/contexts/index.ts +0 -18
- package/src/core/PluginLifecycleManager.tsx +0 -96
- package/src/core/PluginProviderStack.tsx +0 -40
- package/src/core/Rebase.tsx +0 -488
- package/src/core/RebaseProps.tsx +0 -333
- package/src/core/RebaseRouter.tsx +0 -18
- package/src/core/RebaseRoutes.tsx +0 -24
- package/src/core/index.tsx +0 -5
- package/src/hooks/ApiConfigContext.tsx +0 -83
- package/src/hooks/data/collectionQuery.ts +0 -55
- package/src/hooks/data/delete.ts +0 -56
- package/src/hooks/data/save.ts +0 -78
- package/src/hooks/data/useCollection.tsx +0 -183
- package/src/hooks/data/useData.tsx +0 -18
- package/src/hooks/data/useDataOrder.ts +0 -26
- package/src/hooks/data/useFetch.tsx +0 -156
- package/src/hooks/data/useRelationSelector.tsx +0 -280
- package/src/hooks/index.tsx +0 -45
- package/src/hooks/useAdminModeController.tsx +0 -23
- package/src/hooks/useAnalyticsController.tsx +0 -8
- package/src/hooks/useAuthController.tsx +0 -15
- package/src/hooks/useAuthSubscription.ts +0 -130
- package/src/hooks/useBackendStorageSource.ts +0 -295
- package/src/hooks/useBridgeRegistration.tsx +0 -32
- package/src/hooks/useBrowserTitleAndIcon.tsx +0 -23
- package/src/hooks/useBuildAdminModeController.tsx +0 -29
- package/src/hooks/useBuildEffectiveRoleController.tsx +0 -30
- package/src/hooks/useBuildLocalConfigurationPersistence.tsx +0 -83
- package/src/hooks/useBuildModeController.tsx +0 -73
- package/src/hooks/useClipboard.tsx +0 -158
- package/src/hooks/useCollapsedGroups.ts +0 -116
- package/src/hooks/useComponentOverride.tsx +0 -59
- package/src/hooks/useCustomizationController.tsx +0 -14
- package/src/hooks/useDialogsController.tsx +0 -15
- package/src/hooks/useEffectiveRoleController.tsx +0 -10
- package/src/hooks/useLargeLayout.tsx +0 -65
- package/src/hooks/useModeController.tsx +0 -23
- package/src/hooks/useNavigationBlocker.tsx +0 -108
- package/src/hooks/usePermissions.ts +0 -45
- package/src/hooks/useRebaseClient.tsx +0 -10
- package/src/hooks/useRebaseContext.tsx +0 -84
- package/src/hooks/useRebaseRegistry.tsx +0 -91
- package/src/hooks/useResolvedComponent.tsx +0 -195
- package/src/hooks/useSlot.tsx +0 -64
- package/src/hooks/useSnackbarController.tsx +0 -80
- package/src/hooks/useStorageSource.tsx +0 -11
- package/src/hooks/useStudioBridge.tsx +0 -258
- package/src/hooks/useTranslation.ts +0 -38
- package/src/hooks/useUnsavedChangesDialog.tsx +0 -67
- package/src/hooks/useUserConfigurationPersistence.tsx +0 -11
- package/src/i18n/RebaseI18nProvider.tsx +0 -159
- package/src/index.ts +0 -32
- package/src/internal/common.tsx +0 -28
- package/src/internal/useRestoreScroll.tsx +0 -69
- package/src/locales/de.ts +0 -941
- package/src/locales/en.ts +0 -1021
- package/src/locales/es.ts +0 -962
- package/src/locales/fr.ts +0 -941
- package/src/locales/hi.ts +0 -941
- package/src/locales/it.ts +0 -941
- package/src/locales/pt.ts +0 -949
- package/src/util/constants.ts +0 -7
- package/src/util/createFormexStub.tsx +0 -66
- package/src/util/entity_cache.ts +0 -242
- package/src/util/enums.ts +0 -34
- package/src/util/icon_list.ts +0 -22
- package/src/util/icons.tsx +0 -129
- package/src/util/index.ts +0 -13
- package/src/util/local_storage.ts +0 -66
- package/src/util/previews.ts +0 -127
- package/src/util/useStorageUploadController.tsx +0 -354
- package/src/vitePlugin.ts +0 -215
- /package/dist/{components/Debug → debug}/UIReferenceView.d.ts +0 -0
- /package/dist/{components/Debug → debug}/UIStyleGuide.d.ts +0 -0
- /package/dist/{components/Debug → debug}/collection-views/CardViewDemo.d.ts +0 -0
- /package/dist/{components/Debug → debug}/collection-views/CollectionTableDemo.d.ts +0 -0
- /package/dist/{components/Debug → debug}/collection-views/KanbanBoardDemo.d.ts +0 -0
- /package/dist/{components/Debug → debug}/collection-views/index.d.ts +0 -0
- /package/dist/{components/Debug → debug}/collection-views/sample_data.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/CalendarWidget.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/CrmDashboardDemo.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/DashboardMetrics.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/PipelineOverview.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/RecentActivity.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/TaskFilters.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/TaskTable.d.ts +0 -0
- /package/dist/{components/Debug → debug}/crm-dashboard/TasksView.d.ts +0 -0
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ Framework-agnostic runtime for data-driven admin panels — React hooks, provide
|
|
|
8
8
|
pnpm add @rebasepro/app
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
12
|
+
`import`. `require()` of it resolves only on Node 22.12+, which supports
|
|
13
|
+
`require(esm)`.
|
|
14
|
+
|
|
11
15
|
**Peer dependencies:** `react >= 19.2.7`, `react-dom >= 19.2.7`, `react-router ^8`
|
|
12
16
|
|
|
13
17
|
## What This Package Does
|
|
@@ -97,7 +101,6 @@ This package is **framework-agnostic** in the sense that it doesn't depend on an
|
|
|
97
101
|
| `LanguageToggle` | i18n language switcher |
|
|
98
102
|
| `BootstrapAdminBanner` | First-user setup banner |
|
|
99
103
|
| `RebaseLogo` | Rebase branding logo |
|
|
100
|
-
| `UIStyleGuide` / `UIReferenceView` | Debug/reference components |
|
|
101
104
|
|
|
102
105
|
### Contexts
|
|
103
106
|
|
|
@@ -6,9 +6,6 @@ export * from "./ConfirmationDialog.js";
|
|
|
6
6
|
export * from "./ErrorTooltip.js";
|
|
7
7
|
export * from "./RebaseLogo.js";
|
|
8
8
|
export * from "./AIIcon.js";
|
|
9
|
-
export * from "./Debug/UIStyleGuide.js";
|
|
10
|
-
export * from "./Debug/UIReferenceView.js";
|
|
11
|
-
export { CrmDashboardDemo } from "./Debug/crm-dashboard/CrmDashboardDemo.js";
|
|
12
9
|
export * from "./UserSettingsView.js";
|
|
13
10
|
export * from "./LanguageToggle.js";
|
|
14
11
|
export * from "./UserSelectPopover.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AuthController } from "@rebasepro/cms-types";
|
|
3
|
-
|
|
3
|
+
/** `null` outside `<Rebase>` — see {@link RebaseDataContext}. */
|
|
4
|
+
export declare const AuthControllerContext: React.Context<AuthController<any, any> | null>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { CustomizationController } from "@rebasepro/cms-types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
3
|
+
/** `null` outside `<Rebase>` — see {@link RebaseDataContext}. */
|
|
4
|
+
export declare const CustomizationControllerContext: React.Context<CustomizationController | null>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DialogsController } from "@rebasepro/cms-types";
|
|
2
2
|
import React, { PropsWithChildren } from "react";
|
|
3
|
-
|
|
3
|
+
/** `null` outside `<Rebase>` — see `RebaseDataContext`. */
|
|
4
|
+
export declare const DialogsControllerContext: React.Context<DialogsController | null>;
|
|
4
5
|
export declare const DialogsProvider: React.FC<PropsWithChildren>;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RebaseData } from "@rebasepro/types";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* `null` outside `<Rebase>`, so {@link useData} can say so.
|
|
5
|
+
*
|
|
6
|
+
* The default used to be `{} as RebaseData` — a lie the type system agreed
|
|
7
|
+
* with. A hook called outside the tree handed back an empty object, and the
|
|
8
|
+
* first thing anyone does with it is `data.collection("posts")`, which fails as
|
|
9
|
+
* "data.collection is not a function" somewhere in a component's render. That
|
|
10
|
+
* names neither the hook nor the missing provider.
|
|
11
|
+
*/
|
|
12
|
+
export declare const RebaseDataContext: React.Context<RebaseData | null>;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StorageSource } from "@rebasepro/types";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Three states, and they mean different things:
|
|
5
|
+
*
|
|
6
|
+
* - `null` — outside `<Rebase>`.
|
|
7
|
+
* - `undefined` — inside it, but the project configured no storage. `<Rebase>`
|
|
8
|
+
* already warns about this on the console.
|
|
9
|
+
* - a source — the resolved default storage.
|
|
10
|
+
*
|
|
11
|
+
* See {@link RebaseDataContext} for why the default is not `{}`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const StorageSourceContext: React.Context<StorageSource | null | undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { User, DataDriver, DataSourceDefinition, StorageSource, StorageSourceDefinition, DatabaseAdmin, RebaseClient } from "@rebasepro/types";
|
|
3
|
-
import { Locale, AuthController, AnalyticsEvent, UserConfigurationPersistence, RebaseContext, EntityLinkBuilder, RebasePlugin,
|
|
3
|
+
import { Locale, AuthController, AnalyticsEvent, UserConfigurationPersistence, RebaseContext, EntityLinkBuilder, RebasePlugin, AnySlotContribution, PropertyConfig, EntityCustomView, CollectionCustomView, EntityAction, RebaseTranslations, ComponentOverrideMap } from "@rebasepro/cms-types";
|
|
4
4
|
/**
|
|
5
5
|
* A data source registered on `<Rebase>`. Extends the shared
|
|
6
6
|
* {@link DataSourceDefinition} with the frontend {@link DataDriver} used for
|
|
@@ -108,16 +108,6 @@ export type RebaseProps<USER extends User, DB = unknown> = {
|
|
|
108
108
|
context: RebaseContext;
|
|
109
109
|
loading: boolean;
|
|
110
110
|
}) => React.ReactNode);
|
|
111
|
-
/**
|
|
112
|
-
* Optional base path for the entire Rebase app.
|
|
113
|
-
* Defaults to "/"
|
|
114
|
-
*/
|
|
115
|
-
basePath?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Optional base path for the admin collections.
|
|
118
|
-
* Defaults to "/c"
|
|
119
|
-
*/
|
|
120
|
-
baseCollectionPath?: string;
|
|
121
111
|
/**
|
|
122
112
|
* Base URL for the backend API (e.g. "http://localhost:3001").
|
|
123
113
|
* When provided, this is available via `useApiConfig()` to any hook
|
|
@@ -249,7 +239,7 @@ export type RebaseProps<USER extends User, DB = unknown> = {
|
|
|
249
239
|
/**
|
|
250
240
|
* Extra slots for the admin
|
|
251
241
|
*/
|
|
252
|
-
slots?:
|
|
242
|
+
slots?: AnySlotContribution[];
|
|
253
243
|
/**
|
|
254
244
|
* Property configs (widgets)
|
|
255
245
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@rebasepro/app/debug` — the design reference and the demo dashboard.
|
|
3
|
+
*
|
|
4
|
+
* These three used to be on the package's main barrel, which meant every
|
|
5
|
+
* consumer shipped them: `UIReferenceView` is a single file that renders every
|
|
6
|
+
* component in the kit, `CrmDashboardDemo` is a fake CRM with sample data, and
|
|
7
|
+
* `UIStyleGuide` is a token sheet. Nobody building an admin panel imports any
|
|
8
|
+
* of them, and nothing in the framework does either — the `/debug/ui` route
|
|
9
|
+
* that rendered `UIReferenceView` was hardcoded into `RebaseRouteDefs`, so the
|
|
10
|
+
* whole reference was a static dependency of the admin's route table.
|
|
11
|
+
*
|
|
12
|
+
* They are not dead, though: `/debug/ui` in the dogfood app is where the design
|
|
13
|
+
* language is read from, and the marketing site renders both on public pages.
|
|
14
|
+
* A subpath is what that shape wants — reachable by name, paid for only by
|
|
15
|
+
* whoever asks.
|
|
16
|
+
*/
|
|
17
|
+
export * from "./UIStyleGuide.js";
|
|
18
|
+
export * from "./UIReferenceView.js";
|
|
19
|
+
export { CrmDashboardDemo } from "./crm-dashboard/CrmDashboardDemo.js";
|