@cosmicdrift/kumiko-types 0.203.0 → 0.204.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 +1 -1
- package/src/screen.ts +33 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.204.1",
|
|
4
4
|
"description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
package/src/screen.ts
CHANGED
|
@@ -351,7 +351,9 @@ export type ProjectionListScreenDefinition = {
|
|
|
351
351
|
// (e.g. jobs' `detailQuery` expects `runId`) — this lets the primitive bind
|
|
352
352
|
// to it without forcing a handler rename. Extension sections aren't
|
|
353
353
|
// supported (no entity for them to persist against); the boot-validator
|
|
354
|
-
// rejects them.
|
|
354
|
+
// rejects them. `relatedList` sections ARE supported — they run their own
|
|
355
|
+
// query against the displayed record's id, independent of the entity gap
|
|
356
|
+
// above (fw#2166).
|
|
355
357
|
export type ProjectionDetailScreenDefinition = {
|
|
356
358
|
readonly id: string;
|
|
357
359
|
readonly type: "projectionDetail";
|
|
@@ -542,13 +544,15 @@ export type EditFieldSpec =
|
|
|
542
544
|
readonly icon?: string;
|
|
543
545
|
};
|
|
544
546
|
|
|
545
|
-
// A section is
|
|
546
|
-
//
|
|
547
|
-
//
|
|
548
|
-
// side by name (same `__component` marker as
|
|
549
|
-
// renderers) and receives the host entity name +
|
|
550
|
-
// (e.g. custom-fields) can load and persist its
|
|
551
|
-
|
|
547
|
+
// A section is a normal field-grid (default — `kind` omitted keeps every
|
|
548
|
+
// existing screen-def working), an extension slot that mounts a feature-
|
|
549
|
+
// provided component, or a related-list of other records. The extension
|
|
550
|
+
// component is resolved client-side by name (same `__component` marker as
|
|
551
|
+
// custom screens / column renderers) and receives the host entity name +
|
|
552
|
+
// id, so a bundled feature (e.g. custom-fields) can load and persist its
|
|
553
|
+
// own data inside the form. `relatedList` runs its own query instead —
|
|
554
|
+
// see `EditRelatedListSection`.
|
|
555
|
+
export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection;
|
|
552
556
|
|
|
553
557
|
export type EditFieldsSection = {
|
|
554
558
|
readonly kind?: "fields";
|
|
@@ -572,6 +576,27 @@ export type EditExtensionSection = {
|
|
|
572
576
|
readonly component: PlatformComponent;
|
|
573
577
|
};
|
|
574
578
|
|
|
579
|
+
// Read-only list of related records, driven by its own query — for a
|
|
580
|
+
// projectionDetail screen showing e.g. a tenant's payments below the
|
|
581
|
+
// tenant's own fields. Only supported on projectionDetail (fw#2166); the
|
|
582
|
+
// boot-validator rejects it on entityEdit/configEdit/actionForm.
|
|
583
|
+
export type EditRelatedListSection = {
|
|
584
|
+
readonly kind: "relatedList";
|
|
585
|
+
readonly title: string;
|
|
586
|
+
/** Fully qualified query QN. Same paged envelope as projectionList.query:
|
|
587
|
+
* `{ rows, nextCursor, total? }`. */
|
|
588
|
+
readonly query: string;
|
|
589
|
+
/** Query-payload key the parent record's id is passed under. Default "id". */
|
|
590
|
+
readonly parentParam?: string;
|
|
591
|
+
readonly columns: readonly ListColumnSpec[];
|
|
592
|
+
readonly pageSize?: number;
|
|
593
|
+
/** Row click opens the target entity's detail screen via ObjectTarget —
|
|
594
|
+
* the `detailFor` lookup owns the entity→screen mapping, so no screenId
|
|
595
|
+
* is named here. `idColumn` names the row key holding that id (default
|
|
596
|
+
* "id"). Omit `rowClick` for a non-interactive list. */
|
|
597
|
+
readonly rowClick?: { readonly entity: string; readonly idColumn?: string };
|
|
598
|
+
};
|
|
599
|
+
|
|
575
600
|
// Max width of the form container (see FormScreenShell in renderer-web).
|
|
576
601
|
export type FormWidth = "sm" | "3xl" | "4xl" | "full";
|
|
577
602
|
|