@cosmicdrift/kumiko-renderer 0.34.0 → 0.34.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.1",
|
|
4
4
|
"description": "Platform-agnostic React renderer for Kumiko screens. Contains the shared logic — primitives-contract, hooks, KumikoScreen, navigation & SSE abstractions — that any platform-specific renderer (web, native) composes. No DOM, no EventSource, no react-dom.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -452,6 +452,10 @@ function EntityEditUpdateForm({
|
|
|
452
452
|
entity={entity}
|
|
453
453
|
featureName={schema.featureName}
|
|
454
454
|
initial={initial}
|
|
455
|
+
// Echte route-id an die extension-section (Set-Value-UI): das
|
|
456
|
+
// Update-Form lässt `id` bewusst aus den Form-values, daher braucht
|
|
457
|
+
// die Section die id explizit — sonst create-mode trotz Edit.
|
|
458
|
+
entityId={entityId}
|
|
455
459
|
writeCommand={writeCommand}
|
|
456
460
|
payloadMode="changes"
|
|
457
461
|
buildPayload={buildPayload}
|
|
@@ -35,6 +35,13 @@ export type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
35
35
|
readonly entity: EntityDefinition;
|
|
36
36
|
readonly featureName: string;
|
|
37
37
|
readonly initial: TValues;
|
|
38
|
+
/** Echte entity-id für extension-section-Mounts (Set-Value-UI). Der
|
|
39
|
+
* Update-Body kennt sie aus der Route; ohne sie fiele die Section auf
|
|
40
|
+
* `vm.id` (= values["id"]) zurück, das im Update-Form immer fehlt
|
|
41
|
+
* (id ist keine deklarierte Form-Field, siehe EntityEditUpdateForm) —
|
|
42
|
+
* die Section bliebe dann fälschlich im create-mode. Weglassen
|
|
43
|
+
* (undefined) = create-mode / kein extension-Kontext (vm.id-Fallback). */
|
|
44
|
+
readonly entityId?: string | null;
|
|
38
45
|
/** Standard single-write Submit-Pfad. Ignoriert wenn `customSubmit`
|
|
39
46
|
* gesetzt ist (configEdit-Screens dispatchen mehrere Writes pro
|
|
40
47
|
* Submit, da macht writeCommand keinen Sinn). */
|
|
@@ -163,6 +170,7 @@ export function RenderEdit<TValues extends FormValues, TCtx = unknown>(
|
|
|
163
170
|
onReload,
|
|
164
171
|
submitLabel,
|
|
165
172
|
fieldAppendix,
|
|
173
|
+
entityId: entityIdProp,
|
|
166
174
|
} = props;
|
|
167
175
|
const { customSubmit } = props;
|
|
168
176
|
// Translate-Fallback: wenn der Caller keine Translate-Fn übergibt,
|
|
@@ -322,7 +330,7 @@ export function RenderEdit<TValues extends FormValues, TCtx = unknown>(
|
|
|
322
330
|
key={section.title}
|
|
323
331
|
section={section}
|
|
324
332
|
entityName={vm.entityName}
|
|
325
|
-
entityId={vm.id}
|
|
333
|
+
entityId={entityIdProp !== undefined ? entityIdProp : vm.id}
|
|
326
334
|
/>
|
|
327
335
|
);
|
|
328
336
|
}
|