@cosmicdrift/kumiko-renderer-web 0.33.0 → 0.34.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -316,7 +316,7 @@ describe("KumikoScreen", () => {
|
|
|
316
316
|
id: "archive",
|
|
317
317
|
label: "actions.archive",
|
|
318
318
|
handler: "tasks:write:task:archive",
|
|
319
|
-
payload:
|
|
319
|
+
payload: { pick: ["id"] },
|
|
320
320
|
},
|
|
321
321
|
],
|
|
322
322
|
};
|
|
@@ -344,7 +344,7 @@ describe("KumikoScreen", () => {
|
|
|
344
344
|
await waitFor(() => expect(writeCalls.length).toBe(1));
|
|
345
345
|
expect(writeCalls[0]).toEqual({
|
|
346
346
|
type: "tasks:write:task:archive",
|
|
347
|
-
payload: { id: "r1"
|
|
347
|
+
payload: { id: "r1" },
|
|
348
348
|
});
|
|
349
349
|
});
|
|
350
350
|
|
|
@@ -459,7 +459,7 @@ describe("KumikoScreen", () => {
|
|
|
459
459
|
id: "edit",
|
|
460
460
|
label: "actions.edit",
|
|
461
461
|
screen: "task-edit",
|
|
462
|
-
params:
|
|
462
|
+
params: { map: { taskId: "id" } },
|
|
463
463
|
},
|
|
464
464
|
],
|
|
465
465
|
};
|
|
@@ -482,7 +482,7 @@ describe("KumikoScreen", () => {
|
|
|
482
482
|
await waitFor(() => expect(navigateCalls.length).toBe(1));
|
|
483
483
|
expect(navigateCalls[0]).toEqual({ screenId: "task-edit" });
|
|
484
484
|
// params werden zu Strings serialisiert (URL-Layer kennt nur Strings).
|
|
485
|
-
expect(searchParamUpdates).toEqual([{ taskId: "r1"
|
|
485
|
+
expect(searchParamUpdates).toEqual([{ taskId: "r1" }]);
|
|
486
486
|
// Reihenfolge-Pin: erst navigate, dann setSearchParams.
|
|
487
487
|
expect(calls.map((c) => c.kind)).toEqual(["navigate", "setSearchParams"]);
|
|
488
488
|
});
|
|
@@ -522,7 +522,7 @@ describe("KumikoScreen", () => {
|
|
|
522
522
|
id: "edit",
|
|
523
523
|
label: "actions.edit",
|
|
524
524
|
screen: "task-edit",
|
|
525
|
-
entityId:
|
|
525
|
+
entityId: "id",
|
|
526
526
|
},
|
|
527
527
|
],
|
|
528
528
|
};
|
|
@@ -547,12 +547,10 @@ describe("KumikoScreen", () => {
|
|
|
547
547
|
expect(searchParamUpdates).toEqual([]);
|
|
548
548
|
});
|
|
549
549
|
|
|
550
|
-
// JSON-Schema-Fall (window.__KUMIKO_SCHEMA__):
|
|
551
|
-
//
|
|
552
|
-
//
|
|
553
|
-
|
|
554
|
-
// (Prod-e2e-Befund 2026-06-07 nach F1).
|
|
555
|
-
test("entityList rowActions kind=navigate auf entityEdit-Ziel: row.id ist der entityId-Default (JSON-Schema-sicher)", async () => {
|
|
550
|
+
// JSON-Schema-Fall (window.__KUMIKO_SCHEMA__): Declarative entityId: "id"
|
|
551
|
+
// überlebt JSON.stringify (String, kein Function-Drop). Das Schema
|
|
552
|
+
// funktioniert identisch ob direkt oder nach JSON-Roundtrip geladen.
|
|
553
|
+
test("entityList rowActions kind=navigate auf entityEdit-Ziel: entityId-String überlebt JSON-Roundtrip (JSON-Schema-sicher)", async () => {
|
|
556
554
|
const navigateCalls: { screenId: string; entityId?: string }[] = [];
|
|
557
555
|
const memoryNav = {
|
|
558
556
|
route: { screenId: "task-list" },
|
|
@@ -583,10 +581,7 @@ describe("KumikoScreen", () => {
|
|
|
583
581
|
id: "edit",
|
|
584
582
|
label: "actions.edit",
|
|
585
583
|
screen: "task-edit",
|
|
586
|
-
|
|
587
|
-
// JSON-Roundtrip gedroppt — exakt was buildAppSchema +
|
|
588
|
-
// JSON.stringify mit dem Schema im Browser machen.
|
|
589
|
-
entityId: (row) => String(row["id"] ?? ""),
|
|
584
|
+
entityId: "id",
|
|
590
585
|
},
|
|
591
586
|
],
|
|
592
587
|
};
|
|
@@ -786,7 +781,7 @@ describe("KumikoScreen", () => {
|
|
|
786
781
|
id: "sync",
|
|
787
782
|
label: "actions.sync",
|
|
788
783
|
handler: "tasks:write:task:sync",
|
|
789
|
-
payload:
|
|
784
|
+
payload: { all: true },
|
|
790
785
|
},
|
|
791
786
|
],
|
|
792
787
|
};
|
|
@@ -898,8 +893,7 @@ describe("KumikoScreen", () => {
|
|
|
898
893
|
id: "start",
|
|
899
894
|
label: "actions.start",
|
|
900
895
|
handler: "tasks:write:task:start",
|
|
901
|
-
|
|
902
|
-
visible: (row: unknown) => (row as { status?: string }).status === "scheduled",
|
|
896
|
+
visible: { field: "status", eq: "scheduled" },
|
|
903
897
|
},
|
|
904
898
|
],
|
|
905
899
|
};
|
|
@@ -36,8 +36,8 @@ function makeScreen(): EntityEditScreenDefinition {
|
|
|
36
36
|
"isUrgent",
|
|
37
37
|
{
|
|
38
38
|
field: "notes",
|
|
39
|
-
visible:
|
|
40
|
-
required:
|
|
39
|
+
visible: { field: "isUrgent", eq: true },
|
|
40
|
+
required: { field: "isUrgent", eq: true },
|
|
41
41
|
},
|
|
42
42
|
],
|
|
43
43
|
},
|