@cosmicdrift/kumiko-types 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/dist/action-icon.d.ts +1 -1
- package/dist/action-icon.js +2 -0
- package/dist/config.d.ts +4 -0
- package/dist/handler-context-facets.d.ts +5 -0
- package/dist/screen-custom-config.d.ts +3 -0
- package/dist/screen-dashboard.d.ts +10 -1
- package/dist/screen-entity-edit.d.ts +52 -7
- package/dist/screen-entity-list.d.ts +31 -8
- package/dist/screen-projection.d.ts +19 -5
- package/dist/screen-record-guidance.d.ts +2 -0
- package/dist/screen.d.ts +4 -4
- package/package.json +1 -1
package/dist/action-icon.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { IconKey } from "./nav-icon.ts";
|
|
2
2
|
export declare const ACTION_ICON_BY_ID: Readonly<Partial<Record<string, IconKey>>>;
|
|
3
|
-
export declare function resolveActionIcon(id: string, declared?: IconKey): IconKey | undefined;
|
|
3
|
+
export declare function resolveActionIcon(id: string, declared?: IconKey | false): IconKey | undefined;
|
package/dist/action-icon.js
CHANGED
|
@@ -43,6 +43,8 @@ function kebabFirstSegment(id) {
|
|
|
43
43
|
// segment). `declared` is `undefined` for ToolbarAction, which has no
|
|
44
44
|
// author-facing icon field.
|
|
45
45
|
export function resolveActionIcon(id, declared) {
|
|
46
|
+
if (declared === false)
|
|
47
|
+
return undefined;
|
|
46
48
|
if (declared !== undefined)
|
|
47
49
|
return declared;
|
|
48
50
|
return (ACTION_ICON_BY_ID[id] ??
|
package/dist/config.d.ts
CHANGED
|
@@ -85,6 +85,10 @@ export type ConfigMask = {
|
|
|
85
85
|
readonly order?: number;
|
|
86
86
|
/** Shows the value on the generated settings screen without an input; a read-only key cannot also be `required`. */
|
|
87
87
|
readonly readOnly?: boolean;
|
|
88
|
+
/** Draws the generated settings screen of this key compact (like `configEdit` `compact: true`: no origin icon or reset link, no accent bar, large section labels, no name-derived field icons). One key per screen is enough. */
|
|
89
|
+
readonly compact?: true;
|
|
90
|
+
/** i18n key of a section title: keys sharing it form their own titled section on the generated settings screen, after the untitled-by-mask keys. */
|
|
91
|
+
readonly section?: string;
|
|
88
92
|
};
|
|
89
93
|
export type ConfigDefinition = {
|
|
90
94
|
readonly keys: Readonly<Record<string, ConfigKeyDefinition>>;
|
|
@@ -46,6 +46,11 @@ export type HandlerEvents<TMap extends object = KumikoEventTypeMap> = {
|
|
|
46
46
|
readonly asOf?: never;
|
|
47
47
|
readonly includeArchived?: boolean;
|
|
48
48
|
}) => Promise<readonly import("./event-store-types.ts").StoredEvent[]>;
|
|
49
|
+
readonly loadByTypes: (args: {
|
|
50
|
+
readonly aggregateIds: readonly string[];
|
|
51
|
+
readonly eventTypes: readonly string[];
|
|
52
|
+
readonly includeArchived?: boolean;
|
|
53
|
+
}) => Promise<readonly import("./event-store-types.ts").StoredEvent[]>;
|
|
49
54
|
readonly archive: (aggregateId: string, args: {
|
|
50
55
|
readonly aggregateType: string;
|
|
51
56
|
readonly reason?: string;
|
|
@@ -101,6 +101,9 @@ export type ConfigEditScreenDefinition = {
|
|
|
101
101
|
readonly requiredFields?: readonly string[];
|
|
102
102
|
/** i18n key for the submit button. Default: "kumiko.actions.save". */
|
|
103
103
|
readonly submitLabel?: string;
|
|
104
|
+
/** Compact rows: no origin icon, no reset link, no accent bar on changed fields; the form
|
|
105
|
+
* column is capped to a readable width. */
|
|
106
|
+
readonly compact?: true;
|
|
104
107
|
/** Handler buttons drawn as their own row after `afterField` (settings-list layout). */
|
|
105
108
|
readonly actions?: readonly ConfigEditAction[];
|
|
106
109
|
readonly slots?: ScreenSlots;
|
|
@@ -91,6 +91,8 @@ export type DashboardStatPanel = DashboardPanelQueryOptions & DashboardPanelGate
|
|
|
91
91
|
readonly labelField?: string;
|
|
92
92
|
/** i18n key shown instead of the label in the one-line phone strip of a titled stat-group ("2 requests"). Only used for stats inside a stat-group. */
|
|
93
93
|
readonly narrowLabel?: string;
|
|
94
|
+
/** i18n key replacing `label` below the `sm` breakpoint wherever the stat draws its label (a dynamic `labelField` text still wins). */
|
|
95
|
+
readonly labelNarrow?: string;
|
|
94
96
|
readonly subField?: string;
|
|
95
97
|
readonly toneField?: string;
|
|
96
98
|
/** Formats a numeric value as currency (minor units) or, with `relativeTime`, as
|
|
@@ -264,7 +266,8 @@ export type DashboardListNarrow = {
|
|
|
264
266
|
};
|
|
265
267
|
/** Link to a screen from a panel; `label` is an i18n key, `namedFilter` only for list screens. */
|
|
266
268
|
export type DashboardListFooterLink = {
|
|
267
|
-
|
|
269
|
+
/** i18n key of the link text. Without it the footer shows only the `moreText` count as muted text, no link; `screen` still has to resolve. */
|
|
270
|
+
readonly label?: string;
|
|
268
271
|
/** i18n key of the text before the link when more rows exist than shown; `{count}` is the rest. Default "k more". */
|
|
269
272
|
readonly moreText?: string;
|
|
270
273
|
/** i18n key used instead of `moreText` below `sm`. */
|
|
@@ -312,12 +315,18 @@ export type DashboardFeedPanel = DashboardPanelQueryOptions & DashboardPanelEmpt
|
|
|
312
315
|
readonly id: string;
|
|
313
316
|
readonly label: string;
|
|
314
317
|
readonly query: string;
|
|
318
|
+
/** 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. `text` is an i18n key with `{shown}` and `{total}`; without it "{shown} of {total}". */
|
|
319
|
+
readonly showTotal?: true | Pick<DashboardListShowTotal, "text">;
|
|
315
320
|
};
|
|
316
321
|
export type DashboardProgressTone = "default" | "danger";
|
|
317
322
|
export type DashboardProgressListPanel = DashboardPanelQueryOptions & DashboardPanelEmptyState & DashboardPanelGate & DashboardPanelNarrow & {
|
|
318
323
|
readonly kind: "progress-list";
|
|
319
324
|
readonly id: string;
|
|
320
325
|
readonly label: string;
|
|
326
|
+
/** 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" }`. Until the answer arrives the placeholders are empty. */
|
|
327
|
+
readonly labelParams?: Readonly<Record<string, string>>;
|
|
328
|
+
/** Top-level answer field holding a text shown muted at the right end of the panel head, e.g. the period ("November"). */
|
|
329
|
+
readonly subtitleField?: string;
|
|
321
330
|
readonly query: string;
|
|
322
331
|
};
|
|
323
332
|
export type DashboardCustomPanel = DashboardPanelNarrow & {
|
|
@@ -51,6 +51,17 @@ export type EditFieldSpec = string | {
|
|
|
51
51
|
* the field to its value. The values come from another field of the same form that
|
|
52
52
|
* holds an array of numbers (e.g. hidden and `submit: false`, seeded by prefill). */
|
|
53
53
|
readonly valueChips?: FieldValueChips;
|
|
54
|
+
/** Read-only display of a value the viewer may not see: the value (or the mask the query
|
|
55
|
+
* returns) shows muted with a lock icon instead of a replacement text. */
|
|
56
|
+
readonly concealed?: true;
|
|
57
|
+
/** Pill next to the label, e.g. "price source open" in `warn`. `label` is an i18n key; `field` names a
|
|
58
|
+
* value field of the form or record whose non-empty text is the pill text (no text: no pill). */
|
|
59
|
+
readonly badge?: FieldBadge;
|
|
60
|
+
/** Value field whose non-empty text shows as a muted small hint under the field
|
|
61
|
+
* (e.g. "From the buyer: Skoda Octavia"). */
|
|
62
|
+
readonly hintField?: string;
|
|
63
|
+
/** Leaves the field out below `sm`; its value is still submitted. */
|
|
64
|
+
readonly hideOnNarrow?: true;
|
|
54
65
|
/** Marks this field as a reference lookup instead of a plain value —
|
|
55
66
|
* for projectionDetail fields, which have no `EntityDefinition` to
|
|
56
67
|
* carry a real `reference` field type. Same target convention as
|
|
@@ -73,6 +84,14 @@ export type EditFieldSpec = string | {
|
|
|
73
84
|
* field `default`, it is not applied server-side. */
|
|
74
85
|
readonly prefill?: EditFieldPrefill;
|
|
75
86
|
};
|
|
87
|
+
/** Pill next to a field label: a fixed i18n `label`, or the text of another value `field`. */
|
|
88
|
+
export type FieldBadge = {
|
|
89
|
+
readonly label: string;
|
|
90
|
+
readonly tone: SelectOptionTone;
|
|
91
|
+
} | {
|
|
92
|
+
readonly field: string;
|
|
93
|
+
readonly tone: SelectOptionTone;
|
|
94
|
+
};
|
|
76
95
|
export type FieldAffix = string | {
|
|
77
96
|
readonly field: string;
|
|
78
97
|
};
|
|
@@ -138,8 +157,21 @@ export type EditFieldPrefill = {
|
|
|
138
157
|
readonly kind: "currentUser";
|
|
139
158
|
readonly property: "displayName" | "email" | "id";
|
|
140
159
|
};
|
|
160
|
+
/** Presentation options every section kind of a projectionDetail takes. */
|
|
161
|
+
export type EditSectionPresentation = {
|
|
162
|
+
/** i18n key of the tab name when the layout is in tabs mode; the section `title` stays the card heading. Without it the tab is named after the title of the first section with that tab id. */
|
|
163
|
+
readonly tabLabel?: string;
|
|
164
|
+
/** Component drawn directly under this section's card, in its column (also beside photos); same `{ react: { __component } }` form as `slots.afterForm`, receiving the same props. */
|
|
165
|
+
readonly after?: PlatformComponent;
|
|
166
|
+
/** Leaves the section out below `sm`. Exclusive with `showOnNarrowOnly`. */
|
|
167
|
+
readonly hideOnNarrow?: true;
|
|
168
|
+
/** Shows the section only below `sm` (e.g. a compact facts block for phones). */
|
|
169
|
+
readonly showOnNarrowOnly?: true;
|
|
170
|
+
/** `false` leaves the section title out below `sm` (phone); the title stays from `sm` up. */
|
|
171
|
+
readonly titleOnNarrow?: false;
|
|
172
|
+
};
|
|
141
173
|
export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection | EditStepListSection;
|
|
142
|
-
type EditFieldsSectionBase = {
|
|
174
|
+
type EditFieldsSectionBase = EditSectionPresentation & {
|
|
143
175
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
144
176
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
145
177
|
readonly id?: string;
|
|
@@ -158,6 +190,8 @@ type EditFieldsSectionBase = {
|
|
|
158
190
|
* `subtitle` slot as `FormProps.subtitle`. Works without `title` too
|
|
159
191
|
* (subtitle-only section). */
|
|
160
192
|
readonly description?: string;
|
|
193
|
+
/** i18n key of a short text shown instead of `description` below `sm`. */
|
|
194
|
+
readonly descriptionNarrow?: string;
|
|
161
195
|
readonly columns?: number;
|
|
162
196
|
/** Rendered left of the section title, `text-muted-foreground` — closed
|
|
163
197
|
* IconKey vocabulary into the ICONS registry (renderer/web), analogous
|
|
@@ -186,7 +220,8 @@ type EditFieldsSectionBase = {
|
|
|
186
220
|
export type EditFieldGroup = {
|
|
187
221
|
readonly title: string;
|
|
188
222
|
readonly fields: readonly EditFieldSpec[];
|
|
189
|
-
/**
|
|
223
|
+
/** Edit mode renders 2 columns by default. In read mode only a declared value turns the group
|
|
224
|
+
* into a label/value grid; without it the stacked layout stays. */
|
|
190
225
|
readonly columns?: number;
|
|
191
226
|
};
|
|
192
227
|
/** Either a flat `fields` grid or titled `groups` cards, never both: the groups branch has no
|
|
@@ -208,7 +243,7 @@ export type StepListItem = {
|
|
|
208
243
|
/** Vertical numbered step list (circles joined by a line), fed from one field of the detail
|
|
209
244
|
* query. Only supported on projectionDetail. Several sections sharing one `id` stack inside one
|
|
210
245
|
* tab, e.g. fields, relatedList and stepList under "Overview". */
|
|
211
|
-
export type EditStepListSection = {
|
|
246
|
+
export type EditStepListSection = EditSectionPresentation & {
|
|
212
247
|
readonly id?: string;
|
|
213
248
|
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
214
249
|
readonly kind: "stepList";
|
|
@@ -218,7 +253,7 @@ export type EditStepListSection = {
|
|
|
218
253
|
/** Present only so section-actions readers accept the union; a step list has no title-row actions. */
|
|
219
254
|
readonly actions?: undefined;
|
|
220
255
|
};
|
|
221
|
-
export type EditExtensionSection = {
|
|
256
|
+
export type EditExtensionSection = EditSectionPresentation & {
|
|
222
257
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
223
258
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
224
259
|
readonly id?: string;
|
|
@@ -278,7 +313,7 @@ export type ListEmptyStateSpec = {
|
|
|
278
313
|
readonly description?: string;
|
|
279
314
|
readonly action?: RowAction;
|
|
280
315
|
};
|
|
281
|
-
export type EditRelatedListSection = {
|
|
316
|
+
export type EditRelatedListSection = EditSectionPresentation & {
|
|
282
317
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
283
318
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
284
319
|
readonly id?: string;
|
|
@@ -401,8 +436,12 @@ export type EditRelatedListSection = {
|
|
|
401
436
|
readonly photoGrid?: {
|
|
402
437
|
/** Row field holding a FileRef id (or an id array, the first shows). */
|
|
403
438
|
readonly imageField: string;
|
|
404
|
-
/** Row field printed under the image. */
|
|
439
|
+
/** Row field printed under the image; without it the tile reads "Photo n". */
|
|
405
440
|
readonly captionField?: string;
|
|
441
|
+
/** Row field whose non-empty text shows as a warn badge on the image's top left. */
|
|
442
|
+
readonly badgeField?: string;
|
|
443
|
+
/** On a phone (below `sm`) tiles whose `badgeField` has text come first, the rest keep their order; from `sm` up the natural order stays. */
|
|
444
|
+
readonly badgeFirst?: true;
|
|
406
445
|
};
|
|
407
446
|
};
|
|
408
447
|
/** Empty-state text for one parent-record state, e.g. "still running" vs. "finished without rows". */
|
|
@@ -416,7 +455,7 @@ export type RelatedListEmptyStateVariant = {
|
|
|
416
455
|
export type RelatedListEmptyStateSpec = ListEmptyStateSpec & {
|
|
417
456
|
readonly variants?: readonly RelatedListEmptyStateVariant[];
|
|
418
457
|
};
|
|
419
|
-
export type EditWriteFormSection = {
|
|
458
|
+
export type EditWriteFormSection = EditSectionPresentation & {
|
|
420
459
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
421
460
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
422
461
|
readonly id?: string;
|
|
@@ -427,6 +466,8 @@ export type EditWriteFormSection = {
|
|
|
427
466
|
readonly kind: "writeForm";
|
|
428
467
|
readonly title?: string;
|
|
429
468
|
readonly description?: string;
|
|
469
|
+
/** i18n key of a short text shown instead of `description` below `sm`. */
|
|
470
|
+
readonly descriptionNarrow?: string;
|
|
430
471
|
readonly columns?: number;
|
|
431
472
|
readonly icon?: IconKey;
|
|
432
473
|
/** Field-type map for this section's own form — same shape as
|
|
@@ -445,6 +486,8 @@ export type EditWriteFormSection = {
|
|
|
445
486
|
readonly handler: string;
|
|
446
487
|
/** i18n-key for the submit button. Default: "kumiko.actions.save". */
|
|
447
488
|
readonly submitLabel?: string;
|
|
489
|
+
/** Id of a writeHandler action in the screen's `actions`. The section then has no submit button of its own: the action sends its own payload plus this form's current values in one write to the action's handler, after the form validated (an invalid form sends nothing). A form field named like a payload key of the action is rejected at boot; `handler` is not dispatched. */
|
|
490
|
+
readonly submitWith?: string;
|
|
448
491
|
/** Rendered top-right in the section's Card title row — same
|
|
449
492
|
* navigate/drawer/writeHandler dispatch as `ProjectionDetailScreenDefinition.actions`,
|
|
450
493
|
* evaluated against the same record. Every action must resolve an icon
|
|
@@ -466,6 +509,8 @@ export type EditLayout = {
|
|
|
466
509
|
* boot-validator rejects it on entityEdit, see the check for the reason);
|
|
467
510
|
* requires >= 2 sections, each with a title and an `id`. */
|
|
468
511
|
readonly mode?: "single" | "wizard" | "tabs";
|
|
512
|
+
/** `false` (tabs mode): below `sm` there is no tab strip, the visible sections of every tab stand one under the other. */
|
|
513
|
+
readonly narrowTabs?: false;
|
|
469
514
|
/** "settings-list" lays each section out as a band with a title column on
|
|
470
515
|
* the left and one hairline-separated row per field (label + help left,
|
|
471
516
|
* control right) — the familiar settings pattern, for screens that are a
|
|
@@ -50,17 +50,34 @@ export type ListColumnSpec = string | {
|
|
|
50
50
|
* header with tabular figures, like an entityList column of that field
|
|
51
51
|
* type. Ignored on entityList columns, where the field's own type wins. */
|
|
52
52
|
readonly valueType?: "number" | "decimal" | "bigInt" | "money";
|
|
53
|
-
/**
|
|
54
|
-
readonly emptyPlaceholder?: false;
|
|
53
|
+
/** An empty cell stays blank by default; a string (i18n key or literal) is shown muted in its place, e.g. "No vehicle". Not combinable with `hint`, whose empty sentence is `hint.emptyLabel`. */
|
|
54
|
+
readonly emptyPlaceholder?: string | false;
|
|
55
55
|
/** Leaves the column out of the compact card layout used below the
|
|
56
|
-
* `md` breakpoint (
|
|
56
|
+
* `md` breakpoint (phone viewport). For columns that only make sense
|
|
57
57
|
* next to the others, like a sort key. */
|
|
58
58
|
readonly hideOnNarrow?: boolean;
|
|
59
|
+
/** Leaves the column out of a table whose container is narrower than `md` (docked assistant panel); the viewport is not looked at,
|
|
60
|
+
* so the phone card still shows it. */
|
|
61
|
+
readonly hideWhenDocked?: true;
|
|
59
62
|
/** Counterpart of `hideOnNarrow`: the column shows only in the compact card layout and not in the table.
|
|
60
63
|
* Not combinable with `hideOnNarrow`, `hidden` or `pinned`. */
|
|
61
64
|
readonly showOnNarrowOnly?: true;
|
|
62
65
|
/** In the compact card, consecutive `narrowInline` columns stand side by side on one line (12px gap, no separator) instead of one line each. */
|
|
63
66
|
readonly narrowInline?: true;
|
|
67
|
+
/** One line with a trailing ellipsis in the table; the full text is the cell's `title`. */
|
|
68
|
+
readonly ellipsis?: true;
|
|
69
|
+
/** 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). */
|
|
70
|
+
readonly multiline?: true;
|
|
71
|
+
/** Phone card: the column's line stands above the title (muted, e.g. "date, channel") instead of below it. Consecutive `narrowInline` columns share the line. */
|
|
72
|
+
readonly cardAbove?: true;
|
|
73
|
+
/** Cell text in medium weight and foreground colour, like the title column of a board. */
|
|
74
|
+
readonly emphasis?: true;
|
|
75
|
+
/** `"muted"` draws every cell of the column in the muted text colour (e.g. a free-text message beside primary columns). */
|
|
76
|
+
readonly tone?: "muted";
|
|
77
|
+
/** 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). Without one the first select column is the badge. */
|
|
78
|
+
readonly cardBadge?: true;
|
|
79
|
+
/** Timestamp or relativeTime column: a value older than this many days shows the date only, without the time. */
|
|
80
|
+
readonly dateOnlyAfterDays?: number;
|
|
64
81
|
/** Start state for the column picker: the column begins hidden and the
|
|
65
82
|
* user can show it. Only valid together with `table.columnPicker`. */
|
|
66
83
|
readonly hidden?: boolean;
|
|
@@ -83,10 +100,12 @@ export type ListColumnSpec = string | {
|
|
|
83
100
|
readonly display?: ListColumnDisplay;
|
|
84
101
|
/** `"primary"` draws a `display: "button"` link as a filled primary button instead of the outline default (dashboard list panels only). Needs `display: "button"`. */
|
|
85
102
|
readonly variant?: "primary";
|
|
86
|
-
/** Row field naming the badge tone; only with `display: "badge"`. */
|
|
103
|
+
/** Row field naming the badge tone: a `ListBadgeTone` word or a `SelectOptionTone` word (`ok`, `bad`, `critical`, `accent`); only with `display: "badge"`. */
|
|
87
104
|
readonly badgeToneField?: string;
|
|
88
105
|
/** `false` draws the badge pill without its leading dot; only with `display: "badge"`. */
|
|
89
106
|
readonly badgeDot?: false;
|
|
107
|
+
/** `"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"`. */
|
|
108
|
+
readonly badgeIcon?: "sparkles";
|
|
90
109
|
/** Row field holding a second label, drawn as a pill next to the cell's own value
|
|
91
110
|
* (e.g. a vehicle name with a "free" pill). Not combinable with `display` or `hint`. */
|
|
92
111
|
readonly pillField?: string;
|
|
@@ -156,9 +175,10 @@ export type RowFieldExtractor = {
|
|
|
156
175
|
* `"link"` without one). `"responsive"` is a `"button"` with icon and label
|
|
157
176
|
* from tablet width up and an icon-only button below it, the label staying the
|
|
158
177
|
* accessible name (needs a resolved icon, falls back to `"button"` without
|
|
159
|
-
* one).
|
|
178
|
+
* one). `"text"` is a closed state without an action: muted text, not
|
|
179
|
+
* clickable (the row click still applies). Unset: the renderer decides (primary action as link, the rest in the
|
|
160
180
|
* kebab menu). */
|
|
161
|
-
export type RowActionDisplay = "button" | "link" | "icon" | "responsive";
|
|
181
|
+
export type RowActionDisplay = "button" | "link" | "icon" | "responsive" | "text";
|
|
162
182
|
/** Row-action column layout. `"adaptive"` (default): primary action as link,
|
|
163
183
|
* the rest in a kebab menu — except actions with an explicit `display`, which
|
|
164
184
|
* stay inline. `"inline"`: every action inline, no kebab. `"menu"`: every
|
|
@@ -250,8 +270,9 @@ export type RowActionNavigateBase = {
|
|
|
250
270
|
readonly rowClick?: boolean;
|
|
251
271
|
/** Overrides the id-based default icon (see ACTION_ICON_BY_ID in
|
|
252
272
|
* kumiko-renderer) — closed IconKey vocabulary into the ICONS registry
|
|
253
|
-
* (renderer/web), analogous to EditFieldSpec.icon.
|
|
254
|
-
|
|
273
|
+
* (renderer/web), analogous to EditFieldSpec.icon. `false` draws no icon at all, not even the
|
|
274
|
+
* id-derived default (a plain text button). */
|
|
275
|
+
readonly icon?: IconKey | false;
|
|
255
276
|
/** Inline render form in the row-action column — see `RowActionDisplay`. */
|
|
256
277
|
readonly display?: RowActionDisplay;
|
|
257
278
|
};
|
|
@@ -473,6 +494,8 @@ export type EntityListScreenDefinition = {
|
|
|
473
494
|
readonly columns: readonly ListColumnSpec[];
|
|
474
495
|
/** Row field holding a SelectOptionTone; the row is toned like relatedList `rowTone`, other values leave it untoned. */
|
|
475
496
|
readonly rowToneField?: string;
|
|
497
|
+
/** Row field (boolean): a row with a true value is drawn entirely in the muted text colour. */
|
|
498
|
+
readonly mutedRowField?: string;
|
|
476
499
|
/** 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. */
|
|
477
500
|
readonly rowDecoration?: ListRowDecoration;
|
|
478
501
|
readonly rowRenderer?: PlatformComponent;
|
|
@@ -5,7 +5,7 @@ import type { NamedFilterFacetOptions, NamedListFilterRef } from "./named-list-f
|
|
|
5
5
|
import type { NavIconKey } from "./nav-icon.ts";
|
|
6
6
|
import type { FormatSpec, PlatformComponent, ScreenNavSugar, ScreenSlots } from "./screen.ts";
|
|
7
7
|
import type { DashboardStatTone, ScreenVisibility } from "./screen-dashboard.ts";
|
|
8
|
-
import type { EditLayout, ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
8
|
+
import type { EditLayout, EntityEditAction, ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
9
9
|
import type { ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortOption, ListSortSpec, RowAction, RowActionMode, RowFieldExtractor, ScreenFilter, ToolbarAction } from "./screen-entity-list.ts";
|
|
10
10
|
import type { ScreenFallback } from "./screen-fallback.ts";
|
|
11
11
|
import type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
@@ -81,6 +81,8 @@ export type ProjectionListScreenDefinition = {
|
|
|
81
81
|
readonly columns: readonly ListColumnSpec[];
|
|
82
82
|
/** Row field holding a SelectOptionTone; the row is toned like relatedList `rowTone`, other values leave it untoned. */
|
|
83
83
|
readonly rowToneField?: string;
|
|
84
|
+
/** Row field (boolean): a row with a true value is drawn entirely in the muted text colour. */
|
|
85
|
+
readonly mutedRowField?: string;
|
|
84
86
|
/** Computed row fields from an app query, merged into the query rows; see `ListRowDecoration`. */
|
|
85
87
|
readonly rowDecoration?: ListRowDecoration;
|
|
86
88
|
readonly rowRenderer?: PlatformComponent;
|
|
@@ -159,6 +161,8 @@ export type RecordHeaderSpec = {
|
|
|
159
161
|
readonly subtitle?: string | readonly RecordHeaderSubtitlePart[];
|
|
160
162
|
/** Field holding a plain-text subtitle shown instead of `subtitle` below `sm` (e.g. "Main St 12, Berlin · 3 rooms"). */
|
|
161
163
|
readonly narrowSubtitle?: string;
|
|
164
|
+
/** i18n key of a short title for the phone top bar ("Approval") instead of the record title. */
|
|
165
|
+
readonly narrowTitle?: string;
|
|
162
166
|
readonly status?: string;
|
|
163
167
|
/** Formats the badge text (typically `enumOption` with a `keyPrefix`); tones still resolve on the raw value. Needs `status`. Without it, the `status` field's layout renderer is used when it is `enumOption` or `i18nText`. */
|
|
164
168
|
readonly statusFormat?: FormatSpec;
|
|
@@ -205,6 +209,8 @@ export type MetricSpec = {
|
|
|
205
209
|
readonly icon?: NavIconKey;
|
|
206
210
|
/** Formats the displayed value (e.g. `date`, `enumOption`); the tone still resolves on the raw value. */
|
|
207
211
|
readonly format?: FormatSpec;
|
|
212
|
+
/** Shows the metric only while the loaded record matches; same `{ field, eq | ne | in | notIn }` syntax as a section's `visibleWhen`. `field` must be an output field of the detail query. */
|
|
213
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
208
214
|
};
|
|
209
215
|
export type ProjectionDetailScreenDefinition = {
|
|
210
216
|
readonly id: string;
|
|
@@ -262,10 +268,16 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
262
268
|
readonly metrics?: readonly MetricSpec[];
|
|
263
269
|
/** "tiles" draws the metrics as the dashboard KPI tiles (StatCard) instead of the plain band. */
|
|
264
270
|
readonly metricsStyle?: "band" | "tiles";
|
|
265
|
-
/** `narrow: "after-guidance"` moves the metrics below the summary, banner and steps
|
|
271
|
+
/** 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. Works with the page header and the head card; only the metric tiles move, the subtitle and status line stay under the title. */
|
|
266
272
|
readonly metricsPlacement?: {
|
|
267
|
-
readonly narrow?: "after-guidance";
|
|
273
|
+
readonly narrow?: "after-guidance" | "before-steps";
|
|
268
274
|
};
|
|
275
|
+
/** Record field holding one line of text shown instead of the metrics below `sm`. The metrics stay on larger screens; an empty value keeps them on phones too. */
|
|
276
|
+
readonly mobileSummary?: string;
|
|
277
|
+
/** `false` leaves out the "On this page" navigation of a stacked (non-tabs) layout. */
|
|
278
|
+
readonly pageNavigation?: false;
|
|
279
|
+
/** A tab holding fields sections and a relatedList with `photoGrid` shows the fields left and the photos right from `lg` up. */
|
|
280
|
+
readonly photosBeside?: true;
|
|
269
281
|
/** Path above the header (query column holding items). */
|
|
270
282
|
readonly breadcrumb?: RecordBreadcrumbSpec;
|
|
271
283
|
/** One emphasized sentence below the header. */
|
|
@@ -284,8 +296,10 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
284
296
|
* displayed record stands in for the "row", so `pick`/`map`, `visible`,
|
|
285
297
|
* `confirm`/`confirmLabel` and `style` keep their meaning unchanged.
|
|
286
298
|
* `rowClick` has no target here (there is no row to click) and is
|
|
287
|
-
* rejected by the boot-validator.
|
|
288
|
-
|
|
299
|
+
* rejected by the boot-validator. `placement: "menu"` puts the action
|
|
300
|
+
* into the header "…" menu instead of a button (without a header menu it
|
|
301
|
+
* falls back to inline). */
|
|
302
|
+
readonly actions?: readonly EntityEditAction[];
|
|
289
303
|
/** Id of the action that stays the visible header button when the actions
|
|
290
304
|
* collapse into a menu (and the one that keeps the phone icon slot when it
|
|
291
305
|
* has an icon and no confirm). An `actions` id or `"edit"` (the default edit
|
|
@@ -61,6 +61,8 @@ export type RecordSummarySpec = {
|
|
|
61
61
|
export type RecordBannerSpec = {
|
|
62
62
|
/** Holds `RecordNotice | null`; null shows no banner. */
|
|
63
63
|
readonly field: string;
|
|
64
|
+
/** Draws the notice without the tone icon. */
|
|
65
|
+
readonly iconless?: true;
|
|
64
66
|
readonly actions?: readonly RecordGuidanceAction[];
|
|
65
67
|
};
|
|
66
68
|
export type RecordStepsSpec = {
|
package/dist/screen.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ export interface FieldFormatRegistry {
|
|
|
29
29
|
/** IANA zone id (e.g. "Europe/Berlin"). Default: the runtime's zone. */
|
|
30
30
|
readonly timeZone?: string;
|
|
31
31
|
};
|
|
32
|
-
/** Epoch ms or ISO timestamp, shown as "5
|
|
33
|
-
* `style: "short"
|
|
34
|
-
*
|
|
32
|
+
/** Epoch ms or ISO timestamp, shown as "5 min. ago" at render time (a table cell does not tick).
|
|
33
|
+
* Defaults: `style: "short"`, `withTime: true` (clock time on "yesterday" and on the absolute date; `false` leaves it out),
|
|
34
|
+
* `absoluteAfterDays: 7` (from then on the absolute date, "29 Oct 2026", replaces the relative text); under a minute reads "just now". */
|
|
35
35
|
relativeTime: {
|
|
36
36
|
readonly locale?: string;
|
|
37
37
|
readonly style?: "long" | "short" | "narrow";
|
|
@@ -135,7 +135,7 @@ export type { ActionFormFooterAction, ActionFormLoad, ActionFormRedirect, Action
|
|
|
135
135
|
export type { ConfigEditAction, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, SecretsEditScreenDefinition, SecretsEditSection, } from "./screen-custom-config.ts";
|
|
136
136
|
export type { DashboardChartKind, DashboardChartMarkerKind, DashboardChartPanel, DashboardChartRangeOption, DashboardChartRanges, DashboardChartTone, DashboardCurrencyFormat, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardLayout, DashboardListFooterLink, DashboardListNarrow, DashboardListPanel, DashboardListRowLink, DashboardListRowToneMarker, DashboardMoneyParam, DashboardPanelColumn, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelGate, DashboardPanelNarrow, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardProgressTone, DashboardRecordBinding, DashboardRefresh, DashboardRelativeTimeFormat, DashboardRelativeTimeParam, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupLayout, DashboardStatGroupLink, DashboardStatGroupNarrow, DashboardStatGroupPanel, DashboardStatPanel, DashboardStatTone, DashboardText, DashboardTextBlock, DashboardTextPanel, DashboardTextParam, DashboardTimeRangeDefinition, DashboardValueFormat, ScreenVisibility, } from "./screen-dashboard.ts";
|
|
137
137
|
export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-dashboard.ts";
|
|
138
|
-
export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditStepListSection, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldAiAssist, FieldAiAssistChip, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } from "./screen-entity-edit.ts";
|
|
138
|
+
export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditStepListSection, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldAiAssist, FieldAiAssistChip, FieldBadge, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } from "./screen-entity-edit.ts";
|
|
139
139
|
export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.ts";
|
|
140
140
|
export type { EntityListFacetConfig, EntityListFacetExtraOption, EntityListScreenDefinition, ListBadgeTone, ListColumnDisplay, ListColumnHint, ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortDir, ListSortOption, ListSortSpec, RelatedListToolbarAction, RowAction, RowActionClientAction, RowActionDisplay, RowActionDrawer, RowActionMode, RowActionNavigate, RowActionNavigateBase, RowActionWriteHandler, RowFieldExtractor, ScreenFilter, ScreenFilterOp, ToolbarAction, } from "./screen-entity-list.ts";
|
|
141
141
|
export type { EntityListExpandableRow, ExpandableRowGrouping } from "./screen-expandable-row.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.417.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": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|