@cosmicdrift/kumiko-headless 0.289.0 → 0.290.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 +2 -2
- package/src/view-model/edit.ts +2 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-headless",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.290.0",
|
|
4
4
|
"description": "Headless UI logic for Kumiko — Dispatcher contract, Form-Controller, View-Model, Nav-Resolver. Plattform- und React-frei; jeder Renderer (renderer, renderer-web, renderer-native, …) komponiert darauf.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
39
|
+
"@cosmicdrift/kumiko-framework": "0.290.0",
|
|
40
40
|
"temporal-polyfill": "^0.3.2",
|
|
41
41
|
"zod": "^4.4.3"
|
|
42
42
|
},
|
package/src/view-model/edit.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
isWriteFormEditSection,
|
|
13
13
|
normalizeEditField,
|
|
14
14
|
parseRefTarget,
|
|
15
|
+
sectionFieldSpecs,
|
|
15
16
|
WRITE_FORM_SECTION_ENTITY,
|
|
16
17
|
} from "@cosmicdrift/kumiko-framework/ui-types";
|
|
17
18
|
import {
|
|
@@ -167,11 +168,7 @@ export function computeEditViewModel<
|
|
|
167
168
|
}
|
|
168
169
|
// `groups` flattens into the same per-field pipeline as plain `fields`;
|
|
169
170
|
// the group structure below just re-groups the computed views by name.
|
|
170
|
-
const
|
|
171
|
-
sectionSpec.groups !== undefined
|
|
172
|
-
? sectionSpec.groups.flatMap((group) => group.fields)
|
|
173
|
-
: sectionSpec.fields;
|
|
174
|
-
const fields: EditFieldViewModel[] = flatFieldSpecs.map((fieldSpec) => {
|
|
171
|
+
const fields: EditFieldViewModel[] = sectionFieldSpecs(sectionSpec).map((fieldSpec) => {
|
|
175
172
|
const normalized = normalizeEditField(fieldSpec);
|
|
176
173
|
const fieldDef = entity.fields[normalized.field];
|
|
177
174
|
if (!fieldDef) {
|