@cosmicdrift/kumiko-framework 0.416.0 → 0.417.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/agents/api/framework-engine.md +31 -9
- package/agents/api/framework-ui-types.md +23 -5
- package/agents/api/renderer-web.md +24 -2
- package/agents/api/types.md +94 -60
- package/agents/api.md +1 -1
- package/agents/boot-rules.md +3 -1
- package/agents/examples/dashboard-stats.md +51 -0
- package/agents/examples/event-sourcing.md +84 -0
- package/agents/examples/list-table-options.md +71 -5
- package/agents/examples/managed-config.md +9 -1
- package/agents/examples/record-detail-layout.md +71 -6
- package/agents/examples/secrets-demo.md +3 -1
- package/agents/examples/signature.md +3 -2
- package/agents/examples/writeform-section.md +329 -0
- package/dist/db/queries/event-store.d.ts +3 -0
- package/dist/db/queries/event-store.js +12 -0
- package/dist/engine/boot-validator/boot-rules.d.ts +11 -1
- package/dist/engine/boot-validator/card-meta-overflow.js +5 -1
- package/dist/engine/boot-validator/list-row-guidance.d.ts +1 -0
- package/dist/engine/boot-validator/list-row-guidance.js +1 -0
- package/dist/engine/boot-validator/list-table-options.d.ts +1 -1
- package/dist/engine/boot-validator/list-table-options.js +8 -6
- package/dist/engine/boot-validator/list-table-rules.d.ts +1 -1
- package/dist/engine/boot-validator/list-table-rules.js +1 -1
- package/dist/engine/boot-validator/query-output-columns.js +4 -0
- package/dist/engine/boot-validator/query-output-guidance.js +1 -0
- package/dist/engine/boot-validator/screens-actions.d.ts +1 -1
- package/dist/engine/boot-validator/screens-actions.js +2 -0
- package/dist/engine/boot-validator/screens-kind-entity-list.js +3 -1
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +10 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +10 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +80 -0
- package/dist/engine/boot-validator/screens-kind-projection-list.js +1 -1
- package/dist/engine/boot-validator/screens.js +1 -2
- package/dist/engine/bridge-stub.js +1 -0
- package/dist/engine/build-config-feature-schema.js +25 -2
- package/dist/engine/screen-helpers.js +7 -3
- package/dist/event-store/archive.d.ts +1 -0
- package/dist/event-store/archive.js +5 -1
- package/dist/event-store/event-store.d.ts +5 -0
- package/dist/event-store/event-store.js +23 -3
- package/dist/i18n/required-surface-keys.js +6 -0
- package/dist/pipeline/handler-context-events.js +15 -1
- package/dist/ui-types/card-column-roles.d.ts +3 -0
- package/dist/ui-types/card-column-roles.js +9 -5
- package/dist/ui-types/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/changes.json +6 -0
|
@@ -415,6 +415,7 @@ type ConfigEditScreenDefinition = {
|
|
|
415
415
|
fieldDescriptions?: Readonly<Record<string, string>>; // Per-field help text i18n key (Field-Name → Key), from `mask.description`.
|
|
416
416
|
requiredFields?: string[]; // Field names whose config key declares `required: true` — drives the "Not set.
|
|
417
417
|
submitLabel?: string; // i18n key for the submit button.
|
|
418
|
+
compact?: true; // Compact rows: no origin icon, no reset link, no accent bar on changed fields; the form column is capped to a readable width.
|
|
418
419
|
actions?: ConfigEditAction[]; // Handler buttons drawn as their own row after `afterField` (settings-list layout).
|
|
419
420
|
slots?: ScreenSlots;
|
|
420
421
|
access?: AccessRule;
|
|
@@ -537,6 +538,10 @@ type EditFieldSpec =
|
|
|
537
538
|
fillAction?: FieldFillAction; // Button beside the input that runs a query and writes one scalar of its result into this field.
|
|
538
539
|
aiAssist?: FieldAiAssist; // Helper under a `text` or `longText` input: stackable chips and an optional free instruction call a query and write its `resultField` into the field.
|
|
539
540
|
valueChips?: FieldValueChips; // Quick-pick chips under a `number`, `decimal`, `bigInt` or `money` input; a chip sets the field to its value.
|
|
541
|
+
concealed?: true; // Read-only display of a value the viewer may not see: the value (or the mask the query returns) shows muted with a lock icon instead of a replacement text.
|
|
542
|
+
badge?: FieldBadge; // Pill next to the label, e.g. "price source open" in `warn`.
|
|
543
|
+
hintField?: string; // Value field whose non-empty text shows as a muted small hint under the field (e.g. "From the buyer: Skoda Octavia").
|
|
544
|
+
hideOnNarrow?: true; // Leaves the field out below `sm`; its value is still submitted.
|
|
540
545
|
refEntity?: string; // Marks this field as a reference lookup instead of a plain value — for projectionDetail fields, which have no `EntityDefinition` to carry a real `reference` field type.
|
|
541
546
|
refLabelField?: string; // Row field on the referenced entity shown as the label (default "id").
|
|
542
547
|
format?: "email" | "phone"; // Text format for projectionDetail fields, which have no `EntityDefinition` to carry it: a read-only value renders as a `mailto:`/`tel:` link.
|
|
@@ -544,7 +549,7 @@ type EditFieldSpec =
|
|
|
544
549
|
prefill?: EditFieldPrefill; // Fills an empty value when the create form opens; the update form and values from URL params or a handoff are never touched.
|
|
545
550
|
}
|
|
546
551
|
;
|
|
547
|
-
type EditRelatedListSection = {
|
|
552
|
+
type EditRelatedListSection = EditSectionPresentation & {
|
|
548
553
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
549
554
|
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
550
555
|
kind: "relatedList";
|
|
@@ -579,7 +584,9 @@ type EditRelatedListSection = {
|
|
|
579
584
|
emptyState?: RelatedListEmptyStateSpec; // Rendered inside the section's Card in place of the table when this section's query returns zero rows.
|
|
580
585
|
photoGrid?: {
|
|
581
586
|
imageField: string; // Row field holding a FileRef id (or an id array, the first shows).
|
|
582
|
-
captionField?: string; // Row field printed under the image.
|
|
587
|
+
captionField?: string; // Row field printed under the image; without it the tile reads "Photo n".
|
|
588
|
+
badgeField?: string; // Row field whose non-empty text shows as a warn badge on the image's top left.
|
|
589
|
+
badgeFirst?: true; // On a phone (below `sm`) tiles whose `badgeField` has text come first, the rest keep their order; from `sm` up the natural order stays.
|
|
583
590
|
}; // Draws the rows as a tile grid of images instead of a table.
|
|
584
591
|
};
|
|
585
592
|
type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection | EditStepListSection;
|
|
@@ -667,6 +674,7 @@ type EntityListScreenDefinition = {
|
|
|
667
674
|
allowCreate?: boolean; // `false` hides this list's "+ New" button (and the empty-state create CTA) while the entity's edit screen keeps its create branch for other entry points, e.g. a prefilled action.
|
|
668
675
|
columns: ListColumnSpec[];
|
|
669
676
|
rowToneField?: string; // Row field holding a SelectOptionTone; the row is toned like relatedList `rowTone`, other values leave it untoned.
|
|
677
|
+
mutedRowField?: string; // Row field (boolean): a row with a true value is drawn entirely in the muted text colour.
|
|
670
678
|
rowDecoration?: ListRowDecoration; // Computed row fields from an app query, readable by `rowToneField`, column `hint`, `linkScreenField`/`linkParamsField` and rowAction `visible`/`params`/`payload`; a column may name a decoration field.
|
|
671
679
|
rowRenderer?: PlatformComponent;
|
|
672
680
|
rowActions?: RowAction[]; // Per-row actions, rendered as an actions column on the right.
|
|
@@ -880,7 +888,7 @@ interface FieldFormatRegistry {
|
|
|
880
888
|
absoluteAfterDays?: number;
|
|
881
889
|
withTime?: boolean;
|
|
882
890
|
timeZone?: string; // IANA zone id for the clock time and the day boundary.
|
|
883
|
-
}; // Epoch ms or ISO timestamp, shown as "5
|
|
891
|
+
}; // Epoch ms or ISO timestamp, shown as "5 min.
|
|
884
892
|
date: {
|
|
885
893
|
locale?: string;
|
|
886
894
|
dateStyle?: "full" | "long" | "medium" | "short";
|
|
@@ -967,6 +975,7 @@ type HandlerEvents<TMap extends object = KumikoEventTypeMap> = { // Event-store
|
|
|
967
975
|
tryAppend: TryAppendEventFn; // Optimistic append: runs in a savepoint and returns a version conflict as a result instead of throwing, so the handler can continue after losing a race on the same aggregate stream.
|
|
968
976
|
fetchForWriting: (args: FetchForWritingArgs) => Promise<AggregateStreamHandle>;
|
|
969
977
|
load: (aggregateId: string, options?: { asOf?: Temporal.Instant; atVersion?: never; includeArchived?: boolean; } | { atVersion?: number; asOf?: never; includeArchived?: boolean; }) => Promise<StoredEvent[]>;
|
|
978
|
+
loadByTypes: (args: { aggregateIds: string[]; eventTypes: string[]; includeArchived?: boolean; }) => Promise<StoredEvent[]>;
|
|
970
979
|
archive: (aggregateId: string, args: { aggregateType: string; reason?: string; }) => Promise<void>;
|
|
971
980
|
restore: (aggregateId: string) => Promise<void>;
|
|
972
981
|
isArchived: (aggregateId: string) => Promise<boolean>;
|
|
@@ -1073,18 +1082,27 @@ type ListColumnSpec =
|
|
|
1073
1082
|
refLabelField?: string; // Row field on the referenced entity shown as the label (default "id").
|
|
1074
1083
|
sortable?: boolean; // Marks this column as sortable via a clickable header — for relatedList columns, which have no `EntityDefinition` field to carry `sortable` on.
|
|
1075
1084
|
valueType?: "number" | "decimal" | "bigInt" | "money"; // Value type of a projectionList or relatedList column, which has no `EntityDefinition` field to derive it from.
|
|
1076
|
-
emptyPlaceholder?: false; //
|
|
1077
|
-
hideOnNarrow?: boolean; // Leaves the column out of the compact card layout used below the `md` breakpoint (
|
|
1085
|
+
emptyPlaceholder?: string | false; // An empty cell stays blank by default; a string (i18n key or literal) is shown muted in its place, e.g. "No vehicle".
|
|
1086
|
+
hideOnNarrow?: boolean; // Leaves the column out of the compact card layout used below the `md` breakpoint (phone viewport).
|
|
1087
|
+
hideWhenDocked?: true; // Leaves the column out of a table whose container is narrower than `md` (docked assistant panel); the viewport is not looked at, so the phone card still shows it.
|
|
1078
1088
|
showOnNarrowOnly?: true; // Counterpart of `hideOnNarrow`: the column shows only in the compact card layout and not in the table.
|
|
1079
1089
|
narrowInline?: true; // In the compact card, consecutive `narrowInline` columns stand side by side on one line (12px gap, no separator) instead of one line each.
|
|
1090
|
+
ellipsis?: true; // One line with a trailing ellipsis in the table; the full text is the cell's `title`.
|
|
1091
|
+
multiline?: true; // Free text: the cell wraps instead of ending in "…", and a line break (`\n`) in the value starts a new line (table and phone card).
|
|
1092
|
+
cardAbove?: true; // Phone card: the column's line stands above the title (muted, e.g. "date, channel") instead of below it.
|
|
1093
|
+
emphasis?: true; // Cell text in medium weight and foreground colour, like the title column of a board.
|
|
1094
|
+
tone?: "muted"; // `"muted"` draws every cell of the column in the muted text colour (e.g. a free-text message beside primary columns).
|
|
1095
|
+
cardBadge?: true; // The phone card shows this column as its badge: right of the title, as an outlined neutral pill (a `display: "badge"` column keeps its own pill).
|
|
1096
|
+
dateOnlyAfterDays?: number; // Timestamp or relativeTime column: a value older than this many days shows the date only, without the time.
|
|
1080
1097
|
hidden?: boolean; // Start state for the column picker: the column begins hidden and the user can show it.
|
|
1081
1098
|
pinned?: ListColumnPin; // Start pin for the column: it sticks to this edge while the table scrolls horizontally.
|
|
1082
1099
|
width?: number; // Start width in px.
|
|
1083
1100
|
minWidth?: number; // Smallest width in px the user can resize to.
|
|
1084
1101
|
display?: ListColumnDisplay; // One of "bar" | "badge" | "datetime" | "button".
|
|
1085
1102
|
variant?: "primary"; // `"primary"` draws a `display: "button"` link as a filled primary button instead of the outline default (dashboard list panels only).
|
|
1086
|
-
badgeToneField?: string; // Row field naming the badge tone; only with `display: "badge"`.
|
|
1103
|
+
badgeToneField?: string; // Row field naming the badge tone: a `ListBadgeTone` word or a `SelectOptionTone` word (`ok`, `bad`, `critical`, `accent`); only with `display: "badge"`.
|
|
1087
1104
|
badgeDot?: false; // `false` draws the badge pill without its leading dot; only with `display: "badge"`.
|
|
1105
|
+
badgeIcon?: "sparkles"; // `"sparkles"` marks an AI-prepared value: the dashboard list draws the badge as the soft blue AI pill with a sparkles icon, like an AI row action; only with `display: "badge"`.
|
|
1088
1106
|
pillField?: string; // Row field holding a second label, drawn as a pill next to the cell's own value (e.g. a vehicle name with a "free" pill).
|
|
1089
1107
|
pillToneField?: string; // Row field naming the tone of the `pillField` pill (a `ListBadgeTone`).
|
|
1090
1108
|
linkScreenField?: string; // Row field holding a screen QN (`<feature>:screen:<id>`): the cell links to that screen when the row sets it and the user may open it.
|
|
@@ -1410,8 +1428,11 @@ type ProjectionDetailScreenDefinition = {
|
|
|
1410
1428
|
metrics?: MetricSpec[]; // Metric band above the layout — column names in the query row, each with its own i18n `label`.
|
|
1411
1429
|
metricsStyle?: "band" | "tiles"; // "tiles" draws the metrics as the dashboard KPI tiles (StatCard) instead of the plain band.
|
|
1412
1430
|
metricsPlacement?: {
|
|
1413
|
-
narrow?: "after-guidance";
|
|
1414
|
-
}; // `narrow: "after-guidance"` moves the metrics below the summary, banner and steps
|
|
1431
|
+
narrow?: "after-guidance" | "before-steps";
|
|
1432
|
+
}; // On screens under md, `narrow: "after-guidance"` moves the metrics below the summary, banner and steps, ahead of the tabs; `"before-steps"` puts them below the summary and banner, ahead of the next step.
|
|
1433
|
+
mobileSummary?: string; // Record field holding one line of text shown instead of the metrics below `sm`.
|
|
1434
|
+
pageNavigation?: false; // `false` leaves out the "On this page" navigation of a stacked (non-tabs) layout.
|
|
1435
|
+
photosBeside?: true; // A tab holding fields sections and a relatedList with `photoGrid` shows the fields left and the photos right from `lg` up.
|
|
1415
1436
|
breadcrumb?: RecordBreadcrumbSpec; // Path above the header (query column holding items).
|
|
1416
1437
|
summary?: RecordSummarySpec; // One emphasized sentence below the header.
|
|
1417
1438
|
banner?: RecordBannerSpec; // Notice below the summary.
|
|
@@ -1420,7 +1441,7 @@ type ProjectionDetailScreenDefinition = {
|
|
|
1420
1441
|
listScreenId?: string; // Parent list screen (short id) for a "back" navigation.
|
|
1421
1442
|
slots?: ScreenSlots;
|
|
1422
1443
|
access?: AccessRule;
|
|
1423
|
-
actions?:
|
|
1444
|
+
actions?: EntityEditAction[]; // Header action buttons.
|
|
1424
1445
|
primaryAction?: string; // Id of the action that stays the visible header button when the actions collapse into a menu (and the one that keeps the phone icon slot when it has an icon and no confirm).
|
|
1425
1446
|
inlineActions?: string[]; // Action ids that stay visible buttons next to the primary action when the rest collapses into the menu.
|
|
1426
1447
|
footerActions?: string[]; // Ids of `actions` shown in the pinned footer bar instead of the header, in declaration order.
|
|
@@ -1442,6 +1463,7 @@ type ProjectionListScreenDefinition = {
|
|
|
1442
1463
|
query: string;
|
|
1443
1464
|
columns: ListColumnSpec[];
|
|
1444
1465
|
rowToneField?: string; // Row field holding a SelectOptionTone; the row is toned like relatedList `rowTone`, other values leave it untoned.
|
|
1466
|
+
mutedRowField?: string; // Row field (boolean): a row with a true value is drawn entirely in the muted text colour.
|
|
1445
1467
|
rowDecoration?: ListRowDecoration; // Computed row fields from an app query, merged into the query rows; see `ListRowDecoration`.
|
|
1446
1468
|
rowRenderer?: PlatformComponent;
|
|
1447
1469
|
rowActions?: RowAction[];
|
|
@@ -154,6 +154,7 @@ type DashboardFeedPanel = DashboardPanelQueryOptions & DashboardPanelEmptyState
|
|
|
154
154
|
id: string;
|
|
155
155
|
label: string;
|
|
156
156
|
query: string;
|
|
157
|
+
showTotal?: true | Pick<DashboardListShowTotal, "text">; // Shows the count in the panel head, right-aligned like a list panel's `showTotal`: `{total}` is the query's `total`, else the rows returned.
|
|
157
158
|
};
|
|
158
159
|
type DashboardFilterDefinition = {
|
|
159
160
|
id: string;
|
|
@@ -166,7 +167,7 @@ type DashboardFilterDefinition = {
|
|
|
166
167
|
};
|
|
167
168
|
type DashboardLayout = "main-side"; // "main-side": from `lg` up the main column (2/3) stacks every panel without `column`, the side column (1/3) every `column: "side"` panel, each with its own heights; `column: "top"` panels span both columns above them; below `lg` they stack, below `sm` by `narrowOrder`.
|
|
168
169
|
type DashboardListFooterLink = { // Link to a screen from a panel; `label` is an i18n key, `namedFilter` only for list screens.
|
|
169
|
-
label
|
|
170
|
+
label?: string; // i18n key of the link text.
|
|
170
171
|
moreText?: string; // i18n key of the text before the link when more rows exist than shown; `{count}` is the rest.
|
|
171
172
|
narrowMoreText?: string; // i18n key used instead of `moreText` below `sm`.
|
|
172
173
|
narrowOnly?: boolean; // Draw the link only below `sm`, where it is the target of the "line" layout; from `sm` up the panel shows no footer link.
|
|
@@ -229,6 +230,8 @@ type DashboardProgressListPanel = DashboardPanelQueryOptions & DashboardPanelEmp
|
|
|
229
230
|
kind: "progress-list";
|
|
230
231
|
id: string;
|
|
231
232
|
label: string;
|
|
233
|
+
labelParams?: Readonly<Record<string, string>>; // Fills the translated `label` from the query answer: maps a label placeholder to a top-level answer field, e.g. `{ month: "monthName" }` for "Quota {month}" with `{ rows, monthName: "November" }`.
|
|
234
|
+
subtitleField?: string; // Top-level answer field holding a text shown muted at the right end of the panel head, e.g. the period ("November").
|
|
232
235
|
query: string;
|
|
233
236
|
};
|
|
234
237
|
type DashboardProgressTone = "default" | "danger";
|
|
@@ -309,6 +312,7 @@ type DashboardStatPanel = DashboardPanelQueryOptions & DashboardPanelGate & Dash
|
|
|
309
312
|
valueField: string;
|
|
310
313
|
labelField?: string; // Field of the query answer holding the label text, e.g. "Contracts ending by 31.01.2027"; it replaces the static `label` while it holds a non-empty string.
|
|
311
314
|
narrowLabel?: string; // i18n key shown instead of the label in the one-line phone strip of a titled stat-group ("2 requests").
|
|
315
|
+
labelNarrow?: string; // i18n key replacing `label` below the `sm` breakpoint wherever the stat draws its label (a dynamic `labelField` text still wins).
|
|
312
316
|
subField?: string;
|
|
313
317
|
toneField?: string;
|
|
314
318
|
valueFormat?: DashboardValueFormat; // Formats a numeric value as currency (minor units) or, with `relativeTime`, as a ticking "5 minutes ago" from epoch ms; ignored for string values.
|
|
@@ -375,7 +379,7 @@ type DerivedCellRoundingTarget = {
|
|
|
375
379
|
type: EmbeddedSubFieldDef["type"];
|
|
376
380
|
scale?: number;
|
|
377
381
|
};
|
|
378
|
-
type EditExtensionSection = {
|
|
382
|
+
type EditExtensionSection = EditSectionPresentation & {
|
|
379
383
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
380
384
|
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
381
385
|
kind: "extension";
|
|
@@ -395,6 +399,7 @@ type EditLayout = {
|
|
|
395
399
|
sections: EditSectionSpec[];
|
|
396
400
|
width?: FormWidth; // Default "4xl" (a centered column, narrower than list chrome), unless the app overrides it via `createKumikoApp({ screenWidth })`.
|
|
397
401
|
mode?: "single" | "wizard" | "tabs"; // Default "single".
|
|
402
|
+
narrowTabs?: false; // `false` (tabs mode): below `sm` there is no tab strip, the visible sections of every tab stand one under the other.
|
|
398
403
|
variant?: "form" | "settings-list"; // "settings-list" lays each section out as a band with a title column on the left and one hairline-separated row per field (label + help left, control right) — the familiar settings pattern, for screens that are a list of independent preferences rather than one record form.
|
|
399
404
|
hideRequiredMarker?: boolean; // Hides the asterisk after required field labels.
|
|
400
405
|
allRequiredHint?: false; // `false` switches off the "all fields are required" hint when every field is required; each label then carries its own asterisk.
|
|
@@ -408,7 +413,7 @@ type EditLayout = {
|
|
|
408
413
|
submitDisabledWhen?: FieldCondition; // Disables the finish button (and blocks the submit) while the condition holds on the form values.
|
|
409
414
|
}; // Wizard layouts only.
|
|
410
415
|
};
|
|
411
|
-
type EditStepListSection = { // Vertical numbered step list (circles joined by a line), fed from one field of the detail query.
|
|
416
|
+
type EditStepListSection = EditSectionPresentation & { // Vertical numbered step list (circles joined by a line), fed from one field of the detail query.
|
|
412
417
|
id?: string;
|
|
413
418
|
visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
414
419
|
kind: "stepList";
|
|
@@ -416,18 +421,20 @@ type EditStepListSection = { // Vertical numbered step list (circles joined by a
|
|
|
416
421
|
field: string; // Output field of the detail query holding a `StepListItem[]`.
|
|
417
422
|
actions?: undefined; // Present only so section-actions readers accept the union; a step list has no title-row actions.
|
|
418
423
|
};
|
|
419
|
-
type EditWriteFormSection = {
|
|
424
|
+
type EditWriteFormSection = EditSectionPresentation & {
|
|
420
425
|
id?: string; // Kebab-case tab id, used as the `?tab=` value.
|
|
421
426
|
visibleWhen?: Exclude<FieldCondition, boolean>; // projectionDetail only: shows the section (and its tab) only while the loaded record matches, same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`.
|
|
422
427
|
kind: "writeForm";
|
|
423
428
|
title?: string;
|
|
424
429
|
description?: string;
|
|
430
|
+
descriptionNarrow?: string; // i18n key of a short text shown instead of `description` below `sm`.
|
|
425
431
|
columns?: number;
|
|
426
432
|
icon?: IconKey;
|
|
427
433
|
fieldDefs: Readonly<Record<string, FieldDefinition>>; // Field-type map for this section's own form — same shape as `ActionFormScreenDefinition.fields`.
|
|
428
434
|
fields: EditFieldSpec[]; // Rendered fields, in order — same shape as `EditFieldsSection.fields`.
|
|
429
435
|
handler: string; // Write-handler QN dispatched on submit.
|
|
430
436
|
submitLabel?: string; // i18n-key for the submit button.
|
|
437
|
+
submitWith?: string; // Id of a writeHandler action in the screen's `actions`.
|
|
431
438
|
actions?: RowAction[]; // Rendered top-right in the section's Card title row — same navigate/drawer/writeHandler dispatch as `ProjectionDetailScreenDefinition.actions`, evaluated against the same record.
|
|
432
439
|
};
|
|
433
440
|
type EmbeddedDerivedCellDef = ({ op: "multiply" | "sum" | "subtract" | "percent"; from: string[]; } | { op: "inRange"; from: string[]; inside: string; outside: string; }) & { // A cell computed from other cells of the same row.
|
|
@@ -480,6 +487,16 @@ type FieldAiAssistChip = { // One toggle chip: while active, its `params` are me
|
|
|
480
487
|
label: string; // i18n key of the chip label.
|
|
481
488
|
params: Readonly<Record<string, string | number | boolean>>;
|
|
482
489
|
};
|
|
490
|
+
type FieldBadge = // Pill next to a field label: a fixed i18n `label`, or the text of another value `field`.
|
|
491
|
+
| {
|
|
492
|
+
label: string;
|
|
493
|
+
tone: SelectOptionTone;
|
|
494
|
+
}
|
|
495
|
+
| {
|
|
496
|
+
field: string;
|
|
497
|
+
tone: SelectOptionTone;
|
|
498
|
+
}
|
|
499
|
+
;
|
|
483
500
|
type FieldFillAction = {
|
|
484
501
|
label: string; // i18n key (falls back to the literal) of the button label.
|
|
485
502
|
query: string; // Qualified query name, run with the current form values picked by `params`.
|
|
@@ -560,6 +577,7 @@ type QualifiedContentCollection = ContentCollectionDefinition & {
|
|
|
560
577
|
};
|
|
561
578
|
type RecordBannerSpec = {
|
|
562
579
|
field: string; // Holds `RecordNotice | null`; null shows no banner.
|
|
580
|
+
iconless?: true; // Draws the notice without the tone icon.
|
|
563
581
|
actions?: RecordGuidanceAction[];
|
|
564
582
|
};
|
|
565
583
|
type RecordBreadcrumbItem = {
|
|
@@ -659,7 +677,7 @@ type RowActionClientAction = {
|
|
|
659
677
|
display?: RowActionDisplay; // Inline render form in the row-action column — see `RowActionDisplay`.
|
|
660
678
|
successMessage?: string | false; // i18n key of the toast shown after the handler reported `{ ok: true }` (default `kumiko.clientAction.success`); `false` shows no toast.
|
|
661
679
|
};
|
|
662
|
-
type RowActionDisplay = "button" | "link" | "icon" | "responsive"; // How a row action renders inline in the row-action column.
|
|
680
|
+
type RowActionDisplay = "button" | "link" | "icon" | "responsive" | "text"; // How a row action renders inline in the row-action column.
|
|
663
681
|
type RowActionDrawer = {
|
|
664
682
|
kind: "drawer";
|
|
665
683
|
id: string;
|
|
@@ -50,7 +50,7 @@ function FileViewAction(props: { fileId: string; }): ReactNode; // "View" action
|
|
|
50
50
|
function FloatingPanel(props: FloatingPanelProps): ReactNode; // Non-modal panel floating above the page: draggable by its header, resizable from all edges and corners, clamped to the viewport, geometry optionally remembered.
|
|
51
51
|
function FormScreenShell(props: { children: ReactNode; className?: string; testId?: string; maxWidth?: FormScreenShellWidth; fillHeight?: boolean; }): ReactNode;
|
|
52
52
|
function HeaderActionGroup(props: HeaderActionGroupProps): ReactNode;
|
|
53
|
-
function HeaderActionPinned(props: { children: ReactNode; }): ReactNode; // Marks an app header action (e.g. the assistant trigger) that stays in the bar on a phone, next to the bell; the rest of `headerActions` folds into the "…" menu.
|
|
53
|
+
function HeaderActionPinned(props: { children: ReactNode; hideOnListScreens?: boolean; }): ReactNode; // Marks an app header action (e.g. the assistant trigger) that stays in the bar on a phone, next to the bell; the rest of `headerActions` folds into the "…" menu.
|
|
54
54
|
function HtmlMailFrame(props: { html: string; title: string; allowRemoteImages: boolean; testId?: string; }): ReactNode; // Renders server-sanitized mail HTML in a script-free sandboxed iframe that grows to its content.
|
|
55
55
|
function Icon(props: { name: NavIconKey; className?: string; }): ReactNode;
|
|
56
56
|
function InfinityList<TData = unknown, TRow = Readonly<Record<string, unknown>>>(props: InfinityListProps<TData, TRow>): ReactNode; // Cursor-paginated scroll list (mail inbox, activity feeds) — loads the next page when the end sentinel becomes visible (IntersectionObserver), instead of a pager bar like QueryTable/entityList.
|
|
@@ -262,7 +262,7 @@ type AvatarProps = {
|
|
|
262
262
|
type AvatarShape = "square" | "round";
|
|
263
263
|
type AvatarSize = "xs" | "sm" | "md" | "lg";
|
|
264
264
|
type BannerProps = { // Banner for an inline message or page state (for example, "Loading…" or "Screen not found").
|
|
265
|
-
variant?: "error" | "info" | "loading" | "warning" | "primary" | "hint" | "ok"; // "error" for alerts (conflict, network error), "info" for neutral placeholders (not-found, loading), "loading" for load states, "warning" for a non-blocking but attention-grabbing notice (e.g. secretMint's "this is shown only once"), "primary" for a call-to-action notice (neutral background, accent in the primary color; pair it with `title` and `actions`), "hint" for a quiet aside on a muted background (e.g. per-entry results of a submit, with an "Open" link in `actions`), "ok" for a completed state (e.g. "Done").
|
|
265
|
+
variant?: "error" | "info" | "loading" | "warning" | "primary" | "hint" | "ok" | "assist"; // "error" for alerts (conflict, network error), "info" for neutral placeholders (not-found, loading), "loading" for load states, "warning" for a non-blocking but attention-grabbing notice (e.g. secretMint's "this is shown only once"), "primary" for a call-to-action notice (neutral background, accent in the primary color; pair it with `title` and `actions`), "hint" for a quiet aside on a muted background (e.g. per-entry results of a submit, with an "Open" link in `actions`), "ok" for a completed state (e.g. "Done"), "assist" for an AI hint: soft primary surface, primary text, no border.
|
|
266
266
|
inline?: boolean; // Title and text run on one line (text right behind the bold title); the text is dropped below sm, so a phone shows title and actions only.
|
|
267
267
|
density?: "default" | "compact"; // "compact" is one line: the title reads inline before the text.
|
|
268
268
|
icon?: NavIconKey; // Icon left of the text.
|
|
@@ -445,6 +445,7 @@ type DataTableProps = DataTableTableBlock & {
|
|
|
445
445
|
columns: ListColumnViewModel[];
|
|
446
446
|
rows: ListRowViewModel[];
|
|
447
447
|
rowTone?: (row: ListRowViewModel) => SelectOptionTone | undefined; // Tints a row.
|
|
448
|
+
rowMuted?: (row: ListRowViewModel) => boolean; // Draws the whole row in the muted text colour.
|
|
448
449
|
onRowClick?: (row: ListRowViewModel) => void;
|
|
449
450
|
sort?: DataTableSort | null; // Current sorting, or null when unsorted.
|
|
450
451
|
onSortChange?: (next: DataTableSort | null) => void; // Called with the next sort state after a header click (asc → desc → null); the caller updates URL state or the query parameter and refetches.
|
|
@@ -482,6 +483,8 @@ type DataTableProps = DataTableTableBlock & {
|
|
|
482
483
|
getCellTestId?: (row: ListRowViewModel, field: string) => string; // Overrides the cell `data-testid` (default `cell-${row.id}-${field}`).
|
|
483
484
|
chromeless?: boolean; // Drops the table's own rounded/border/card background — for a host that already provides the surrounding boundary (a tab panel) and would otherwise show a card nested inside that boundary.
|
|
484
485
|
scrollBody?: boolean; // Fills the available height of its flex container and scrolls rows internally instead of growing with row count — for a host that would otherwise have a long table stretch the whole page, or a short table leave dead space below it (a tab panel).
|
|
486
|
+
hideCountFooter?: boolean; // Drops the "n entries" footer of a `scrollBody` table (a pager stays).
|
|
487
|
+
plainPhoneCards?: boolean; // Phone cards as a plain feed: no sort line, the above-title meta joined with commas, the last meta line in the text colour.
|
|
485
488
|
screenPadding?: boolean; // Uses the shared screen padding (wider bottom inset) instead of the table's symmetric embedded inset — for a table that IS the screen body (entityList/projectionList), so a list screen ends at the same footer distance as a form or custom screen.
|
|
486
489
|
expandedRowIds?: ReadonlySet<string>; // Ids of the rows whose expansion area is currently open (controlled by the host; several rows can be open at once).
|
|
487
490
|
onToggleRowExpanded?: (rowId: string) => void; // User toggled a row's expand control.
|
|
@@ -674,12 +677,14 @@ type FormProps = { // Submit wrapper.
|
|
|
674
677
|
title: string;
|
|
675
678
|
subtitle?: string;
|
|
676
679
|
}; // Drawer-hosted forms: context box above the fields.
|
|
680
|
+
topBanner?: ReactNode; // Rendered above everything else in the form body (above `summary`), e.g. the submit error.
|
|
677
681
|
sectionNav?: FormSectionNavItem[]; // Titled sections for the "on this page" navigation next to a `screenForm`.
|
|
678
682
|
sideRail?: ReactNode; // Leading column next to the scroll surface of a `screenForm` (wizard step navigation).
|
|
679
683
|
};
|
|
680
684
|
type GridCellProps = { // Span wrapper for a child within a grid.
|
|
681
685
|
span?: number;
|
|
682
686
|
width?: FieldCellWidth; // Only read inside a `flow` grid.
|
|
687
|
+
hideOnNarrow?: boolean; // Hidden below the `sm` breakpoint.
|
|
683
688
|
children: ReactNode;
|
|
684
689
|
};
|
|
685
690
|
type GridProps = { // Column-based layout.
|
|
@@ -691,6 +696,7 @@ type GridProps = { // Column-based layout.
|
|
|
691
696
|
list?: boolean; // One full-width row per child, separated by hairlines — the field rows of a `settings-list` section.
|
|
692
697
|
ariaLabelledBy?: string; // Id of the element naming this grid (a Field label).
|
|
693
698
|
tight?: boolean; // With `columns: "auto"`: the small gap of a chip row instead of the tile gap.
|
|
699
|
+
facts?: boolean; // Read-only label/value facts: a true `columns`-wide grid with a tight gap, at most 2 columns below `sm`.
|
|
694
700
|
};
|
|
695
701
|
type HeaderActionGroupProps = {
|
|
696
702
|
children: ReactNode;
|
|
@@ -1363,6 +1369,12 @@ type RenderEditProps<TValues extends FormValues, TCtx = unknown> = {
|
|
|
1363
1369
|
valueDisplay?: "form" | "text"; // "form" (default) — every field renders as its Input widget, disabled when `field.readOnly`, unchanged behavior.
|
|
1364
1370
|
hideSectionTitles?: boolean; // Suppresses every section's own title (fields-section header, relatedList Section title) AND the form's own top-level title/subtitle — for a host that already renders that label itself elsewhere (e.g. a tab strip whose label duplicates it, or a page-level header above RenderEdit).
|
|
1365
1371
|
activeTabId?: string; // Id of the active tab of a tabbed projectionDetail; handed to the `afterForm` slot.
|
|
1372
|
+
recordSections?: {
|
|
1373
|
+
labelTitles?: true; // Section titles render as small uppercase labels without separators.
|
|
1374
|
+
omitFirstTitle?: true; // The first section's title is the tab label right above it and is left out.
|
|
1375
|
+
pageNavigation?: false; // `false` leaves out the "On this page" navigation.
|
|
1376
|
+
photosBeside?: true; // Fields sections and the photo-grid relatedList sit side by side from `lg` up.
|
|
1377
|
+
}; // Record-view look of a projectionDetail; each key is opt-in.
|
|
1366
1378
|
fillScreenHeight?: boolean; // Screen body fills the shell height: the form gets `fillHeight` and `stickyActions` (sections scroll, footer pinned).
|
|
1367
1379
|
leadContent?: ReactNode; // Rendered first inside the form, above the sections, in the same column and rhythm — for content that belongs to the form but is no field (e.g. the secret a confirm step refers to).
|
|
1368
1380
|
submitBlocked?: boolean; // Blocks submit (button and Enter) while fields stay editable — unlike `disabled`, which locks the whole form.
|
|
@@ -1439,6 +1451,8 @@ type RenderListProps = DataTableTableBlockProps & {
|
|
|
1439
1451
|
onDateRangeChange?: (field: string, bound: "from" | "to", value: string) => void; // One bound changed (set URL state + refetch).
|
|
1440
1452
|
chromeless?: boolean; // Forwarded to `DataTableProps.chromeless` — drops the table's own card frame for a host that already provides one (relatedList in a tabs-mode section).
|
|
1441
1453
|
scrollBody?: boolean; // Forwarded to `DataTableProps.scrollBody` — bounds the table height and scrolls rows internally instead of growing the page (relatedList in a tabs-mode section).
|
|
1454
|
+
hideCountFooter?: boolean; // Forwarded to `DataTableProps.hideCountFooter` (relatedList: the tab label already says how many).
|
|
1455
|
+
plainPhoneCards?: boolean; // Forwarded to `DataTableProps.plainPhoneCards` (relatedList: a history reads as a plain feed on the phone).
|
|
1442
1456
|
screenPadding?: boolean; // Forwarded to `DataTableProps.screenPadding` — `true`: the table carries the shared screen padding because it is the screen body (entityList/ projectionList).
|
|
1443
1457
|
expandedRowIds?: ReadonlySet<string>; // Forwarded to `DataTableProps.expandedRowIds` / `onToggleRowExpanded` / `renderExpandedRow` (entityList `expandableRow`).
|
|
1444
1458
|
onToggleRowExpanded?: (rowId: string) => void;
|
|
@@ -1465,6 +1479,12 @@ type SectionProps = { // Titled group of fields.
|
|
|
1465
1479
|
actions?: ReactNode; // Rendered top-right in the title row — never a footer.
|
|
1466
1480
|
layout?: "stacked" | "settings-list"; // "settings-list": title + subtitle form a left header column and the children (field rows) the right one on `md:` and up.
|
|
1467
1481
|
variant?: "default" | "destructive"; // "destructive" marks the Section as a warning/danger area (e.g. account deletion, restrict processing) — border color only, no content change.
|
|
1482
|
+
titleStyle?: "heading" | "label"; // "label": the title is a small uppercase muted label and the section has no separator line above it.
|
|
1483
|
+
hint?: {
|
|
1484
|
+
text: string;
|
|
1485
|
+
textNarrow?: string;
|
|
1486
|
+
testId: string;
|
|
1487
|
+
}; // Small muted note under the section content on `sm` and up, above it on a phone.
|
|
1468
1488
|
testId?: string;
|
|
1469
1489
|
icon?: IconKey; // Rendered left of the title, `text-muted-foreground`, same optical size as the title.
|
|
1470
1490
|
};
|
|
@@ -1621,6 +1641,8 @@ interface TextFieldProps extends FieldBase {
|
|
|
1621
1641
|
type TextProps = { // Semantic text.
|
|
1622
1642
|
variant?: "body" | "small" | "code" | "required-mark" | "muted";
|
|
1623
1643
|
decorative?: boolean; // Pure ornament (e.g. a separator glyph): hidden from assistive tech.
|
|
1644
|
+
concealed?: boolean; // A value the viewer may not see: drawn muted with a lock icon before it.
|
|
1645
|
+
narrow?: string; // Phone wording: `children` show from `sm` up, this text below it.
|
|
1624
1646
|
children: ReactNode;
|
|
1625
1647
|
testId?: string;
|
|
1626
1648
|
};
|