@cosmicdrift/kumiko-types 0.187.0 → 0.189.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 +3 -3
- package/src/entity-table-meta-types.ts +4 -0
- package/src/screen.ts +32 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.189.0",
|
|
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>",
|
|
@@ -224,12 +224,12 @@
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"devDependencies": {
|
|
227
|
-
"hono": "^4.
|
|
227
|
+
"hono": "^4.13.1",
|
|
228
228
|
"postgres": "^3.4.9",
|
|
229
229
|
"temporal-polyfill": "^0.3.2"
|
|
230
230
|
},
|
|
231
231
|
"peerDependencies": {
|
|
232
|
-
"hono": "^4.
|
|
232
|
+
"hono": "^4.13.1",
|
|
233
233
|
"postgres": "^3.4.9",
|
|
234
234
|
"temporal-polyfill": "^0.3.2"
|
|
235
235
|
},
|
|
@@ -21,6 +21,10 @@ export type PgType =
|
|
|
21
21
|
| "jsonb"
|
|
22
22
|
| "timestamptz"
|
|
23
23
|
| "timestamptz(3)"
|
|
24
|
+
// Calendar day, no time-of-day/timezone component — Temporal.PlainDate.
|
|
25
|
+
// Distinct from timestamptz: a `date` field is a pure calendar concept
|
|
26
|
+
// (invoice date, lease term) and must never round-trip through an Instant.
|
|
27
|
+
| "date"
|
|
24
28
|
// Exact decimal — precision/scale are encoded in the type string so the
|
|
25
29
|
// DDL renderer and read-coercion need no side-channel metadata.
|
|
26
30
|
| `numeric(${number},${number})`;
|
package/src/screen.ts
CHANGED
|
@@ -564,6 +564,13 @@ export type EditLayout = {
|
|
|
564
564
|
* three-column fields) that would leave dead space on both sides in a
|
|
565
565
|
* 3xl column — see #1676. */
|
|
566
566
|
readonly width?: FormWidth;
|
|
567
|
+
/** Default "single". "wizard" renders one section per step (with
|
|
568
|
+
* progress + per-step validation) instead of all sections at once —
|
|
569
|
+
* boot-validator requires >= 2 sections, each with a title, when set. */
|
|
570
|
+
readonly mode?: "single" | "wizard";
|
|
571
|
+
/** Persists in-progress wizard state as a resumable draft instead of
|
|
572
|
+
* discarding it on navigation away. */
|
|
573
|
+
readonly draft?: boolean;
|
|
567
574
|
};
|
|
568
575
|
|
|
569
576
|
export type EntityEditScreenDefinition = {
|
|
@@ -586,6 +593,22 @@ export type EntityEditScreenDefinition = {
|
|
|
586
593
|
* (History-/Audit-Erhalt): unterdrückt den Löschen-Button im
|
|
587
594
|
* Update-Form. */
|
|
588
595
|
readonly allowDelete?: boolean;
|
|
596
|
+
/** Default false. `true` for singleton entities (exactly one record per
|
|
597
|
+
* tenant: organization, settings, tenant profile). A call without an
|
|
598
|
+
* `entityId` first resolves the existing record via `<entity>:list`
|
|
599
|
+
* (limit 1) and renders the update branch with prefill on a hit,
|
|
600
|
+
* instead of blindly creating another one. The create branch only
|
|
601
|
+
* fires when the table is empty (and `allowCreate: false` still
|
|
602
|
+
* applies there). */
|
|
603
|
+
readonly singleton?: boolean;
|
|
604
|
+
/** Navigate to this screen ID after a successful save (create or update).
|
|
605
|
+
* Either a same-feature short screen-ID, or a fully-qualified
|
|
606
|
+
* cross-feature screen QN (`<feature>:screen:<id>`) — the nav-router
|
|
607
|
+
* resolves both against the schema; boot-validator checks the target
|
|
608
|
+
* resolves to a registered screen. Overrides the default post-save
|
|
609
|
+
* target (the entity's list screen); delete is unaffected and still
|
|
610
|
+
* always navigates to the list. */
|
|
611
|
+
readonly redirect?: string;
|
|
589
612
|
/** Optionaler per-Field-Label-i18n-Key (Field-Name → Key), überschreibt
|
|
590
613
|
* die Default-Konvention `<feature>:entity:<entity>:field:<name>`.
|
|
591
614
|
* Primär für configEdit: dessen Pseudo-Entity `__config-edit__` hat
|
|
@@ -632,18 +655,20 @@ export type ActionFormScreenDefinition = {
|
|
|
632
655
|
/** i18n-key für den Submit-Button. Default: i18n-Default des
|
|
633
656
|
* Renderers (typischerweise "actions.submit"). */
|
|
634
657
|
readonly submitLabel?: string;
|
|
635
|
-
/** Nach erfolgreichem Submit zu dieser Screen-ID navigieren
|
|
636
|
-
* ID
|
|
637
|
-
* zum vollen Pfad)
|
|
638
|
-
* Wenn nicht gesetzt, bleibt der User auf
|
|
639
|
-
* Validator prüft dass
|
|
658
|
+
/** Nach erfolgreichem Submit zu dieser Screen-ID navigieren: entweder
|
|
659
|
+
* kurze ID (z.B. "item-list" — gleiche Feature, der nav-Router
|
|
660
|
+
* resolved zum vollen Pfad) oder voll-qualifizierte Cross-Feature-QN
|
|
661
|
+
* (`<feature>:screen:<id>`). Wenn nicht gesetzt, bleibt der User auf
|
|
662
|
+
* dem Form-Screen. Boot-Validator prüft dass das Ziel einen
|
|
663
|
+
* registrierten Screen meint. */
|
|
640
664
|
readonly redirect?: string;
|
|
641
665
|
/** Ziel des Abbrechen-Buttons. Default: `redirect` (historisches
|
|
642
666
|
* Verhalten — Cancel und Submit-Redirect landen dann am selben Ort).
|
|
643
667
|
* `false` = kein Abbrechen-Button; richtig für Single-Action-Screens
|
|
644
668
|
* ohne verwerfbaren Zustand (z.B. "Test-Mail senden"), wo Abbrechen
|
|
645
|
-
* nur ein zweiter Weg zum selben Ziel wäre.
|
|
646
|
-
* String-Targets wie `redirect
|
|
669
|
+
* nur ein zweiter Weg zum selben Ziel wäre. Akzeptiert dieselben
|
|
670
|
+
* String-Targets wie `redirect` (kurze ID oder Cross-Feature-QN);
|
|
671
|
+
* Boot-Validator prüft das. */
|
|
647
672
|
readonly cancelTarget?: string | false;
|
|
648
673
|
readonly slots?: ScreenSlots;
|
|
649
674
|
readonly access?: AccessRule;
|