@rebasepro/common 0.11.0 → 0.11.1-canary.g8caabf3
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.
|
@@ -28,10 +28,10 @@ export declare function buildRebaseData(driver: DataDriver, options?: EntityData
|
|
|
28
28
|
/**
|
|
29
29
|
* Wrap a flat {@link RebaseSdkData} into a Entity-shaped {@link RebaseData}.
|
|
30
30
|
*
|
|
31
|
-
* This is the **
|
|
31
|
+
* This is the **admin boundary**: the SDK client (`client.data`) returns flat
|
|
32
32
|
* rows, but the admin renders the `Entity` view-model (`entity.values.*`).
|
|
33
33
|
* `core/Rebase.tsx` wraps `client.data` through this before handing it to the
|
|
34
|
-
*
|
|
34
|
+
* admin `RebaseDataContext` — without it the admin renders rows with only their
|
|
35
35
|
* `id`.
|
|
36
36
|
*/
|
|
37
37
|
export declare function wrapAsEntityData(sdkData: RebaseSdkData, options?: EntityDataOptions): RebaseData;
|
|
@@ -50,6 +50,6 @@ export declare function wrapAsSdkData(entityData: RebaseData): RebaseSdkData;
|
|
|
50
50
|
* This is the developer-facing SDK data layer used by backend framework
|
|
51
51
|
* callbacks & scripts (`context.data` / `rebase.data`). It returns flat rows —
|
|
52
52
|
* identical in shape to the frontend SDK client — so the API is symmetric
|
|
53
|
-
* across front and back. The admin
|
|
53
|
+
* across front and back. The admin uses {@link buildRebaseData} (Entity).
|
|
54
54
|
*/
|
|
55
55
|
export declare function buildSdkData(driver: DataDriver): RebaseSdkData;
|
package/dist/index.es.js
CHANGED
|
@@ -142,7 +142,7 @@ function traverseValueProperty(inputValue, property, operation) {
|
|
|
142
142
|
return value;
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Create a lightweight relation stub for
|
|
145
|
+
* Create a lightweight relation stub for admin views.
|
|
146
146
|
* Replaces inline `{ id, path, __type: "relation" }` object literals.
|
|
147
147
|
*/
|
|
148
148
|
function createRelationRef(id, path) {
|
|
@@ -3051,7 +3051,7 @@ function toSdkCollectionClient(snap) {
|
|
|
3051
3051
|
/**
|
|
3052
3052
|
* Wrap a flat {@link SDKCollectionClient} into a Entity-shaped
|
|
3053
3053
|
* {@link CollectionAccessor}. Every returned row is re-wrapped into the
|
|
3054
|
-
* `{ id, path, values }` view-model the admin
|
|
3054
|
+
* `{ id, path, values }` view-model the admin admin renders.
|
|
3055
3055
|
*/
|
|
3056
3056
|
function toEntityAccessor(sdk, slug, getPks = () => []) {
|
|
3057
3057
|
const accessor = {
|
|
@@ -3099,10 +3099,10 @@ function toEntityAccessor(sdk, slug, getPks = () => []) {
|
|
|
3099
3099
|
/**
|
|
3100
3100
|
* Wrap a flat {@link RebaseSdkData} into a Entity-shaped {@link RebaseData}.
|
|
3101
3101
|
*
|
|
3102
|
-
* This is the **
|
|
3102
|
+
* This is the **admin boundary**: the SDK client (`client.data`) returns flat
|
|
3103
3103
|
* rows, but the admin renders the `Entity` view-model (`entity.values.*`).
|
|
3104
3104
|
* `core/Rebase.tsx` wraps `client.data` through this before handing it to the
|
|
3105
|
-
*
|
|
3105
|
+
* admin `RebaseDataContext` — without it the admin renders rows with only their
|
|
3106
3106
|
* `id`.
|
|
3107
3107
|
*/
|
|
3108
3108
|
function wrapAsEntityData(sdkData, options) {
|
|
@@ -3154,7 +3154,7 @@ function wrapAsSdkData(entityData) {
|
|
|
3154
3154
|
* This is the developer-facing SDK data layer used by backend framework
|
|
3155
3155
|
* callbacks & scripts (`context.data` / `rebase.data`). It returns flat rows —
|
|
3156
3156
|
* identical in shape to the frontend SDK client — so the API is symmetric
|
|
3157
|
-
* across front and back. The admin
|
|
3157
|
+
* across front and back. The admin uses {@link buildRebaseData} (Entity).
|
|
3158
3158
|
*/
|
|
3159
3159
|
function buildSdkData(driver) {
|
|
3160
3160
|
return wrapAsSdkData(buildRebaseData(driver));
|