@cosmicdrift/kumiko-framework 0.257.0 → 0.258.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.
@@ -1,14 +1,39 @@
1
1
  import type {
2
+ ActionFormScreenDefinition,
3
+ ConfigEditScreenDefinition,
2
4
  EditExtensionSection,
3
5
  EditFieldSpec,
4
6
  EditFieldsSection,
5
7
  EditSectionSpec,
6
8
  EditWriteFormSection,
9
+ EntityEditScreenDefinition,
7
10
  FieldCondition,
8
11
  FormatSpec,
9
12
  ListColumnSpec,
13
+ ProjectionDetailScreenDefinition,
14
+ ScreenDefinition,
15
+ SecretMintScreenDefinition,
10
16
  } from "./types/screen";
11
17
 
18
+ export type EditLayoutScreen =
19
+ | ProjectionDetailScreenDefinition
20
+ | EntityEditScreenDefinition
21
+ | ActionFormScreenDefinition
22
+ | ConfigEditScreenDefinition
23
+ | SecretMintScreenDefinition;
24
+
25
+ // Shared by boot-validators that walk the EditLayout shape (entityEdit's
26
+ // layout, reused verbatim by projectionDetail/actionForm/configEdit/secretMint).
27
+ export function isEditLayoutScreen(screen: ScreenDefinition): screen is EditLayoutScreen {
28
+ return (
29
+ screen.type === "projectionDetail" ||
30
+ screen.type === "entityEdit" ||
31
+ screen.type === "actionForm" ||
32
+ screen.type === "configEdit" ||
33
+ screen.type === "secretMint"
34
+ );
35
+ }
36
+
12
37
  export function isExtensionEditSection(section: EditSectionSpec): section is EditExtensionSection {
13
38
  return section.kind === "extension";
14
39
  }
@@ -122,6 +122,7 @@ export type {
122
122
  MoneyFieldDef,
123
123
  MultiSelectFieldDef,
124
124
  NumberFieldDef,
125
+ ParentRefDef,
125
126
  PersonalAnnotations,
126
127
  PersonalAnnotationsLongText,
127
128
  PersonalAnnotationsNoFind,
@@ -308,6 +309,10 @@ export type {
308
309
  ScreenFilterOp,
309
310
  ScreenNavSugar,
310
311
  ScreenSlots,
312
+ SecretMintConfirmStep,
313
+ SecretMintScreenDefinition,
314
+ SecretReveal,
315
+ SecretRevealField,
311
316
  SecretsEditScreenDefinition,
312
317
  SecretsEditSection,
313
318
  ToolbarAction,
@@ -18,6 +18,7 @@ import type {
18
18
  ProjectionListScreenDefinition,
19
19
  RowAction,
20
20
  ScreenDefinition,
21
+ SecretMintScreenDefinition,
21
22
  SecretsEditScreenDefinition,
22
23
  ToolbarAction,
23
24
  WorkspaceDefinition,
@@ -211,6 +212,53 @@ export function requiredKeysFromScreen(
211
212
  }
212
213
  break;
213
214
  }
215
+ case "secretMint": {
216
+ // Mirrors the actionForm case above (submitLabel, fields/section titles
217
+ // via ACTION_FORM_ENTITY) plus the reveal-phase's own i18n surface.
218
+ const mint = screen as SecretMintScreenDefinition;
219
+ pushKey(out, mint.submitLabel);
220
+ for (const fieldName of Object.keys(mint.fields)) {
221
+ out.add(fieldLabelKey(featureName, ACTION_FORM_ENTITY, fieldName));
222
+ }
223
+ for (const section of mint.layout.sections) {
224
+ if (isExtensionEditSection(section)) {
225
+ pushKey(out, section.title);
226
+ continue;
227
+ }
228
+ if (section.kind === "relatedList") continue; // rejected at boot, unreachable here
229
+ pushKey(out, section.title);
230
+ for (const f of section.fields) {
231
+ const fieldName = editFieldName(f);
232
+ out.add(fieldLabelKey(featureName, ACTION_FORM_ENTITY, fieldName));
233
+ }
234
+ }
235
+ pushKey(out, mint.reveal.title);
236
+ pushKey(out, mint.reveal.warning);
237
+ pushKey(out, mint.reveal.confirmLabel);
238
+ for (const revealField of mint.reveal.fields) {
239
+ pushKey(out, revealField.label);
240
+ }
241
+ if (mint.confirm !== undefined) {
242
+ pushKey(out, mint.confirm.submitLabel);
243
+ pushKey(out, mint.confirm.doneMessage);
244
+ for (const fieldName of Object.keys(mint.confirm.fields)) {
245
+ out.add(fieldLabelKey(featureName, ACTION_FORM_ENTITY, fieldName));
246
+ }
247
+ for (const section of mint.confirm.layout.sections) {
248
+ if (isExtensionEditSection(section)) {
249
+ pushKey(out, section.title);
250
+ continue;
251
+ }
252
+ if (section.kind === "relatedList") continue; // rejected at boot, unreachable here
253
+ pushKey(out, section.title);
254
+ for (const f of section.fields) {
255
+ const fieldName = editFieldName(f);
256
+ out.add(fieldLabelKey(featureName, ACTION_FORM_ENTITY, fieldName));
257
+ }
258
+ }
259
+ }
260
+ break;
261
+ }
214
262
  case "configEdit": {
215
263
  const config = screen as ConfigEditScreenDefinition;
216
264
  pushKey(out, config.submitLabel);
@@ -108,6 +108,8 @@ export function generateE2ESpec(
108
108
  // actionForm: kein generischer E2E-Spec — Author-defined Handler
109
109
  // braucht Author-defined Test-Daten, die der Generator nicht kennt.
110
110
  if (screen.type === "actionForm") continue;
111
+ // secretMint: same reasoning — author-defined write handler, no generic spec.
112
+ if (screen.type === "secretMint") continue;
111
113
  // configEdit: dito — die Werte werden über config:write:set
112
114
  // pro Field geschrieben, ohne CRUD-Zustand zu generieren wäre der
113
115
  // Spec wertlos. Branding/SMTP/etc. sind Author-spezifisch.
@@ -100,6 +100,10 @@ export type {
100
100
  ScreenFilter,
101
101
  ScreenFilterOp,
102
102
  ScreenSlots,
103
+ SecretMintConfirmStep,
104
+ SecretMintScreenDefinition,
105
+ SecretReveal,
106
+ SecretRevealField,
103
107
  SecretsEditScreenDefinition,
104
108
  SecretsEditSection,
105
109
  ToolbarAction,