@rebasepro/cms 0.21.0 → 0.21.1
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 +37 -35
- package/dist/{CollectionEditorDialog-C-A_NCKB.js → CollectionEditorDialog-DPLimWfL.js} +3 -3
- package/dist/{CollectionEditorDialog-C-A_NCKB.js.map → CollectionEditorDialog-DPLimWfL.js.map} +1 -1
- package/dist/{PropertyEditView-Dv7496fx.js → PropertyEditView-D85vuYZu.js} +2 -2
- package/dist/{PropertyEditView-Dv7496fx.js.map → PropertyEditView-D85vuYZu.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-DuDFEYuL.js → RouterCollectionsStudioView-C1BseTGZ.js} +4 -4
- package/dist/{RouterCollectionsStudioView-DuDFEYuL.js.map → RouterCollectionsStudioView-C1BseTGZ.js.map} +1 -1
- package/dist/collection_editor_ui.js +4 -4
- package/dist/{export-DtSmLT6u.js → export-CrKQwyBM.js} +2 -2
- package/dist/{export-DtSmLT6u.js.map → export-CrKQwyBM.js.map} +1 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +1 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +1 -1
- package/dist/{history-C6kUDQ3f.js → history-DH4h_T1U.js} +2 -2
- package/dist/{history-C6kUDQ3f.js.map → history-DH4h_T1U.js.map} +1 -1
- package/dist/{import-BciQBH5t.js → import-Ct2FFEEj.js} +2 -2
- package/dist/{import-BciQBH5t.js.map → import-Ct2FFEEj.js.map} +1 -1
- package/dist/index.js +6 -6
- package/dist/{util-h6jhiiBE.js → util-jUWinb7D.js} +21 -16
- package/dist/util-jUWinb7D.js.map +1 -0
- package/package.json +9 -9
- package/dist/util-h6jhiiBE.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,14 +9,14 @@ pnpm add @rebasepro/cms
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
12
|
-
`import`.
|
|
13
|
-
`require(esm)
|
|
12
|
+
`import`. It needs Node `>=22.22.0` (its `engines` floor), where `require()`
|
|
13
|
+
of it resolves too: Node has supported `require(esm)` since 22.12.
|
|
14
14
|
|
|
15
|
-
**Peer dependencies:** `react
|
|
15
|
+
**Peer dependencies:** `react ^19.2.7`, `react-dom ^19.2.7`, `react-router ^8.3.0`
|
|
16
16
|
|
|
17
17
|
## What This Package Does
|
|
18
18
|
|
|
19
|
-
`@rebasepro/cms` is the complete CMS layer of Rebase. It provides the admin panel UI — collection table/card views,
|
|
19
|
+
`@rebasepro/cms` is the complete CMS layer of Rebase. It provides the admin panel UI — collection table/card views, entity editing forms, side-panel navigation, the visual collection (schema) editor, data import/export (CSV, JSON, Excel), and the app shell with auth gating, routing, and drawer layout. It sits on top of `@rebasepro/app` (runtime hooks/providers) and `@rebasepro/ui` (design system components).
|
|
20
20
|
|
|
21
21
|
## Key Exports
|
|
22
22
|
|
|
@@ -24,8 +24,8 @@ ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
|
24
24
|
|
|
25
25
|
| Export | Description |
|
|
26
26
|
|---|---|
|
|
27
|
-
| `RebaseCMS` |
|
|
28
|
-
| `RebaseShell` |
|
|
27
|
+
| `RebaseCMS` | Declares the CMS into the registry: `collections`, `views`, `homePage`, `entityViews`, `collectionViews`, `entityActions`, `collectionEditor`, `navigationGroupMappings`, `basePath`. Renders nothing; it sits inside `<Rebase>` |
|
|
28
|
+
| `RebaseShell` | Composes `RebaseAuthGate`, `RebaseNavigation`, `RebaseRouteDefs` and `RebaseLayout` with sensible defaults |
|
|
29
29
|
| `RebaseAuthGate` | Auth-gated wrapper — shows login or the CMS based on session state |
|
|
30
30
|
| `RebaseNavigation` | Renders the sidebar navigation from resolved collections/views |
|
|
31
31
|
| `RebaseLayout` | Main content layout (header + body area) |
|
|
@@ -35,34 +35,34 @@ ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
|
35
35
|
| `Drawer` / `DefaultDrawer` | Sidebar drawer components |
|
|
36
36
|
| `DrawerFooterActions` | Footer action buttons inside the drawer |
|
|
37
37
|
| `SideDialogs` | Stacked side-panel dialog system |
|
|
38
|
-
| `AdminModeSyncer` | Syncs admin
|
|
38
|
+
| `AdminModeSyncer` | Syncs the admin mode (`"cms"` \| `"studio"`) with the current route |
|
|
39
39
|
| `CollectionPanel` | Standalone collection browser panel |
|
|
40
40
|
|
|
41
|
-
###
|
|
41
|
+
### Entity & Collection Views
|
|
42
42
|
|
|
43
43
|
| Export | Description |
|
|
44
44
|
|---|---|
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
45
|
+
| `EntityViewBinding` | Full entity detail/edit view |
|
|
46
|
+
| `CollectionViewBinding` | Primary collection list view (table + toolbar) |
|
|
47
|
+
| `CollectionTableBinding` | Virtualized spreadsheet table for a collection |
|
|
48
|
+
| `CollectionCardViewBinding` | Card/grid layout for a collection |
|
|
49
|
+
| `EntityCardBinding` | Individual entity card |
|
|
50
|
+
| `CollectionViewActions` | Toolbar actions (filters, search, create) |
|
|
51
|
+
| `CollectionRowActions` | Per-row action buttons |
|
|
52
|
+
| `SelectionTableBinding` | Table for multi-entity selection dialogs |
|
|
53
53
|
| `SelectableTable` | Generic selectable table component |
|
|
54
|
-
| `
|
|
54
|
+
| `EntityPreviewBinding` | Compact entity preview widget |
|
|
55
55
|
| `VirtualTableInput` | Inline-edit input rendered inside the virtual table |
|
|
56
56
|
| `ArrayContainer` | Renders array/repeated property fields |
|
|
57
57
|
| `ReferenceWidget` | Reference (foreign key) picker widget |
|
|
58
58
|
|
|
59
|
-
###
|
|
59
|
+
### Entity Actions
|
|
60
60
|
|
|
61
61
|
| Export | Description |
|
|
62
62
|
|---|---|
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
63
|
+
| `editEntityAction` | Built-in action to open an entity for editing |
|
|
64
|
+
| `copyEntityAction` | Built-in action to duplicate an entity |
|
|
65
|
+
| `deleteEntityAction` | Built-in action to delete an entity |
|
|
66
66
|
| `resetPasswordAction` | Action to reset a user's password |
|
|
67
67
|
|
|
68
68
|
### Hooks
|
|
@@ -70,10 +70,10 @@ ESM-only: `"type": "module"` with no CommonJS build, so it is loaded with
|
|
|
70
70
|
| Export | Description |
|
|
71
71
|
|---|---|
|
|
72
72
|
| `useApp` | Access the app-level context (navigation, mode, config) |
|
|
73
|
-
| `
|
|
74
|
-
| `useSelectionDialog` | Launch a multi-
|
|
73
|
+
| `useSidePanel` | Open/close entity side panels programmatically |
|
|
74
|
+
| `useSelectionDialog` | Launch a multi-entity selection dialog |
|
|
75
75
|
| `useSelectionController` | Row selection state for tables |
|
|
76
|
-
| `useHistory` |
|
|
76
|
+
| `useHistory` | Entity change history and version revert |
|
|
77
77
|
| `useBreadcrumbsController` | Breadcrumb navigation state |
|
|
78
78
|
| `useAdminContext` | Access the admin-level context |
|
|
79
79
|
| `useResolvedNavigationFrom` | Resolve navigation tree from collection configs |
|
|
@@ -89,7 +89,7 @@ All exports from `./collection_editor` — the visual schema editor UI for creat
|
|
|
89
89
|
Also available as a separate entry point:
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
|
-
import {
|
|
92
|
+
import { CollectionEditorDialog, PropertyForm } from "@rebasepro/cms/collection_editor_ui";
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
### Rich Text Editor (`RichTextEditor`)
|
|
@@ -102,8 +102,6 @@ Type exports only from the main entry point (`RichTextEditorProps`, `JSONContent
|
|
|
102
102
|
import { RichTextEditor } from "@rebasepro/cms/editor";
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
> **Note:** The previous name `RebaseEditor` still works but is deprecated.
|
|
106
|
-
|
|
107
105
|
### Utilities
|
|
108
106
|
|
|
109
107
|
| Export | Description |
|
|
@@ -112,23 +110,27 @@ import { RichTextEditor } from "@rebasepro/cms/editor";
|
|
|
112
110
|
| `getIconForWidget` / `getIconForProperty` | Get the display icon for a property or widget |
|
|
113
111
|
| `getPropertyInPath` / `getResolvedPropertyInPath` | Navigate nested property paths |
|
|
114
112
|
| `getPropertiesWithPropertiesOrder` | Apply display ordering to properties |
|
|
115
|
-
| `
|
|
113
|
+
| `getEntityPreviewKeys` / `getEntityTitlePropertyKey` | Determine preview/title fields |
|
|
116
114
|
| `isReferenceProperty` / `isRelationProperty` | Property type guards |
|
|
117
|
-
| `
|
|
115
|
+
| `mergeEntityActions` / `resolveEntityAction` / `resolveEntityView` | Action & view resolution |
|
|
118
116
|
| Path helpers | `addInitialSlash`, `removeInitialSlash`, `removeTrailingSlash`, etc. |
|
|
119
117
|
|
|
120
118
|
## Quick Start
|
|
121
119
|
|
|
120
|
+
`<RebaseCMS>` renders nothing on its own: it declares the CMS to the `<Rebase>`
|
|
121
|
+
it sits inside, and `<RebaseShell>` renders it.
|
|
122
|
+
|
|
122
123
|
```tsx
|
|
123
|
-
import {
|
|
124
|
+
import { Rebase, RebaseAuth } from "@rebasepro/app";
|
|
125
|
+
import { RebaseCMS, RebaseShell } from "@rebasepro/cms";
|
|
124
126
|
|
|
125
127
|
function App() {
|
|
126
128
|
return (
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
<Rebase client={client} authController={authController}>
|
|
130
|
+
<RebaseAuth />
|
|
131
|
+
<RebaseCMS collections={[/* your collection configs */]} />
|
|
132
|
+
<RebaseShell title="Rebase" />
|
|
133
|
+
</Rebase>
|
|
132
134
|
);
|
|
133
135
|
}
|
|
134
136
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { A as getFieldId, At as convertDataToEntity, Ft as ImportSaveInProgress, Gt as SearchIconsView, Kt as FieldCaption, Nt as getInferenceType, Ot as ImportNewPropertyFieldPreview, Pt as useImportConfig, Rt as ImportFileUpload, S as isSchemaChangeCancelled, Sn as useUrlController, Tt as useCollectionEditorController, Wt as PropertyConfigBadge, _ as useCollectionsConfigController, _n as CollectionTableBinding, ct as useSafeSnackbarController, hn as useSelectionController, i as namespaceToPropertiesOrderPath, k as getFieldConfig, kt as DataNewPropertiesMapping, l as validateCollectionJson, m as toSerializableCollectionConfig, n as getFullIdPath, o as CollectionGenerationApiError, r as idToPropertiesPath, t as getFullId, tr as useCollectionRegistryController, wn as useNavigationStateController } from "./util-
|
|
3
|
-
import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-
|
|
2
|
+
import { A as getFieldId, At as convertDataToEntity, Ft as ImportSaveInProgress, Gt as SearchIconsView, Kt as FieldCaption, Nt as getInferenceType, Ot as ImportNewPropertyFieldPreview, Pt as useImportConfig, Rt as ImportFileUpload, S as isSchemaChangeCancelled, Sn as useUrlController, Tt as useCollectionEditorController, Wt as PropertyConfigBadge, _ as useCollectionsConfigController, _n as CollectionTableBinding, ct as useSafeSnackbarController, hn as useSelectionController, i as namespaceToPropertiesOrderPath, k as getFieldConfig, kt as DataNewPropertiesMapping, l as validateCollectionJson, m as toSerializableCollectionConfig, n as getFullIdPath, o as CollectionGenerationApiError, r as idToPropertiesPath, t as getFullId, tr as useCollectionRegistryController, wn as useNavigationStateController } from "./util-jUWinb7D.js";
|
|
3
|
+
import { a as updatePropertyFromWidget, c as useAIModifiedPaths, i as supportedFields, n as PropertyForm, o as PropertyTree, r as PropertyFormDialog, s as AIModifiedPathsProvider } from "./PropertyEditView-D85vuYZu.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { Alert, AppWindow, ArrowLeftIcon, BooleanSwitchWithLabel, Button, Card, CheckIcon, Chip, CircularProgress, CircularProgressCenter, CodeIcon, ColumnsIcon, Container, CopyIcon, DebouncedTextField, Dialog, DialogActions, DialogContent, DialogTitle, ErrorBoundary, FileIcon, FileSearchIcon, FileTextIcon, IconButton, KanbanIcon, KeyIcon, LayoutGridIcon, ListIcon, LoadingButton, Menu, MultiSelect, MultiSelectItem, PanelLeftIcon, Paper, PlusIcon, Select, SelectItem, ShoppingCartIcon, SquareIcon, Tab, TableIcon, Tabs, TextField, ToggleButtonGroup, Tooltip, Trash2Icon, Typography, UserIcon, XIcon, cls, coolIconKeys, defaultBorderMixin, iconSize } from "@rebasepro/ui";
|
|
@@ -3582,4 +3582,4 @@ var validateId = (value, isNewCollection, existingPaths, existingIds) => {
|
|
|
3582
3582
|
//#endregion
|
|
3583
3583
|
export { CollectionEditorDialog as n, CollectionEditorDialog_exports as r, CollectionEditor as t };
|
|
3584
3584
|
|
|
3585
|
-
//# sourceMappingURL=CollectionEditorDialog-
|
|
3585
|
+
//# sourceMappingURL=CollectionEditorDialog-DPLimWfL.js.map
|